115 Commits

Author SHA1 Message Date
728f42b82c docs: cross-link Scribase/Toolgate ecosystem (Rithub discoverability pass, 2026-11-16)
Some checks failed
Pull request checks / rust (push) Failing after 35s
Pull request checks / python (push) Failing after 40s
Pull request checks / typescript (push) Failing after 37s
Nightly scientific checks / scientific-fixtures (push) Failing after 40s
2026-11-16 14:35:26 +00:00
afd9f736dc fix(sim): widen ODE end-of-run tolerance to absorb float drift
Some checks failed
Pull request checks / typescript (push) Failing after 26s
Pull request checks / rust (push) Failing after 31s
Pull request checks / python (push) Failing after 34s
`simulate` compared the remaining time against `config.step * 1e-12` to
decide whether the run had reached `config.end`. Repeated `time = time
+ step` additions drift from the exact grid by more than that after a
few hundred steps (e.g. 0.0..=5.0 step 0.01), so an extra near-zero
duration RK4 step snuck in right at the end, producing a spurious
duplicate-looking final sample (502 rows instead of the expected 501
for a 500-step run). This silently inflated row counts in simulate,
forecast, validate, backtest, and report output. Scaled the tolerance
to the step size (1e-6 instead of 1e-12) so it comfortably absorbs
summation drift while staying far smaller than any real remaining
sub-step. Added a regression test pinning the exact sample count for
a run that previously tripped this.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-04 17:05:35 +03:00
c51b5f90cf docs: fix broken --set flag in CLI README and clarify offline cargo fetch
crates/lawsynth-cli/README.md documented `lawsynth simulate ... --set x=1`,
but `--set` is not a real flag on any subcommand (the correct flag is
`--initial NAME=VALUE`). Running the exact documented command against the
real built binary fails with exit code 2 ("missing initial value for state
'x'") -- confirmed by actually building lawsynth-cli from main and running
the documented command verbatim. Fixed to the real, working flag and
verified the corrected command runs successfully end to end.

Also tightened the top-level README's offline-cargo note: a bare
`cargo fetch` on a fresh clone still fails under this repo's
`[net] offline = true` config (reproduced live) -- the actual fix is
`CARGO_NET_OFFLINE=false cargo fetch`, which is already correctly documented
on the live docs-site installation page; brought the GitHub README in line
with it so first-time cloners don't hit the same dead end.
2026-10-26 18:12:03 +03:00
e123975b23 fix(docs-site): allowlist X/Twitter ads pixel in CSP
The Content-Security-Policy had no exception for static.ads-twitter.com
(script-src) or the analytics.twitter.com/t.co conversion beacon
(img-src, connect-src), so uwt.js and every adsct conversion ping were
silently blocked by the browser on every page view. Same bug class
independently found and fixed on bidstage.app and ereboslab.com today.

Verified live: static.ads-twitter.com/uwt.js now loads (200) and the
adsct beacon fires with no CSP violations in the console.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-24 22:00:27 +03:00
6b6715120c feat(docs-site): rewrite landing opener around the time-series search intent
The homepage opener led with a feature description instead of the pain the
visitor is searching for. Rewrite it to name the search ("symbolic regression
from a time series", "discover equations from data"), link the shipped
damped-oscillator sample above the fold, and show the actual CLI command so
the value is provable in the first screen instead of asserted.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-24 04:50:06 +03:00
908577e09d fix(cli): reject path traversal in workspace import run entries (zip-slip)
read_container() parses each archive manifest entry's logical path
(fields[3]) straight from the attacker-controlled .lsworkspace header with
no validation. World bundle imports already sanitize the target file name
via safe_filename(), but the runs-import loop joined the raw, unsanitized
path (after stripping the "runs/" prefix) directly onto runs_dir and wrote
to it with fs::write. A crafted archive entry such as
`runs/../../../../.ssh/authorized_keys` would let fs::write escape the
workspace directory and write attacker-chosen content anywhere the process
has permission — a classic zip-slip path traversal, reachable through the
documented, user-facing `workspace import ARCHIVE.lsworkspace` command and
its advertised "share it with a colleague" workflow.

Add is_safe_run_name(), which rejects any run_name containing a path
separator or equal to "." / "..", and skip (rather than write) any entry
that fails it, mirroring the "skip defensively" pattern already used
elsewhere in this file for other malformed archive entries.
2026-10-20 18:36:11 +03:00
687ee01d5b fix(gateway): reject Transfer-Encoding requests instead of silently dropping the body
read_request() in the Rust gateway's HTTP transport only ever looked at
Content-Length to size the request body. A chunked request (Transfer-Encoding:
chunked, no Content-Length) made content_length default to 0, so the body was
silently truncated to empty and forwarded to the backend while the real chunked
bytes were left unread on the connection — desynchronizing the next request
parsed from that same socket (request smuggling), or just silently dropping a
real client's upload with no error at all.

The sibling Python prototype (lawsynth_gateway/app.py) already rejects any
Transfer-Encoding header with 400 unsupported_transfer_encoding; the Rust
rewrite dropped that check. Add it back as a new ReadOutcome variant handled
in server.rs, with a regression test.
2026-10-20 18:32:59 +03:00
02658c6dd1 Merge branch 'feat/quant-portfolio-rung' (single-currency multi-instrument Portfolio)
Adds a Portfolio contract to lawsynth-quant: aggregates exact cost basis,
mark-to-market value, gross notional, and unrealized P&L across an ordered
book of Lots using Money's overflow-checked integer algebra. Rejects
foreign-currency lots and unpriced instruments rather than silently
defaulting. Deterministic LSQF1 byte encoding with a strict decoder.
5 new tests (18 total pass); reviewed: sound, scope-limited, well-tested.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-19 13:41:32 +03:00
4c3aa71dad Merge branch 'graph/lawsynth-feature' (e-graph distributivity-over-subtraction factoring)
Adds the a*b - a*c -> a*(b-c) rewrite rule to the e-graph simplifier,
mirroring the existing factor_sum rule. Unconditionally value-preserving
for all reals; +3 unit tests, +3 soundness-battery entries (9458 sampled
value-agreement checks stay green). Reviewed: sound, self-contained,
tests included.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-19 13:36:22 +03:00
b8d1c115a7 fix(ci): build workspace deps before docs-site render in deploy-site.yml
Deploy docs site has failed on every push to main since before 2026-08-18.
It ran `pnpm --filter @lawsynth/docs-site run render` directly, which only
builds docs-site itself — never its workspace deps `@lawsynth/world-schema`
and `@lawsynth/world-viewer`, whose package.json `exports` point at
`./dist/src/index.*` which only exists after each package's own `tsc`
build runs. `pnpm install` just symlinks workspace packages, it doesn't
build them, so tsc failed with TS2307 (cannot find module) every time.

pr.yml's `typescript` job never hit this because it calls the root
`build` script (`pnpm -r --if-present run build && pnpm --filter
@lawsynth/docs-site run render`), which builds every workspace package in
topological order first — that's why PR checks passed while deploys kept
failing.

Fix: add the same `pnpm -r --if-present run build` step to deploy-site.yml
before the render step, mirroring the root build script. Verified locally:
`pnpm -r --if-present run build` builds all 10 packages in order, then
`pnpm --filter @lawsynth/docs-site run render` renders 330 files
successfully (previously failed in ~13s with TS2307).

This is unrelated to PR #9's merge-conflict-marker fix — that issue was
already independently resolved on main in 760bc7e (2026-10-17).
2026-10-19 13:35:57 +03:00
4b05ba8a27 fix(docs-site): replace broken registry-install commands with the real source install path
The Getting Started page and its runnable example both told visitors to run
`cargo install lawsynth-cli` and `pip install lawsynth` — neither package is
published (crates.io/PyPI both 404), so every visitor following the
quickstart hit a dead command. RELEASE.md already documents the real, tested
v0.1 install path (source checkout, no registry access needed); this just
brings the public site's copy in line with it: git clone + cargo install
--path crates/lawsynth-cli + maturin develop.

Publishing to crates.io/PyPI remains intentionally gated on owner-provisioned
credentials (release-plz.toml publish = false), already tracked in
RELEASE.md's "Publishing (owner-gated)" section — no new blocker doc needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-19 13:07:49 +03:00
403cc3564a feat: add X conversion tracking pixel to docs site template
Loads the X Ads base code (pixel rhhqi) on every page by injecting it
into the single shared renderPage() template in site.ts, so all 312
pre-rendered static pages pick it up on the next render/deploy.
2026-10-18 17:42:33 +03:00
f5f220edf8 fix(studio): wire the World Lab live-forecast button to the API client
World Lab's subtitle promises "Simulate, forecast, and intervene on the
current world," and ScreensController already had a fully working
forecastWorld() method plus a "world:forecast" case in its onAction
dispatch table (calling the real worlds.forecast API) since the P6 wave —
but no screen ever rendered a button with that action id, so a real user
could never trigger it. The button, its handler, and its result were three
separately built pieces that were never connected.

Add the "Request live forecast" button to World Lab's actions, track a
`forecasting` in-flight flag, and surface the live forecast result as a
metric so clicking it has a visible effect instead of silently doing
nothing. Covered by a new end-to-end test (worldLabForecastTests) that
drives the real action id through a live api-client transport and asserts
the model updates.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-18 00:08:18 +03:00
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
c44ed79ea2 feat(ci): add release-build workflow and fix nightly-science test collection
- release-build.yml: new workflow_dispatch-independent job triggered on v*
  tags, building the lawsynth CLI on a macos-latest/ubuntu-latest matrix
  (same cargo build --release --locked -p lawsynth-cli command release.yml's
  verification job already runs) and uploading the packaged binaries as
  GitHub Release assets via softprops/action-gh-release. Does not modify
  release.yml, which stays verify-only and workflow_dispatch-triggered.
- nightly-science.yml: was running `pytest tests/scientific tests/conformance`
  directly, which collects zero tests (exit code 5) because those directories
  hold declarative run.py fixtures, not test_*.py files. Added a Rust
  toolchain + CLI build step and a new tests/test_scientific.py pytest
  wrapper (mirroring the existing tests/test_conformance.py pattern) that
  parametrizes one test per case and runs each case's own run.py via
  runpy.run_path against the native engine, then pointed the job at the two
  real wrapper modules.

Verified locally: cargo fmt --check, cargo clippy --workspace --all-targets
-- -D warnings, and cargo test --workspace all clean; actionlint clean on
release-build.yml, nightly-science.yml, and (unchanged) release.yml;
`pytest tests/test_scientific.py tests/test_conformance.py` passes (22/22)
against the compiled CLI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-15 20:00:13 +03:00
ac68067b17 fix(release): correct crates.io repository URL and gate internal crates from publish
The workspace repository metadata pointed at a 404 (lawsynth/lawsynth instead
of caelum0x/lawsynth). RELEASE.md documents 12 crates plus all services/apps
as explicitly internal for v0.1 (not part of the published surface), but only
lawsynth-integration actually carried `publish = false` — add the missing
flag to the other 16 internal crates/services/apps so a future `cargo
publish` run can't accidentally ship them.

Also fix the two cargo clippy -D warnings failures blocking CI on main since
the 2026-10-12 release-cut merge: lawsynth-information-diffusion's forecast()
needlessly indexes `totals` by a range-loop variable (needless_range_loop)
and exceeds clippy's argument-count lint (too_many_arguments, same pattern
already used elsewhere in the workspace for fixed simulation-contract
surfaces). Verified: cargo fmt --check, cargo clippy --workspace --all-targets
-- -D warnings, and cargo test --workspace (388 suites, 0 failures) all pass
clean; cargo build --locked --release -p lawsynth-cli succeeds.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-15 16:53:00 +03:00
ef2abe919b Merge the SEO/release-cut line (superset of main's duplicate SEO commit) 2026-10-12 12:26:00 +03:00
32f72fa92f fix(seo): serve slashless URLs directly, unique titles, clean meta descriptions
- assets html_handling drop-trailing-slash: sitemap/canonical/internal links
  were all 307-redirecting to the trailing-slash variant
- qualify duplicate SEO titles (19 pages) with their section
- strip repeated heading and markdown markers from fallback descriptions
- IndexNow key file

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 04:34:52 +03:00
27bac5aa45 feat: SEO — 37 dynamical-systems pages, article schema, OG PNG, durable .assetsignore 2026-09-14 20:29:51 +03:00
c7819262f9 fix(deploy): emit LawSynth canonical host worker 2026-09-13 21:58:10 +03:00
e6fd73dae5 fix(seo): normalize quoted frontmatter titles 2026-09-13 21:24:59 +03:00
6d4071939d feat(seo): strengthen docs discovery and canonical routing 2026-09-13 19:24:08 +03:00
a9815b7ab4 feat(seo): strengthen docs discovery and canonical routing 2026-09-13 18:43:01 +03:00
c4ed6b45d4 docs(changelog): cut the 0.1.0 section
Rename the frozen `Unreleased` heading to `0.1.0 - 2026-09-06`, note that
publishing/tagging is owner-gated (RELEASE.md), and record this session's
release-cut work: the --version/-V fix, the Python maturin manifest-path fix,
and the publish-metadata preparation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 13:09:32 +03:00
99f6a8d9cb docs(release): add v0.1.0 cut manifest
Define the v0.1 release surface: the `lawsynth` CLI and Python SDK plus their
workspace dependency closure (20 core-pipeline crates, 22 advanced crates
surfaced as CLI subcommands, report). Mark non-surface crates, services/, and
apps/ as internal (publish=false). Document `cargo install --path
crates/lawsynth-cli` and the maturin/build-native Python path as the tested
install paths, the acceptance smoke on examples/00-quickstart, and the
leaf-first topological publish order so each `cargo publish` is one command
once the owner un-gates.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 13:08:47 +03:00
7a06febeb6 chore(release): inherit repository metadata on all crates
Crates inherited version/license/edition from [workspace.package] but not
`repository`, so every crate published without a repository link. Add
`repository.workspace = true` uniformly, completing the
description+version+license+repository metadata `cargo publish` and crates.io
expect. No build impact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 13:08:47 +03:00
fb38900c67 chore(release): add version to internal path deps for publishability
Every intra-workspace dependency was declared path-only
(`{ path = "../lawsynth-X" }`), which makes `cargo publish` fail with
"all dependencies must have a version specified when publishing". Add the
uniform workspace version (`version = "0.1.0"`) alongside each `lawsynth-*`
path dep across all workspace members so each crate can be published with a
single `cargo publish`. Path is retained, so local offline builds are
unchanged (cargo prefers the path for workspace builds); this only supplies
the version metadata the registry requires. Publishing itself stays owner-
gated via release-plz (publish=false).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 13:06:43 +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
639a8d85e3 feat(cli): print version for --version/-V instead of usage
`lawsynth --version` and `-V` fell through to the catch-all arm and printed
the multi-line usage block (exiting non-zero). Add a `version` arm that emits
`lawsynth <CARGO_PKG_VERSION>` on a single line, plus a test covering the
three spellings and the single-clean-line contract.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 13:01:39 +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
798d5821a2 feat(quant): single-currency multi-instrument Portfolio aggregation
Add a `Portfolio` contract to lawsynth-quant: an ordered, single-currency
book of `Lot`s that aggregates exact cost basis, mark-to-market value,
gross notional, and unrealized P&L. Every total reuses `Money`'s
overflow-checked integer algebra, so figures are exact — no rounding, no
binary floating point, no silent wrapping.

Marks are supplied by a caller per-instrument resolver, so the portfolio
never sources or infers a price; an unpriced instrument is rejected rather
than defaulted to zero. Foreign-currency lots and mark currency mismatches
are rejected, never silently converted. Adds a deterministic versioned byte
encoding (`LSQF1`) with a length-prefixed lot sequence and a strict decoder
that rejects unknown versions, truncation, over-large lot counts,
currency drift, and trailing bytes.

Promotes the "multi-instrument portfolio aggregation" item that the Lot
slice deferred; realized P&L, lot-matched fill accounting, FX, financing,
and fees remain out of scope. Updates the quant-foundation spec + changelog
and adds a new `MissingMark` error variant. 5 new tests (18 total pass);
clippy -D warnings and rustfmt clean.
2026-08-26 14:58:18 +03:00
75afe3b0f4 feat(graph): factor distributivity over subtraction in e-graph rewrites
Add a new sound rewrite rule to the equality-saturation simplifier:
`a*b - a*c -> a*(b - c)`, the cost-reducing (7->5 nodes) direction of
distributivity over subtraction. It mirrors the existing `factor_sum`
rule and reuses `as_product`.

Soundness: `a*(b - c) = a*b - a*c` holds for all reals, so the rewrite
is unconditionally value-preserving with no domain caveat. Multiplication
is commutative, so the shared factor is matched in any position; subtraction
is not, so the remainders keep their minuend/subtrahend roles (rest_left
from the left product, rest_right from the right).

- rules.rs: add `factor_difference`, wire into `reduce_subtract`, +3 unit tests
- simplify_soundness.rs: +3 battery entries (shared factor in each position);
  the sampled cross-check now runs 9458 value-agreement checks and stays green
- spec README: document the difference-factoring rule in the rule table

cargo test / build / fmt --check / clippy -D warnings all pass.
2026-08-25 12:26:32 +03:00
34df992656 test: cover Money currency-field decode rejection paths 2026-08-25 11:59:00 +03:00
fd03107ee8 feat(quant): position-sizing / P&L / risk contract 2026-08-25 03:42:35 +03:00
52fc82412a feat(quant): next QR0 contract built on Money exact-integer algebra 2026-08-25 03:21:30 +03:00
91209aad8a feat(quant): checked integer algebra (mul/neg/abs) on Money contract, +1 test 2026-08-25 03:09:57 +03:00
04118af7b6 docs(landing): add open-source contributor CTA + project scope to landing and README
Landing (apps/docs-site/src/content.ts): add a why-it-matters positioning
line (open-source, Apache-2.0 alternative to black-box ML and SINDy), an
"Open source & contributing" section (Star on GitHub, Contribute, Apache-2.0,
CLI + Python/TS SDKs), and a "Project scope" section covering the dynamics /
control / causal / bifurcation domains plus the GridSynth and Information
Diffusion applied tools and the roadmap.

README: tighten the hero with a one-line what, the read-the-equations-not-a-
black-box differentiator, license/language/SDK badges, and GitHub + Contributing
links.
2026-08-24 18:10:40 +03:00
5993b8c758 feat(seo): keyword-targeted title/meta/H1 + structured data 2026-08-24 14:33:55 +03:00
c3203167ea chore(seo): add RFC 9116 security.txt + SEO metadata (robots/sitemap/JSON-LD) 2026-08-24 14:10:09 +03:00
6ea69aed05 test(examples): guard SIR S·I coupling recovery at population scale
Add a first-class integration guard to the 04-sir-epidemic example: drive
the real lawsynth CLI on the raw population-scale trajectory (states ~1e3)
and assert the susceptible·infected coupling survives sparsity at threshold
0.02 with a coefficient near the true beta/N = 3.2e-4. This locks in the
scale-invariant discovery fix at the example level. Skips cleanly when the
CLI is not built, so the pure-Python contract still runs unchanged.
2026-08-19 00:42:43 +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
4d897ed1a1 docs(readme): link the live lawsynth.dev site and describe the docs 2026-08-18 23:49:59 +03:00
74cd272200 feat(docs-site): publish repo docs/ as site pages and add discovery diagrams
Load the 253 hand-written Markdown files under docs/ through the existing
compileSite pipeline, published under /docs/** with README->index mapping,
internal .md link rewriting, and folder-grouped navigation (254 pages incl.
a /docs landing). Add standalone-image support to the Markdown renderer
(same-origin-only sources matching the img-src 'self' CSP, semantic <figure>
with figcaption, lazy/async loading) and wire the new hero phase-portrait and
discovery-loop SVG diagrams into the landing and getting-started pages.

- load-docs.mjs: fs-backed docs loader (deterministic sorted discovery)
- markdown.ts: image block kind, parser, renderer, alt indexed for search
- theme.ts: .docs-figure styling
- content.ts: hero.svg + loop.svg on / and /getting-started
- tests: image rendering + docs-corpus coverage; determinism preserved

254 pages render; 12/12 tests pass; two renders byte-identical.
2026-08-18 23:47:49 +03:00
849315f7ff deploy: serve the site at lawsynth.dev + www (Worker custom domains)
Added custom-domain routes for lawsynth.dev and www.lawsynth.dev to wrangler.jsonc.
The zone is in the same Cloudflare account, so `wrangler deploy` provisions the
custom domains and TLS automatically. The site (favicon + OG link previews + docs)
is now served at https://lawsynth.dev.
2026-08-18 23:37:51 +03:00
edec453090 feat(web): favicon/logo + rich link previews (Open Graph / Twitter)
- assets/favicon.svg + assets/og.svg: a LawSynth mark (dark rounded square + an
  accent signal-wave with a highlighted node) and a 1200x630 OG banner; the
  emitter copies apps/docs-site/assets/* verbatim into public/.
- seo.ts: added og:site_name, twitter:title/description, and twitter:image
  (alongside the existing og:*), so shared links render a rich card.
- site.ts renderPage: <link rel=icon> (+ apple-touch-icon), theme-color, and
  passes og.svg as the preview image on every page.
docs-site 11/11 pass; favicon.svg/og.svg + og:image/twitter:image verified in
the rendered output.
2026-08-18 23:34:45 +03:00
cb86afd258 chore: trigger a fresh deploy on the fixed lockfile
The committed pnpm-lock.yaml (723cb5f) is correct — pnpm install --frozen-lockfile
passes. Earlier Cloudflare failures were retries of a pre-fix commit. This empty
commit advances main so a clean build runs on the fixed tree.
2026-08-18 23:28:01 +03:00
723cb5f078 build: root build now also renders the docs site (zero-touch Cloudflare deploy)
The Cloudflare Workers build command is `pnpm run build`, but that only compiled
the packages — it didn't emit apps/docs-site/public for `wrangler deploy`. Fold
the site render into `build` so the existing command produces the deployable
static tree (verified: 16 files). `build:packages` keeps the packages-only build;
`build:site` is now an alias. No Cloudflare settings change needed — just redeploy.
2026-08-18 23:22:00 +03:00
bf30ab9da4 fix(deploy): regenerate pnpm-lock.yaml + world-viewer DOM.Iterable for the toolchain bump
Regenerated pnpm-lock.yaml online so it matches the manifests (it was missing
typescript@^5.8.3 and @types/node) — `pnpm install --frozen-lockfile` now passes,
which is exactly what Cloudflare runs (ERR_PNPM_OUTDATED_LOCKFILE gone).

Regenerating resolved typescript 5.9.3 (from 5.8.x), which surfaced TS2488 in
world-viewer: iterating a NodeListOf now needs DOM.Iterable in `lib`. Added it to
packages/world-viewer/tsconfig.json. Full workspace build + typecheck + test are
green under the new toolchain.

Restored --frozen-lockfile in pr.yml/deploy-site.yml (the lock is correct now).
Cloudflare: set the build command to `pnpm run build:site`; deploy stays
`npx wrangler deploy`.
2026-08-18 23:20:38 +03:00
c7e707e4bd fix(deploy): pin autoInstallPeers in pnpm-workspace.yaml + one-click lockfile regen
The .npmrc auto-install-peers=false didn't resolve the Cloudflare
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH: pnpm 10 reads autoInstallPeers from
pnpm-workspace.yaml, so pin it there (the canonical location) to match the
lockfile's recorded `settings.autoInstallPeers: false`.

The lockfile is also stale (missing @types/node), which needs a networked
regeneration this offline repo can't do. Added a manual
`Regenerate pnpm lockfile` GitHub Action (workflow_dispatch): from the Actions
tab it runs `pnpm install --no-frozen-lockfile` on GitHub's network and commits
the fixed lockfile back — no local pnpm required. After it runs, Cloudflare's
frozen install passes.
2026-08-18 23:07:32 +03:00
c2819e11ba feat(web): site-wide footer + header GitHub link (contact, repo, docs)
Every page now carries a header GitHub link and a footer with Docs, CLI
reference, GitHub (github.com/caelum0x/lawsynth), and Contact
(caelum0x42@gmail.com) links plus a one-line tagline and a mailto for
collaboration. Minimal footer/header styling added to the theme. docs-site 11/11
pass; footer verified in the rendered output.
2026-08-18 23:06:23 +03:00