# bangoriyabhavya151107/pinkops architecture

> Architecture diagram of the GitHub repository bangoriyabhavya151107/pinkops, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bangoriyabhavya151107/pinkops
- Repository: https://github.com/bangoriyabhavya151107/pinkops

## Overview

PinkOps is a cricket player-evaluation and squad-selection framework. Its documented workflow moves from auditing immutable competition data and reconstructing match state through pressure measurement, context-adjusted player evidence, reliability classification, and batter/bowler selection with auction strategy. Stage 4.0’s orchestrator explicitly invokes its analytical modules; Stage 4.1’s pipeline explicitly assembles evidence, assigns roles, and runs robustness analysis. README documents the broader stage progression. Later-stage internals are represented at file level because their call relationships are not shown in the supplied excerpts.

Main entry points: [`src/stage_4_1/evidence_profiles.py`](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1/evidence_profiles.py) (Player evidence profiles), [`src/stage_4_0/run_stage_4_0.py`](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/run_stage_4_0.py) (Stage 4.0 orchestrator), [`src/stage_5/candidate_selection.py`](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_5/candidate_selection.py) (Candidate selection), [`src/01_data_audit.py`](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/01_data_audit.py) (Data audit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data foundation"]
  node_competition_data["Competition data"]
  node_audit["Data audit<br/>[01_data_audit.py]"]
  node_match_state["Match-state builder"]
end

subgraph group_pressure["Pressure modeling"]
  node_pressure_discovery["Pressure discovery"]
  node_stage31["Stage 3.1 validation"]
end

subgraph group_evidence["Reliability evidence"]
  node_stage40["Stage 4.0 orchestrator<br/>[run_stage_4_0.py]"]
  node_opportunity["Pressure opportunity<br/>[opportunity.py]"]
  node_expectation["Contextual expectation<br/>[expectation.py]"]
  node_attribution["Player attribution<br/>[attribution.py]"]
  node_clutch["Clutch matching<br/>[clutch.py]"]
  node_consistency["Match consistency<br/>[consistency.py]"]
  node_uncertainty["Uncertainty bounds<br/>[uncertainty.py]"]
  node_profiles["Player evidence profiles"]
  node_role_analysis["Tactical roles<br/>[role_analysis.py]"]
  node_classification["Reliability profiles"]
  node_robustness["Robustness analysis<br/>[robustness.py]"]
  node_multiverse["Methodological multiverse<br/>[multiverse.py]"]
end

subgraph group_selection["Squad decisions"]
  node_candidate_selection["Candidate selection"]
  node_target_files["Target-file generation"]
  node_auction_strategy["Auction strategy"]
  node_stage6["Stage 6 defense"]
end

node_competition_data -->|"audited by"| node_audit
node_audit -->|"informs"| node_match_state
node_match_state -->|"feeds"| node_pressure_discovery
node_pressure_discovery -->|"extends"| node_stage31
node_stage31 -->|"informs"| node_stage40
node_stage40 -->|"calls"| node_opportunity
node_stage40 -->|"calls"| node_expectation
node_stage40 -->|"calls"| node_attribution
node_stage40 -->|"calls"| node_clutch
node_stage40 -->|"calls"| node_consistency
node_stage40 -->|"calls"| node_uncertainty
node_stage40 -->|"feeds"| node_profiles
node_profiles -->|"uses"| node_opportunity
node_profiles -->|"uses"| node_expectation
node_profiles -->|"uses"| node_attribution
node_profiles -->|"uses"| node_clutch
node_profiles -->|"uses"| node_uncertainty
node_profiles -->|"assigned by"| node_role_analysis
node_profiles -->|"evaluated by"| node_robustness
node_profiles -.->|"classified by"| node_classification
node_profiles -->|"stress-tested by"| node_multiverse
node_profiles -->|"supports"| node_candidate_selection
node_candidate_selection -->|"produces"| node_target_files
node_candidate_selection -->|"informs"| node_auction_strategy
node_auction_strategy -.->|"supports"| node_stage6

click node_audit "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/01_data_audit.py"
click node_match_state "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/02_build_match_state.py"
click node_pressure_discovery "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/03_pressure_discovery.py"
click node_stage31 "https://github.com/bangoriyabhavya151107/pinkops/tree/main/src/stage_3_1"
click node_stage40 "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/run_stage_4_0.py"
click node_opportunity "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/opportunity.py"
click node_expectation "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/expectation.py"
click node_attribution "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/attribution.py"
click node_clutch "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/clutch.py"
click node_consistency "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/consistency.py"
click node_uncertainty "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/uncertainty.py"
click node_profiles "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1/evidence_profiles.py"
click node_role_analysis "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1/role_analysis.py"
click node_classification "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1/reliability_classification.py"
click node_robustness "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1/robustness.py"
click node_multiverse "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1_1/multiverse.py"
click node_candidate_selection "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_5/candidate_selection.py"
click node_target_files "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_5/generate_target_files.py"
click node_auction_strategy "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_5/auction_strategy.py"
click node_stage6 "https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_6/build_stage_6_defense.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_competition_data,node_audit,node_match_state toneBlue
class node_pressure_discovery,node_stage31 toneAmber
class node_stage40,node_opportunity,node_expectation,node_attribution,node_clutch,node_consistency,node_uncertainty,node_profiles,node_role_analysis,node_classification,node_robustness,node_multiverse toneMint
class node_candidate_selection,node_target_files,node_auction_strategy,node_stage6 toneRose
```

## Components

### Data foundation

- **Competition data**
- [Data audit](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/01_data_audit.py): `src/01_data_audit.py`
- [Match-state builder](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/02_build_match_state.py): `src/02_build_match_state.py`

### Pressure modeling

- [Pressure discovery](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/03_pressure_discovery.py): `src/03_pressure_discovery.py`
- [Stage 3.1 validation](https://github.com/bangoriyabhavya151107/pinkops/tree/main/src/stage_3_1): `src/stage_3_1`

### Reliability evidence

- [Stage 4.0 orchestrator](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/run_stage_4_0.py): `src/stage_4_0/run_stage_4_0.py`
- [Pressure opportunity](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/opportunity.py): `src/stage_4_0/opportunity.py`
- [Contextual expectation](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/expectation.py): `src/stage_4_0/expectation.py`
- [Player attribution](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/attribution.py): `src/stage_4_0/attribution.py`
- [Clutch matching](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/clutch.py): `src/stage_4_0/clutch.py`
- [Match consistency](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/consistency.py): `src/stage_4_0/consistency.py`
- [Uncertainty bounds](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_0/uncertainty.py): `src/stage_4_0/uncertainty.py`
- [Player evidence profiles](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1/evidence_profiles.py): `src/stage_4_1/evidence_profiles.py`
- [Tactical roles](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1/role_analysis.py): `src/stage_4_1/role_analysis.py`
- [Reliability profiles](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1/reliability_classification.py): `src/stage_4_1/reliability_classification.py`
- [Robustness analysis](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1/robustness.py): `src/stage_4_1/robustness.py`
- [Methodological multiverse](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_4_1_1/multiverse.py): `src/stage_4_1_1/multiverse.py`

### Squad decisions

- [Candidate selection](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_5/candidate_selection.py): `src/stage_5/candidate_selection.py`
- [Target-file generation](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_5/generate_target_files.py): `src/stage_5/generate_target_files.py`
- [Auction strategy](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_5/auction_strategy.py): `src/stage_5/auction_strategy.py`
- [Stage 6 defense](https://github.com/bangoriyabhavya151107/pinkops/blob/main/src/stage_6/build_stage_6_defense.py): `src/stage_6/build_stage_6_defense.py`

## Connections

- Competition data → Data audit: audited by
- Data audit → Match-state builder: informs
- Match-state builder → Pressure discovery: feeds
- Pressure discovery → Stage 3.1 validation: extends
- Stage 3.1 validation → Stage 4.0 orchestrator: informs
- Stage 4.0 orchestrator → Pressure opportunity: calls (evidence: `src/stage_4_0/run_stage_4_0.py`)
- Stage 4.0 orchestrator → Contextual expectation: calls (evidence: `src/stage_4_0/run_stage_4_0.py`)
- Stage 4.0 orchestrator → Player attribution: calls (evidence: `src/stage_4_0/run_stage_4_0.py`)
- Stage 4.0 orchestrator → Clutch matching: calls (evidence: `src/stage_4_0/run_stage_4_0.py`)
- Stage 4.0 orchestrator → Match consistency: calls (evidence: `src/stage_4_0/run_stage_4_0.py`)
- Stage 4.0 orchestrator → Uncertainty bounds: calls (evidence: `src/stage_4_0/run_stage_4_0.py`)
- Stage 4.0 orchestrator → Player evidence profiles: feeds
- Player evidence profiles → Pressure opportunity: uses (evidence: `src/stage_4_1/evidence_profiles.py`)
- Player evidence profiles → Contextual expectation: uses (evidence: `src/stage_4_1/evidence_profiles.py`)
- Player evidence profiles → Player attribution: uses (evidence: `src/stage_4_1/evidence_profiles.py`)
- Player evidence profiles → Clutch matching: uses (evidence: `src/stage_4_1/evidence_profiles.py`)
- Player evidence profiles → Uncertainty bounds: uses (evidence: `src/stage_4_1/evidence_profiles.py`)
- Player evidence profiles → Tactical roles: assigned by (evidence: `src/stage_4_1/stage_4_1_pipeline.py`)
- Player evidence profiles → Robustness analysis: evaluated by (evidence: `src/stage_4_1/stage_4_1_pipeline.py`)
- Player evidence profiles → Reliability profiles: classified by
- Player evidence profiles → Methodological multiverse: stress-tested by (evidence: `src/stage_4_1_1/multiverse.py`)
- Player evidence profiles → Candidate selection: supports
- Candidate selection → Target-file generation: produces
- Candidate selection → Auction strategy: informs
- Auction strategy → Stage 6 defense: supports
