Skip to main content
Version: 3.0.1

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

IDCore BehaviorPriorityStatus
REQ-RULES-NEGSIGMOID-001Flags negative wells with upward sigmoid patternsHIGHDraft
REQ-RULES-NEGSIGMOID-002Skips validation when resolution code appliedHIGHDraft
REQ-RULES-NEGSIGMOID-003Skips validation when manual classification presentHIGHDraft

Key Integration Points: Well Observation Data, Resolution Management, Error Reporting System

Rule Summary

PropertyValue
NameNEGATIVE_SIGMOID
TriggersWhen well has negative classification and upward sigmoid pattern
OutputSets INCORRECT_NEGATIVE_SIGMOID error codes on well/target
RelatedPOSITIVE_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

TermDefinition
SigmoidS-shaped curve characteristic of PCR amplification patterns
Upward SigmoidSigmoid curve rising from low to high values, typical of positive amplification
Downward SigmoidSigmoid curve descending from high to low values, typical of negative wells
Final ClassificationThe final result classification assigned to a well (Positive or Negative)
Manual ClassificationA classification override manually assigned by a user
Resolution CodeCode 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

OptionDefaultDescriptionAffects
--No configurable options identified-

[REVIEW REQUIRED: Verify if sigmoid detection thresholds or sensitivity parameters are configurable.]


Open Questions

IDQuestionSourceOwnerDate Raised
OQ-001Are sigmoid detection thresholds or sensitivity parameters configurable?Configuration Options@tbd2026-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)

ComponentLocation
Rule ClassAnalyzer/Rules/NegativeSigmoidRule.php
Sigmoid IdentifierSupport/SigmoidIdentifier.php
Error SetterAnalyzer/Rules/Concerns/SetErrorToWell.php

Traceability Matrix

RequirementTitleVerificationImplementationTest CasesStatus
REQ-RULES-NEGSIGMOID-001Validate Negative Well Sigmoid PatternTestNegativeSigmoidRuleNEGSIGMOID-001 through NEGSIGMOID-004Draft
REQ-RULES-NEGSIGMOID-002Skip Rule When Resolution Code AppliedTestNegativeSigmoidRuleNEGSIGMOID-005Draft
REQ-RULES-NEGSIGMOID-003Skip Rule When Manual Classification PresentTestNegativeSigmoidRuleNEGSIGMOID-006Draft

Acceptance Tests

Test: REQ-RULES-NEGSIGMOID-001

Back to requirement

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

Back to requirement

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

Back to requirement

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

Design DocumentRelevant Sections
SDD AlgorithmsSigmoid 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 RequirementDisposition
REQ-RULES-NEGSIGMOID-001Retained - Core validation logic with 4 test scenarios
REQ-RULES-NEGSIGMOID-002Retained - Distinct skip condition (resolution code)
REQ-RULES-NEGSIGMOID-003Retained - Distinct skip condition (manual classification)

Rationale: These requirements represent separate, independently testable behaviors of the analytics rule:

  1. The primary validation logic (when to flag errors)
  2. Resolution-based skip behavior (user acknowledgment)
  3. 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