Negative Sigmoid Rule
Version: v3.0.0 Status: Normative (text), Illustrative (diagrams only) Scope: NEGATIVE_SIGMOID rule for flagging negative wells with invalid upward sigmoid patterns Domain: RULES-NEGSIGMOID
Statement
The system shall validate sigmoid curve patterns for wells with negative final classifications, flagging wells that exhibit upward sigmoid patterns (characteristic of positive amplification) as having invalid behavior.
The rule operates within the PCR analysis rules engine and assigns error codes at both well and target levels when a pattern inconsistency is detected. The rule can be bypassed when a user has applied a resolution code or manual classification, allowing acknowledged exceptions to pass without error.
Quick Reference
| ID | Core Behavior | Priority | Status |
|---|---|---|---|
| REQ-RULES-NEGSIGMOID-001 | Flags negative wells with upward sigmoid patterns | HIGH | Draft |
| REQ-RULES-NEGSIGMOID-002 | Skips validation when resolution code applied | HIGH | Draft |
| REQ-RULES-NEGSIGMOID-003 | Skips validation when manual classification present | HIGH | Draft |
Key Integration Points: Well Observation Data, Resolution Management, Error Reporting System
Rule Summary
| Property | Value |
|---|---|
| Name | NEGATIVE_SIGMOID |
| Triggers | When well has negative classification and upward sigmoid pattern |
| Output | Sets INCORRECT_NEGATIVE_SIGMOID error codes on well/target |
| Related | POSITIVE_SIGMOID (handles positive wells) |
Rule Flowchart (Illustrative)
This diagram illustrates the rule evaluation logic. It does not specify UI layout, styling, or interaction details.
Definitions
| Term | Definition |
|---|---|
| Sigmoid | S-shaped curve characteristic of PCR amplification patterns |
| Upward Sigmoid | Sigmoid curve rising from low to high values, typical of positive amplification |
| Downward Sigmoid | Sigmoid curve descending from high to low values, typical of negative wells |
| Final Classification | The final result classification assigned to a well (Positive or Negative) |
| Manual Classification | A classification override manually assigned by a user |
| Resolution Code | Code indicating user resolution/acknowledgment of a flagged error condition |
Assumptions
- Wells have been processed through the PCR analysis pipeline with sigmoid pattern detection
- Final classification has been determined before the Negative Sigmoid rule executes
- The rules engine provides access to well observation data including readings patterns
- Resolution codes and manual classifications are queryable from the well context
Requirements
Sigmoid Pattern Validation (REQ-RULES-NEGSIGMOID-001)
FR-NEGSIGMOID-001: Validate Negative Well Sigmoid Pattern
The system shall flag wells classified as negative that exhibit upward sigmoid curve patterns as having invalid sigmoid behavior by assigning error codes at both well and target levels.
Acceptance Criteria
Error Assignment Logic:
- When a well has readings with an upward sigmoid pattern AND final classification is negative, assign error code INCORRECT_NEGATIVE_SIGMOID to the well
- When a well has readings with an upward sigmoid pattern AND final classification is negative, assign error code INCORRECT_NEGATIVE_SIGMOID_TARGET to the target
Non-Triggering Conditions:
- When final classification is positive, do NOT assign any INCORRECT_NEGATIVE_SIGMOID error codes (regardless of sigmoid pattern)
- When sigmoid pattern is downward, do NOT assign any INCORRECT_NEGATIVE_SIGMOID error codes (regardless of classification)
Rule Identity:
- The rule shall be identified as NEGATIVE_SIGMOID within the rules engine
- The well-level error code shall be INCORRECT_NEGATIVE_SIGMOID
- The target-level error code shall be INCORRECT_NEGATIVE_SIGMOID_TARGET
- Positive wells are evaluated by a separate Positive Sigmoid rule, not this rule
Error Handling
- Missing readings pattern: Skip validation for this well
- Missing classification: Skip validation for this well
Trace: Source: 3.0.0-Negative Sigmoid Rule (Row 1, Cases 1-4) | Jira: BT-5014 | Tests: BT-5020, See scenarios | Related: REQ-RULES-POSSIGMOID-001
Rule Skip Conditions (REQ-RULES-NEGSIGMOID-002 & 003)
FR-NEGSIGMOID-002: Skip Rule When Resolution Code Applied
The system shall bypass the Negative Sigmoid rule validation when the well has resolution code NEGATIVE_SIGMOID applied.
Acceptance Criteria
Skip Behavior:
- Given conditions that would normally trigger the rule (upward sigmoid + negative classification), when resolution code NEGATIVE_SIGMOID is applied, do NOT assign error code INCORRECT_NEGATIVE_SIGMOID to the well
- Given conditions that would normally trigger the rule, when resolution code NEGATIVE_SIGMOID is applied, do NOT assign error code INCORRECT_NEGATIVE_SIGMOID_TARGET to the target
Resolution Code:
- The resolution code for this rule is NEGATIVE_SIGMOID
Trace: Source: 3.0.0-Negative Sigmoid Rule (Row 2) | Jira: BT-5014 | Tests: See scenarios
FR-NEGSIGMOID-003: Skip Rule When Manual Classification Present
The system shall bypass the Negative Sigmoid rule validation when the well has a manual classification assigned.
Acceptance Criteria
Skip Behavior:
- Given conditions that would normally trigger the rule (upward sigmoid + negative classification), when a manual classification is assigned, do NOT assign error code INCORRECT_NEGATIVE_SIGMOID to the well
- Given conditions that would normally trigger the rule, when a manual classification is assigned, do NOT assign error code INCORRECT_NEGATIVE_SIGMOID_TARGET to the target
Trace: Source: 3.0.0-Negative Sigmoid Rule (Row 3) | Jira: BT-5014 | Tests: See scenarios
Configuration Options
| Option | Default | Description | Affects |
|---|---|---|---|
| - | - | No configurable options identified | - |
[REVIEW REQUIRED: Verify if sigmoid detection thresholds or sensitivity parameters are configurable.]
Open Questions
| ID | Question | Source | Owner | Date Raised |
|---|---|---|---|---|
| OQ-001 | Are sigmoid detection thresholds or sensitivity parameters configurable? | Configuration Options | @tbd | 2026-01-23 |
Notes
- The Negative Sigmoid rule is part of the sigmoid rule separation effort (BT-5015 Epic) that split the original unified sigmoid validation into separate rules for positive and negative wells
- This separation provides targeted validation and clearer error attribution for each classification type
- The companion rule for positive wells is the Positive Sigmoid Rule (POSITIVE_SIGMOID)
- Rule operates at analytics engine level without direct UI presentation
Implementation (Illustrative)
| Component | Location |
|---|---|
| Rule Class | Analyzer/Rules/NegativeSigmoidRule.php |
| Sigmoid Identifier | Support/SigmoidIdentifier.php |
| Error Setter | Analyzer/Rules/Concerns/SetErrorToWell.php |
Traceability Matrix
| Requirement | Title | Verification | Implementation | Test Cases | Status |
|---|---|---|---|---|---|
| REQ-RULES-NEGSIGMOID-001 | Validate Negative Well Sigmoid Pattern | Test | NegativeSigmoidRule | NEGSIGMOID-001 through NEGSIGMOID-004 | Draft |
| REQ-RULES-NEGSIGMOID-002 | Skip Rule When Resolution Code Applied | Test | NegativeSigmoidRule | NEGSIGMOID-005 | Draft |
| REQ-RULES-NEGSIGMOID-003 | Skip Rule When Manual Classification Present | Test | NegativeSigmoidRule | NEGSIGMOID-006 | Draft |
Acceptance Tests
Test: REQ-RULES-NEGSIGMOID-001
Test NEGSIGMOID-001: Error for Upward Sigmoid with Negative Classification
Given: A well with readings exhibiting an upward sigmoid pattern
And: The well has final classification of Negative
When: The Negative Sigmoid rule is evaluated
Then: The system shall assign error code INCORRECT_NEGATIVE_SIGMOID to the well
And: The system shall assign error code INCORRECT_NEGATIVE_SIGMOID_TARGET to the target
Test NEGSIGMOID-002: No Error for Upward Sigmoid with Positive Classification
Given: A well with readings exhibiting an upward sigmoid pattern
And: The well has final classification of Positive
When: The Negative Sigmoid rule is evaluated
Then: The system shall NOT assign any INCORRECT_NEGATIVE_SIGMOID error codes
Test NEGSIGMOID-003: No Error for Downward Sigmoid with Negative Classification
Given: A well with readings exhibiting a downward sigmoid pattern
And: The well has final classification of Negative
When: The Negative Sigmoid rule is evaluated
Then: The system shall NOT assign any INCORRECT_NEGATIVE_SIGMOID error codes
Test NEGSIGMOID-004: No Error for Downward Sigmoid with Positive Classification
Given: A well with readings exhibiting a downward sigmoid pattern
And: The well has final classification of Positive
When: The Negative Sigmoid rule is evaluated
Then: The system shall NOT assign any INCORRECT_NEGATIVE_SIGMOID error codes
Test: REQ-RULES-NEGSIGMOID-002
Test NEGSIGMOID-005: Skip When Resolution Applied
Given: A well with readings exhibiting an upward sigmoid pattern
And: The well has final classification of Negative
And: Resolution code NEGATIVE_SIGMOID has been applied to the well
When: The Negative Sigmoid rule is evaluated
Then: The system shall NOT assign error code INCORRECT_NEGATIVE_SIGMOID to the well
And: The system shall NOT assign error code INCORRECT_NEGATIVE_SIGMOID_TARGET to the target
Test: REQ-RULES-NEGSIGMOID-003
Test NEGSIGMOID-006: Skip When Manual Classification Present
Given: A well with readings exhibiting an upward sigmoid pattern
And: The well has final classification of Negative
And: The well has a manual classification assigned
When: The Negative Sigmoid rule is evaluated
Then: The system shall NOT assign error code INCORRECT_NEGATIVE_SIGMOID to the well
And: The system shall NOT assign error code INCORRECT_NEGATIVE_SIGMOID_TARGET to the target
Related Design Documents
| Design Document | Relevant Sections |
|---|---|
| SDD Algorithms | Sigmoid Detection Algorithm |
Appendix: Process Artifacts
Completion Checklist
- All requirements are capability-level (describe behavior, not UI)
- Requirement variants consolidated (no requirement explosion - N/A, requirements are distinct)
- UI details are fully demoted to Illustrative section
- Configuration options are not encoded as requirements
- Acceptance criteria describe behavior, not UI mechanics
- Every requirement has acceptance criteria and source traceability
- Error handling addressed for I/O, validation, and external system requirements
- Open questions documented with owners assigned
- Consolidations documented in Reviewer Notes with reversibility info
- Module can survive a full UI redesign unchanged
- Refinements do not introduce new capabilities
- Traceability matrix is complete
Reviewer Notes
No Consolidation Required
The source requirements represent three distinct system behaviors:
| Original Requirement | Disposition |
|---|---|
| REQ-RULES-NEGSIGMOID-001 | Retained - Core validation logic with 4 test scenarios |
| REQ-RULES-NEGSIGMOID-002 | Retained - Distinct skip condition (resolution code) |
| REQ-RULES-NEGSIGMOID-003 | Retained - Distinct skip condition (manual classification) |
Rationale: These requirements represent separate, independently testable behaviors of the analytics rule:
- The primary validation logic (when to flag errors)
- Resolution-based skip behavior (user acknowledgment)
- Manual classification skip behavior (user override)
Consolidating these would lose precision critical for analytics rules testing and would combine distinct control flows. Per the RULES domain guidance for conservative consolidation, all three requirements are preserved.
Reversibility: Source requirements preserved 1:1.
- Source:
output/pilot/rules/rule-negative-sigmoid/rule-negative-sigmoid-restructured.md