Skip to content

DEM-PRODUCER-PLAN (core): delete the rrMultiplePlanned synthesis; generalize the composer - #36

Merged
Gio2050 merged 1 commit into
mainfrom
dem/plan-core
Aug 26, 2026
Merged

Gio2050 merged 1 commit into
mainfrom
dem/plan-core

Conversation

@Gio2050

@Gio2050 Gio2050 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Wave 1 of 4 — DEM-PRODUCER-PLAN, step 1 of 3. Merge this first, then afi-config dem/plan-config, then afi-reactor dem/plan-reactor.

The accepted row and gate (DEM-GOV §9, quoted before building)

DEM-PRODUCER-PLAN | D-DEM-4(2), D-DEM-5(1)(6): rrMultiplePlanned carried from the submitted trade plan through cpjMapper as a provider fact, against the governed trade-plan contract; deletion of the synthesis | D-DEM-5(6) satisfied — the submitted plan is verified against observed market data by the producer that emits it, and refused when it cannot be verified, proven by test; the value is a provider fact, never synthesized from an analyst input — the analyst/provider role split proven by test; absence fails closed under D-DEM-5(2) unless declared optional within D-DEM-5(4)(b); the risk/structure collinearity of Evidence §3 recorded as resolved or recorded as residual, per D-DEM-5(5); movement itemized; implementationVersion bumps per D-DEM-7(4)

Authorization: your instruction of 2026-08-25, recorded verbatim in the DEM-GOV Status line and §9 (afi-governance #55, merge 7274627); determinations D-2/D-4/D-5 in #56.

What this PR does

The planned R:R stops being invented. rrMultiplePlanned was synthesized from an analyst input (pulledBackIntoSweetSpot && !brokeEmaWithBody ? 2 : 1) — the exact role-split violation D-DEM-4(2) names. That line is deleted. The value now comes from the submitted trade plan, verified by the technical lane against the candles it fetched, and bound by the registered mapping.

  • froggy.enrichment_adapter.ts — the synthesis is gone; the builder returns FroggyAdapterOutput (no rrMultiplePlanned); the view type gains technical.plan (the lane's verified plan facts, read only through the mapping).
  • froggy.residual_builder.ts — the composer is now mapping-version-agnostic and fail-closed: fragment ∪ residual must partition the ten scorer-input fields exactly (nothing missing, nothing supplied twice) and every value must lie in its declared domain. The domain table is predicate-valued on purpose, so no scorer-input field is ever assigned a literal in this module — the coming GUARD slot has nothing to flag here.
  • froggy.trend_pullback_v1.ts — scoreFroggyTrendPullbackFromEnriched is deleted: the adapter no longer produces a full input, so that convenience path could only lie.
  • Tests — the registered 1.1.0 mapping as shared test data (inline, drift-checked against the sibling registry file when present); the byte-equivalence suite now proves compose(fragment, residual) equals the adapter's output plus the mapping-bound R:R, with the fired default recorded when the producer emitted none; composer refusal cases for missing / extra / dual-source / out-of-domain.

Verification

afi-core 312/312 green; tsc --noEmit green. No scoring-law value moves (weights, clamps, R:R bands, riskBucket map untouched).

🤖 Generated with Claude Code

…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>
@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 661c798 into main Aug 26, 2026
1 of 2 checks passed
@Gio2050
Gio2050 deleted the dem/plan-core branch August 26, 2026 04:00
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