Skip to content

Commit 44ed267

Browse files
committed
Initial commit: PUTMAN Model Pipeline Visual Simulator (deterministic POC)
0 parents  commit 44ed267

23 files changed

Lines changed: 4099 additions & 0 deletions

.github/workflows/deploy-pages.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy App To GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
cache: npm
29+
cache-dependency-path: app/package-lock.json
30+
31+
- name: Install dependencies
32+
working-directory: app
33+
run: npm ci
34+
35+
- name: Test
36+
working-directory: app
37+
run: npm run test
38+
39+
- name: Build
40+
working-directory: app
41+
run: npm run build
42+
43+
- name: Upload pages artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: app/dist
47+
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
needs: build
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.DS_Store
3+
app/dist
4+
app/.vite
5+
coverage

LICENSE

Lines changed: 361 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
PUTMAN Model Pipeline Visual Simulator
2+
3+
A deterministic, local-only simulator for the PUTMAN pipeline:
4+
5+
M = (V, E, w, t) + context C -> activation S -> beam reconstruction -> interpretation I -> shift metric Delta
6+
7+
The app is a single-page React + TypeScript interface that consumes a framework-agnostic core engine from /core, visualizes the synthetic graph via SVG, and exports reproducible artifacts.
8+
9+
What it demonstrates
10+
- Seeded synthetic graph generation with configurable node count, edge density, and prior/new overlap.
11+
- Activation scoring from context and weighted structure.
12+
- Rigidity pruning (rho) over weak nodes/edges.
13+
- Beam reconstruction with width k.
14+
- Recursive updates across depth d.
15+
- Interpretation summaries (I) and per-step shift metric (Delta) using cosine distance between interpretation centroids.
16+
- Deterministic runlogs with per-step internals and export support.
17+
18+
Project layout
19+
- /core: Framework-agnostic TypeScript simulation engine.
20+
- /app: Vite + React + TypeScript UI and Vitest tests.
21+
- /specs: Preset JSON configs (stable, drift, collapse).
22+
23+
Run locally
24+
25+
cd app
26+
npm install
27+
npm run dev
28+
29+
Build and tests:
30+
31+
npm run build
32+
npm run test
33+
34+
Reproduce presets
35+
1. Start the app.
36+
2. Click one preset button in the left panel:
37+
- stable: low drift, moderate rigidity.
38+
- drift: high drift and stronger recursive movement.
39+
- collapse: high rigidity, aggressive pruning.
40+
3. Click Run to regenerate with that preset.
41+
4. Use Export SVG for the current graph view and Export JSON Runlog for full step traces.
42+
43+
Determinism check
44+
45+
Vitest includes core determinism assertions in:
46+
47+
app/tests/core.determinism.test.ts
48+
49+
It verifies:
50+
- same seed + params => identical runlog and hash
51+
- different seeds => different runlog hashes
52+
53+
GitHub Pages
54+
55+
GitHub Actions workflow:
56+
57+
.github/workflows/deploy-pages.yml
58+
59+
On pushes to main, it builds /app and deploys static output to GitHub Pages.
60+
61+
License
62+
63+
This project is licensed under Creative Commons Attribution–NonCommercial 4.0 International (CC BY-NC 4.0).
64+
See LICENSE.
65+
66+
Contact
67+
68+
putmanmodel@pm.me

app/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>PUTMAN Pipeline Visual Simulator</title>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/main.tsx"></script>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)