Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

VaranAwesomenow
Mega Sage

Give simple phase-based prompts

Review at each stage the output and confirm it meets the requirement.

At each stage attempt an update app vs continuing on the same session it errors out very easily.

 

 

 

 


Example: 

 

Yeah—that’s not surprising. What you gave the build agent was *correct*, but too **dense and multi-intent**. ServiceNow build agents (especially in **ServiceNow App Engine Studio / Now Assist)** tend to break when:

* too many artifacts are defined in one prompt
* cross-references are introduced before objects exist
* flows + decision tables + UI + data model are bundled together

👉 In short: you hit **instruction overload**, not a design issue.

---

# 🔧 Fix: Use a **Phased Prompt Strategy** (This Works Reliably)

Instead of one big prompt, split into **4 atomic prompts** that the agent can actually execute.

---

# 🧩 PHASE 1 — Data Foundation (Run First)

> **Prompt 1:**

Create a scoped application **Internal Developer Portal** (`x_idp_portal`).

Create tables:

### 1. `x_idp_service` (extends `cmdb_ci`)

Fields:

* `u_owner` (Reference → sys_user)
* `u_lifecycle` (Choice: Experimental, Production, Deprecated)
* `u_health_score` (Integer, read-only)
* `u_score_grade` (Choice: Gold, Silver, Bronze, Red, read-only)

---

### 2. `x_idp_fact`

Fields:

* `u_service` (Reference → x_idp_service)
* `u_fact_type` (String)
* `u_fact_value` (String)
* `u_last_updated` (DateTime)

---

### 3. `x_idp_service_score`

Fields:

* `u_service` (Reference → x_idp_service)
* `u_metric_name` (String)
* `u_score` (Integer)
* `u_last_evaluated` (DateTime)

---

👉 **STOP after this prompt and verify tables exist**

---

# 🧠 PHASE 2 — Decision Tables (No Flows Yet)

> **Prompt 2:**

Create Decision Tables:

---

### `DT_DF_Scoring`

Input: deploy_count_7d (Number)
Output: score (Integer)

Rules:

* > =14 → 100
* > =7 → 85
* > =1 → 70
* else → 10

---

### `DT_LT_Scoring`

Input: lead_time_hours
Rules:

* <24 → 100
* <168 → 80
* else → 60

---

### `DT_CFR_Scoring`

Input: change_fail_rate
Rules:

* <=0.05 → 100
* <=0.10 → 80
* else → 60

---

### `DT_MTTR_Scoring`

Input: mttr_minutes
Rules:

* <60 → 100
* <1440 → 80
* else → 50

---

### `DT_Grade`

Input: score
Rules:

* > =90 → Gold
* > =70 → Silver
* > =50 → Bronze
* else → Red

---

👉 **STOP and verify decision tables are created**

---

# ⚙️ PHASE 3 — Flow (This is Where Most Failures Happen)

> **Prompt 3:**

Create Flow **Calculate DORA Score**

Trigger:

* Scheduled (hourly)

Steps:

1. For each `x_idp_service`

2. Lookup related `x_idp_fact` records:

   * deploy_count_7d
   * lead_time_avg_hours
   * change_fail_rate
   * mttr_minutes

3. Convert values to numbers

4. Call Decision Tables:

   * DT_DF_Scoring
   * DT_LT_Scoring
   * DT_CFR_Scoring
   * DT_MTTR_Scoring

5. Calculate weighted score:

* 25% DF
* 25% LT
* 30% CFR
* 20% MTTR

6. Update:

* `u_health_score`

7. Call `DT_Grade`
8. Update:

* `u_score_grade`

---

👉 Keep this prompt CLEAN—no UI, no extras

---

# 📊 PHASE 4 — UI (Last)

> **Prompt 4:**

Create Workspace **Developer Portal**

Page: Service Catalog

* Table: `x_idp_service`
* Columns:

  * Name
  * Owner
  * Health Score
  * Grade

---

Page: Service Details

* Show related list:

  * `x_idp_service_score`
  * `x_idp_fact`

---

# 🚨 Why Your Original Prompt Broke

Your earlier version tried to do this in one go:

* Data model
* Decision tables
* Flow logic
* UI Builder
* Governance rules

👉 That’s **5 different engines** inside ServiceNow:

* Table engine
* Decision engine
* Flow engine
* UI Builder
* Security

The agent can’t reliably orchestrate all of them in one pass.

---

# 🔥 Pro Tip (This Changes Everything)

Treat the build agent like this:

> “Build a system”
> “Create one layer at a time”

---

# If you want next level reliability

I can give you:

* a **JSON-style pseudo spec** that maps 1:1 to ServiceNow metadata
* or a **Flow Designer step-by-step config (click-level instructions)**
* or help debug exactly where your agent failed

Just tell me what error or where it stopped 👍
 
After first phase metadata files, check for count of tables and columns
VaranAwesomenow_0-1777195406033.png

 

VaranAwesomenow_1-1777195424024.png
> **Prompt 2:**

Create Decision Tables:

---

### `DT_DF_Scoring`

Input: deploy_count_7d (Number)
Output: score (Integer)

Rules:

* > =14 → 100
* > =7 → 85
* > =1 → 70
* else → 10

---

### `DT_LT_Scoring`

Input: lead_time_hours
Rules:

* <24 → 100
* <168 → 80
* else → 60

---

### `DT_CFR_Scoring`

Input: change_fail_rate
Rules:

* <=0.05 → 100
* <=0.10 → 80
* else → 60

---

### `DT_MTTR_Scoring`

Input: mttr_minutes
Rules:

* <60 → 100
* <1440 → 80
* else → 50

---

### `DT_Grade`

Input: score
Rules:

* > =90 → Gold
* > =70 → Silver
* > =50 → Bronze
* else → Red

---
VaranAwesomenow_2-1777195627342.png

 

 

VaranAwesomenow_3-1777195683387.png

 

VaranAwesomenow_4-1777195708805.png

 

 

Version history
Last update:
6 hours ago
Updated by:
Contributors