Skip to content

DEM-PRODUCER-HTF (core): delete the neutral bias literals; resolve the "unknown" branch - #38

Merged
Gio2050 merged 3 commits into
mainfrom
dem/htf-core
Aug 26, 2026
Merged

Gio2050 merged 3 commits into
mainfrom
dem/htf-core

Conversation

@Gio2050

@Gio2050 Gio2050 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Wave 3 of 4 — DEM-PRODUCER-HTF, step 1 of 3. Merge after the CANDLE wave.

The accepted row and gate

DEM-PRODUCER-HTF | real higher-timeframe bias facts feeding weeklyBias/dailyBias; the multi-timeframe capability the technical lane lacks, registered as a provider/composition act. This is the mission DIR-GOV D-DIR-3's scope-guard reserved | DIR-GOV D-DIR-3 honored — no submitted or declared trade direction reaches any bias or axis input, proven by a dedicated negative test; the "unknown"-direction branch semantics resolved in the same slot; timeframe selection is a registered composition value, never a code constant; both literals deleted; …; structure axis proven to reach beyond its former 0.40 cap

What leaves afi-core here

The last two placeholders — weeklyBias = "neutral" as const and dailyBias = "neutral" as const — are deleted. The residual is now one field: liquiditySwept, the two-lane read D-DEM-3(5) expressly reserves. The D-DEM-4(2) placeholder inventory is empty.

The "unknown" branch, resolved

DIR-GOV's scope-guard required this slot to settle the "unknown"-direction branch — impossible while both biases were hardcoded and the branch unreachable. With real facts the four cases are exhaustive and each means something:

  • long / short — both timeframes agree on a non-neutral side;
  • neutral — at least one timeframe has no directional bias (a range regime, or a window the producer could not compute): the analyst asserts no direction;
  • unknown — both are directional and disagree: a higher-timeframe conflict. Not an error, not an absence — the analyst declining to call a direction while the timeframes contradict each other.

It feeds no axis (the axes are computed before it) and never reaches scoredSignal.direction, which carries the submitted side. Five new tests pin all four cases, including a proof that the verdict moves no axis and that only an aligned non-neutral pair lifts structure by +0.4.

afi-core 322/322; typecheck green.

🤖 Generated with Claude Code

Gio2050 and others added 3 commits August 25, 2026 17:29
…eralize the composer

DEM-GOV §9 DEM-PRODUCER-PLAN (owner-authorized 2026-08-25; afi-governance
#55): the planned R:R is a PROVIDER fact the technical lane produces from the
submitted afi.trade-plan.v1 and the registered mapping binds — never
synthesized from analyst inputs again.

- froggy.enrichment_adapter.ts: the synthesis at the old :282-283 is deleted;
  the builder returns FroggyAdapterOutput (Omit<…,'rrMultiplePlanned'>); the
  view type gains technical.plan (the lane's verified plan facts, read only
  through the mapping).
- froggy.residual_builder.ts: residual Pick shrinks to the five still-
  unexpressible fields; the composer is mapping-version-agnostic and
  fail-closed — fragment ∪ residual must partition the ten scorer-input fields
  exactly and every value must lie in its declared domain (predicate-valued
  table: no scorer-input field is ever assigned a literal here).
- froggy.trend_pullback_v1.ts: scoreFroggyTrendPullbackFromEnriched (the
  adapter-only convenience path) is deleted — the adapter no longer emits a
  full input; the rubric no longer imports the adapter.
- tests: the registered 1.1.0 mapping as shared test data (inline, drift-
  checked against the sibling registry file when present); the residual
  builder suite proves compose(fragment, residual) == adapter output + the
  mapping-bound R:R (fired default recorded when the producer emitted none);
  composer refusal cases (missing / extra / dual-source / out-of-domain).

No scoring-law value moves. afi-core suite 312/312.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ed literal

DEM-GOV §9 DEM-PRODUCER-CANDLE (owner-authorized 2026-08-25; afi-governance
#55) — the act D5-GOV D-D5-1 reserved. Merge after dem/plan-core, and after
the reactor's PLAN wave has merged.

- froggy.enrichment_adapter.ts: BROKE_EMA_WITH_BODY_UNIMPLEMENTED_STUB and its
  ?? read are DELETED, as is the `haFlatBackConfirmed: false` literal. Both are
  now computed technical-lane facts the registered mapping binds (required).
  FroggyAdapterOutput drops them; the view type gains the lane's
  brokeEmaWithBody / haFlatBack / haFlatBackConfirmed facts.
- froggy.residual_builder.ts: the residual Pick shrinks to the HTF bias
  placeholders + liquiditySwept — three fields.
- tests: mapping 1.2.0 in the shared support module (required binds); probes
  carry the candle facts and vary them; a view WITHOUT them now REFUSES at the
  interpreter (required-source-absent) instead of taking a stub — pinned in
  both the residual-builder and adapter suites.

afi-core 313/313. No scoring-law value moves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e "unknown" branch

DEM-GOV §9 DEM-PRODUCER-HTF (owner-authorized 2026-08-25; afi-governance #55)
— the mission DIR-GOV D-DIR-3's scope-guard reserved. Merge after the CANDLE
wave.

- froggy.enrichment_adapter.ts: the `weeklyBias = "neutral" as const` and
  `dailyBias = "neutral" as const` literals are DELETED. Both are now computed
  technical-lane facts (higher-timeframe trend) that the registered mapping
  RECODES into the rubric's bias vocabulary. The view type gains technical.htf
  {daily,weekly}. NOTHING this builder returns is a placeholder any more.
- froggy.residual_builder.ts: the residual is now ONE field, liquiditySwept —
  the two-lane read D-DEM-3(5) expressly reserves. The D-DEM-4(2) placeholder
  inventory is EMPTY.
- froggy.trend_pullback_v1.ts: the "unknown"-direction branch semantics are
  RESOLVED as DIR-GOV's scope-guard requires (they could not be settled while
  both biases were hardcoded and the branch unreachable): with real HTF facts
  the four cases are exhaustive — long/short when both timeframes agree,
  neutral when either has no directional bias, and "unknown" when both are
  directional and DISAGREE (a higher-timeframe CONFLICT: the analyst declining
  to call a direction, not an error and not an absence). It feeds no axis and
  never reaches scoredSignal.direction. No code changed — the branch is
  documented and pinned.
- tests: mapping 1.3.0 in the shared support (the bullish->long / bearish->short
  / range->neutral vocabulary translation lives in the MAPPING, never in the
  producer, D-DEM-3); probes for aligned / conflicting / range / absent-window
  HTF; five new direction-verdict tests including the conflict branch and a
  proof that the verdict moves no axis.

afi-core 322/322. No scoring-law value moves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kilo-code-bot

kilo-code-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

Kilo Code Review could not run — your account is out of credits.

Add credits or switch to a free model to enable reviews on this change.

@Gio2050
Gio2050 merged commit 156c5d4 into main Aug 26, 2026
1 of 2 checks passed
@Gio2050
Gio2050 deleted the dem/htf-core branch August 26, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant