# HOLOGRAPHIC_FORM_REPLAY_V1

Phase-12.HFR — REAL form-replay (not exact-cache). The C++ runtime ships 4 hand-curated FormPattern recognizers (`terminal_create_file_exact`, `terminal_sed_uppercase_keys`, `terminal_json_extract_key`, `terminal_grep_count_pattern`). Each pattern inspects a NEW non-identical envelope, extracts delta params from the instruction + inputs, materializes the parametric action template, and runs the capsule. NO 7B forward, NO llama.cpp HTTP. The exact-input cache (`hologram_cache.jsonl`) is WIPED before this run, so every pass on this page is form-recognition-only.

## Headline

| metric | value | target |
|---|---|---|
| variants tested | **20** | 20 |
| passed | **20/20** | ≥15/20 |
| pass with `model_called:false` | **20/20** | all passes |
| pass wall_ms_total < 500ms | **20/20** | all passes |
| pass wall_ms_total < 100ms | **20/20** | informational |
| pass with `source_hologram_id` | **20/20** | all passes |
| pass with `delta_params` JSON | **20/20** | all passes |

## By family

| family | pass/total |
|---|---|
| create_file_exact | 5/5 |
| sed_uppercase_keys | 5/5 |
| json_extract_key | 5/5 |
| grep_count_pattern | 5/5 |

## Per-variant

| id | family | pass | wall_total ms | wall_internal ms | route | pattern | model | llama | delta_params |
|---|---|---|---|---|---|---|---|---|---|
| create_v1_answer_txt | create_file_exact | OK | 38.5 | 36.8589 | form_replay | terminal_create_file_exact | False | False | {"target_content":"42","target_path":"answer.txt"} |
| create_v2_status_txt | create_file_exact | OK | 38.1 | 36.6028 | form_replay | terminal_create_file_exact | False | False | {"target_content":"ok","target_path":"status.txt"} |
| create_v3_note_txt | create_file_exact | OK | 38.8 | 37.2462 | form_replay | terminal_create_file_exact | False | False | {"target_content":"done","target_path":"note.txt"} |
| create_v4_greeting_txt | create_file_exact | OK | 40.3 | 38.7747 | form_replay | terminal_create_file_exact | False | False | {"target_content":"hi there","target_path":"greeting.txt"} |
| create_v5_marker_txt | create_file_exact | OK | 38.4 | 36.8634 | form_replay | terminal_create_file_exact | False | False | {"target_content":"BEACON","target_path":"marker.txt"} |
| sed_v1 | sed_uppercase_keys | OK | 40.0 | 38.5125 | form_replay | terminal_sed_uppercase_keys | False | False | {"source_file":"data.txt","target_file":"out.txt"} |
| sed_v2 | sed_uppercase_keys | OK | 40.2 | 38.7843 | form_replay | terminal_sed_uppercase_keys | False | False | {"source_file":"pairs.txt","target_file":"up.txt"} |
| sed_v3 | sed_uppercase_keys | OK | 41.3 | 39.8742 | form_replay | terminal_sed_uppercase_keys | False | False | {"source_file":"items.csv","target_file":"caps.txt"} |
| sed_v4 | sed_uppercase_keys | OK | 39.4 | 38.0134 | form_replay | terminal_sed_uppercase_keys | False | False | {"source_file":"keys.list","target_file":"big.txt"} |
| sed_v5 | sed_uppercase_keys | OK | 40.4 | 38.8893 | form_replay | terminal_sed_uppercase_keys | False | False | {"source_file":"rows.tsv","target_file":"OUT.txt"} |
| json_v1_target | json_extract_key | OK | 54.1 | 52.6576 | form_replay | terminal_json_extract_key | False | False | {"json_file":"data.json","key":"target"} |
| json_v2_version | json_extract_key | OK | 53.4 | 51.9511 | form_replay | terminal_json_extract_key | False | False | {"json_file":"cfg.json","key":"version"} |
| json_v3_port | json_extract_key | OK | 55.5 | 54.0462 | form_replay | terminal_json_extract_key | False | False | {"json_file":"settings.json","key":"port"} |
| json_v4_name | json_extract_key | OK | 56.5 | 54.9779 | form_replay | terminal_json_extract_key | False | False | {"json_file":"user.json","key":"name"} |
| json_v5_total | json_extract_key | OK | 55.3 | 53.6175 | form_replay | terminal_json_extract_key | False | False | {"json_file":"counts.json","key":"total"} |
| grep_v1_ERROR | grep_count_pattern | OK | 39.9 | 38.5355 | form_replay | terminal_grep_count_pattern | False | False | {"pattern_word":"ERROR","source_file":"log.txt"} |
| grep_v2_WARN | grep_count_pattern | OK | 38.8 | 37.362 | form_replay | terminal_grep_count_pattern | False | False | {"pattern_word":"WARN","source_file":"events.log"} |
| grep_v3_200 | grep_count_pattern | OK | 41.7 | 39.96 | form_replay | terminal_grep_count_pattern | False | False | {"pattern_word":"200","source_file":"access.log"} |
| grep_v4_DROP | grep_count_pattern | OK | 39.7 | 38.2943 | form_replay | terminal_grep_count_pattern | False | False | {"pattern_word":"DROP","source_file":"packets.log"} |
| grep_v5_FAIL | grep_count_pattern | OK | 39.6 | 38.0989 | form_replay | terminal_grep_count_pattern | False | False | {"pattern_word":"FAIL","source_file":"build.log"} |

## Architectural witness

Every pass row carries:
* `route: form_replay`, `replay: true`, `replay_kind: form`
* `pattern_id` — which form recognizer fired
* `source_hologram_id` — `form:<pattern_id>` (hand-curated id; future versions can promote pattern ids to learned cluster ids)
* `source_dag_id` — points at the capsule that proved THIS variant (at `dag/capsules/cap_*.json`); contains the materialized commands, sha256 artifact hashes, and a replay_recipe
* `delta_params` — the values extracted from the new instruction + inputs (e.g. `{"target_path":"answer.txt","target_content":"42"}`)
* `materialized_commands` — the actual bash commands the capsule ran, built by substituting delta params into the template
* `model_called: false`, `llamacpp_called: false` — proven by the fact that `run_chat()` returned from inside `run_form_replay` before any organ_manager/shared_mgr call


## DOD

* GREEN  — DOD met: 20/20 ≥ 15, every pass row has `model_called:false`, `source_hologram_id`, `delta_params`, and `wall_ms_total < 500ms`. Cache file was wiped at the start of the run, so passes are form-recognition only.