docs(website): the template editor as built (engagement Phase 5b) #186

Merged
whitlocktech merged 1 commits from docs/engagement-template-editor into edge 2026-08-29 23:37:24 +00:00
Member

The documentation §6.0b assigns Phase 5b: an As built — 5b section in website/ENGAGEMENT.md, and the eight new /admin/engagement routes in website/BACKEND_DESIGN.md.

Pairs with RunicGateway/website#173 and RunicGateway/runicgateway.com#TBD.

The scope decision is recorded first, because the plan contradicted itself. The Phase 5 body names only the editor; Q4's answer and §6.2 both promise "Triggers, Templates and the send log" in Phase 5. All three shipped — leaving either out would have left the nav group half-built and G15 open with the rows already on disk.

Five more decisions, each because the tree said something the plan did not:

  • the preview is rendered server-side and framed, because a React preview would be a second renderer for the one artifact that matters;
  • status is now enforced by renderByKey — it shipped in 5a and nothing read it, so a draft kept going out;
  • a test send is logged under a synthetic trigger rather than making trigger_id nullable;
  • a template a rule uses refuses deletion with a 409 naming the rules;
  • duplicate is the only creation path.

It also records the correction that changed the most code: §4.6.2 says duplicate is how a protected template is customized, the schema says "Editable, NOT deletable", and the org lead's ruling is the schema's — a default is edited in place.

And the three things only building it found: the email.itemList bare-name reference a token scan cannot see, the duplicate that loses its variable palette if seed_key is nulled, and validateEmailBlocks returning { valid, errors } rather than an array — which meant block validation silently never ran. Plus the Phase 4a template-key pattern with no dot in it, which could not match any key this system uses.

BACKEND_DESIGN.md's router tree line goes 14 → 22 and now says why two of the new routes are POSTs that write nothing.


  • AI-assisted: written with Claude Code (Claude Opus 5)

🤖 Generated with Claude Code

https://claude.ai/code/session_01T6t8mrAWhZU5vnyYgZTMtL

The documentation §6.0b assigns Phase 5b: an **As built — 5b** section in `website/ENGAGEMENT.md`, and the eight new `/admin/engagement` routes in `website/BACKEND_DESIGN.md`. Pairs with RunicGateway/website#173 and RunicGateway/runicgateway.com#TBD. **The scope decision is recorded first, because the plan contradicted itself.** The Phase 5 body names only the editor; Q4's answer and §6.2 both promise "Triggers, Templates and the send log" in Phase 5. All three shipped — leaving either out would have left the nav group half-built and **G15 open with the rows already on disk**. Five more decisions, each because the tree said something the plan did not: - the preview is **rendered server-side and framed**, because a React preview would be a second renderer for the one artifact that matters; - **`status` is now enforced** by `renderByKey` — it shipped in 5a and nothing read it, so a draft kept going out; - a test send is logged under a **synthetic trigger** rather than making `trigger_id` nullable; - a template a rule uses **refuses deletion with a 409 naming the rules**; - **duplicate is the only creation path.** It also records **the correction that changed the most code**: §4.6.2 says duplicate is how a `protected` template is customized, the schema says *"Editable, NOT deletable"*, and the org lead's ruling is the schema's — a default is edited in place. And the three things only building it found: the `email.itemList` bare-name reference a token scan cannot see, the duplicate that loses its variable palette if `seed_key` is nulled, and `validateEmailBlocks` returning `{ valid, errors }` rather than an array — which meant block validation silently never ran. Plus the **Phase 4a template-key pattern with no dot in it**, which could not match any key this system uses. `BACKEND_DESIGN.md`'s router tree line goes 14 → 22 and now says why two of the new routes are POSTs that write nothing. --- - [x] AI-assisted: written with Claude Code (Claude Opus 5) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T6t8mrAWhZU5vnyYgZTMtL
wtclaude added 1 commit 2026-08-29 23:15:33 +00:00
ENGAGEMENT.md gains an "As built - 5b" section and BACKEND_DESIGN.md the eight
routes under /admin/engagement.

The scope decision is recorded first because the plan contradicted itself: the
Phase 5 body names only the editor, while Q4's answer and 6.2 both promise
"Triggers, Templates and the send log" in Phase 5. All three shipped - leaving
either out would have left the nav group half-built and G15 open with the rows
already on disk.

Five more decisions, each because the tree said something the plan did not: the
preview is rendered server-side and framed; `status` is now enforced by
renderByKey; a test send is logged under a synthetic trigger rather than making
the column nullable; a template a rule uses refuses deletion with a 409; and
duplicate is the only creation path.

Also records the correction that changed the most code - 4.6.2 says duplicate is
how a protected template is customized, the schema says "Editable, NOT deletable",
and the org lead's ruling is the schema's - and the three things only building it
found, including the Phase 4a template-key pattern that could not match any key
this system uses.

Co-Authored-By: Claude <noreply@anthropic.com>
whitlocktech merged commit 2161119c8c into edge 2026-08-29 23:37:24 +00:00
whitlocktech deleted branch docs/engagement-template-editor 2026-08-29 23:37:25 +00:00
Sign in to join this conversation.
No description provided.