Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions PR_REVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# PR Review (work vs main baseline)

> Note: The repository currently has no `main` branch ref locally, so this review uses `f363df5` ("Initialize repository") as the effective baseline for the current branch changes.

## Agent 1 — Security issue
- **Result:** No direct secret exposure or dangerous execution pattern found in changed files.
- **Observation:** CI workflow currently executes only static `echo` statements and uses `actions/checkout@v4`, which is a pinned major tag and generally acceptable baseline hygiene.
- **Risk:** Low.

## Agent 2 — Code quality
- **Result:** Acceptable for scaffolding, but CI workflow remains template-level and does not perform quality checks.
- **Observation:** `.github/workflows/blank.yml` is still a starter template and lacks lint/test/build steps.
- **Risk:** Medium (quality regressions can slip through).

## Agent 3 — Bugs
- **Result:** Functional bug risk identified in CI trigger configuration.
- **Observation:** Workflow triggers only on `main`, but this repository currently has only `work`. This means CI may not run on normal pushes/PRs from the active branch naming state.
- **Risk:** Medium.

## Agent 4 — Race
- **Result:** No race/concurrency bug identified.
- **Observation:** Single job workflow with sequential steps and no shared mutable state.
- **Risk:** Low.

## Agent 5 — Test flakiness
- **Result:** No flaky tests detected because no tests are currently executed.
- **Observation:** Absence of tests is itself a reliability gap.
- **Risk:** Medium (unknown behavior remains unvalidated).

## Agent 6 — Maintainability of the code
- **Result:** Documentation clarity is good for positioning, but operational maintainability is limited by missing engineering scaffolding.
- **Observation:** README communicates principles and scope well; however, repository lacks contribution/development/testing conventions and actionable CI checks.
- **Risk:** Medium.

## Recommended follow-ups
1. Align workflow triggers with actual branch strategy (e.g., `work` and/or wildcard + protected branch policy).
2. Add real CI stages (lint, test, build) and fail-fast defaults.
3. Introduce minimal test harness and a contributor/developer guide.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,11 @@ Ich arbeite an der Schnittstelle von:

**Operator Fischer**
Executive System Architect / High-Performance KI-Operator

## Agenten (neu)

Die von dir gewünschte Agenten-Pipeline wurde als Scaffold hinzugefügt:
- `agents/registry.yml`
- `agents/prompts/*.md`

Startpunkt: `agents/README.md`
18 changes: 18 additions & 0 deletions agents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Agenten-Setup (aus deiner Architektur)

Diese Struktur bildet genau die von dir gezeigte Pipeline ab:

1. **Market Data Feed** + **News Scraper** + **Sentiment Analyzer**
2. ➜ **Core Engine**
3. ➜ **Pattern Matcher (Oktagon-Logik)**
4. ➜ **Signal Generator (Muster → Gegenmuster)**
5. ➜ **Live Dashboard (Streamlit/React)**
6. ➜ **Watchlists**, **News-Block pro Aktie**, **Alert Layer**

## Enthalten
- `agents/registry.yml`: Zentrale Agenten-Definition (Rollen, Inputs/Outputs, Handoffs)
- `agents/prompts/*.md`: Prompt-Vorlagen je Agent für schnelle Implementierung

## Nächster Schritt
- Diese Agenten als echte Worker/Services anbinden (z. B. Python + Queue/Orchestrator),
wobei `registry.yml` als Single Source of Truth dient.
7 changes: 7 additions & 0 deletions agents/prompts/alert_layer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Alert Layer Agent Prompt

Du bist der Alert-Layer-Agent.
- Versende Alerts nur bei kritischen/hochpriorisierten Signalen.
- Kanäle: E-Mail, Slack, Webhook.
- Verhindere Alert-Spam durch Deduplikation und Cooldown.
- Gib nur JSON-Objekte zurück.
7 changes: 7 additions & 0 deletions agents/prompts/core_engine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Core Engine Agent Prompt

Du bist der Core-Engine-Agent.
- Führe Market, News und Sentiment je Ticker/Zeitscheibe zusammen.
- Berechne konsistente Features inkl. Datenqualität.
- Ausgabeformat: `fused_feature_frame` pro Ticker.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match core-engine output key to registry contract

The prompt asks Core Engine to output fused_feature_frame (agents/prompts/core_engine.md), but the registry contract routes fused_feature_frames from core_engine to pattern_matcher (agents/registry.yml, outputs/inputs at lines 55 and 63). If a worker follows the prompt literally, the handoff key will not match the orchestrator contract and downstream pattern matching can receive no data.

Useful? React with 👍 / 👎.

- Gib nur JSON-Objekte zurück.
7 changes: 7 additions & 0 deletions agents/prompts/live_dashboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Live Dashboard Agent Prompt

Du bist der Dashboard-Agent.
- Erzeuge ein UI-View-Model für Streamlit/React.
- Zeige je Ticker: aktuelles Signal, Konfidenz, letzte News, Sentiment.
- Strukturiere Daten für Watchlist, News-Block und Alerts.
- Gib nur JSON-Objekte zurück.
7 changes: 7 additions & 0 deletions agents/prompts/market_data_feed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Market Data Feed Agent Prompt

Du bist der Market-Data-Agent.
- Hole Kursdaten für alle Ticker aus der Watchlist.
- Normalisiere Felder (`ticker`, `timestamp`, `open`, `high`, `low`, `close`, `volume`, `source`).
- Markiere fehlende Werte und Datenlatenz.
- Gib nur JSON-Objekte zurück.
7 changes: 7 additions & 0 deletions agents/prompts/news_block.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# News-Block Agent Prompt

Du bist der News-Block-Agent.
- Rendere je Aktie die wichtigsten Nachrichten nach Relevanz und Aktualität.
- Ergänze Sentiment-Kurzlabel pro Nachricht.
- Begrenze auf die Top-Einträge pro Ticker.
- Gib nur JSON-Objekte zurück.
7 changes: 7 additions & 0 deletions agents/prompts/news_scraper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# News Scraper Agent Prompt

Du bist der News-Scraper-Agent.
- Sammle Nachrichten pro Ticker aus NewsAPI/RSS/GNews.
- Dedupliziere nach URL/Titel-Ähnlichkeit.
- Normalisiere Felder (`ticker`, `timestamp`, `title`, `summary`, `url`, `source`).
- Gib nur JSON-Objekte zurück.
7 changes: 7 additions & 0 deletions agents/prompts/pattern_matcher.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Pattern Matcher Agent Prompt

Du bist der Pattern-Matcher-Agent (Oktagon-Logik).
- Erkenne Muster und Gegenmuster aus `fused_feature_frame`.
- Gib je Ereignis aus: `pattern_id`, `ticker`, `strength`, `direction`, `explanation`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Emit anti_pattern_events in pattern matcher prompt

The registry defines two required outputs from pattern_matcherpattern_events and anti_pattern_events—and signal_generator depends on both (agents/registry.yml, lines 64-66 and 74-75), but the prompt only specifies a generic per-event payload and never names an anti_pattern_events output channel. In a schema-driven implementation this ambiguity can drop anti-pattern data and break or degrade downstream signal generation.

Useful? React with 👍 / 👎.

- Markiere Konflikte zwischen Pattern und Gegenmuster.
- Gib nur JSON-Objekte zurück.
7 changes: 7 additions & 0 deletions agents/prompts/sentiment_analyzer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Sentiment Analyzer Agent Prompt

Du bist der Sentiment-Agent.
- Analysiere jede News auf Sentiment und Unsicherheit.
- Felder: `sentiment_score` (-1..1), `confidence` (0..1), `reasoning_short`.
- Achte auf widersprüchliche Signale.
- Gib nur JSON-Objekte zurück.
7 changes: 7 additions & 0 deletions agents/prompts/signal_generator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Signal Generator Agent Prompt

Du bist der Signal-Generator-Agent.
- Erzeuge aus Pattern-Events handelbare Signale.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include anti-pattern input in signal generation prompt

The signal generator contract consumes both pattern_events and anti_pattern_events (agents/registry.yml, lines 74-75), but the prompt instructs generation only from “Pattern-Events.” When implementers or LLM workers follow this prompt, contraindicating anti-patterns can be ignored, which undermines the risk-balancing logic encoded in the architecture.

Useful? React with 👍 / 👎.

- Pflichtfelder: `ticker`, `signal` (buy/sell/hold), `confidence`, `risk_note`, `rationale`.
- Priorisiere Signale nach Robustheit und Risiko.
- Gib nur JSON-Objekte zurück.
7 changes: 7 additions & 0 deletions agents/prompts/watchlists.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Watchlist Agent Prompt

Du bist der Watchlist-Agent.
- Verwalte Nutzer-Watchlists mit Priorität.
- Ergänze/entferne Ticker deterministisch und nachvollziehbar.
- Liefere diff-basierte Änderungen.
- Gib nur JSON-Objekte zurück.
123 changes: 123 additions & 0 deletions agents/registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
version: 1
system: stock-signal-multi-agent
language: de
agents:
- id: market_data_feed
name: Market Data Feed Agent
role: Holt Kurs-, Volumen- und Basis-Metadaten für beobachtete Ticker.
inputs:
- watchlist_tickers
- timeframe
outputs:
- normalized_market_snapshots
providers:
- yahoo_finance
- alpha_vantage
handoff_to:
- core_engine

- id: news_scraper
name: News Scraper Agent
role: Sammelt, dedupliziert und normalisiert Finanznachrichten je Aktie.
inputs:
- watchlist_tickers
- time_window
outputs:
- normalized_news_items
providers:
- newsapi
- rss
- gnews
handoff_to:
- core_engine

- id: sentiment_analyzer
name: Sentiment Analyzer Agent
role: Bewertet News-Sentiment und Unsicherheitssignale.
inputs:
- normalized_news_items
outputs:
- sentiment_scores
providers:
- nltk
- transformers
handoff_to:
- core_engine

- id: core_engine
name: Core Engine Agent
role: Führt Markt-, News- und Sentimentdaten zu einem einheitlichen Feature-Objekt zusammen.
inputs:
- normalized_market_snapshots
- normalized_news_items
- sentiment_scores
outputs:
- fused_feature_frames
handoff_to:
- pattern_matcher

- id: pattern_matcher
name: Pattern Matcher Agent
role: Ermittelt Oktagon-Logik-Pattern (Muster/Gegenmuster) aus Feature-Frames.
inputs:
- fused_feature_frames
outputs:
- pattern_events
- anti_pattern_events
handoff_to:
- signal_generator

- id: signal_generator
name: Signal Generator Agent
role: Erzeugt handelbare Signale mit Begründung, Konfidenz und Risiko-Hinweis.
inputs:
- pattern_events
- anti_pattern_events
outputs:
- ranked_signals
handoff_to:
- live_dashboard

- id: live_dashboard
name: Live Dashboard Agent
role: Rendert Signale, News-Block und Status für UI (Streamlit/React).
inputs:
- ranked_signals
- normalized_news_items
outputs:
- dashboard_view_model
channels:
- streamlit
- react
handoff_to:
- watchlists
- news_block
- alert_layer

- id: watchlists
name: Watchlist Agent
role: Verwaltet beobachtete Ticker, Priorisierung und Nutzerlisten.
inputs:
- dashboard_view_model
outputs:
- watchlist_state

- id: news_block
name: News-Block Agent
role: Zeigt pro Aktie gefilterte, priorisierte News mit Sentiment-Kontext.
inputs:
- dashboard_view_model
outputs:
- per_ticker_news_panels

- id: alert_layer
name: Alert Layer Agent
role: Versendet Alerts für kritische Signale und Statuswechsel.
inputs:
- dashboard_view_model
outputs:
- delivered_alerts
channels:
- email
- slack
- webhook
Loading