From 545b2f7a3df6292fb3e71d1e9009824e9569df1c Mon Sep 17 00:00:00 2001 From: agb1986 Date: Sat, 8 Aug 2026 14:15:54 +0100 Subject: [PATCH] Opt in to the ai-data-store artifact-logging hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ai-data-store's log_artifact_entry.py hook only acts on projects that have a .ai-data-store.json config at their root — this repo never had one, so every verdict, price check, and portfolio snapshot artifact this agent produces has gone unlogged since the hook was installed. The mapping rules are ai-data-store's own ready-made template (hooks/configs/finance-agent.json there), copied in verbatim and tracked here rather than left as untracked host-only state, since a CasaOS rebuild or fresh clone would otherwise silently lose the wiring again. README points at what the file is for. Co-Authored-By: Claude Sonnet 5 --- .ai-data-store.json | 76 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 7 +++++ 2 files changed, 83 insertions(+) create mode 100644 .ai-data-store.json diff --git a/.ai-data-store.json b/.ai-data-store.json new file mode 100644 index 0000000..5b9f4d2 --- /dev/null +++ b/.ai-data-store.json @@ -0,0 +1,76 @@ +{ + "source": "finance-agent", + "rules": [ + { + "pattern": "/skills/(?P[^/]+)/tmp/verdict_(?P[^_]+)_[^/]*\\.json$", + "description": [ + "Verdict - {content.symbol} ({content.verdict.winner}, {content.verdict.confidence} confidence)", + "Verdict - {ticker}" + ], + "keywords": ["{ticker}", "{skill}", "verdict"] + }, + { + "pattern": "/skills/(?P[^/]+)/tmp/debate_(?P[^_]+)_[^/]*\\.json$", + "description": [ + "Debate - {content.symbol} ({content.rounds} rounds)", + "Debate - {ticker}" + ], + "keywords": ["{ticker}", "{skill}", "debate"] + }, + { + "pattern": "/skills/(?P[^/]+)/tmp/panel_(?P[^_]+)_[^/]*\\.json$", + "description": [ + "Panel analysis - {content.symbol}", + "Panel analysis - {ticker}" + ], + "keywords": ["{ticker}", "{skill}", "panel"] + }, + { + "pattern": "/skills/(?P[^/]+)/tmp/check_stock_(?P[^_]+)_[^/]*\\.json$", + "description": [ + "{content.name} ({content.symbol}) - ${content.price:,.2f} ({content.change_percent:+.2f}%)", + "{content.name} ({content.symbol}) price check", + "{ticker} price check" + ], + "keywords": ["{ticker}", "{skill}", "check_stock"] + }, + { + "pattern": "/skills/(?P[^/]+)/tmp/check_crypto_(?P[^_]+)_[^/]*\\.json$", + "description": [ + "{content.name} ({content.symbol}) - ${content.price:,.2f} ({content.change_percent_24h:+.2f}% 24h)", + "{content.name} ({content.symbol}) price check", + "{ticker} price check" + ], + "keywords": ["{ticker}", "{skill}", "check_crypto"] + }, + { + "pattern": "/skills/(?P[^/]+)/tmp/history_(?P[^_]+)_(?P[^_]+)_[^/]*\\.json$", + "description": "Price history - {ticker}", + "keywords": ["{ticker}", "{skill}", "history", "{period}"] + }, + { + "pattern": "/skills/(?P[^/]+)/tmp/portfolio_[^/]*\\.json$", + "description": [ + "Portfolio snapshot - {content.account_summary.currency} {content.account_summary.totalValue:,.2f}", + "Portfolio snapshot" + ], + "keywords": ["{skill}"] + }, + { + "pattern": "/skills/(?P[^/]+)/tmp/news_results_[^/]*\\.json$", + "description": [ + "News search - {content_length} articles", + "News search" + ], + "keywords": ["{skill}", "news_results"] + }, + { + "pattern": "/skills/(?P[^/]+)/tmp/analysis_[^/]*\\.json$", + "description": [ + "News analysis - {content_length} articles ranked", + "News analysis" + ], + "keywords": ["{skill}", "analysis"] + } + ] +} diff --git a/README.md b/README.md index 4a46e87..2967ab7 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,13 @@ See **[docs/deployment.md](docs/deployment.md)** for the full guide — Gmail ap passwords, the cron entry, reading reports out of the named volumes, and cost tuning. +`.ai-data-store.json` at the repo root opts this project into the +[ai-data-store](https://github.com/agb1986/ai-data-store) PostToolUse hook: it +maps each skill's `skills/*/tmp/*.json` artifacts to a description and +keywords so verdicts, price checks, and portfolio snapshots get logged +automatically as they're produced. It's config, not a secret, so it's tracked +here rather than left as untracked host state. + --- ## Development