diff --git a/docs/GROWTH-ANALYST-SPEC.md b/docs/GROWTH-ANALYST-SPEC.md index e7a77ee..07e79da 100644 --- a/docs/GROWTH-ANALYST-SPEC.md +++ b/docs/GROWTH-ANALYST-SPEC.md @@ -58,4 +58,3 @@ Give an authenticated merchant a trustworthy 90-day Persian growth outlook: hist - AvalAI function calling: https://docs.avalai.ir/en/guides/function-calling?api-mode=responses - AvalAI structured outputs: https://docs.avalai.ir/en/guides/structured-outputs?api-mode=responses - University of Tehran Iranian calendar: https://calendar.ut.ac.ir/ - diff --git a/docs/decisions/0015-deterministic-ai-growth-reports.md b/docs/decisions/0015-deterministic-ai-growth-reports.md index 8f5c569..40b4cf1 100644 --- a/docs/decisions/0015-deterministic-ai-growth-reports.md +++ b/docs/decisions/0015-deterministic-ai-growth-reports.md @@ -17,4 +17,3 @@ Use PostgreSQL plus deterministic Go analytics as the sole authority for numbers - Repeated page visits do not create paid calls while the fingerprint is unchanged. - Algorithm, catalog, prompt, schema, model, or import changes intentionally invalidate the report. - The backend owns more deterministic forecasting and validation code, but the result is auditable and tenant-safe. - diff --git a/tasks/ai-growth-analyst.md b/tasks/ai-growth-analyst.md index 8be9a2b..7d093cc 100644 --- a/tasks/ai-growth-analyst.md +++ b/tasks/ai-growth-analyst.md @@ -1,11 +1,10 @@ # AI Growth Analyst Implementation Tasks -- [ ] G1: Add approved spec, ADR, OpenAPI resources, event catalog, report schema, and reversible migration. -- [ ] G2: Add pure tested daily aggregation, event effect, similarity, 90-day forecast, residual ranges, backtest confidence, risk, and peer-suppression logic. -- [ ] G3: Add PostgreSQL report repository, fingerprint/idempotency, Redis hot cache/locks/budgets, and Tehran-day limits. -- [ ] G4: Add bounded worker state machine and sanitized `GrowthAnalyticsTools` boundary. -- [ ] G5: Add AvalAI Responses client, strict tool/final schemas, output validation, retry/timeout, usage metadata, and deterministic Persian fallbacks. -- [ ] G6: Add authenticated create/latest/get/SSE handlers with terminal ownership, CSRF, idempotency, replay, and `429` refresh semantics. -- [ ] G7: Wire configuration/composition roots, feature flag, local environment templates, retention cleanup, safe logs, and operational documentation. +- [x] G1: Add approved spec, ADR, OpenAPI resources, event catalog, report schema, and reversible migration. +- [x] G2: Add pure tested daily aggregation, event effect, similarity, 90-day forecast, residual ranges, backtest confidence, risk, and peer-suppression logic. +- [x] G3: Add PostgreSQL report repository, fingerprint/idempotency, Redis hot cache/locks/budgets, and Tehran-day limits. +- [x] G4: Add bounded worker state machine and sanitized `GrowthAnalyticsTools` boundary. +- [x] G5: Add AvalAI Responses client, strict tool/final schemas, output validation, retry/timeout, usage metadata, and deterministic Persian fallbacks. +- [x] G6: Add authenticated create/latest/get/SSE handlers with terminal ownership, CSRF, idempotency, replay, and `429` refresh semantics. +- [x] G7: Wire configuration/composition roots, feature flag, local environment templates, retention cleanup, safe logs, and operational documentation. - [ ] G8: Run unit/integration/contract/security/race/vet/build verification and real local PostgreSQL/Redis/API smoke without sending an AvalAI request unless a user-provided key is configured. -