---
schema: wtfp.workflow/v1
action: map-project
source: wtfp.protocol
---

# Map an existing project

@protocol://project/README.md
@protocol://skills/wtfp-start-project/SKILL.md
@protocol://skills/wtfp-start-project/references/actions.md

## Record contract

Read: `project://manifest`, `project://state`, `project://materials/{artifact}`, `project://paper/{artifact}`, `project://sources/{source}`, `project://evidence/{evidence}`.
Produce: `project://sources/{source}` (create), `project://evidence/{evidence}` (create), `project://state` (update), `project://sources/{source}` (update), `project://evidence/{evidence}` (update), `project://manifest` (update).

Resolve every logical URI through the host adapter. Portable v1 JSON records are the source of truth: schema-validate before a write, preserve stable IDs, update revision and timestamps where required, and replace records atomically. Never pass a literal logical URI to a shell command or infer record state from a legacy Markdown control file.

Manuscript prose and supporting context, research, plan, review, summary, handoff, and deliverable artifacts retain their authored format (normally Markdown). Link them from the relevant v1 record; do not convert manuscript prose into project-state JSON.

## Procedure

1. Read the current manifest and state, then scan only the authorized project boundary and do not follow escaping symlinks.
2. Inventory manuscript, notes, bibliography, datasets, figures, tables, and prior drafts with provenance and verification depth.
3. Read existing source and evidence records before merging by stable identity. Create missing records; update existing records only after inspecting them. Preserve IDs, curated annotations and stronger verification depth; report duplicate identifiers and citation-key collisions rather than overwriting them.
4. Merge selected material and manuscript URIs into the manifest artifact indexes without removing existing entries or changing authored files. Preserve all unrelated manifest fields and set updated_at to the actual update time only when the index changes.
5. Validate and read back the complete source/evidence and manifest changes before transitioning state to mapped. Retain active checkpoints.

## Safety and completion

Do not initialize a repository or run branch, stage, commit, merge, push, or publish operations. If requested, return a clearly labeled optional handoff for a separately authorized action.

Report the logical resources read, created, updated, archived, or deleted; the gates crossed; validation results; unresolved checkpoints; and the safest next action. Never claim a mutation that was not verified.
