Skip to content

fix: full signal renderer + schema alignment (entry_zone, invalidations, size_hint_pct, horizon)#4

Open
deluonchain wants to merge 2 commits into
mainfrom
fix/schema-alignment-and-full-renderer
Open

fix: full signal renderer + schema alignment (entry_zone, invalidations, size_hint_pct, horizon)#4
deluonchain wants to merge 2 commits into
mainfrom
fix/schema-alignment-and-full-renderer

Conversation

@deluonchain

Copy link
Copy Markdown
Owner

what this fixes

SKILL.md — renderer was missing 4 of 7 blocks

the old SKILL.md was a pure API spec with no rendering instructions. the agent was only rendering verdict / score / confidence / summary / drivers / risks / mandate and skipping:

  • signal stack (momentum / flow / structure / volatility / liquidity)
  • regime & macro context (regime_label, regime_confidence, base_eco_pulse, macro_pulse)
  • market snapshot (atr_pct_1h, pool_age_days, turnover_ratio_24h)
  • comparables (pool_age_percentile, liquidity_tier)

new SKILL.md adds explicit rendering instructions with field-by-field output format, null-omission rules, and hard rules against skipping signal stack or context blocks.

references/mandate-fields.md — schema mismatches corrected

four bugs aligned to the live internal_oracle.ts output:

field old spec corrected spec
entry_zone { low, high } object [low, high] array
invalidation singular string invalidations: string[] plural array
size_hint_pct decimal e.g. 0.03 percentage e.g. 3.0, clamped [0.5, 10.0]
horizon keys h4_to_d1, scalp, h1_to_h4 4h-24h, 1h-3h, 1h-4h etc.

horizon key table added for all regime labels.

backend patches still needed (bankr-fs internal_oracle.ts)

these are code changes required on the backend — not in this repo but documented here for tracking:

  1. entry_zone: { low, high }entry_zone: [low, high]
  2. invalidation: stringinvalidations: string[] (wrap in array, add liquidity condition)
  3. size_hint_pct clamp [0.005, 0.1][0.5, 10.0], base sizes 0.05/0.035.0/3.0
  4. horizonForRegime() key strings fixed to match mandate-fields.md table
  5. sanitize() leak scrubber: out.mandate?.invalidation...(out.mandate?.invalidations ?? [])

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