DEM-PRODUCER-PLAN (core): delete the rrMultiplePlanned synthesis; generalize the composer - #36
Merged
Merged
Conversation
…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 Review could not run — your account is out of credits. Add credits or switch to a free model to enable reviews on this change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wave 1 of 4 —
DEM-PRODUCER-PLAN, step 1 of 3. Merge this first, then afi-configdem/plan-config, then afi-reactordem/plan-reactor.The accepted row and gate (DEM-GOV §9, quoted before building)
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.
rrMultiplePlannedwas 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 returnsFroggyAdapterOutput(norrMultiplePlanned); the view type gainstechnical.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—scoreFroggyTrendPullbackFromEnrichedis deleted: the adapter no longer produces a full input, so that convenience path could only lie.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 --noEmitgreen. No scoring-law value moves (weights, clamps, R:R bands,riskBucketmap untouched).🤖 Generated with Claude Code