14 Commits

Author SHA1 Message Date
760bc7e1fe feat(seo): add equation-discovery FAQ page, fix unresolved merge conflicts in docs-site
Adds docs/getting-started/faq.md targeting real search queries people ask
when evaluating equation-discovery / symbolic-regression tools (what SINDy
is, how LawSynth compares to PySINDy/PySR, whether it's free/offline, what
a .lsworld bundle is, and honest current limitations) — claim-gated against
the actual CLI, README, and docs/research/limitations.md.

Also fixes two unresolved git merge-conflict markers left in
apps/docs-site/package.json and src/site.ts from a prior merge (ef2abe9),
which left package.json as invalid JSON and broke `npm run build/test/render`
for the lawsynth.dev static-site pipeline. Resolved both in favor of the
feat/release-cut-2026-09-06 side (keeps seo_titles.test.js in the test script
and fallbackDescription() in renderPage, which seo_titles.ts already exports
and the rest of the file already relies on). Build, full test suite (15/15),
and a deterministic re-render all pass after the fix.

Rendered and deployed via `npx wrangler deploy`; new page verified live at
https://lawsynth.dev/docs/getting-started/faq (200, correct title/meta,
listed in sitemap.xml), and all referenced internal doc links verified 200.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-17 14:36:42 +03:00
a9815b7ab4 feat(seo): strengthen docs discovery and canonical routing 2026-09-13 18:43:01 +03:00
d4eea9f1d8 chore(hygiene): move scaffolding blueprints off the release root
Relocate the two large generated planning docs
(LawSynth_3161_Repository_Manifest.md 656K, LawSynth_Production_Architecture.md
118K) from the repo root into docs/internal/ so a public v0.1 checkout isn't
~770K of scaffolding at the top level. Update the three references in
PRODUCT.md and docs/roadmap/ to the new paths and add docs/internal/README.md
marking them as non-release artifacts.

Note: untracked local datasets (creditcard.csv 144M, Financials.csv, heart.csv)
were also deleted from the working tree; they are gitignored (*.csv) and were
never tracked, so there is no git-history change here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 13:03:03 +03:00
7dfbb5df69 fix(python): make documented maturin install path work
The `maturin develop` path documented in the README and installation guide
failed: python/lawsynth/ has no Cargo.toml and pyproject.toml carried no
manifest-path, so maturin had nothing to build. Point maturin at the
lawsynth-python crate in the Cargo workspace via manifest-path, and document
scripts/build-native.sh as the maturin-free / offline fallback (both produce
an import-compatible lawsynth._native).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 13:01:01 +03:00
91209aad8a feat(quant): checked integer algebra (mul/neg/abs) on Money contract, +1 test 2026-08-25 03:09:57 +03:00
96e0591c88 fix(discovery): make SINDy sparsity scale-invariant
Discovery ran stlsq_standardized (thresholds in RMS-normalized feature
space) but then re-filtered the restored *original-unit* coefficients by
config.sparse.threshold. That defeated the standardization: genuine terms
whose coefficient is small purely because their state carries a large
magnitude (e.g. SIR's beta/N ~ 3e-4 with populations ~1e3) were pruned,
collapsing the law unless the user hand-tuned the threshold to the data
scale. Keep every non-zero term the standardized solver returns.

Fixing that unmasked a second bug: when a threshold prunes every remaining
active term in one step, STLSQ's loop broke on empty support and returned
the pre-prune *dense* fit, so an aggressive threshold silently produced a
denser model. Zero the coefficients when the support drains, matching the
reference STLSQ contract.

- Add regression tests: keeps_scale_small_coefficients_after_standardized_fit
  and threshold_above_every_coefficient_yields_the_empty_model.
- SIR now recovers the S*I interaction at raw population scale (thr 0.02);
  Lorenz/Lotka-Volterra/damped-pendulum recovery unchanged.
- Add a reproducible discovery gallery (examples/discovery-gallery) and a
  site showcase page (docs/showcase) with deterministic observed-vs-recovered
  SVG plots served from the docs site.
- .gitignore: local datasets, scratch worlds, and regenerable run/work dirs.

Workspace: 1653 tests pass; docs-site render stays byte-identical.
2026-08-19 00:34:05 +03:00
fab9a4a45a feat: reach + performance + docs — Python analysis client, parallel eval, sensitivity, guide
Batch 7 of expansion-v2. Extends the product across surfaces and adds an
analysis primitive. Deterministic/offline/std-only (Rust) or graceful-absence
(Python).

python/lawsynth analysis.py (new): Python client for the engine's stability,
control, and domains analyses — shells out to the lawsynth CLI (--json) and
parses to typed dataclasses. No numerics re-implemented in Python; the Rust
engine is the single source of truth. Locates the binary like the benchmarks,
raises MissingBinaryError/CliError honestly, and is fully parse-testable
offline. 20 tests; full SDK suite 114 passed.

crates/lawsynth-features: opt-in std::thread-parallel feature-library
evaluation, bit-identical to serial for ALL thread counts (row-chunked via
thread::scope, ordered assembly, no parallel float reduction). Verified via
f64::to_bits across {1,2,3,4,7,8} threads x 10 library variants x uneven row
counts. Measured 3.6x at 8 threads; honestly sublinear (allocation-bound,
~few-thousand-row crossover). 28 tests + benchmark.

crates/lawsynth-sensitivity (new): forward sensitivity analysis. Integrates the
variational equations Ṡ_j = J_x·S_j + f_θj (J_x from the analytic Jacobian, f_θ
by symbolic differentiation) on the augmented system with fixed-step RK4.
Analytic check to <1e-6; finite-difference cross-check at 1e-6 for every
parameter on logistic + Lotka-Volterra. 22 tests.

docs/guide (new): verified end-to-end guide — getting-started, workflow
(discover→simplify→stability→control→export→validate→uncertainty), and a
determinism demo. All 17 documented commands run exit-0 via run_all.sh; honest
about real behaviors (already-minimal law simplifies to 0 nodes saved, CLI
bootstrap doesn't surface per-coef intervals, center points are inconclusive).
README links the guide.

specs/{parallel-evaluation,sensitivity-analysis}: boundary specs.
2026-08-18 16:14:46 +03:00
20750c64cd docs+P10: competitive analysis, expansion-v2 roadmap, distributed discovery
Competitive intelligence (code-level study of PySINDy, PySR/SymbolicRegression.jl,
Operon, SciML/DataDrivenDiffEq+MTK, gplearn/DEAP, AI-Feynman, + SRBench/
forecasting/MLOps landscape):
- docs/research/competitive-analysis.md — market map, feature matrix (LawSynth vs
  field), and prioritized adopt/court/differentiate recommendations.
- docs/roadmap/expansion-v2.md — a ~10k-file expansion plan (v2-A engine breadth,
  v2-B ecosystem/adoption, v2-C platform/distributed, v2-D domain packs, v2-E
  docs), sequenced by ROI.

P10 distributed discovery (crates/lawsynth-discovery/distributed.rs):
discover_partitioned() parallelizes feature-library evaluation across threads,
BIT-IDENTICAL to single-node (equivalence test at partitions {1,2,3,7,64}),
1.87x at 8 threads; RSS reduction kept single-node for float exactness. The
'distributed AND reproducible' guarantee. 41 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 02:20:12 +03:00
7087e7925e feat(product): symbolic simplify (egraph), model compose/edit, hosted-deploy
Wave 11 — the three candidates:
CLI — lawsynth simplify (egraph equality saturation extracts the lowest-cost
EQUIVALENT law; proves equivalence by simulating both worlds, deviation ~0;
honest 'already minimal' on sparse discovered worlds); lawsynth compose (union
two worlds into a coupled system, namespacing collisions) and lawsynth edit
(immutable rename/set-param/drop-law/scale-law, re-validated).

SDK — lawsynth.simplify / World.simplify (stdlib expand/fold/combine +
equivalence verify), lawsynth.compose, World.rename/set_parameter/drop_law/
scale_law. Two runnable examples.

Deploy — a verifiable hosted-deploy story: deploy/quickstart (config-validated
minimal api+gateway) + docs/self-hosting/quickstart.md (real curl/Client run
loop), after fixing genuine drift in the compose files (SQLite URL the API
actually accepts, correct token env, object root, health endpoints, native
build step) — verified end-to-end from source.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 01:08:14 +03:00
f8584cb195 docs(roadmap): plan phases P6-P10 + new boundary specs
New product/company phases beyond the shipped P0-P5:
- P6 Collaboration (shared workspaces, roles, revision lineage, review, merge)
- P7 Streaming & online discovery (windowing, drift-triggered re-discovery, change records)
- P8 Plugin marketplace (signed packages, capability grants, mirrorable registry)
- P9 Governance (lineage, model cards, approval, tamper-evident audit)
- P10 Hosted platform & scale (tenancy, SSO, quota/metering, distributed discovery)

Each is a boundary specification under specs/ (house style: MUST-conform, not
built-yet) with a conformance bar; docs/roadmap/next-phases.md holds the goals,
user problems, and sequencing. ROADMAP.md updated: P0-P5 now shipped, not proposals.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-18 00:50:02 +03:00
8bae186f19 feat(product): rolling-origin backtest, portable workspaces, cookbook
Wave 10 — rigor & sharing:
CLI — lawsynth backtest (rolling-origin/walk-forward: N origins x horizon,
per-state RMSE/MAE/R2 + skill-vs-horizon decay + verdict, --html report);
lawsynth workspace export/import (portable .lsworkspace archive: world bytes +
provenance + runs, per-entry SHA-256 integrity, non-destructive import).

SDK — Study.backtest -> Backtest (skill-vs-horizon decay, deterministic);
lawsynth.Project workspace persisting in the CLI library.tsv format (verified
bidirectional CLI<->SDK interop) with export/import archives.

Docs — a real cookbook (10 task recipes, CLI + SDK each) + 3 end-to-end
tutorials, verified against the shipped source (two-intervention-semantics and
preset-vs-recipe differences called out).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 23:46:25 +03:00
edaf16b08b feat(product): domain presets/recipes, provenance workspace, product README
Wave 5 — approachability & front door:
CLI — discover --preset (physics/ecology/epidemiology/finance/general) + presets
catalog; explicit flags override presets. library becomes a provenance-aware
workspace: world/data content hashes, columns, config, tags captured on add;
library search + compare over the workspace (backward-compatible index).

SDK — lawsynth.recipes (parity with CLI presets) + Study.discover(recipe=...,
**overrides); three runnable domain demos. Van der Pol shows the payoff: general
recipe misses the cubic term, mechanics recipe recovers -x+v-x^2*v (R2 0.99995).

Docs — a real product README (hero + Lorenz GIF, CLI+Python quickstart, feature
matrix by product loop, surfaces + HTTP endpoints, honest tone); refreshed
getting-started pages and a CHANGELOG Unreleased section. All flags verified
against the shipped CLI usage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 21:53:47 +03:00
5828d99939 dragon warrior 2026-08-16 22:04:11 +03:00
6a9ce627e0 asdoruyu 2026-08-16 20:29:23 +03:00