Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,16 @@ updates:
time: "05:45"
timezone: America/Chicago
open-pull-requests-limit: 3
groups:
# The RustCrypto crates share a `digest` major version. Bumped one at a time
# they cannot compile: sha2 0.11 moves to digest 0.11 while hmac 0.12 still
# expects digest 0.10, so Sha256 stops satisfying hmac's CoreProxy bound and
# new_from_slice/verify_slice fall off CoreWrapper<HmacCore<Sha256>>. Keeping
# them in one pull request makes the major bump atomic and compilable.
rustcrypto:
patterns:
- "sha2"
- "sha1"
- "hmac"
- "digest"
- "hkdf"
6 changes: 3 additions & 3 deletions DUMBMONEY_WORKSPACE.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
"snapshot_executed": false,
"runtime_binding": "dumbmoney.runtime-bindings.v2:dimwit",
"source_repository": "https://github.com/ObtuseAI/dimwit",
"public_base_commit": "1a6dbf6ae043bacd203f2ff17fe03a3e4a07bb43",
"integration_commit": "1a6dbf6ae043bacd203f2ff17fe03a3e4a07bb43",
"source_tree": "77eddc59e2a70ce18647f8555b4dcb3f06722200"
"public_base_commit": "276527a38c30df1427d4cf8effee899a55198d24",
"integration_commit": "276527a38c30df1427d4cf8effee899a55198d24",
"source_tree": "d5bbc2fc2feff1183d4a16cd726c3b454acedebf"
},
{
"name": "nimrod",
Expand Down
5 changes: 3 additions & 2 deletions contracts/runtime-bindings.v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"cell": "dimwit",
"upstream_snapshot": {
"path": "projects/dimwit",
"source_tree": "77eddc59e2a70ce18647f8555b4dcb3f06722200",
"source_tree": "d5bbc2fc2feff1183d4a16cd726c3b454acedebf",
"product_role": "proof_bearing_game_production_studio",
"executed_by_runtime": false
},
Expand All @@ -168,7 +168,8 @@
"implementation_status": "PARTIAL",
"limitations": [
"deterministic_ohlcv_indicators_plus_held_out_ta_evidence",
"chart_pixels_and_visual_perception_not_implemented",
"chart_pixel_recovery_is_verified_only_for_charts_this_runtime_rendered",
"foreign_chart_screenshots_are_not_interpreted",
"frozen_dimwit_is_a_game_production_studio_and_is_not_executed"
],
"executes_upstream_snapshot": false
Expand Down
16 changes: 15 additions & 1 deletion projects/dimwit/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ jobs:
# test_bot_balance_telemetry, test_elite_toolchains,
# test_metahuman_output_attempt, test_packaged_build_validation,
# test_performance_baseline.
# The 10 dimwit/tests/test_market_*.py modules are the market evidence
# lane (dimwit/market/): pure Python plus numpy/pillow, no Unreal, no
# Blender, no Windows path assumptions and no network, so they belong in
# the clean-clone set rather than the local-only one.
# This selection is the honest intersection a clean Linux runner can
# actually satisfy: 549 tests across 58 modules, including source-controlled
# actually satisfy: 788 tests across 68 modules, including source-controlled
# engine fixtures, improvement outcomes, and cross-engine proof receipts.
run: |
python -m pytest -q -p no:cacheprovider --no-header \
Expand Down Expand Up @@ -109,6 +113,16 @@ jobs:
dimwit/tests/test_ui_settings_persistence.py \
dimwit/tests/test_universal_mobile_factory.py \
dimwit/tests/test_unreal_game_builder_engine.py \
dimwit/tests/test_market_bars.py \
dimwit/tests/test_market_cell_contract.py \
dimwit/tests/test_market_chart.py \
dimwit/tests/test_market_chart_vision.py \
dimwit/tests/test_market_evidence.py \
dimwit/tests/test_market_indicators.py \
dimwit/tests/test_market_knowledge.py \
dimwit/tests/test_market_patterns.py \
dimwit/tests/test_market_scan.py \
dimwit/tests/test_market_sports.py \
tests/test_animation_roster.py \
tests/test_mode_contract.py \
tests/test_progression.py \
Expand Down
15 changes: 15 additions & 0 deletions projects/dimwit/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,25 @@ Autonomy **STOPS** at the review ceiling. The operator (a human) owns everything
6. **Validate before trust.** After ANY change you make, run `python scripts/pipeline/run_validation.py` (exit 0 only on suite
PASS). Your change is a **CANDIDATE** until it passes. Stop at the review ceiling.

## The market cell (`dimwit/market/`)
Dimwit's market evidence lane applies the studio's law to prices and game state. Same doctrine, three extra
non-negotiables:
1. **Observations only.** Never emit `forecast_probability` or `expected_return_bps` as anything but `None`.
Probability and edge claims belong to a downstream evidence court, after held-out evidence.
2. **No lookahead, structurally.** Indicators must be prefix-stable (`indicator(bars)[i]` equals the value on
`bars[:i+1]`); patterns must expose `detected_at_index`, and rules may read only that, never `index`.
3. **Disclose the search and the baseline.** Any new rule raises `family_size`; any claim is scored on excess
over the unconditional same-side baseline and must beat its own placebo. Never add a rule without re-running
`python -m dimwit market audit --deep`.

No network, no credentials, no broker calls in that package. A new module there must be added to
`evidence.ATTESTED_MODULES` or the contract test fails.

## How to drive
| Purpose | Command |
|---|---|
| The gate (full fail-closed suite; exit 0 = PASS) | `python scripts/pipeline/run_validation.py` |
| Market cell anti-costume gate (exit 0 = clean) | `python -m dimwit market audit --deep` |
| Fast gate (UE/eyes validators → BLOCKED, cannot PASS — honest) | `python scripts/pipeline/run_validation.py --no-ue` |
| List every validator | `python scripts/pipeline/run_validation.py --list` |
| The loop (sweep to PROMOTED_TO_REVIEW) | `python scripts/pipeline/run_director.py` |
Expand Down
22 changes: 22 additions & 0 deletions projects/dimwit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- `dimwit.market`: the market evidence lane — the studio's evidence law applied to prices and game state
instead of pixels and packages, with the same fail-closed discipline.
- 46 prefix-stable indicators and 24 pattern detectors, each carrying its confirmation lag.
- Deterministic candlestick renderer (PNG + SVG, three themes) with invertible pixel geometry, plus chart
vision that reads the prices back out and reports recovery error in pixels.
- Walk-forward rule scanner over 35 rules with baseline-excess scoring, overlap deflation, Bonferroni and
Benjamini–Hochberg search disclosure, and a placebo control.
- Sports game-state analysis, margin/win-probability charting, and a cross-game rule scanner whose
observations are genuinely independent.
- A 111-term citable knowledge pack merged from the code registries plus 41 methodology, microstructure and
assurance concepts.
- Downstream-compatible observation export, an implementation attestation over the market modules' own bytes,
and a hash-chained evidence ledger with a length anchor so tail truncation is detectable.
- `python -m dimwit market <cmd>` operator surface; each command exits non-zero on a BLOCKED verdict.
- `dimwit market audit` — the anti-costume gate: runs the cell and reports what actually executed.
- New `MARKET` capability domain (24 read-only capabilities). The two writing verbs, `EXECUTE/chart.export` and
`EXECUTE/evidence.record`, stay behind the existing MCP mutation gate.
- MCP path confinement for the chart-vision verbs that accept a local image path.
- 239 tests in `dimwit/tests/test_market_*.py`.

## [0.1.1] - 2026-07-26

### Fixed
Expand Down
60 changes: 58 additions & 2 deletions projects/dimwit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Every executable lane returns receipts. Every promotion stops for human review.

[![Tests](https://github.com/ObtuseAI/dimwit/actions/workflows/tests.yml/badge.svg)](https://github.com/ObtuseAI/dimwit/actions/workflows/tests.yml)
[![Python 3.12](https://img.shields.io/badge/Python-3.12-3776AB?logo=python&logoColor=white)](https://www.python.org/)
[![CI proof](https://img.shields.io/badge/clean_clone-549_tests-8B5CF6)](.github/workflows/tests.yml)
[![CI proof](https://img.shields.io/badge/clean_clone-788_tests-8B5CF6)](.github/workflows/tests.yml)
[![Human gate](https://img.shields.io/badge/ceiling-PROMOTED__TO__REVIEW-22D3EE)](AGENTS.md)
[![Market lane](https://img.shields.io/badge/market_lane-239_tests-F59E0B)](docs/DIMWIT_MARKET_LANE.md)
[![Source available](https://img.shields.io/badge/license-source--available-22C55E)](LICENSE)

</div>
Expand All @@ -23,6 +24,8 @@ It turns a brief into a typed, dependency-aware production graph. Each runnable

Dimwit can autonomously prepare a candidate up to `PROMOTED_TO_REVIEW`. Human acceptance, source integration, signing, publishing, payment, account access, store submission, and active-slice promotion remain operator-owned.

The evidence machinery is not specific to art. Dimwit applies the same law to numbers in its [market evidence lane](#12-market-evidence-lane): 46 indicators proven prefix-stable by recomputation, chart recovery error reported in pixels, and rule survival reported only after a disclosed search space and a placebo run. It emits observations and never a forecast.

## Product truth

| Contract | Current public state |
Expand All @@ -32,6 +35,7 @@ Dimwit can autonomously prepare a candidate up to `PROMOTED_TO_REVIEW`. Human ac
| **Engineering evidence baseline** | [`1019e4df`](https://github.com/ObtuseAI/dimwit/commit/1019e4dfb6191a2e751829253fde7359c5bb2d67) · configured [test workflow](https://github.com/ObtuseAI/dimwit/actions/workflows/tests.yml) |
| **Proved now** | The public source implements typed production graphs, capability detection, bounded command plans, receipts, artifact hashing, fail-closed validators, recovery candidates, and review promotion. |
| **Authority ceiling** | Automation stops at `PROMOTED_TO_REVIEW`. Human operators own acceptance, integration, publishing, accounts, payment, signing, and active-slice promotion. |
| **Second production lane** | **Market evidence lane** — [`dimwit/market/`](dimwit/market): deterministic technical analysis, chart rendering, chart *vision*, walk-forward rule evidence, and sports game-state analysis. Observations only; no network, no credentials, no broker. |
| **Clean demonstration** | Use the [quick start](#quick-start) to inspect the graph, run provider-free checks, and exercise bounded studio surfaces. |
| **Known limit** | DCC execution, live captures, visual judgment, mobile SDKs, and packaged-build proof depend on the actual local toolchains and current project evidence; missing evidence remains blocked. |

Expand All @@ -51,6 +55,7 @@ Dimwit can autonomously prepare a candidate up to `PROMOTED_TO_REVIEW`. Human ac
| **Does every engine execute everywhere?** | No. Adapters report detected, ready, plan-only, blocked, or reference-only based on actual project and toolchain evidence. |
| **What is the core output?** | A review candidate with build receipts, logs, artifact hashes, validator results, provenance, rollback notes, and unresolved blockers. |
| **What makes it different?** | It treats creative-production claims as evidence contracts rather than accepting successful process exit, generated files, or AI confidence as proof. |
| **Does it only do art?** | No. The [market evidence lane](#12-market-evidence-lane) applies the same law to prices and game state instead of pixels and packages: technical analysis, chart vision, and walk-forward rule evidence. `python -m dimwit market audit --deep` runs it and reports what actually executed. |

## The production problem

Expand Down Expand Up @@ -373,6 +378,41 @@ The local Studio IDE brings production state into one work surface:

The server binds to `127.0.0.1` and prints a tokenized URL. The token protects source views and operator actions. The interface does not expose an arbitrary shell or generic filesystem mutation endpoint.

### 12. Market evidence lane

The same evidence law, applied to numbers instead of pixels. [`dimwit/market/`](dimwit/market) is eleven modules
of deterministic market analysis: technical indicators, chart rendering, chart *vision*, walk-forward rule
evidence, and sports game-state analysis.

| Question | Answer |
| --- | --- |
| **What does it do?** | Reads OHLCV bars and game timelines, renders charts, reads charts back, and produces walk-forward evidence about rules over them. |
| **Why is it here?** | Because "the process exited zero" proves nothing about a number either. A backtest is the purest form of a claim that looks like proof and is not. |
| **What is measured, not asserted?** | 46 indicators proven prefix-stable by recomputation on truncated prefixes; chart recovery error reported in **pixels** (≤ 0.5 px); rule survival reported after Bonferroni and Benjamini–Hochberg on a disclosed search space. |
| **Does it forecast?** | No. Every result carries `forecast_probability: None`, and a test asserts it across all fifteen public result types. |
| **Does it touch money?** | No. No network, no credentials, no broker, no orders. Bars arrive from the caller with a declared classification. |
| **Authority ceiling** | Unchanged. The lane emits observations; nothing it produces promotes, sizes, or executes anything. |

Three properties do the work:

- **Prefix stability.** `indicator(bars)[i] == indicator(bars[:i+1])[-1]`, tested per indicator. That converts
"no lookahead" from an assurance into a property a test can fail. Patterns carry both `index` (where the shape
is) and `detected_at_index` (when it was knowable), because a fractal pivot is not visible until its
confirmation bars exist.
- **Falsifiable chart vision.** The renderer returns its exact pixel geometry; the reader inverts it; the
round-trip is scored against known values. "Dimwit can see a chart" becomes a number a test can fail, not a
claim. Foreign screenshots are read for shape only, with the price scale pinned to `UNKNOWN`.
- **Honest observation accounting.** Settled independent observations are the scarce resource, so rules are
scored on **excess over the unconditional same-side baseline**, t-statistics are deflated for window overlap,
and a placebo run with displaced entries must not match the real result. On a random walk the scanner finds
nothing; on an injected conditional edge it recovers the responsible rule.

Provenance is recomputable rather than declared: every export embeds a digest of the actual bytes of the eleven
attested market modules, and `python -m dimwit market audit` runs the lane end to end and reports what really
executed — including what is deliberately absent.

Full detail: [market evidence lane](docs/DIMWIT_MARKET_LANE.md).

## What proof looks like

| Production claim | Required evidence |
Expand Down Expand Up @@ -412,6 +452,19 @@ python dimwit.py studio --status
python scripts\pipeline\run_validation.py --list
```

Exercise the market evidence lane against its deterministic synthetic fixture (no network, no data files):

```powershell
python -m dimwit market audit --deep
python -m dimwit market indicators --self
python -m dimwit market vision --self --bars 120
python -m dimwit market scan --self --null
python -m dimwit market chart --self --bars 140 --theme tote --out today
python -m dimwit market know adverse_selection
```

Each command prints one JSON document and exits non-zero on a `BLOCKED` verdict, so any of them works as a shell gate.

Launch the local Studio IDE:

```powershell
Expand Down Expand Up @@ -481,6 +534,7 @@ dimwit/
|-- adapters/ shared engine and production contracts
|-- capabilities/ typed registry and read/mutate boundaries
|-- ledger/ evidence, outcomes, integrity, and repair
|-- market/ market evidence lane: TA, chart render and vision, scans, sports
|-- pipelines/ production, validation, runtime, and review flows
|-- toolchains/ Blender, Unreal, engine, and mobile execution plans
|-- studio/ DAG scheduling, receipts, and IDE data surfaces
Expand All @@ -503,6 +557,7 @@ Recommended reading:
2. [Elite Studio toolchains](docs/DIMWIT_ELITE_STUDIO_TOOLCHAINS_20260711.md) — Blender, Unreal, and the studio DAG.
3. [Universal game and mobile factory](docs/DIMWIT_UNIVERSAL_GAME_FACTORY_20260711.md) — engine adapters and mobile evidence.
4. [Open-source adaptation audit](docs/DIMWIT_BLUNDER_OPEN_SOURCE_AUDIT_20260711.md) — reused ideas, upstream policy, and boundaries.
4b. [Market evidence lane](docs/DIMWIT_MARKET_LANE.md) — technical analysis, chart vision, and observation accounting.
5. [Autonomy capability matrix](docs/superpowers/specs/2026-06-28-autonomy-capability-matrix-design.md) — capability states and validation integration.
6. [Cross-pipeline contract auditor](docs/superpowers/specs/2026-06-28-cross-pipeline-contract-auditor-design.md) — drift detection between production lanes.
7. [Real-game validation loop](docs/superpowers/specs/2026-06-28-real-game-validation-loop-design.md) — runtime and capture proof.
Expand Down Expand Up @@ -534,7 +589,8 @@ Dimwit does not:
- fabricate an iOS archive on Windows or a DCC result when the DCC is absent;
- delegate signing credentials, purchases, account access, publishing, or payment;
- promote its own work beyond `PROMOTED_TO_REVIEW`;
- convert a successful command, generated file, or AI opinion into complete production proof.
- convert a successful command, generated file, or AI opinion into complete production proof;
- forecast prices or outcomes, hold broker credentials, place orders, or claim an edge — the market lane emits observations, and the bars it reads arrive from the caller with a declared classification.

The intended outcome is not unattended publication. It is a better-prepared, better-instrumented, and more honestly reviewed candidate.

Expand Down
Loading
Loading