# World Layers Protocol

This protocol separates the work's environment from concrete places and spatial continuity. Places may consult neutral research notes, but research is governed by `docs/research-protocol.md`.

## Source Roles

| File | Authority | Role |
|------|-----------|------|
| `WORLD.md` or adapted world surface | project | Atmosphere, setting pressure, rules, social order, cosmology, system boundaries |
| `PLACES.md` | project | Confirmed locations, regions, buildings, landmarks, routes, and place-specific continuity |
| `GEOGRAPHY.md` | derived | Spatial hierarchy, adjacency, routes, distances, and map-ready summaries derived from `PLACES.md` |

## Writer Ownership

Scriveno may detect place-like mentions during `/scr:scan`, but it must not silently add them to canon.

- Detection is automatic.
- Suggestions are automatic.
- Place canon changes happen only through writer-invoked commands such as `/scr:new-place` or `/scr:place-touch`.
- `GEOGRAPHY.md` can be regenerated automatically because it is derived from already-confirmed files.
- `RESEARCH.md` stays advisory. A place fact from research enters `PLACES.md` only when the writer accepts it through `/scr:place-touch`.

## No Inbox Rule

Do not create a separate place or world inbox. Candidate mentions live in the scan output and next-command suggestions. This keeps Scriveno from becoming a backlog manager. Durable research notes live only in `RESEARCH.md` when the writer invokes `/scr:research`.

When `/scr:scan` detects a recurring unregistered place, report:

```text
INFO   "New York City" appears in 3 drafts but is not in PLACES.md.
       Add it with /scr:new-place "New York City", or ignore it as a one-off mention.
       If this is a real place, optional research: /scr:research "New York City" --place
```

## Place Creation

`/scr:new-place <name>` creates a confirmed place entry in `PLACES.md`. The command should:

1. Resolve whether the work type has an adapted world surface. If canonical `WORLD.md` is `not_applicable`, explain that place tracking is not active for this work type.
2. Load `WORK.md`, the adapted world surface, `PLACES.md` if present, `RESEARCH.md` if present for source-backed place facts, and recent draft mentions when available.
3. Ask only for missing essentials: type, parent, story role, geography/access, and whether the place is real, fictional, or altered-real.
4. Append one complete place profile to `PLACES.md`.
5. Regenerate `GEOGRAPHY.md` when two or more places, routes, or parent-child place relationships exist.

## Place Touch

`/scr:place-touch <name>` updates an existing place after drafting or research. It may append:

- new appearances
- route or distance changes
- sensory details
- social or historical context
- continuity rules
- author deviations
- accepted real-world facts from `RESEARCH.md`

It must not overwrite existing place facts without showing the delta and asking the writer to confirm.

## Geography Derivation

`GEOGRAPHY.md` is derived from:

- `PLACES.md` place profiles
- the adapted world surface's geography/cosmology/system sections
- route and distance notes in plans, drafts, and `RECORD.md` when cited by confirmed place entries

The derived map should distinguish:

- `confirmed`: stated in `PLACES.md` or the adapted world surface
- `implied`: inferred from multiple confirmed entries
- `undefined`: likely needed but not established

Undefined spatial relationships are suggestions, not errors.

## Research Handoff

`/scr:research <topic>` writes or appends neutral advisory notes to `RESEARCH.md` under `docs/research-protocol.md`. This can include place research, but it can also include craft, historical, technical, cultural, sacred, academic, legal, medical, source, procedure, comparable-work, or public-data research.

World-layer commands may read `RESEARCH.md` when a note is relevant to a confirmed place. They must not promote facts into `PLACES.md` without an explicit `/scr:place-touch` acceptance step.

## Regeneration Points

`GEOGRAPHY.md` may be regenerated by:

- `/scr:new-place`
- `/scr:place-touch`
- `/scr:geography-map`
- `/scr:save`
- `/scr:scan --fix`

`PLACES.md` is authored. `GEOGRAPHY.md` is derived. `RESEARCH.md` is a neutral advisory surface and changes only through `/scr:research`.
