Use this file to discover all available pages before exploring further.
The pipeline registers two agent-swarm-kit advisors whose sole purpose is to convert raw OHLCV candle data into a markdown table the LLM can read directly inside the outline history. StockData1mAdvisor provides 4 hours of 1-minute candles (240 rows) and StockData15mAdvisor provides 8 hours of 15-minute candles (32 rows). Neither advisor makes any decision — they are pure data formatters. The LLM uses the tables exclusively to populate the audit fields sure_level and confidence; the action decision is driven entirely by the pre-computed scalar metrics injected by commitMetricsHistory.
Both advisors are invoked via ask() from agent-swarm-kit inside risk.outline.ts. ask resolves the advisor by name, calls its getChat function with the symbol, and returns the resulting markdown string.
The returned string is then pushed as a user message in the outline history, followed by an assistant "OK" acknowledgement, so the LLM has already “read” both tables before it encounters the draft signal or the final instruction.
ask() throws if the advisor returns a falsy value. Both commitOneMinuteHistory and commitFifteenMinuteHistory check for this and throw "StockData1mAdvisor failed" / "StockData15mAdvisor failed" respectively, causing the outline to abort and retry from the outer error handler.
|close - open| / (high - low) × 100 — proportion of the range covered by the candle body (0 % = pure wick doji, 100 % = marubozu). Returns 0 when high == low. Formatted to 1 decimal place.
For the 15-minute advisor the heading changes to ## 15-Minute Candles (Last 32) and the Symbol: line and table structure remain identical.
The 8-decimal-place price formatting is intentional for low-priced altcoins (e.g. 0.00003421 USD) where fewer decimal places would lose significant precision. The LLM reads the raw string values; no rounding is applied beyond toFixed.
Understanding the separation between advisor data and pre-computed metrics is critical for interpreting LLM output correctly.
Advisor data (candles)
Used for:sure_level and confidence audit fields only.The LLM inspects the 1m and 15m tables to assess whether there is visual evidence of accumulation, manipulation, or anomalous volume patterns. This assessment is logged for post-analysis but does not influence action.
Pre-computed metrics
Used for:action decision exclusively.avgRangePct and momentum24hPct are derived from 1440 1m candles in commitMetricsHistory and pushed as scalar numbers. The LLM is instructed to apply the two rules literally against these numbers and not to re-derive them from the candle tables.
Never remove or reorder advisor calls in getOutlineHistory. If commitOneMinuteHistory or commitFifteenMinuteHistory is skipped, the LLM will not have candle context and will be forced to assign confidence: "not_reliable" on every call, degrading the quality of the audit log even though action would remain correct.