mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8.6 KiB
8.6 KiB
Todo
Updated: 2026-02-23
- Verify current repository state and missing required files
- Create
docs/adr/for architecture decisions - Save
Tasks.mdat repository root - Populate
docs/tasks/tasks.md - Create
tasks/improvements.md - Create
tasks/lessons.md - Confirm files exist on disk
- Kick off MVP slice after Presearch refresh (this session)
Tasks
Last updated: 2026-02-23
Active Tickets
| ID | Feature | Status | Tests | PR / Commit |
|---|---|---|---|---|
| T-001 | Presearch package and architecture direction | Complete | Doc review checklist | Local docs update |
| T-002 | ADR foundation in docs/adr/ |
Complete | ADR template and first ADR review | Local docs update |
| T-003 | Agent MVP tool 1: portfolio_analysis |
Complete | apps/api/src/app/endpoints/ai/ai.service.spec.ts |
Planned |
| T-004 | Agent memory and response formatter | Complete | apps/api/src/app/endpoints/ai/ai.service.spec.ts |
Planned |
| T-005 | Eval dataset baseline (MVP 5-10) | Complete | apps/api/src/app/endpoints/ai/evals/mvp-eval.runner.spec.ts |
Planned |
| T-006 | Full eval dataset (50+) | Planned | Dataset validation and regression run | Planned |
| T-007 | Observability wiring (LangSmith traces and metrics) | Planned | Trace assertions and latency checks | Planned |
| T-008 | Deployment and submission bundle | Complete | npm run test:ai + Railway healthcheck + submission docs checklist |
2b6506de8 |
Notes
- Canonical project requirements live in
docs/requirements.md. - Architecture decisions live in
docs/adr/. - Detailed task board mirror lives in
docs/tasks/tasks.md.
MVP Start (Finance Agent on Ghostfolio)
- Inspect existing AI endpoint and integration points (
ai.controller.ts,ai.service.ts, portfolio and data-provider services) - Add
POST /api/v1/ai/chatendpoint with request validation - Implement 3 MVP tools in AI service
- Add Redis-backed session memory for conversation continuity
- Add verification checks and structured output formatter (citations, confidence, verification details)
- Add targeted API unit tests for tool selection and response contract
- Run lint and API tests
- Share required and optional
.envkeys for local MVP run
Session Plan (2026-02-23)
- Refresh
docs/PRESEARCH.mdwith source-backed framework and eval notes - Add root
Tasks.mdmirror for submission checklist compliance - Add AI chat service tests (tool execution, memory, verification, confidence)
- Add MVP runbook snippet for local execution and API invocation
- Execute focused verification (lint/test on touched surface)
- Update ticket status and evidence links
Session Plan (2026-02-23, UI + Deploy + Test Data)
- Add client chat integration method for
POST /api/v1/ai/chat - Build MVP chat interface in portfolio analysis page
- Add focused frontend tests for chat request and response rendering
- Verify AI test suite + eval suite after UI changes
- Validate Railway API key and project visibility
- Install/use Railway CLI and initialize or link project configuration
- Add local data setup path and seed script command for MVP testing
- Run final verification commands and capture evidence
Session Plan (2026-02-23, Visibility + Test URL)
- Diagnose why AI panel and activities are not visible in local UI
- Remove analysis page visibility gate that hides AI panel for non-experimental users
- Seed MVP activities for all local users to make testing deterministic
- Update
docs/CODE-REVIEW.mdwith exact local test URLs and validation steps - Run focused tests for touched files and record verification evidence
- Capture lesson for UI discoverability and test-path communication
Session Plan (2026-02-23, Publish via CLI)
- Validate Railway CLI availability and auth path
- Switch to supported Railway CLI version (
@railway/cli) - Link current repository to configured Railway project/service
- Trigger production deployment from local repository
- Return deployed URL and post-deploy health check evidence
Session Plan (2026-02-23, Seed Expansion)
- Expand AI MVP seed dataset with more symbols and transactions
- Add a second account per user for diversification scenarios
- Run seeding command and verify row counts and sample orders
- Share exact seeded coverage for local and deploy testing
Session Plan (2026-02-23, Submission Bundle Completion)
- Switch Railway service from source-build deploys to GHCR image deploys
- Trigger redeploy and verify production health endpoint on image-based deploy
- Create 1-page AI development log document for submission
- Create AI cost analysis document with 100/1K/10K/100K projections
- Push submission documents and deployment updates to
origin/main
Session Plan (2026-02-23, Railway Crash Recovery)
- Reproduce Railway start-command failure locally
- Correct Railway start command to built API entrypoint
- Verify fixed command resolves module-not-found crash
- Update task tracker evidence for deploy follow-up
Session Plan (2026-02-23, AI Chat Intent Recovery)
- Diagnose why allocation/invest prompts return memory-only fallback
- Expand tool-intent routing for invest/allocate/rebalance prompts
- Improve deterministic fallback answer content for allocation guidance
- Normalize risk concentration math for leveraged/liability portfolios
- Run focused AI test suite and eval regression checks
Session Plan (2026-02-23, Railway Latency + Redis Auth Fix)
- Reproduce production slowness and capture health endpoint latency
- Identify Redis AUTH error spam source from cache URL construction
- Fix Redis cache URL to avoid credentials when password is empty
- Correct
railway.tomlstart command for Docker runtime (node main.js) - Redeploy and verify logs + latency improvements in production
Session Plan (2026-02-23, Core Features Expansion)
- Run focused AI verification gate before feature work (
npm run test:ai,nx run api:lint) - Expand agent toolset from 3 to 5 meaningful finance tools
- Add deterministic tests for new tool planning and orchestration
- Extend MVP eval dataset with coverage for new tools
- Run focused AI regression suite and push to
origin/main
Verification Notes
nx run api:lintcompleted successfully (existing workspace warnings only).- Full
nx test apicurrently fails in pre-existing portfolio calculator suites unrelated to AI endpoint changes. - Focused MVP verification passed:
npm run test:ainpm run test:mvp-evalnpm run hostinger:checknpx dotenv-cli -e .env.example -- npx jest apps/client/src/app/pages/portfolio/analysis/ai-chat-panel/ai-chat-panel.component.spec.ts --config apps/client/jest.config.tsnpm run railway:checknpm run railway:setupnpm run database:seed:ai-mvpnpx nx run client:build:development-ennpx nx run client:lintnpx dotenv-cli -e .env -- npx -y @railway/cli@latest up --detachnpx dotenv-cli -e .env -- npx -y @railway/cli@latest service statuscurl -i https://ghostfolio-api-production.up.railway.app/api/v1/health
- Railway crash recovery verification (local):
node main.jsfails withMODULE_NOT_FOUNDfor/ghostfolio/main.js(old command)node dist/apps/api/main.jsstarts successfullycurl -fsS http://127.0.0.1:3333/api/v1/healthreturns{"status":"OK"}
- Railway crash recovery verification (production):
npx dotenv-cli -e .env -- npx -y @railway/cli@latest up --detachnpx dotenv-cli -e .env -- npx -y @railway/cli@latest service statusreachedStatus: SUCCESSon deployment4f26063a-97e5-43dd-b2dd-360e9e12a951curl -i https://ghostfolio-api-production.up.railway.app/api/v1/healthreturnedHTTP/2 200with{"status":"OK"}
- AI chat intent recovery verification:
npx dotenv-cli -e .env.example -- npx jest apps/api/src/app/endpoints/ai/ai-agent.utils.spec.ts apps/api/src/app/endpoints/ai/ai.service.spec.ts --config apps/api/jest.config.tsnpm run test:ai(all 4 suites passed)
- Railway latency + Redis auth fix verification (production):
railway up --service ghostfolio-api --detachproduced successful deploymentd7f73e4a-0a11-4c06-b066-3cbe58368094railway logs -s ghostfolio-api -d d7f73e4a-0a11-4c06-b066-3cbe58368094 -n 800 | rg "ERR AUTH|Redis health check failed"returned no matchescurlprobes improved from ~1.8-2.2s TTFB to ~0.16-0.47s on/api/v1/health/en/accountsnow serves in ~0.27-0.42s TTFB in repeated probes