# YEET / Browser Toolkit

Four instruments extracted from the YEET Semantic Playground: conservative text editing, explicit-label brief compilation, lexical graph data, and interactive generative motion.

## Run or deploy

Unzip the download. Serve this directory with any static HTTP server or upload its contents to a static website host. `index.html` is the entrypoint. Keep the files together. There is no package installation, build step, API key, database, or model connection.

For a local preview, with Python installed:

    python3 -m http.server 8000

Open http://localhost:8000. ES modules need HTTP; opening index.html through a file:// URL may be blocked by your browser. Clipboard operations require HTTPS or localhost. File exports still work if clipboard access is unavailable.

## Import the engines

```js
import { purify, extractBrief, briefMarkdown, signalMap, runChecks } from './yeet-engine.mjs';

const result = purify('Okay, in order to finish, we should wait.', 'balanced');
console.log(result.output); // to finish, we should wait.
console.log(result.edits);  // exact original offsets, before/after text, reason

const brief = extractBrief('Goal: Ship a prototype.\nConstraints: No paid login.');
console.log(briefMarkdown(brief));
console.log(signalMap('Language shapes intent. Intent guides action.'));
console.log(runChecks());
```

`gentle` removes a small allowlist of opening discourse phrases. `balanced` also replaces five wordy connective phrases (the ambiguous “in order to” is only shortened at a line opening). `bold` additionally removes specified opening emphasis. No mode deliberately strips epistemic markers, negation, repeated words, or request framing. Do not treat this as a grammar model or as proof of unchanged meaning. Review every result.

Literal scanning protects detected quotes (including single and curly quotes), backticks, fenced code, links, email, assignments, and numeric tokens. Unclosed literals protect the remainder of the source. Ambiguous text may be left unchanged. Newline structure is retained. All edit offsets are zero-based JavaScript UTF-16 code-unit offsets with an exclusive end. Word counts use whitespace splitting; they are not model tokens.

Briefs use explicit `Goal:`, `Audience:`, `Deliverables:`, `Constraints:`, `Deadline:`, `Success:`, and `Decision:` lines. `Objective`, `Users`, `Scope`, `Guardrail`, `Due`, and `Acceptance` are also supported. Unlabeled lines remain unassigned. A `Decision:` label reflects the author's label and is not independently confirmed. Each extracted item has a source offset. A suggested export schema is included in `brief-schema.json`.

`signalMap(text, maxNodes=14)` returns term counts and up to 42 shared-sentence connections with source evidence. Uses English stop words and case folding, with no stemming, embeddings, causal inference, or truth verification. Sentence boundaries use Intl.Segmenter where available, with a simple punctuation-and-whitespace fallback. Paragraph lines are treated separately. Word boundaries and sentence rules remain heuristics.

Text inputs are capped at 18,000 UTF-16 code units. The caller should handle range errors. The engines retain no state and make no network requests.

## Generative motion

```js
import { createField, fieldSVG } from './field-engine.mjs';
const config = { seed:47, topology:'vortex', palette:'acid', density:480, complexity:52, speed:1 };
const engine = createField(document.querySelector('canvas'), config);
engine.setPaused(engine.reducedMotion);
// engine.update({ palette:'ice' });
// engine.setPaused(true);
// engine.destroy(); // detach listeners when removing the canvas
const svg = fieldSVG(config);
```

Give the canvas an explicit CSS height. The live renderer uses Canvas 2D, Pointer Events, ResizeObserver, and IntersectionObserver. A focusable canvas also supports arrow-key interaction and Escape to clear. It caps device pixel ratio at 2 and frame rate at 36, and suspends rendering when the page is hidden or the canvas is outside the viewport. Enabling reduced motion pauses playback immediately; it resumes only when the user chooses Play. The initial field is seeded. Live interaction, time and canvas size affect later frames. SVG generates a deterministic still from the settings rather than tracing the current frame. PNG captures the current canvas.

Supported config values: `topology`: vortex/braid/orbit; `palette`: acid/ice/ember; `density`: 150–900; `complexity`: 20–90; `speed`: 0.1–3; integer `seed`. Complexity applies to vortex and braid. The renderer normalizes configuration values to these supported ranges.

## Checks

Run `runChecks()` in the browser, press the standalone page's check button, or use Node:

    node --input-type=module -e "import {runChecks} from './yeet-engine.mjs'; const r=runChecks(); console.table(r); if(r.some(x=>!x.pass))process.exitCode=1"

Twelve regression checks cover uncertainty, negation, proposals, repeated words, links, numeric values, literals, fenced code, unclosed quotes, newline structure, edit reconstruction, and explicit decision handling. Passing them is not a general semantic guarantee.

## Privacy and credit

These tools process entered text in browser memory without persistence or model calls. The standalone workbench retains a separate draft for each tool until the page is reloaded. A host still receives normal page requests. Exports contain your source text; share them intentionally.

Original concept and scaffolding: Sol. Rebuilt and expanded with Astra Ultra in ChatGPT Work, directed by Nick. This is an independent showcase, not an official OpenAI property or a comparative model benchmark.

Code: MIT license, included in LICENSE.txt. The generated hero artwork from the full Site is not included in this code toolkit.
