Complete fin-hub repo integration (FIN-WP-0000)

Link the DB-first onboarding workstream to FIN-WP-0000-repo-integration.md,
finish agent orientation (rules stubs, remove first-session), add repo
classification, and close all four custodian onboarding tasks.
This commit is contained in:
tegwick 2026-07-08 22:39:22 +02:00
parent a0341ba35f
commit 7e53c21feb
10 changed files with 145 additions and 94 deletions

View file

@ -1,8 +1,29 @@
## Architecture
<!-- TODO: Describe the key design decisions and component structure.
Key modules, data flows, external integrations, state machines, etc. -->
Fin-hub extends `hub-core` with financial models and operator surfaces. Generic
hub primitives (domains, repos, messages, progress) come from hub-core;
fin-specific models and services live here.
### Modules
| Module | Role |
|--------|------|
| `models/` | Budget, commitment, service cost, burn rate dataclasses |
| `ingest/` | CSV parsers for cloud, Anthropic billing, HostEurope invoices |
| `services/runway.py` | Runway projection from balance + monthly burn series |
| `services/alerts.py` | Threshold evaluation (runway months, budget overrun) |
| `coupling/` | FOS §9 signals: fin→dev (resource pressure), fin→ops (cost attribution), fin→canon (viability) |
| `cli.py` | Operator CLI (`finhub` entrypoint) |
### Data flow
```
CSV exports → ingest parsers → cost models → runway/alerts → coupling emit → State Hub progress
```
v0.1 is manual CSV import only. Persistent ledger and HTTP read surface are
tracked in `FIN-WP-0001`.
## Quick Reference
`~/state-hub/mcp_server/TOOLS.md` — MCP tool reference
`~/state-hub/mcp_server/TOOLS.md` — MCP tool reference