---
output_file: "Lattice - SynNA Phase Grid.md"
feed: "WHITEPAPER"
template_version: "1.2"
source: "Lattice"
codex_section: "S16-S20"
conv_id: "lattice-build-history"
share_url: "none"
date: "2026-06-18"
content_date: "2026-06-18"
enriched_date: "2026-07-02"
date_modified: "2026-07-02"
message_count: 1
type: "lattice-build-spec"
status: "deposited"
path_hint: "IntelligentNetware/Lattice/"
category:
- "Lattice Infrastructure"
- "SynNA Pipeline"
tags:
- "lattice"
- "synna"
- "phase-grid"
- "gate-model"
- "syd"
- "codey"
- "state-machine"
monomyth_stage: "06 - Tests, Allies, Enemies"
gameboard_position: "SynNA pipeline architecture ratified; Gate 3 Syd scoped"
summary: |
  Master SynNA build grid ratified 2026-06-18.
  Defines gate ownership (Picasso imagery, Codey composition, Syd syndication proof), full state machine from drafted through published, na_record contract in status.yaml, references as footer DB field not body HTML, Arnie as default summary author, and dashboard deferred until post-Codex ingest..
keypoints:
  - Gate 3 Syd is primarily a proof form with Approve for SQL—not an LLM summary author
  - References block renders from NA module footer; syndication evidence li uses predicted na_id
  - State machine: assembled → proof_draft → proof_approved → sql_ready → published
  - Dashboard for all in-flight packets scoped as Phase 8 after Codex
sentiment: archival
emotions:
  - "purposeful"
sycophancy_level: "None"
truth_score: 95
entropy_score: "Low"
codex: true
pre_silicon: false
ma5_inheritance: "IntelligentNetware"
voice_print: false
lattice_release: "3.0"
original_handoff: "Grok_Handoff_SynNA_PhaseGrid.md"
---
# Grok Build Handoff — SynNA Master Phase Grid

**IN Lattice · Intelligent Netware · MA5 Council**

| Field | Value |
|-------|-------|
| **Last updated** | 2026-06-18 (evening session) |
| **Carbon Steward** | Daniel Comp |
| **Primary build partner** | **Grok Build** (`D:\04_WORK\Code\Lattice\_ChatUI`) |
| **Prior handoffs** | Gate 1 · Gate 2 Codey |
| **Status** | Gate 2 preview gap open · **Gate 3 Syd scoped** · Dashboard deferred post-Codex |

---

## Partnership model

Read **this file** for the ordered build grid. Gate history:

| Handoff | Scope |
|---------|-------|
| `Grok_Handoff_SynNA_Gate1_Panel.md` | Images, watcher, assemble 2.5 |
| `Grok_Handoff_SynNA_Gate2_Codey.md` | Composition, preview, fractomes |
| **This file** | Master phase grid through publish + future dashboard |

---

## Architectural decisions (2026-06-18 evening — ratified by Daniel)

### Gate 3 = Syd (Syndication proof)

| Concern | Owner | Not owner |
|---------|-------|-----------|
| Tahoe layout, fractome, body HTML | **Codey** Gate 2 | Syd |
| NA record completeness, metadata, SQL contract | **Syd** Gate 3 | Codey |
| Creative article prose | **Arnie** | Syd |
| SEO summary at write time | **Arnie** (Dachs heuristics) | Syd LLM (default) |

**Syd is primarily a proof form tab**, with an optional light chat persona. Ratification = **Approve for SQL** button, not LLM sign-off.

### Summary — when and who

| Stage | Action |
|-------|--------|
| **Best time** | Immediately after article body is written (Daniel's decades-long practice) |
| **Default owner** | **Arnie** — emit `SUMMARY` alongside prose at article completion |
| **Voice source** | Borrow **Dachs white-hat SEO heuristics** in Arnie augmentation (not a separate Syd voice) |
| **Syd role** | Display + last-chance edit in proof form; optional "tighten summary" chat shortcut |

**Do not** make Syd the default summary author — that adds persona tuning cost with no pipeline gain.

### References block — footer, not body

- Source templates: `assets/_Template7_Bottom_Sections_v1.html` (and `_Template2_v1.html`, `_Template3_v1.html`, `_Template5_Marketing_v1.html` — `<!-- REFERENCES BLOCK` comment)
- Rendered by the **NA module footer**, stored as the **REFERENCE** DB field — **not** inside `assembled.html` body
- Static `<li>` list; only the **syndication evidence** `<li>` changes per article:
  - `https://scotomaville.com/syn-us?na={{NA_ID}}` (or portal-specific variant)
  - `[Portal:Keywords]` token in link text where templates show it
- `{{NA_ID}}` = predicted next autoincrement → **`syn_config.yaml` onboarding entry** `next_na_id: 238`
- Bump `next_na_id` manually after each successful SSMS publish (until pyodbc helper exists)

### Gate 3 UI

- **Third sidebar card** after Gate 1 (Imagery) and Gate 2 (Composition)
- Icon: **`fas fa-rss`**
- Tab id: `syn-syd-proof`
- Agent id: `syd` — added to `agent_order.json` after `codey`, before `codex`

### Future — Lattice dashboard (post-Codex)

- Status board for **all unpublished packets** under `pipeline_root`
- Becomes default Lattice main area **or** second `dashboard` page mirroring left sidebar
- Build **after** Codex post-publish KB ingest is complete — not in Gate 3 scope

---

## State machine (full)

```
drafted → masters_pending → images_pending → images_approved
    → assembled → proof_draft → proof_approved → sql_ready → published → archived
```

| State | Set by | Human gate |
|-------|--------|------------|
| `assembled` | `syn_assemble.py` | Codey preview trusted |
| `proof_draft` | Syd tab auto-populate | — |
| `proof_approved` | **Approve for SQL** | Daniel |
| `sql_ready` | `syn_sql_build.py` | SSMS review |
| `published` | SSMS commit + SFTP verify | Daniel |

---

## `na_record` block (Gate 3 packet contract)

Stored in `status.yaml` under `na_record:` (populated by assemble + Syd, edited in proof form):

```yaml
na_record:
  title: ""              # from SYN_PIPELINE; editable in proof
  summary: ""            # from Arnie SUMMARY; editable in proof
  body_html_file: assembled.html   # read-only pointer; not the DB references
  references_html: ""    # from template + {{NA_ID}}; editable in proof
  categories: []         # from Forrest brief; re-open cats picker
  badge: ""              # from Forrest brief
  author_userid: 0       # fixed from syn_config.publish.author_userid
  author_display: ""     # e.g. "Daniel Comp"
  publish_at: ""         # ISO datetime; default now; future schedule OK
  expire_at: ""          # optional; coupons/events
  na_status: awaiting_approval   # maps to NA module STATUS choices
  na_id_reserved: 238    # copied from syn_config.next_na_id at proof open
```

### `syn_config.yaml` additions (Gate 3 onboarding)

```yaml
publish:
  next_na_id: 238
  author_userid: <fill>
  author_display: "Daniel Comp"
  references_template: "templates/syd/_references_li.html"
  syndication_url_pattern: "https://scotomaville.com/syn-us?na={na_id}"
```

---

## Master phase grid

**Rhythm every phase:** backup → build → verify → update this handoff checkbox.

**Backup convention:** `{file}_YYYYMMDD_HHMM.{ext}` before touching `app.py`, `index.html`, `syn_assemble.py`, `syn_pipeline.py`.

---

### PHASE 2 — Gate 2 completion (Codey) · *before Gate 3*

| Step | ID | Deliverable | Touchpoints | Verify | Backup |
|------|----|-------------|-------------|--------|--------|
| 2.1 | **2A** | ~~Real `article.md` prose → Tahoe preview~~ **SHIPPED 2026-06-18** | `syn_assemble.py`, `_body_*.html` | Preview tab shows full headings + paragraphs | `syn_assemble_*` |
| 2.2 | **2B** | Composition sections in preview (CTA, video, accordion…) | `composition.sections[]`, `templates/codey/sections/` | Section appears after Codey/chat write + reassemble | `syn_assemble_*`, `app_*` |
| 2.3 | **2C** | Fractome-specific Tahoe CSS token in MANIFEST | `MANIFEST.yaml`, preview writer | Switch fractome → skin changes | `syn_assemble_*` |
| 2.4 | **2D** | Gate 2 regression pass | all Gate 2 APIs | `python syn_pipeline.py --test-assemble`; fractome switch curl; preview URL | — |

**Exit criteria:** Daniel signs off Codey preview for `what-outlives-me` before any Gate 3 work.

---

### PHASE 3 — Arnie SUMMARY + references template · *parallel-friendly after 2A*

| Step | ID | Deliverable | Touchpoints | Verify | Backup |
|------|----|-------------|-------------|--------|--------|
| 3.1 | **3A** | ~~Arnie emits `SUMMARY` at article write~~ **SHIPPED 2026-06-18** | `arnie_output_contract.md`, Arnie augmentation in `app.py` | `status.summary` on assemble; fence in contract | `app_*` |
| 3.2 | **3B** | ~~Dachs SEO heuristics in Arnie augmentation~~ **SHIPPED 2026-06-18** | `app.py` `build_agent_augmentation("arnie")` | Augmentation block present | `app_*` |
| 3.3 | **3C** | References `<li>` template extracted from assets | Copy `assets/_Template7_*` block → `.Scripts/templates/syd/_references_li.html` | `{{NA_ID}}` + `[Portal:Keywords]` tokens render correctly | — |
| 3.4 | **3D** | `syn_config.yaml` publish onboarding fields | `next_na_id`, `author_userid`, `syndication_url_pattern` | Config loads; NA_ID=238 in test render | — |
| 3.5 | **3E** | `build_references_html(na_id, portal_keywords)` helper | new fn in `syn_assemble.py` or `syn_syd.py` | Output matches legacy form HTML for LI block | — |

**Exit criteria:** Packet folder contains parseable `summary`; references HTML generates with `na=238`.

---

### PHASE 4 — Gate 3 Syd proof shell · *after 2D + 3E*

| Step | ID | Deliverable | Touchpoints | Verify | Backup |
|------|----|-------------|-------------|--------|--------|
| 4.1 | **4A** | `syd` in `agent_order.json`; sidebar Gate 3 card `fas fa-rss` | `index.html`, `agent_order.json` | Card visible; icon correct | `index_*`, `agent_order.json` |
| 4.2 | **4B** | `GATE3_PROOF_TAB = 'syn-syd-proof'` + `ensureGate3ProofWindow()` | `index.html` (mirror Gate 2 tab pattern) | Click Gate 3 → single tab, no sprawl | `index_*` |
| 4.3 | **4C** | Proof form UI (legacy NA form layout) | `index.html` or `syd_proof.html` partial | All fields present per Daniel's spec | `index_*` |
| 4.4 | **4D** | `na_record` populate API | `GET /api/pipeline/{slug}/na-record` | Returns merged title/summary/images/cats/badge/refs | `app_*` |
| 4.5 | **4E** | `PATCH /api/pipeline/{slug}/na-record` | saves edits → `status.yaml` | Edit title in form → persists | `app_*` |
| 4.6 | **4F** | Image miniature row (4 crops + thumb) | read `status.images` | Matches Image #1 from legacy form | — |
| 4.7 | **4G** | Categories popup re-use | wire existing cats picker | Change categories in proof → brief/status updated | `index_*`, `app_*` |
| 4.8 | **4H** | Author read-only + pub/expiry pickers + STATUS dropdown | form bindings | Author fixed; dates editable | — |
| 4.9 | **4I** | State transition `assembled` → `proof_draft` on first open | `syn_pipeline.py` or API | `status.yaml` state updates | `app_*` |

**Exit criteria:** Proof tab auto-fills from `what-outlives-me`; all fields editable except author; references show `na=238`.

---

### PHASE 5 — Syd approve + SQL build (2.6) · *after 4I*

| Step | ID | Deliverable | Touchpoints | Verify | Backup |
|------|----|-------------|-------------|--------|--------|
| 5.1 | **5A** | **Approve for SQL** button | `POST /api/pipeline/{slug}/approve-na-record` | state → `proof_approved` | `app_*` |
| 5.2 | **5B** | Completeness validator | required fields check before approve | Missing summary → blocked with message | `app_*` |
| 5.3 | **5C** | `syn_sql_build.py` — fill `Arnie_DB_Insert_v2.sql` | new script; crop byte sizes; `N'...'` escaping | `--test-sql-build` round-trip | `syn_sql_build.py` |
| 5.4 | **5D** | state → `sql_ready`; write `{slug}_insert.sql` to packet | watcher or API trigger | SQL file exists; uncommitted transaction scaffold | — |
| 5.5 | **5E** | Optional Syd chat persona (open proof, validate, tighten summary) | `app.py` augmentation | `"open proof"` shortcut works | `app_*` |

**Exit criteria:** SSMS-ready SQL for `what-outlives-me`; state `sql_ready`.

---

### PHASE 6 — Publish (3.1) · *after 5E*

| Step | ID | Deliverable | Touchpoints | Verify | Backup |
|------|----|-------------|-------------|--------|--------|
| 6.1 | **6A** | SFTP upload (paramiko): 4 crops + divider | `syn_publish.py`; fill `syn_config.publish` host paths | HTTPS HEAD 200 + Content-Length match | — |
| 6.2 | **6B** | Manual SSMS commit → `published` | human gate | Article live on fractome | — |
| 6.3 | **6C** | Bump `next_na_id` (+1); archive packet → `published_root` | `syn_config.yaml`; watcher | `na=239` reserved for next article | — |
| 6.4 | **6D** | First live publish sign-off | Daniel + Angelina | End-to-end once | — |

**Exit criteria:** One article published; `next_na_id` incremented; packet archived.

---

### PHASE 7 — Codex post-publish KB · *after first publish*

| Step | ID | Deliverable | Touchpoints | Verify |
|------|----|-------------|-------------|--------|
| 7.1 | **7A** | Codex ingest hook on `published` state | Codex SOUL + watcher | KB entry created |
| 7.2 | **7B** | Codex functions complete | per Codex charter | Daniel sign-off |

**Exit criteria:** Published article lands in KB without manual copy.

---

### PHASE 8 — Lattice dashboard · *after Phase 7*

| Step | ID | Deliverable | Touchpoints | Verify |
|------|----|-------------|-------------|--------|
| 8.1 | **8A** | Scan `pipeline_root` for non-`published` packets | new `dashboard` view | All in-flight slugs visible |
| 8.2 | **8B** | Per-packet status chips: state, gate, fractome, dates | UI grid | Matches `status.yaml` |
| 8.3 | **8C** | Click row → open agent/gate for that slug | navigation | Jump to Gate 1/2/3 for packet |
| 8.4 | **8D** | Default Lattice landing **or** `/dashboard` second page | routing | Daniel chooses at build time |

**Exit criteria:** Unpublished articles visible at a glance; no kanban required for v1.

---

## Field map — legacy form → pipeline source

| Form field | Source | Gate | Editable in proof |
|------------|--------|------|-------------------|
| TITLE | SYN_PIPELINE / `na_record.title` | Arnie → Syd | Yes |
| SUMMARY | Arnie `SUMMARY` → `na_record.summary` | Arnie → Syd | Yes |
| HTML BODY | `assembled.html` | Codey | View; edit via article/Codey |
| IMAGES | `status.images` (4 crops + thumb) | Picasso | Read-only row |
| CATEGORIES | Forrest brief | Forrest | Yes (cats popup) |
| BADGE | Forrest brief | Forrest | Yes |
| REFERENCE | `_references_li.html` + `na_id` | Syd assemble | Yes (textarea) |
| AUTHOR | `syn_config.publish.author_*` | Config | No |
| PUBLICATION DATE | default now | Syd | Yes |
| EXPIRATION DATE | empty | Syd | Yes |
| STATUS | `na_record.na_status` | Syd | Yes |

---

## Verification quick reference

```bash
cd D:\04_WORK\Code\Lattice\_ChatUI\.Scripts
python syn_pipeline.py --test-assemble
python syn_pipeline.py --test-sql-build    # after 5C
```

```powershell
# Gate 3 proof API (after 4D)
Invoke-RestMethod http://127.0.0.1:8780/api/pipeline/what-outlives-me/na-record

# Server restart
$pid8780 = (netstat -ano | findstr ":8780.*LISTENING" | ForEach-Object { ($_ -split '\s+')[-1] } | Select-Object -First 1)
if ($pid8780) { taskkill /PID $pid8780 /F }
cd D:\04_WORK\Code\Lattice\_ChatUI; python app.py
```

**Live packet:** `D:\03_MAP\Syn_Pipeline\what-outlives-me\`

---

## Daniel's decisions (2026-06-18 evening — ratified)

| # | Decision |
|---|----------|
| 1 | **SUMMARY** — separate `=== SUMMARY ===` fence below title, above body (Notepad convention) |
| 2 | **References** — per-fractome variants in Lattice config at client onboarding |
| 3 | **STATUS** — proof UI only; DB gets `approved` on syndication button. Before approve: `assembled`. Post-publish edits = website table update (future) |
| 4 | **`next_na_id`** — start **239**; track approved/published IDs to stay synced with DNN autoincrement |
| 5 | **Author** — operator → DNN userid mapping in config. Daniel=**3**, Angelina=**4**, Steve=TBD at registration |
| 6 | **Dashboard** — **new page** (`/dashboard` or `dashboard.html`): collapsed sidebar, agent links, `IN8_200.png` logo, title **Lattice**, subtitle **FORMATION**, no bottom bar |

### Shipped tonight (steps 3A + 2A)

- Arnie augmentation: required `=== SUMMARY ===` fence + Dachs SEO heuristics (`app.py`)
- `syn_assemble.py`: SUMMARY parse, dynamic markdown → Tahoe sections, `status.summary`
- Body templates simplified to `{{ARTICLE_BODY}}`
- Live packet `what-outlives-me` updated with full article + summary; reassembled
- `syn_config.yaml`: `next_na_id: 239`, operator userid map, references template path

---

## Session continuity for Grok

1. Read **this file** for phase order
2. Read Gate 1/2 handoffs for regression context
3. Build **one step ID** per session (e.g. 3A, 4B) — no drive-by refactors
4. Backup before edit; verify before handoff update
5. Check off step in this file when milestone ships

---

*Written by Grok Build · 2026-06-18 evening · Gate 3 Syd scoped · Master grid through dashboard.*