Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# AutoQuant Project evidence is hashed by exact bytes. Never let Git rewrite
# line endings inside datasets, source snapshots, or immutable research objects.
projects/** -text
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:
pull_request:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v9.0.0
with:
enable-cache: true
- run: uv python install 3.12
- name: Test changed research contracts
run: >-
uv run --python 3.12 --with pytest python -m pytest
tests/test_model_runtime.py
tests/test_compute_jobs.py
tests/test_verification.py
tests/test_json_event_intake.py
tests/test_cli.py::AgentCliTests::test_capabilities_describe_every_public_command
tests/test_studio.py::StudioObservationTests::test_workspace_and_project_snapshots_share_verified_contract
-q

frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: studio-web
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: studio-web/package-lock.json
- run: npm ci
- run: npm test
- run: npm run lint
- run: npm run check:boundary
- run: npm run build
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ __pycache__/
/dist/
*.egg-info/

# Next.js Studio workbench
/studio-web/node_modules/
/studio-web/.next/
/studio-web/out/
/studio-web/.env*.local

# Editor / OS
.DS_Store
.vscode/
Expand Down
97 changes: 97 additions & 0 deletions DESIGN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
name: AutoQuant Studio Evidence Workbench
schema: design-pipeline.design-foundation.v0.1
sourceMode: requirements-only
activeChange: next-studio-workbench
---

## Product Context

AutoQuant Studio is a dense, repeated-use research environment for factor researchers. Its central promise is point-in-time truth: a researcher can see what information was actually available at a historical moment, form a factor hypothesis from that evidence, and test it without silently changing the evidence underneath.

The product is self-hosted and open source. It supports A-share announcements, crypto events and financial news through adapters. It has no live trading, broker account or order-routing surface.

## Overview

The design posture is an evidence console, not a marketing dashboard and not a retail trading terminal. The primary screen lets a user scan a shared time axis, select evidence, compare cohorts and move into a test without losing context.

Priorities:

1. Make time, provenance and uncertainty legible before visual appeal.
2. Make repeated research work fast: dense, stable, keyboard-friendly and unsurprising.
3. Keep data visualizations inspectable. A chart never hides the source, time boundary or computation behind it.
4. Use visual distinction to identify state and evidence class, not to claim confidence that the data does not have.

## Colors

| Token | Value | Use |
|---|---|---|
| ink-950 | #0B1118 | application canvas |
| ink-900 | #111A24 | persistent navigation and inspector |
| ink-800 | #182434 | raised data surfaces and selected rows |
| line-700 | #2D3A49 | grid lines, separators and chart axes |
| paper-100 | #E7EDF3 | primary text |
| paper-300 | #AFBDCB | secondary text and annotations |
| signal-cyan | #52C7D9 | confirmed factor signal and selected time cursor |
| event-amber | #F1B35C | event marker and pending evidence |
| success-mint | #6BCB9A | completed research job and passing data health |
| danger-coral | #EC7C73 | failed job, invalid input and blocking data issue |
| muted-slate | #728198 | unavailable, restricted or partial state |

Color never carries meaning alone. Every trusted-state color has an icon, visible label and programmatic name.

## Typography

- UI and tabular data use an installed system sans-serif stack with tabular numerals.
- Metric values use tabular figures at 14-18 px; dense tables use 12-13 px with a minimum 1.35 line height.
- Screen titles are functional labels, not editorial hero copy.
- Long evidence text is constrained to a readable measure in the inspector, never compressed into chart tooltips.

## Layout

- Desktop research workbench: 12-column fluid grid with a persistent 240 px navigation rail, a 320-400 px inspector and a flexible central canvas.
- The central canvas owns the shared time axis. K-line, factor signal, market snapshot and event tracks align to it.
- At 1024 px and below, the inspector becomes a focus-managed drawer and event filters become a collapsible panel. Charts retain horizontal pan/zoom rather than shrinking labels below legibility.
- At 768 px and below, research actions use a staged single-column flow: context, chart, selected evidence, action drawer. No critical state is hover-only.
- Dense data uses rows, dividers and hierarchy; avoid nested decorative cards.

## Components

| Component | Contract |
|---|---|
| Trust strip | Fixed, top-of-workspace summary of replay time, bundle coverage, source/permission state and known gaps. |
| Replay transport | Time cursor, step, jump-to-event, pause and optional playback. Always shows timezone and visible-at boundary. |
| Event marker | Encodes adapter, evidence state and group membership; opens a full inspector, never a content-only tooltip. |
| Evidence inspector | Shows source, all relevant timestamps, license state, revision, hash and local/open-source access policy. |
| Cohort tray | Holds one or two explicitly named event groups; comparison cannot start until both have a saved membership rule. |
| Factor passport header | Stable identity, version, latest test status, linked research frame and direct links to data/compute/audit. |
| Test configuration panel | Shows active universe, lag, cost, rebalance, coverage and visibility policy before a run is created. |
| Result provenance card | Always accompanies test metrics with input snapshots, engine version, job ID and output hash. |
| Compute job row | State, resource budget, start/end, retries, logs, outputs and link back to research object. |
| Evidence status chip | Known, partial, delayed, revised, restricted or missing; includes an explanatory detail on focus/click. |

## Do's and Don'ts

Do:

- Put the replay timestamp and data coverage in the primary reading path.
- Preserve a user's research context across every jump between replay, factor, test, task and audit.
- Use calm visual hierarchy and durable table layouts for repeated work.
- Make empty, delayed, restricted and failed states useful: say what is absent, why and what can be done next.
- Offer keyboard navigation for time stepping, opening the inspector and adding evidence to a cohort.

Don't:

- Do not use candlesticks, red/green returns or neon movement to imply a trading product.
- Do not use a generic card grid or dashboard hero as the main research surface.
- Do not hide data versions, timing assumptions or restricted content behind an advanced menu.
- Do not invent confidence scores when coverage or provenance is unknown.
- Do not autoplay a historical narrative or use decorative data animation.

## Source Decisions

| Source | Adopted | Rejected | Reason |
|---|---|---|---|
| Approved replay-first design | Shared time axis, right-side evidence inspector, factor passport entry and ResearchFrame/ReplayBundle concepts | Treating replay as the only required product page | The product requires the full research loop, not a single viewer. |
| Approved AutoQuant scope | Unified research kernel, complete research pages and explicit non-trading boundary | Real trading surfaces | AutoQuant owns factor research from evidence to test result. |
| Requirements-only design synthesis | Quiet, dense evidence-console posture with AutoQuant-owned tokens and domain components | Borrowing another product's visual identity or live-site style | Public Mantine primitives may supply accessible component mechanics, but they must remain themed by AutoQuant and may not define the product identity. |
39 changes: 39 additions & 0 deletions MOTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
schema: design-pipeline.motion-foundation.v0.1
name: AutoQuant Studio motion language
posture: static
primitiveRegistry: design-pipeline.motion-primitives.v1
---

## Motion Thesis

Research evidence should feel stable. Motion must never create a sense of price momentum, urgency or certainty. The product uses deliberate state changes and manual temporal navigation instead of decorative animation.

## Motion Principles

- A replay step changes the research time state; it is not a cinematic playback effect.
- State confirmation must be immediate and readable before any visual transition completes.
- The user can stop, step or jump at every point. No transition blocks evidence inspection or keyboard input.
- New data, revisions and failed tasks appear as labeled state changes, never as surprise animation.

## Motion Vocabulary

No registry primitive is selected. The static posture is intentional because the primary user work is analytical reading, comparison and audit.

## Procedural Motion

None. Charts and replay time progression are data render states, not procedural visual effects.

## Runtime Policy

Use semantic DOM and SVG for bounded visualizations. Small focus, hover and loading feedback may use CSS only if it preserves layout, can be interrupted and communicates no research meaning by itself. No GSAP, Anime.js, Canvas or GPU rendering runtime is selected by this foundation.

## Reduced Motion

The default posture already avoids continuous or decorative motion. The reduced-motion fallback keeps replay in manual-step mode, suppresses optional playback transitions and preserves focus, ordering, labels and error feedback.

## Source Decisions

- Adopted: a static, manual-step posture that treats replay as an inspectable research state.
- Rejected: animated market theatrics, continuous decorative loops and borrowed external motion implementations.
- This is an authored, requirements-only decision. No external motion implementation or visual reference was copied.
6 changes: 5 additions & 1 deletion PLANS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ invariants live in `docs/design/`.

## Active plans

None.
| Plan | Outcome | Updated |
| --- | --- | --- |
| [[plans/agent-research-console]] | Implement the approved OpenSpec Agent Research Console through one Core-owned Operator Port, versioned research definitions, bounded Campaigns, a truthful ResearchLedger Studio, exact-version approval, and reproduction. | 2026-08-03 |

## Proposed plans

Expand All @@ -28,12 +30,14 @@ None.

| Plan | Outcome | Updated |
| --- | --- | --- |
| [[plans/next-studio-workbench]] | Internalized the approved Next.js factor-research workbench over the verified Studio snapshot while keeping private plugin integrations outside the open-source repository. | 2026-08-02 |
| [[plans/order-native-portfolio-decisions]] | Return evidence-backed target weights together with bounded Order/TPSL realization plans shared by mechanical and RL research. Paused until the workbench product model is canonical. | 2026-07-27 |

## Completed plans

| Plan | Outcome | Updated |
| --- | --- | --- |
| [[plans/autoresearch-factor-strategy-studio]] | Exposed the existing Core research program as connected Factor Research and Strategy Research workbenches with truthful evidence, status, model/holdout artifacts, and bounded next actions. | 2026-08-03 |
| [[plans/factor-evidence-report-handoff]] | Made temporal Factor protocol applicability, material train/validation tension, and safe evidence-bound Report drafting explicit to fresh Agents. | 2026-08-02 |
| [[plans/caller-owned-factor-population]] | Separated caller-owned Factor evaluation population from Portfolio position authority across standalone Factor, Portfolio, and governed-RL research. | 2026-08-02 |
| [[plans/concise-documentation-front-door]] | Make README a bounded product entrance and route Agents to one operator guide plus the existing authoritative release documents. | 2026-08-02 |
Expand Down
Loading