chore: checkpoint remaining pre-gate worktree changes
- governance: stage v7.0 review prompts, run book, roadmap/current-status/decision updates, and sprint board state - adapters: capture DASH/trailing-drawdown/state-telemetry strategy work already present in the worktree - tools: capture dashboard console/KPI parser updates, logtriage notes, and runnersweep output Build: previously clean | Tests: previously 511 passing | Includes all open staged files
This commit is contained in:
104
TASK_GAP047_WEIGHT_RESCORE_PROMPT.md
Normal file
104
TASK_GAP047_WEIGHT_RESCORE_PROMPT.md
Normal file
@@ -0,0 +1,104 @@
|
||||
# TASK: GAP-047 — Confluence factor weights are pre-populated to 1.0
|
||||
# PART 1: offline re-scoring study (NO runtime change)
|
||||
# Staged: 2026-08-18 (v7.0 review, Finding 1)
|
||||
# Sprint: Stage 1 (P1-A step 1) — HIGHEST-VALUE TASK IN THE PROJECT
|
||||
# Owner: Kilocode (analysis) → operator (the weighting decision)
|
||||
# ─────────────────────────────────────────────────────────────────
|
||||
|
||||
## THE DEFECT
|
||||
|
||||
`ConfluenceScorer`'s constructor (`ConfluenceScorer.cs` ~105-117) pre-populates
|
||||
`_factorWeights` with 1.0 for ALL TEN FactorType values. `ResolveWeight(type,
|
||||
fallbackWeight)` (~410-419) checks that dictionary FIRST and returns the stored
|
||||
value if present. It always is. The `fallbackWeight` branch — where each
|
||||
calculator's designed weight arrives — is unreachable dead code.
|
||||
|
||||
The calculators DO emit the designed weights (`FactorCalculators.cs`):
|
||||
NarrowRange 0.20 (line ~569)
|
||||
OrbRangeVsAtr 0.15 (~670)
|
||||
GapDirectionAlignment 0.15 (~797)
|
||||
BreakoutVolumeStrength 0.20 (~897)
|
||||
PriorDayCloseStrength 0.15 (~1021)
|
||||
Factors 1-5 (Setup, Trend, Volatility, Timing, ExecutionQuality) are 1.00 by design.
|
||||
|
||||
Runtime confirmation — every STATE: line in every session reads `x1.00`:
|
||||
|
||||
[10:10:11.833] STATE: Regime=Bearish Direction=Sell Score=0.640 Grade=C
|
||||
Factors=Setup=1.00x1.00;Trend=0.30x1.00;Volatility=0.70x1.00;Timing=1.00x1.00;
|
||||
ExecutionQuality=0.80x1.00;NarrowRange=0.45x1.00;OrbRangeVsAtr=0.50x1.00;
|
||||
GapDirectionAlignment=0.10x1.00;BreakoutVolumeStrength=0.85x1.00;
|
||||
PriorDayCloseStrength=0.70x1.00
|
||||
|
||||
## WHY THIS MATTERS MORE THAN ANYTHING ELSE ON THE BOARD
|
||||
|
||||
Designed total weight is 5.85; actual is 10.00. Under the designed scheme a
|
||||
setup where factors 1-5 score well reaches Grade A (>=0.80) on those five
|
||||
alone — 5.0 weighted points against the 4.68 required. Under equal weights,
|
||||
Grade A requires the SUM of all ten factor scores to reach 8.0, so with
|
||||
GapDirectionAlignment routinely at 0.10 and OrbRangeVsAtr at 0.50, the other
|
||||
eight must average 0.925.
|
||||
|
||||
Grade A is close to structurally unreachable. This is the leading hypothesis
|
||||
for GAP-034a's silent zero-trade days, and — via trade frequency — for the
|
||||
seven-month projected duration of a 20-trade gate sample.
|
||||
|
||||
Worked example on the live data above: 0.640 (Grade C) at equal weights vs
|
||||
0.727 (Grade B) under the designed weights.
|
||||
|
||||
## PART 1 — THE STUDY. THIS TASK IS ANALYSIS ONLY. CHANGE NO RUNTIME CODE.
|
||||
|
||||
Every `STATE:` line already contains the full factor breakdown, so the entire
|
||||
study can be run against existing logs with no new instrumentation.
|
||||
|
||||
1. Build a standalone script under `tools/` (suggest `tools/rescore/`) —
|
||||
standalone Python, zero NT8 assembly references, same rules as the other
|
||||
tools. Reuse `tools/dashboard/parsers.py`'s `STATE_RE` /
|
||||
`parse_state_factors()` rather than writing a third parser.
|
||||
|
||||
2. Input: all `session_*.log` files in the NT8 log directory AND its ARCHIVE
|
||||
subtree. Parse every `STATE:` and every `SIGNAL_DETAIL:` line.
|
||||
|
||||
3. For each sampled state, compute BOTH composites:
|
||||
equal = sum(score_i) / 10
|
||||
designed = sum(score_i * w_i) / 5.85
|
||||
with w = [1,1,1,1,1, 0.20, 0.15, 0.15, 0.20, 0.15] in FactorType order.
|
||||
Map both to grades: A+ >=0.90, A >=0.80, B >=0.70, C >=0.60, D below, F floor.
|
||||
|
||||
4. Output, as JSON and markdown:
|
||||
- Grade distribution under each scheme, overall and per session
|
||||
- The COUNT of samples that would cross MinTradeGrade=5 (A) under designed
|
||||
weights but do not under equal weights — this is the headline number
|
||||
- Same for MinTradeGrade=4 (B), since the live workspace currently runs 4
|
||||
- Per-factor mean score and per-factor contribution share under each scheme
|
||||
- Sessions with zero SIGNAL lines, showing their best designed-weight score
|
||||
— i.e. how close each silent day came to qualifying
|
||||
|
||||
5. Cross-check the arithmetic against the worked example above before trusting
|
||||
any aggregate: the 10:10:11 sample on 2026-08-18 must reproduce 0.640 and
|
||||
0.727 exactly. If it does not, STOP and report.
|
||||
|
||||
## KNOWN CAVEAT — DO NOT SKIP THIS
|
||||
|
||||
`STATE:` telemetry scores are computed from a synthetic intent whose
|
||||
`DailyBarContext.TradeDirection` is stale (GAP-049, DEC-20260818-06), so
|
||||
direction-sensitive factors (GapDirectionAlignment, PriorDayCloseStrength, and
|
||||
possibly Trend) are unreliable in telemetry. `SIGNAL_DETAIL:` lines come from
|
||||
the REAL accepted intent and are trustworthy.
|
||||
|
||||
Report the two populations SEPARATELY. Do not pool them. If the sample of
|
||||
`SIGNAL_DETAIL:` lines is too small to be meaningful, say so plainly — the
|
||||
telemetry population still bounds the effect but must be labelled as
|
||||
direction-degraded.
|
||||
|
||||
## PART 2 — NOT THIS TASK
|
||||
|
||||
The runtime change (removing the pre-population or making it
|
||||
configuration-driven) requires an operator decision informed by Part 1's
|
||||
output, and it changes ConfigHash, so it needs a fresh freeze capture. Stage it
|
||||
separately once the study is in.
|
||||
|
||||
## GOVERNANCE
|
||||
|
||||
Track as [GAP-047] in SPRINT_BOARD.md. The study's output is the evidence for a
|
||||
decisions.md entry, Status: proposed until the operator accepts.
|
||||
Reference: NT8_SDK_Master_Document_v7.0 Finding 1, Sections 4.6, 9.4 (P1-A), 12.2 (O-01).
|
||||
Reference in New Issue
Block a user