Atlas for Clarus Global Capital
This release includes a persistent synthetic database. From the extracted bundle root, start with node start.mjs. The default local port is 4180.
1. Trial objective and delivery contract
Advisors need a single explainable view of client wealth. Operations staff need to reconcile fragmented custodian files before advisors can rely on them. A reviewer needs to see exactly what will become permanent and why. Trial acceptance target: every scripted fixture has the expected disposition, and every reported value can be traced back to a saved statement. The trial uses synthetic data and a single reviewer on a local machine.
The advisor application lives at /. The documentation always lives at /docs; it is served from the versioned docs/ directory. Direct navigation to either route must work. Update the documentation in the same change whenever a rule, schema, supported source format, or calculation changes.
2. Research and decisions
| Topic | Evidence and Atlas design decision |
|---|---|
| Business context | Clarus Global Capital describes consolidated performance, cash-flow monitoring and custody coordination in its family office services. Prioritize account-level provenance and completeness alongside headline wealth. |
| Document extraction | GPT PDF support describes text and visual analysis of PDFs. Structured outputs constrains response shape. Run financial and cross-field checks independently of schema validation. Reject unsupported, encrypted or unreadable submissions with a reason and a manual entry path. |
| Instrument identity | ANNA administers international securities identifiers. Preserve original identifier, type and market, and resolve against a curated crosswalk. Record the mapping source and version. Ambiguous or missing matches require review. |
| Fixed income | U.S. Treasury clean and dirty price example documents the relationship with accrued interest. Store clean value, accrual, dirty value, and pricing convention separately. Reconcile using the basis in the printed statement and count accrued interest exactly once. |
| Performance | CFA Institute GIPS Standards for Firms distinguishes external cash flows and investment returns. Label trial Modified Dietz estimates explicitly. Exact time-weighted returns require valuation at flow boundaries. Confirm the methodology with Clarus before use in client materials. |
| Storage | SQLite transactions provide transaction isolation and explicit write locking. Use a single database transaction for validation at commit, permanent records, and the load audit event. |
3. Data and ingestion lifecycle
- Register the client, custodian, account and portfolio before ingest. Account identity is scoped by client and custodian. Store reporting currency and account lifecycle. Closing an account requires an explicit closure record to stop carry-forward.
- Receive one statement envelope per client, custodian and statement date. Keep original bytes in a controlled store, hash them, and attach file name, received time, parser version and original page/row references. Capture reporting currency, opening and closing dates and the printed total independently from rows. Include the list of covered accounts, including explicitly zeroed accounts.
- Extract using a structured-file parser or a server-only GPT adapter. Ask for holdings, trades, contributions, withdrawals and source coordinates. Treat file content as untrusted input. GPT receives only the source and extraction schema, with no access to persistence or approval endpoints. Keep uncertain fields empty and surface discrepancies. Save parse failures with a retriable status without advancing the draft.
- Normalize source fields into canonical types and retain original values. Holdings include account, instrument, asset class, currency, market value, cost, quantity, clean and dirty value where applicable, and provenance. Transactions include date, type, signed amount, currency, account, source ID and provenance. Represent money using integer minor units or exact decimal. Quantity is separate precision. Use explicitly sourced FX rates and rate dates for consolidation. Start the trial with one currency.
- Stage immutable revisions under a draft identifier. A fix creates a new revision with changed fields, before/after values, evidence and actor. AI suggestions are proposed changes tied to a revision. Provide a source-to-normalized review and show totals and transactions side by side.
- Validate the current revision and persist rule version, affected rows, observed values and expected bounds. Compute the reconciliation difference from all in-scope positions and cash using the statement valuation basis. Never substitute a computed total for the printed one.
- Review each issue. Fix wrong values or register a missing portfolio, then revalidate. Allow a scoped exception only for a documented reconciliation residual under a policy agreed with Clarus. Require issue code, note, actor and revision. Duplicate deliveries, stale periods, missing required facts and unregistered portfolios are hard blocks. Changing a draft invalidates prior exceptions.
- Commit after the reviewer selects Save to Atlas and confirms. Check permissions and revision again under a write transaction, apply all rules to current state and insert source-linked holdings, transactions and an audit event atomically. Statement uniqueness is client + custodian + account + date. Holdings key includes load, portfolio, instrument and source lot. Transactions use portfolio-scoped source IDs, with evidence-backed matching for sources that omit stable IDs. A retry with the same commit key returns the prior result. A conflicting source requires a dedicated correction workflow.
- Monitor changes after commit. Compare consecutive observations for the same account and instrument on a consistent basis. Apply configured thresholds to value, cost, quantity and unrealized P&L and show earlier value, current value and supporting trade or flow. Acknowledge or resolve each alert with a note. Retry monitoring separately if it fails.
- Correct permanent data through a separately reviewed superseding revision linked to the original, with impacted snapshots identified and rebuilt. Keep original load and history accessible. Historical backfills and revisions require this explicit workflow.
4. Validation rules and failure handling
| Check | Behavior |
|---|---|
| Required metadata and row facts | Validate calendar dates, source, custodian, account, identifier and numeric value. Zero is valid. Blank, non-finite, or ambiguous numeric fields block. |
| Portfolio coverage | All declared accounts must be active registered portfolios for the same client and custodian. Every row belongs to a declared account. A zero-position account needs explicit coverage. |
| Reconciliation | Sum comparable values in statement currency, apply the configured exact minor-unit tolerance, and surface signed difference. Avoid double-counting summary rows and accrued interest. |
| Duplicate | Compare content hash, committed statement key, lot/source-row identity and transaction IDs. A committed statement can never be duplicated through reviewer override. |
| Stale | Compare with latest committed date for the same client and custodian. Show latest load in the error. Do not use another client's or custodian's date. |
| Transaction validity | Check account, period, source reference, sign and classification. Match transfers across included accounts so consolidation does not misstate external flows. Ambiguous transfers make performance provisional or unavailable. |
| Concurrency and recovery | Reject stale revisions, roll back partial commits, and make repeat submissions safe. Failed parsing and blocked validation leave permanent collections untouched. |
5. Month-end and reports
- Enumerate the client's active portfolios at the cut-off. For each, use the latest explicit observation at or before month-end, using the agreed month-end convention. Show original valuation date and mark carried balances. An explicitly zero account contributes zero. An account with no observation is unknown and contributes a coverage warning.
- Sum current and carried values and group the same positions into allocation by asset class and custodian. Calculate shares from identical scope and flag an undefined allocation denominator.
- Calculate monthly performance only for accounts with fresh beginning and ending values and complete external flows. Modified Dietz is
(ending - beginning - sum(flows)) / (beginning + sum(day_weight × flow)), with positive flows into the measured scope and weights reflecting time remaining. Apply the same eligible accounts to numerator and denominator. Show eligible wealth and omitted accounts. Return unavailable for insufficient inputs or a nonpositive denominator. - Show contributions and withdrawals as sourced cash activity, report net external flow separately, and use the matching performance scope for investment gain. Buy and sell trades within a portfolio are internal activity. Avoid inferring investment returns from changes in aggregate wealth.
- Export a fixed snapshot version to CSV, print-ready report and slide deck. Include client, reporting date, reporting currency, coverage, carried balances, performance method, approval exceptions, sources and generation timestamp. Verify that every artifact agrees with the on-screen snapshot and stays tied to its source revision.
6. Build sequence and acceptance
| Order | Deliverable | Verify before advancing |
|---|---|---|
| 1 | Route shell and synthetic client/account fixtures | / opens the advisor workspace and /docs opens this plan directly. |
| 2 | Structured statement import, revision review and deterministic gate | Import valid, mismatched, malformed, duplicate, stale and unknown-portfolio fixtures. Confirm expected reasons and unchanged permanent data while blocked. |
| 3 | Reviewer save, durable records and audit | Save a reconciled load, retry it, reload the service and confirm one load. Test partial-write rollback and concurrent submissions before shared deployment. |
| 4 | Snapshot and allocation | Compare an explicit zero, a carried account, a fresh account and an account without history. Reconcile totals to underlying rows. |
| 5 | Performance, cash activity and monitoring | Verify zero return for a pure contribution, correct elapsed-day weighting and carried-account exclusion. Flag an unusual movement and record reviewer disposition. |
| 6 | Client outputs | Compare dashboard, CSV, printable report and deck to the same selected snapshot. |
| 7 | GPT adapter and custodian sample validation | Run a reviewed corpus with redacted PDF layouts, page-level evidence, unknown mapping, extraction failure and proposal-only behavior. Measure field accuracy and manually review every unresolved discrepancy. |
| 8 | Shared trial readiness | Confirm access, data handling, retention, approved processor settings and restore procedure before onboarding actual client statements. |
Open Clarus decisions include approved sample formats, currency and FX policy, reconciliation and movement thresholds, return methodology, reviewer roles, retention, and whether exceptions need a second approver. These inputs govern shared use. Synthetic fixtures can exercise the local workflow independently.
7. Local trial status and operation
From the Atlas folder, run node server.mjs using Node 24. Open http://127.0.0.1:4173/ for the app or http://127.0.0.1:4173/docs for this document. The local SQLite file is created automatically. Set PORT to choose a different port and ATLAS_DB=:memory: to run a disposable demo.
The current vertical slice uses one synthetic client, two predefined portfolios, manually editable JSON with one account per statement, USD cents, exact reconciliation, duplicate and stale checks, an explicit Save confirmation, SQLite persistence with save timestamps, and a month-end value and allocation view. A valuation from any date in the selected month counts as current in this slice. As the app evolves, apply the agreed month-end convention described above.
Remaining work includes original document custody and page-level lineage, persisted draft revisions and reviewer identity, exception and correction workflows, more complete normalization, fixed report versions, slide decks, and GPT extraction. The prototype is a local synthetic-data workspace.
8. Transactions and reporting implementation
The local trial now accepts a JSON file or pasted input. Source references are reviewer-supplied text. Add a statement's inclusive periodStart and a transactions array with id, date, type, and signed integer-cent amount. Supported types are positive contributions, sales and dividends and negative withdrawals, purchases and fees. IDs must be unique within a custodian across saved loads. Previously saved statements without activity fields still work for wealth and allocation. Include an empty transactions array to assert that a fully reviewed period had no transactions.
For performance, the trial requires exact prior and current calendar month-end dates, a current statement period beginning on the first of the month, a source reference, and a declared activity array. The report displays eligible account count and wealth. Modified Dietz weights external flows by the number of days remaining after the flow date. Investment gain covers only eligible accounts. Purchases, sales, dividends and fees are internal to the measured scope. Inter-account transfer matching is pending.
The advisor workspace shows live movement alerts for matched instruments between consecutive loads. The synthetic threshold is an absolute relative movement of at least 25% in value, cost, quantity or unrealized P&L. Any change from zero is flagged. Optional cost is in cents and quantity is in units. Reviewers can acknowledge an alert with a required note. Alert assignment remains planned.
The snapshot API serves the same calculation to the app and CSV endpoint. The browser can print the report view. CSV values are in USD cents and include account coverage, provenance references, activity and performance. The report is regenerated from saved statements for the selected month. Month-end close supports signed CSV versions. Slide decks remain planned.
9. Guided advisor demo
Run ATLAS_DEMO=1 PORT=4174 node server.mjs with Node 24. This opens a separate in-memory workspace for the fictional Ashford family with September through November statements. Restarting the demo process restores the original fixtures. Normal startup continues to use the local SQLite file.
- Open Portfolio overview for November. UBS is current and Northern Trust is carried from October. Opening consolidated wealth is $3,470,000.
- Select Review statement. Use Reconciliation mismatch to see a $3,000 difference. Run validation, apply the correction from the synthetic source, and rerun validation. The duplicate scenario demonstrates a hard block.
- Choose Save to Atlas, then Confirm save. Northern Trust becomes current, consolidated wealth moves to $3,511,000, and performance coverage increases from one account to two.
- Open Activity & audit to verify the saved source and review movements and flows. Open Reports to view, print, or download the same month-end snapshot.
JSON import and editing remain available under the advanced disclosure. The demo correction uses a known synthetic value and illustrates a proposed change with evidence. The PDF inbox supports live extraction when GPT credentials and a model are configured.
10. Product architecture for a multi-client Atlas
Atlas is one advisor application with distinct areas for client portfolios, investment operations, and reporting. Every screen uses the same canonical account, valuation and audit records.
| Area | Workflows | Service and data ownership |
|---|---|---|
| Client workspace | Client directory, household entities, account ownership, reporting currency, mandates and advisor access | Client and portfolio registry with scoped role assignments |
| Portfolio book | As-of views, positions and lots, allocation, exposure, FX, cash and period performance | Ledger of committed observations and transactions, instrument master, reference data and snapshot calculation |
| Statement operations | Receipt queue, custodian templates, encrypted source storage, parsing jobs, revision comparison and approvals | Ingestion service, versioned extraction adapters, object storage, and deterministic gate |
| Review and controls | Missing statements, mapping exceptions, reconciliation, stale or duplicate loads, unusual movements and reviewer actions | Issue records and append-only audit events. Approvals bind to a particular revision and policy version. |
| Reporting | Month-end close, coverage sign-off, immutable report revisions, print, CSV and slide decks | Versioned snapshot and artifact generation. Every export carries source load IDs and methodology. |
| Administration | Roles, custodian mappings, policy thresholds, data retention, recovery and operational status | Tenant and entitlement controls, reference data governance, and service monitoring |
Implementation order
- Prove the local workflow with synthetic statements and a populated advisor workspace. The current app supports portfolio history, holdings with statement provenance, statement review, audit and reports.
- The local trial has a client and portfolio registry. Add authenticated user access and enforce tenant entitlements before enabling shared access.
- Add source object storage and a durable extraction queue. Deduplicate source files by scoped content hash. Record claim, retry, completion and failure states. Restrict GPT to typed proposals with source references.
- Add a reviewer inbox, permissioned resolution and immutable revision events. Commit accepted records and audit together, then enqueue downstream recalculation. Idempotent jobs rebuild affected snapshots from the committed ledger.
- Introduce portfolio-level reconciliation across currencies, explicit period-close rules, movement dispositions, and operational dashboards. Publish immutable client artifacts from an approved snapshot with its coverage and methodology attached.
- Verify recovery, privacy, export permissions, statement-format coverage and financial calculation fixtures before using actual client documents.
The trial remains a web app. It uses macOS-inspired month and dropdown popovers, plus native search, radio and dialog controls. Live SwiftUI controls would require a separate native client. The wealth history chart shows the full selected three- or six-month timeline. Months without recorded valuations remain blank. Each available value and missing month appears in the chart’s accessibility label.
The reporting month, as-of month, custodian, and scenario controls use compact macOS-inspired popovers on browsers that support the Popover API. The month grid moves between years and selects whole months. Dropdowns mark the selected option and support arrow keys, Enter, and Escape. Native inputs remain the fallback.
The Statement Review inspector compares the reviewed draft against a fixed synthetic source. For imported JSON, it shows the supplied references and identifies when independent source evidence is unavailable.
Portfolio investigation
Open a holding to inspect its reported value, optional cost basis and quantity, unrealized P&L, and statement-linked history. History is scoped to the selected custodian, account and instrument and ends at the valuation shown.
Activity & Audit can filter saved loads, alerts and current reporting-month transactions by custodian. Open a saved statement to review its recorded holdings and source reference.
Movement alert review
Filter movement alerts by custodian or review status. Open an alert to compare observations and record a review note. The first acknowledgement is timestamped and retained with the alert. Notes persist in normal local SQLite mode and reset with the disposable demo.
PDF statement inbox
- Open Statement inbox and upload a PDF up to 12 MB. Atlas stores the original and recognizes repeat uploads by file hash.
- Select Extract with GPT to send the PDF to OpenAI for a structured holdings proposal. In demo mode, the seeded Northern Trust PDF has a labeled fixture extraction. You can also enter holdings manually.
- Check the account, statement date, currency, printed total and each holding against the original. Atlas renders PDFs locally with PDF.js and offers page navigation and zoom. Use a holding’s source-page button to jump to the cited page, or open the original separately. Confirm the physical PDF page for each row. Edit the draft, then choose Save draft and validate.
- Choose Approve & save and confirm. Atlas checks the reviewed revision again before saving the holdings, original PDF reference and hash together. Use Activity & Audit to reopen the saved statement and its PDF.
To enable live extraction, start Atlas with OPENAI_API_KEY set on the server. The default model is gpt-6.2-astra. Set ATLAS_GPT_MODEL to use another model with PDF and structured output support. The key stays on the server. Uploading alone keeps the PDF local. The extraction button sends it to OpenAI. GPT PDF support · GPT structured outputs
The local workflow supports a single registered account per USD statement and extracts holdings and supported transaction activity. Uploads, drafts and approvals persist in the local SQLite database in normal mode. The demo uses disposable in-memory storage and resets on server restart.
Client workspaces
The Clients directory supports search and previews a client’s portfolios and statement counts. Choose Open workspace to switch the active client. The toolbar selector also switches clients directly. In demo mode, Ashford Family has the sample PDF inbox and Meridian Foundation has a separate seeded portfolio. Use New client to add a workspace and Register portfolio to add the custodian and printed account ID. Upload the statement from that client's inbox.
The selected client scopes holdings, loads, reports, statement files, and review records. Normal mode keeps the original workspace in the existing SQLite database and stores additional client databases in its companion .clients directory. Include both locations in backups. This localhost trial supports multiple portfolios at the same custodian. Each PDF still covers one registered account. User sign-in, per-user entitlements, shared hosting, and multi-account statements are future milestones.
Scaling review
The client directory now previews portfolios and saved statements. Atlas now identifies each observation by custodian, account and date inside a client workspace. Each account reconciles, carries forward and qualifies for performance independently.
- Use portfolio identity throughout. Loads, transaction identity, duplicate and stale checks, carry-forward, coverage and movement alerts now use the custodian and account pair. Stable portfolio IDs and account rename history remain future work.
- Make close status visible. Month-end close shows saved, missing and matched drafts awaiting review for the selected month. It shows the latest valuation in use and whether it was carried or eligible for performance. Open a matched draft directly from its account row.
- Identify reviewers before shared use. Require sign-in and enforce client-level permissions across the API and PDF routes. Store who reviewed and approved each saved revision. A selectable client in the interface establishes workspace context only.
- Operate extraction as a durable job. Atlas now tracks queued, running, failed and completed work independently of the browser. Model-level job audit and a throughput test remain future work.
A representative acceptance fixture has two accounts from the same custodian at the same month-end. Both save independently. When one account is missing the following month, its balance carries forward and only the current account qualifies for performance, subject to its opening valuation and flows.
Signed month-end snapshots
Open Month-end close, check coverage, and choose Sign off snapshot. A note is required when an account has no current statement or contributes a carried balance. Atlas requires at least one recorded valuation, checks that the displayed snapshot still matches current data, and gives the signed snapshot a version number.
The archive keeps the sign-off timestamp, review note, and fixed CSV for each version. A later statement can change the live snapshot. Sign off again to publish a new version while earlier downloads remain intact. This local trial records the action and timestamp. Authenticated reviewer identity remains planned.
Background PDF extraction
Choose Upload PDFs to add one or more local files. Opening a file and selecting Extract with GPT queues it. Search by filename, custodian, account or date, or filter by status. Select eligible PDFs and use Queue with GPT to submit several at once. Opening another statement prompts you to keep or discard unsaved changes. You can queue other PDFs or leave the workspace. Pending files show Queued or Extracting. Completed work moves to Needs review. Failed work shows an error and a retry action.
Atlas runs up to two extractions at once across the local server. Normal mode resumes work that was still queued when the server stopped. Interrupted in-flight requests require a manual retry to avoid automatically repeating a request that may have reached OpenAI. Demo storage resets on restart.
PDF transaction and cash-flow review
GPT proposes trades, contributions, withdrawals, dividends and fees separately from closing positions, with source pages and printed transaction IDs when available. Review or add rows in the inbox. Enter the period start, verify signs, and use a stable source ID for each row. Holdings still reconcile against the independently printed closing total.
Mark activity complete only after checking the entire statement period, including an explicit absence of transactions if applicable. Incomplete activity can be saved when its recorded rows validate, and excludes the account from performance for that month. Atlas also checks month-end dates, opening valuations and cash-flow scope.
Cash and trades ledger
Open Cash & trades to review posted transactions for the reporting month. Filter by registered portfolio, transaction type or source text. Contributions, withdrawals and net external flow summarize the full month for the selected portfolio scope.
Select a transaction to see its signed amount, classification, source ID and saved statement. PDF-backed records link to the original statement at the cited page. Rows appear after statement approval.
Performance breakdown
Open Performance for the selected reporting month. The gain reconciliation uses the same eligible scope as the published Modified Dietz estimate. Opening value plus net external flows plus investment gain equals closing value for those accounts.
The coverage table shows recorded opening and closing valuations alongside exclusion reasons. Carried valuations are visible in closing value and remain outside performance. Select a portfolio to inspect the valuation sources.