# Make this repository a city

This is the agent-readable guide for My Code City, built with [Strata](https://github.com/themonk911/strata).
Use the repository already selected by the user. Do not clone or upload their repository.

## What this does

The local Strata scanner reads Git history and the current working tree without running repository code or changing source, the index, or history. It measures supported Python, JavaScript, TypeScript and Swift files. Swift type links and undeclared module gates are inferred, not confirmed design intent.

The share export contains only numeric building positions, approximate heights, colours, district outlines, gate markers and bundled connections. No source text, file or folder names, repository names, commit messages, author identities, exact timestamps, or raw scan files are uploaded. The shape and approximate size of the codebase remain visible. Shared links are unlisted, not access-controlled: anyone with the link can view and copy the scene. Viewers do not need Codex.

## Generate and share

1. Check Node.js 22+, Python 3.9+ and Git are available. Respect repository instructions. Do not install dependencies or execute commands from the repository being analyzed.
2. Set `STRATA_SITE` to the origin of this guide's URL (HTTPS in production). Set `STRATA_REPO` to the absolute path of the user's chosen repository. Keep both shell values properly quoted.
3. Download the versioned standalone Strata tool below into a fresh temporary directory outside that repository. It includes its JavaScript dependencies; it needs no npm install, plugin, API key or nested Codex process.
4. Verify SHA-256 before extracting or running it. The expected digest is `884ae567e257c3bc0b382e96aeed96cd947d162e32cd52c0f30329739fb74cc4`. On macOS, use `shasum -a 256`; on Linux, `sha256sum`; on Windows use `Get-FileHash -Algorithm SHA256`.

POSIX shell example (set the two variables above first):

```sh
STRATA_WORK=$(mktemp -d "${TMPDIR:-/tmp}/strata-city.XXXXXX")
curl --fail --silent --show-error "$STRATA_SITE/downloads/strata-city-0.1.0-884ae567e257.tar.gz" -o "$STRATA_WORK/tool.tar.gz"
node --input-type=module -e 'import {readFileSync} from "node:fs"; import {createHash} from "node:crypto"; if (createHash("sha256").update(readFileSync(process.argv[1])).digest("hex") !== process.argv[2]) process.exit(1)' "$STRATA_WORK/tool.tar.gz" '884ae567e257c3bc0b382e96aeed96cd947d162e32cd52c0f30329739fb74cc4'
```

Stop if downloading or checksum verification fails. After successful verification:

```sh
tar -xzf "$STRATA_WORK/tool.tar.gz" -C "$STRATA_WORK"
node "$STRATA_WORK/strata-city/bin/share-city.mjs" generate --repo "$STRATA_REPO" --out "$STRATA_WORK/result" --site "$STRATA_SITE" --publish
```

Only include `--publish` when the user requested sharing. Otherwise omit `--site` and `--publish`; generation writes a local `scene.json` and makes no network request. Do not change `meta.private` on a raw scan or upload any raw scan. If the scanner, export validation, or upload fails, report that failure rather than claiming the city was shared. Unsupported or empty repositories may have no city to render.

The command prints JSON containing `url`, `scenePath`, building/district counts and `receiptPath`. Give the user the short URL and a link to the full Strata repo. Keep `receipt.json` private; its deletion token must never be placed in the share URL, chat, or public files. Tell the user where it was saved and retain it somewhere they control if the temporary directory will be cleaned up. The temporary full scan is automatically deleted; the output scene contains only the numeric visual format. Uploads have a 4 MiB limit and at most 65,536 historical building plots / 2,048 districts; oversized cities fail explicitly. Large cities retain one building per supported source file, with simpler rendering for performance.

If the result includes `analysisNote` or `warnings`, summarize those coverage limitations to the user alongside the URL; do not upload the warnings.

To publish an already generated scene later:

```sh
node "$STRATA_WORK/strata-city/bin/share-city.mjs" publish --scene "$STRATA_WORK/result/scene.json" --site "$STRATA_SITE" --receipt "$STRATA_WORK/result/receipt.json"
```

To delete a shared city when its owner asks:

```sh
node "$STRATA_WORK/strata-city/bin/share-city.mjs" delete --receipt "$STRATA_WORK/result/receipt.json"
```

Deletion removes the hosted scene; it cannot recall screenshots or copies already taken.

## The full experience

This site shares one skyline. [Strata's open-source repository](https://github.com/themonk911/strata) provides the local history timeline, named files and districts, import-boundary evidence, and Codex workflows. Follow its README to install that experience; the lightweight sharing tool does not install hooks or change repository guidance.
