-
Notifications
You must be signed in to change notification settings - Fork 0
Add project agent scaffold from provided architecture diagram #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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. |
| 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. |
| 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. |
| 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. | ||
| - Gib nur JSON-Objekte zurück. | ||
| 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. |
| 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. |
| 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. |
| 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. |
| 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`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The registry defines two required outputs from Useful? React with 👍 / 👎. |
||
| - Markiere Konflikte zwischen Pattern und Gegenmuster. | ||
| - Gib nur JSON-Objekte zurück. | ||
| 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. |
| 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. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The signal generator contract consumes both 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. | ||
| 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. |
| 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: | ||
| - slack | ||
| - webhook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prompt asks Core Engine to output
fused_feature_frame(agents/prompts/core_engine.md), but the registry contract routesfused_feature_framesfromcore_enginetopattern_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 👍 / 👎.