<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:media="http://search.yahoo.com/mrss/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Server &#038; Cloud Monitoring &#8211; Flowpast.com &#8211; Your Workflow Automation Library</title>
	<atom:link href="https://flowpast.com/function/server-monitoring/feed/" rel="self" type="application/rss+xml" />
	<link>https://flowpast.com</link>
	<description>Flowpast.com - Pre-Built n8n, Make &#38; Zapier Workflow Templates</description>
	<lastBuildDate>Fri, 23 Jan 2026 02:50:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://flowpast.com/wp-content/uploads/2025/12/cropped-icon-32x32.png</url>
	<title>Server &#038; Cloud Monitoring &#8211; Flowpast.com &#8211; Your Workflow Automation Library</title>
	<link>https://flowpast.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Build Layered API Rate Limits with this AI Prompt</title>
		<link>https://flowpast.com/prompts/build-layered-api-rate-limits-with-this-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:50:32 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5001441</guid>

					<description><![CDATA[Scrapers overrun your API - the ultimate AI Prompt that designs layered rate limits with code, 429 handling, telemetry, tests, and rollout. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: API rate limits -->
<div class="hook-introduction">

<p>Your API works fine. Until it doesn’t. One scraper hits a single endpoint, retries aggressively, rotates IPs, and suddenly legit users are seeing timeouts, higher latency, and a flood of “why is this broken?” messages.</p>



<p>This <strong>API rate limits</strong> prompt is built for <strong>backend engineers</strong> who need a production-ready throttling plan without weeks of trial-and-error, <strong>platform leads</strong> trying to stop abusive traffic without punishing power users, and <strong>DevOps/SRE teams</strong> who must add visibility, alerts, and safe rollouts before the next surge. The output is a deployable blueprint: layered IP + identity controls, storage backend options, middleware-style code examples, 429 + Retry-After guidance, telemetry, tests, and a low-risk rollout checklist.</p>

</div>

<div class="what-and-when-section">

<h2 class="wp-block-heading">What Does This AI Prompt Do and When to Use It?</h2>



<table class="solution-results-table three-column" role="presentation" aria-label="What this prompt does, when to use it, and what you get">
 <thead>
    <tr>
      <th scope="col">What This Prompt Does</th>
      <th scope="col">When to Use This Prompt</th>
      <th scope="col">What You&#8217;ll Get</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <ul class="automation-list">
          <li>It models likely abuse paths (bursts, retry storms, credential stuffing, IP rotation) and converts them into concrete rate-limit rules.</li>
          <li>It designs layered throttling with at least two independent enforcement layers (IP-based plus identity-based), including guidance for unauthenticated traffic.</li>
          <li>It specifies scalable state storage patterns for counters and windows, from local memory to shared cache and distributed backends.</li>
          <li>It generates code-oriented, middleware-style examples that you can adapt to your stack, while keeping the core approach framework-agnostic.</li>
          <li>It defines operational visibility: logs, metrics, dashboards, alerts, and what signals to watch as attackers change tactics.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You are seeing sudden 429s, timeouts, or elevated p95 latency during traffic spikes and you need protection without downtime.</li>
          <li>Scrapers are draining quota or inflating infra bills, especially on “list,” “search,” “export,” or “pricing” endpoints.</li>
          <li>You have authentication for some routes but also support public endpoints, and you need sane rules for both.</li>
          <li>Attackers are bypassing naive IP limits by rotating addresses, distributing requests, or abusing retry behavior.</li>
          <li>You are about to launch, get featured, or open an integration program, and you want guardrails before growth stress-tests you.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A layered rate-limit blueprint with at least 2 enforcement layers plus one fallback behavior for edge cases.</li>
           <li>Endpoint-by-endpoint policy suggestions (examples: burst vs sustained limits) with a short rationale for each.</li>
           <li>Ready-to-adapt middleware/pseudocode showing request keying, counter updates, and consistent limit evaluation.</li>
           <li>A 429 response contract including Retry-After guidance and client-safe error messaging that avoids leaking internals.</li>
           <li>A validation + rollout plan: test matrix, load simulation outline, and step-by-step staged deployment checklist.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

<div class="prompt-display-section">

<h2 class="wp-block-heading">The Full AI Prompt: Layered API Rate-Limiting Blueprint Generator</h2>



<div class="prompt-viewer-wrapper" id="prompt-section">
    <div class="prompt-comparison-row prompt-premium">
        <!-- Header with buttons -->
        <div class="prompt-row-header">
            <!-- <span class="prompt-row-icon">✨</span> -->
            <span class="prompt-row-title">
                                    Step 1: Customize the prompt with your input
                            </span>
            <div class="prompt-header-buttons">
                                    <button class="prompt-header-btn prompt-header-reset" onclick="resetPrompt()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                                <button class="prompt-header-btn prompt-header-copy-green flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span>Customize and Copy Full Prompt</span>
                </button>
            </div>
        </div>

        <!-- Customize the Prompt Section -->
                    <div class="prompt-customize-section">
                <span class="customize-title">Customize the Prompt</span>
                <p class="customize-subtitle">Fill in the fields below to personalize this prompt for your needs.</p>
                <table class="customize-table">
                    <thead>
                        <tr>
                            <th>Variable</th>
                            <th>What to Enter</th>
                            <th>Customise the prompt</th>
                        </tr>
                    </thead>
                    <tbody>
                                                    <tr>
                                <td class="var-name"><code>[FORMAT]</code></td>
                                <td class="var-desc">
                                    Specify the format in which the deliverable should be presented, such as text, diagrams, or code snippets.                                    <div class="var-example">For example: "A markdown document with embedded code examples and architecture diagrams."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[FORMAT]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[CONTEXT]</code></td>
                                <td class="var-desc">
                                    Provide background information about the API, including its purpose, typical usage patterns, and traffic characteristics.                                    <div class="var-example">For example: "A public API for a social media platform handling 10M daily active users with frequent data retrieval and posting operations."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[CONTEXT]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[INDUSTRY]</code></td>
                                <td class="var-desc">
                                    Describe the industry or domain the API serves, as this can influence abuse patterns and rate-limiting strategies.                                    <div class="var-example">For example: "E-commerce platform with APIs for product search, inventory updates, and checkout processing."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[INDUSTRY]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[CHALLENGE]</code></td>
                                <td class="var-desc">
                                    Explain the main problem or threat the rate-limiting solution needs to address, such as traffic surges or targeted abuse.                                    <div class="var-example">For example: "Mitigating credential stuffing attacks and preventing unauthenticated scraping during flash sales events."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[CHALLENGE]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[TIMEFRAME]</code></td>
                                <td class="var-desc">
                                    Indicate the expected timeline for delivering the solution, including any milestones or deadlines.                                    <div class="var-example">For example: "Two months for full implementation, including testing and phased rollout."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[TIMEFRAME]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                            </tbody>
                </table>

                <button class="copy-customized-btn flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span class="copy-customized-text">Customise the prompt now</span>
                </button>
            </div>
        
        <!-- Full Prompt Code Header -->
                    <div class="prompt-code-header">
                <span class="prompt-code-title">
                    Step 2: Copy the Prompt
                </span>
                <div class="prompt-code-buttons">
                    <!-- Reset: Only visible when unlocked -->
                    <button class="prompt-header-btn prompt-header-reset btn-when-unlocked" onclick="resetPrompt()" style="display: none;">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                    <!-- Copy Full Prompt -->
                    <button class="prompt-header-btn prompt-header-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                            <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                        </svg>
                        <span>Copy Full Prompt</span>
                    </button>
                </div>
            </div>
        

        <!-- Prompt Content -->
        <div class="prompt-box prompt-gated-wrapper">
            <!-- Gated: Blurred content -->
            <div class="prompt-gated-content">
                <div class="prompt-header-visible">OBJECTIVE</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PERSONA</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">CONSTRAINTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">What This Is NOT (Scope Boundaries)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PROCESS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">Edge Case Handling</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">INPUTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">OUTPUT SPECIFICATION</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">QUALITY CHECKS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div>            </div>
            <!-- Unlocked: Full content (hidden by default) -->
            <div class="prompt-content-full" id="premium-prompt-content" style="display: none;">
                ## OBJECTIVE
Create a production-grade API rate-limiting blueprint and implementation guide that withstands traffic surges and active abuse. The deliverable must cover layered throttling (IP + identity), scalable state storage, safe client messaging, and operational visibility—without degrading legitimate user experience.

## PERSONA
Act as a seasoned API defense engineer who has designed anti-abuse controls for high-volume enterprise platforms. You prioritize attacker behavior modeling, adaptive controls, and practical implementations that survive real-world load and evasion tactics. Write with crisp, engineering-focused clarity.

## CONSTRAINTS
- Provide concrete, deployable patterns; avoid generic “secure your API” advice.
- Use multi-layer protection (at least two independent enforcement layers plus a fallback behavior).
- Include both IP-based and user/identity-based throttling, with guidance for unauthenticated traffic.
- Offer framework-agnostic concepts plus code-oriented middleware examples tailored to the stated stack.
- Recommend state backends appropriate to scale (local memory, shared cache, distributed options).
- 429 handling must include **Retry-After** and client-safe messaging that does not leak internals.
- Include logging, monitoring, and alerting plans aimed at discovering evolving abuse patterns.
- Address performance overhead and tuning.
- Include a validation plan (tests + load simulation) and a low-risk rollout plan.

### What This Is NOT (Scope Boundaries)
- Not a full WAF/CDN vendor selection report.
- Not a complete IAM/auth redesign (only cover identity signals needed for rate limiting).
- Not malware forensics or incident response playbooks beyond logging/alerting needed for throttling.
- Not compliance legal guidance; only technical measures mapped to stated requirements.

## PROCESS
1. **Pre-analysis (required):** Restate your understanding of the API scenario, likely abuse modes, and success criteria based on the provided inputs. List any assumptions.
2. **Threat-to-control mapping:** Translate the stated threats into specific throttles (burst, sustained, endpoint-sensitive, credential stuffing-style patterns, scraping heuristics).
3. **Layered design:** Specify at minimum:
   - Edge or gateway control (coarse limiting)
   - Application middleware control (fine-grained limiting)
   - A fallback/containment mode when dependencies fail (e.g., storage outage)
4. **Middleware build plan:** Provide implementation patterns for:
   - IP keying (including proxy/CDN header handling guidance)
   - User/identity keying (user ID, API key, session, device fingerprint where appropriate)
   - Combined keys (e.g., per-user-per-endpoint) and endpoint weighting
5. **State storage decisioning:** Recommend the backend(s) with clear thresholds for when to move from in-process to shared/distributed stores. Include setup notes.
6. **Client response behavior:** Define 429 structure, headers, and message templates that help clients recover without revealing architecture.
7. **Observability:** Define log schema, metrics, dashboards, and alert rules; include examples of queries/patterns to detect abuse evolution.
8. **Performance &amp; tuning:** List optimizations (hot paths, sampling, async logging, local caches, Lua/scripts if Redis, etc.).
9. **Validation:** Provide unit/integration tests, adversarial test cases, and load tests. Include acceptance criteria.
10. **Rollout:** Provide a staged deployment plan over **4–6 phases** with monitoring gates and rollback triggers.

### Edge Case Handling
- If any input is missing or ambiguous, ask targeted clarifying questions first. If the user requests immediate output anyway, proceed with reasonable defaults and clearly label them as assumptions.
- If the stack cannot support a recommended tactic, provide an alternative that preserves the same security intent.
- If strict limiting conflicts with performance constraints, propose adaptive limits and “grace” mechanisms for trusted clients.

## INPUTS
- **Application type:** [FORMAT]
- **Traffic profile (baseline + peak + spike shape):** [CONTEXT]
- **Technology stack (framework, runtime, infra, DB):** [INDUSTRY]
- **Security requirements (threats + compliance):** [CHALLENGE]
- **Performance constraints (latency/throughput SLOs):** [TIMEFRAME]

## OUTPUT SPECIFICATION
Use markdown headings and provide sections in this exact order:

1. **Rate Limiting Architecture**
   - {Threat Model Summary}
   - {Layered Controls Overview}
   - {Keying Strategy} (IP, user, combined, endpoint sensitivity)
   - {Adaptive Rules} (burst vs sustained, anomaly triggers)

2. **Middleware Implementation**
   - {Middleware Approach} (where it runs, how it’s composed)
   - {IP Throttle Example} (code-oriented pseudocode or stack-specific sample)
   - {User/Identity Throttle Example}
   - {Composite &amp; Endpoint-Weighted Limits}
   - {Failure Modes &amp; Fallback Behavior}

3. **State Storage &amp; Configuration**
   - {When In-Memory Is Acceptable}
   - {When Shared/Distributed Storage Is Required}
   - {Redis/Upstash-Style Setup Notes}
   - {Key Design, TTLs, Atomicity Notes}

4. **429 Responses &amp; Client Guidance**
   - {Response Schema}
   - {Retry-After Strategy}
   - {Safe Message Examples} (rewritten, non-revealing)
   - {Handling for Auth vs Unauth Clients}

5. **Logging, Monitoring, and Alerting**
   - {Log Fields &amp; Structure}
   - {Metrics to Emit}
   - {Dashboards}
   - {Alert Rules}
   - {Abuse Pattern Detection Examples}

6. **Performance Optimization**
   - {Hot Path Optimizations}
   - {Caching &amp; Sampling Guidance}
   - {Distributed Store Latency Mitigations}

7. **Testing &amp; Validation**
   - {Unit Tests}
   - {Integration Tests}
   - {Adversarial Scenarios}
   - {Load/Spike Tests}
   - {Pass/Fail Criteria}

8. **Deployment &amp; Gradual Rollout**
   - {Phase Plan}
   - {Monitoring Gates}
   - {Rollback Triggers}
   - {Post-Launch Tuning Loop}

## QUALITY CHECKS
Before finalizing, verify:
- The plan includes at least two enforcement layers plus a defined fallback mode.
- Both IP-based and identity-based throttles are implemented with clear key definitions.
- 429 handling includes Retry-After and client-safe wording that avoids leaking internals.
- Storage recommendations are tied to the provided traffic scale and performance constraints.
- Testing and rollout steps are actionable and include measurable acceptance criteria.            </div>
        </div>


    </div>

    <!-- CTA Row - Full width buttons -->
    <div class="prompt-cta-row">
        <button class="prompt-cta-btn prompt-cta-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
            </svg>
            <span class="cta-copy-text">Copy Full Prompt</span>
        </button>
    </div>
</div>

<style>
    /* Gated prompt states */
    .prompt-gated-wrapper {
        position: relative;
    }

    /* When unlocked - show full content, hide gated */
    body.flowpast-unlocked .prompt-gated-wrapper .prompt-gated-content {
        display: none;
    }

    body.flowpast-unlocked .prompt-gated-wrapper .prompt-content-full {
        display: block !important;
    }

    /* Show/hide elements based on unlock state */
    body.flowpast-unlocked .btn-when-unlocked {
        display: inline-flex !important;
    }

    .prompt-viewer-wrapper {
        scroll-margin-top: 250px;
    }

    /* ========================================
   PROMPT VIEWER - MAIN WRAPPER
   ======================================== */
    .prompt-viewer-wrapper {
        margin: 30px 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* ========================================
   PROMPT BOX CONTAINER
   ======================================== */
    .prompt-comparison-row {
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid #e0e0e0;
        background: #fff;
    }

    /* ========================================
   HEADER WITH BUTTONS
   ======================================== */
    .prompt-row-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
        flex-wrap: wrap;
    }

    .prompt-row-icon {
        font-size: 20px;
    }

    .prompt-row-title {
        font-weight: 600;
        font-size: 22px;
        color: #fff !important;
        text-decoration: underline
    }

    .prompt-header-buttons {
        margin-left: auto;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Header buttons */
    .prompt-header-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-header-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-header-copy:hover {
        background: #2a2a2a;
    }

    .prompt-header-copy.copied {
        background: #2e7d32;
    }

    .prompt-header-copy-green {
        background: #04AA6D !important;
        color: #fff !important;
    }

    .prompt-header-copy-green:hover {
        background: #039860 !important;
    }

    .prompt-header-copy-green.copied {
        background: #2e7d32 !important;
    }

    .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-header-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-1px);
    }

    /* ========================================
   PROMPT CONTENT - FULL (NO SCROLL)
   ======================================== */
    .prompt-box {
        background: #ffffff;
    }

    .prompt-content-full {
        padding: 24px;
        margin: 0;
        color: #202124;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.7;
        white-space: pre-wrap;
        word-wrap: break-word;
        /* No scroll - show full content */
        max-height: none;
        overflow: visible;
    }

    /* Highlighted variable in prompt */
    .prompt-variable {
        background: #fff3cd;
        color: #1967d2;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #ffc107;
    }

    .prompt-variable-filled {
        background: #d4edda;
        color: #155724;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #28a745;
    }

    /* ========================================
   GATED CONTENT (NO ACCESS)
   ======================================== */
    .prompt-gated-content {
        padding: 24px;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.8;
        max-height: none;
        overflow: visible;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        cursor: default;
    }

    /* ## headers - larger, black */
    .prompt-header-visible {
        color: #202124;
        font-weight: 600;
        margin: 5px 0 0px 0;
        font-size: 20px;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    /* ### headers - smaller, black */
    .prompt-header-visible.subheader {
        color: #202124;
        font-weight: 600;
        margin: 5px 0;
        font-size: 18px;
    }

    .prompt-header-visible:first-child {
        margin-top: 0;
    }

    /* ========================================
   LOCKED SECTION BLOCK
   ======================================== */
    .locked-section {
        position: relative;
        margin: 4px 0 8px 0;
        border-radius: 6px;
        overflow: hidden;
        background: linear-gradient(110deg, #e2e8f0 8%, #f1f5f9 18%, #e2e8f0 33%);
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }

    .locked-section-bg {
        position: relative;
    }

    .locked-section-lines {
        padding: 8px 12px;
        position: relative;
    }

    .locked-line {
        height: 6px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 3px;
        margin-bottom: 4px;
        margin-left: 12px;
    }

    .locked-line:last-child {
        margin-bottom: 0;
    }

    .locked-section-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        font-size: 24px;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
    }

    /* Subheader locked sections - slightly indented */
    /*  .prompt-header-visible.subheader+.locked-section {
        margin-left: 16px;
    } */

    /* ========================================
   COMPATIBILITY BADGES
   ======================================== */
    .prompt-compatibility {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        background: #f8f9fa;
        border-top: 1px solid #e0e0e0;
    }

    .compat-label {
        font-size: 13px;
        color: #5f6368;
        font-weight: 500;
    }

    .compat-badge {
        padding: 4px 10px;
        background: #e8f0fe;
        color: #1967d2;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }

    /* ========================================
   CTA ROW - FULL WIDTH BUTTONS
   ======================================== */
    .prompt-cta-row {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .prompt-cta-btn {
        flex: 1;
        min-width: 200px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 24px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-cta-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-copy:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-copy.copied {
        background: #2e7d32;
    }

    .prompt-cta-reset {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-reset:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-cta-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    /* ========================================
    CUSTOMIZE YOUR PROMPT SECTION
    ======================================== */
    .prompt-customize-section {
        padding: 24px;
        border-bottom: 1px solid #e0e0e0;
        background: #fafbfc;
    }

    .customize-title {
        margin: 0 0 8px 0;
        font-size: 18px;
        font-weight: 700;
        color: #202124;
    }

    .customize-subtitle {
        margin: 0 0 20px 0;
        font-size: 14px;
        color: #5f6368;
    }

    .customize-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }

    .customize-table th {
        text-align: left;
        padding: 12px;
        background: #f1f3f4;
        border: 1px solid #e0e0e0;
        font-size: 13px;
        font-weight: 600;
        color: #202124;
    }

    .customize-table td {
        padding: 12px;
        border: 1px solid #e0e0e0;
        vertical-align: top;
    }

    .customize-table .var-name {
        width: 25%;
        background: #f8f9fa;
    }

    .customize-table .var-name code {
        background: #fff3cd;
        color: #1967d2;
        border: 1px solid #ffc107;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        word-break: break-all;
        font-weight: 600;
    }

    .customize-table .var-desc {
        width: 35%;
        font-size: 13px;
        color: #5f6368;
        line-height: 1.5;
    }

    .customize-table .var-example {
        margin-top: 8px;
        padding: 8px 10px;
        background: #f8f9fa;
        border-left: 3px solid #dadce0;
        font-size: 12px;
        color: #5f6368;
        font-style: italic;
        border-radius: 0 4px 4px 0;
    }

    .customize-table .var-input {
        width: 40%;
    }

    .customize-input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #dadce0;
        border-radius: 6px;
        font-size: 13px;
        font-family: inherit;
        resize: vertical;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .customize-input:focus {
        outline: none;
        border-color: rgb(5, 152, 98);
        box-shadow: 0 0 0 3px rgba(5, 152, 98, 0.1);
    }

    .customize-input::placeholder {
        color: #9aa0a6;
        font-style: italic;
    }

    .copy-customized-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 16px 24px;
        background: rgb(5, 152, 98);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .copy-customized-btn:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    .copy-customized-btn.copied {
        background: #2e7d32;
    }

    /* ========================================
    FULL PROMPT CODE HEADER
    ======================================== */
    .prompt-code-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
    }

    .prompt-code-title {
        font-size: 22px;
        font-weight: 600;
        text-decoration: underline;

    }

    .prompt-code-buttons {
        display: flex;
        gap: 8px;
    }

    .prompt-code-buttons .prompt-header-btn {
        padding: 8px 14px;
        font-size: 13px;
        background: #ffffff;
        color: #202124;
        border: 1px solid #dadce0;
    }

    .prompt-code-buttons .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
        border-color: rgb(5, 152, 98);
    }

    .prompt-code-buttons .prompt-header-btn.prompt-header-access:hover {
        background: rgb(4, 130, 83) !important;
        border-color: rgb(4, 130, 83);
        color: #fff !important;
    }

    .prompt-code-buttons .prompt-header-btn:hover {
        background: #f1f3f4;
    }

    .prompt-code-buttons .prompt-header-copy.copied {
        background: #d4edda;
        color: #155724;
        border-color: #28a745;
    }

    .prompt-header-reset {
        background: #ffffff;
        color: #202124;
    }

    /* ========================================
   RESPONSIVE
   ======================================== */
    @media (max-width: 768px) {
        .prompt-row-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .prompt-header-buttons {
            margin-left: 0;
            width: 100%;
        }

        .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }

        .prompt-cta-row {
            flex-direction: column;
        }

        .prompt-cta-btn {
            width: 100%;
        }

        /* Customize table responsive */
        .customize-table,
        .customize-table thead,
        .customize-table tbody,
        .customize-table tr,
        .customize-table th,
        .customize-table td {
            display: block;
        }

        .customize-table thead {
            display: none;
        }

        .customize-table tr {
            margin-bottom: 16px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            overflow: hidden;
        }

        .customize-table td {
            width: 100% !important;
            border: none;
            border-bottom: 1px solid #e0e0e0;
        }

        .customize-table td:last-child {
            border-bottom: none;
        }

        .customize-table .var-name {
            background: #f1f3f4;
            font-weight: 600;
        }

        .prompt-code-header {
            flex-direction: column;
            gap: 12px;
            align-items: flex-start;
        }

        .prompt-code-buttons {
            width: 100%;
        }

        .prompt-code-buttons .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }
    }
</style>

<script>
    function handlePromptCopy() {
        // Check if unlocked via cookie
        if (typeof window.flowpastIsUnlocked === 'function' && !window.flowpastIsUnlocked()) {
            // Show email popup
            if (typeof window.flowpastShowEmailPopup === 'function') {
                window.flowpastShowEmailPopup('prompt');
            }
            return;
        }

        // Copy the customized prompt (with filled variables)
        const customizedPrompt = getCustomizedPrompt();
        const copyButtons = document.querySelectorAll('.prompt-header-copy, .prompt-header-copy-green, .prompt-cta-copy, .copy-customized-btn');

        navigator.clipboard.writeText(customizedPrompt).then(() => {
            copyButtons.forEach(btn => {
                btn.classList.add('copied');
                const textSpan = btn.querySelector('span');
                if (textSpan) textSpan.textContent = 'Copied!';
            });

            setTimeout(() => {
                copyButtons.forEach(btn => {
                    btn.classList.remove('copied');
                    const textSpan = btn.querySelector('span');
                    if (textSpan) textSpan.textContent = 'Copy Full Prompt';
                });
            }, 2000);
        }).catch(err => {
            console.error('Failed to copy:', err);
        });
    }

    // Store original prompt for customization
    const originalPrompt = "## OBJECTIVE\r\nCreate a production-grade API rate-limiting blueprint and implementation guide that withstands traffic surges and active abuse. The deliverable must cover layered throttling (IP + identity), scalable state storage, safe client messaging, and operational visibility\u2014without degrading legitimate user experience.\r\n\r\n## PERSONA\r\nAct as a seasoned API defense engineer who has designed anti-abuse controls for high-volume enterprise platforms. You prioritize attacker behavior modeling, adaptive controls, and practical implementations that survive real-world load and evasion tactics. Write with crisp, engineering-focused clarity.\r\n\r\n## CONSTRAINTS\r\n- Provide concrete, deployable patterns; avoid generic \u201csecure your API\u201d advice.\r\n- Use multi-layer protection (at least two independent enforcement layers plus a fallback behavior).\r\n- Include both IP-based and user\/identity-based throttling, with guidance for unauthenticated traffic.\r\n- Offer framework-agnostic concepts plus code-oriented middleware examples tailored to the stated stack.\r\n- Recommend state backends appropriate to scale (local memory, shared cache, distributed options).\r\n- 429 handling must include **Retry-After** and client-safe messaging that does not leak internals.\r\n- Include logging, monitoring, and alerting plans aimed at discovering evolving abuse patterns.\r\n- Address performance overhead and tuning.\r\n- Include a validation plan (tests + load simulation) and a low-risk rollout plan.\r\n\r\n### What This Is NOT (Scope Boundaries)\r\n- Not a full WAF\/CDN vendor selection report.\r\n- Not a complete IAM\/auth redesign (only cover identity signals needed for rate limiting).\r\n- Not malware forensics or incident response playbooks beyond logging\/alerting needed for throttling.\r\n- Not compliance legal guidance; only technical measures mapped to stated requirements.\r\n\r\n## PROCESS\r\n1. **Pre-analysis (required):** Restate your understanding of the API scenario, likely abuse modes, and success criteria based on the provided inputs. List any assumptions.\r\n2. **Threat-to-control mapping:** Translate the stated threats into specific throttles (burst, sustained, endpoint-sensitive, credential stuffing-style patterns, scraping heuristics).\r\n3. **Layered design:** Specify at minimum:\r\n   - Edge or gateway control (coarse limiting)\r\n   - Application middleware control (fine-grained limiting)\r\n   - A fallback\/containment mode when dependencies fail (e.g., storage outage)\r\n4. **Middleware build plan:** Provide implementation patterns for:\r\n   - IP keying (including proxy\/CDN header handling guidance)\r\n   - User\/identity keying (user ID, API key, session, device fingerprint where appropriate)\r\n   - Combined keys (e.g., per-user-per-endpoint) and endpoint weighting\r\n5. **State storage decisioning:** Recommend the backend(s) with clear thresholds for when to move from in-process to shared\/distributed stores. Include setup notes.\r\n6. **Client response behavior:** Define 429 structure, headers, and message templates that help clients recover without revealing architecture.\r\n7. **Observability:** Define log schema, metrics, dashboards, and alert rules; include examples of queries\/patterns to detect abuse evolution.\r\n8. **Performance & tuning:** List optimizations (hot paths, sampling, async logging, local caches, Lua\/scripts if Redis, etc.).\r\n9. **Validation:** Provide unit\/integration tests, adversarial test cases, and load tests. Include acceptance criteria.\r\n10. **Rollout:** Provide a staged deployment plan over **4\u20136 phases** with monitoring gates and rollback triggers.\r\n\r\n### Edge Case Handling\r\n- If any input is missing or ambiguous, ask targeted clarifying questions first. If the user requests immediate output anyway, proceed with reasonable defaults and clearly label them as assumptions.\r\n- If the stack cannot support a recommended tactic, provide an alternative that preserves the same security intent.\r\n- If strict limiting conflicts with performance constraints, propose adaptive limits and \u201cgrace\u201d mechanisms for trusted clients.\r\n\r\n## INPUTS\r\n- **Application type:** [FORMAT]\r\n- **Traffic profile (baseline + peak + spike shape):** [CONTEXT]\r\n- **Technology stack (framework, runtime, infra, DB):** [INDUSTRY]\r\n- **Security requirements (threats + compliance):** [CHALLENGE]\r\n- **Performance constraints (latency\/throughput SLOs):** [TIMEFRAME]\r\n\r\n## OUTPUT SPECIFICATION\r\nUse markdown headings and provide sections in this exact order:\r\n\r\n1. **Rate Limiting Architecture**\r\n   - {Threat Model Summary}\r\n   - {Layered Controls Overview}\r\n   - {Keying Strategy} (IP, user, combined, endpoint sensitivity)\r\n   - {Adaptive Rules} (burst vs sustained, anomaly triggers)\r\n\r\n2. **Middleware Implementation**\r\n   - {Middleware Approach} (where it runs, how it\u2019s composed)\r\n   - {IP Throttle Example} (code-oriented pseudocode or stack-specific sample)\r\n   - {User\/Identity Throttle Example}\r\n   - {Composite & Endpoint-Weighted Limits}\r\n   - {Failure Modes & Fallback Behavior}\r\n\r\n3. **State Storage & Configuration**\r\n   - {When In-Memory Is Acceptable}\r\n   - {When Shared\/Distributed Storage Is Required}\r\n   - {Redis\/Upstash-Style Setup Notes}\r\n   - {Key Design, TTLs, Atomicity Notes}\r\n\r\n4. **429 Responses & Client Guidance**\r\n   - {Response Schema}\r\n   - {Retry-After Strategy}\r\n   - {Safe Message Examples} (rewritten, non-revealing)\r\n   - {Handling for Auth vs Unauth Clients}\r\n\r\n5. **Logging, Monitoring, and Alerting**\r\n   - {Log Fields & Structure}\r\n   - {Metrics to Emit}\r\n   - {Dashboards}\r\n   - {Alert Rules}\r\n   - {Abuse Pattern Detection Examples}\r\n\r\n6. **Performance Optimization**\r\n   - {Hot Path Optimizations}\r\n   - {Caching & Sampling Guidance}\r\n   - {Distributed Store Latency Mitigations}\r\n\r\n7. **Testing & Validation**\r\n   - {Unit Tests}\r\n   - {Integration Tests}\r\n   - {Adversarial Scenarios}\r\n   - {Load\/Spike Tests}\r\n   - {Pass\/Fail Criteria}\r\n\r\n8. **Deployment & Gradual Rollout**\r\n   - {Phase Plan}\r\n   - {Monitoring Gates}\r\n   - {Rollback Triggers}\r\n   - {Post-Launch Tuning Loop}\r\n\r\n## QUALITY CHECKS\r\nBefore finalizing, verify:\r\n- The plan includes at least two enforcement layers plus a defined fallback mode.\r\n- Both IP-based and identity-based throttles are implemented with clear key definitions.\r\n- 429 handling includes Retry-After and client-safe wording that avoids leaking internals.\r\n- Storage recommendations are tied to the provided traffic scale and performance constraints.\r\n- Testing and rollout steps are actionable and include measurable acceptance criteria.";
    const variables = ["[FORMAT]","[CONTEXT]","[INDUSTRY]","[CHALLENGE]","[TIMEFRAME]"];
    // Initial render with highlighted variables
    document.addEventListener('DOMContentLoaded', function() {
        renderPromptWithHighlights();
    });

    // Live update prompt as user types
    document.querySelectorAll('.customize-input').forEach(input => {
        input.addEventListener('input', renderPromptWithHighlights);
    });

    function renderPromptWithHighlights() {
        const promptContent = document.getElementById('premium-prompt-content');
        if (!promptContent) return;

        let updatedPrompt = originalPrompt;
        let filledVariables = {};

        // Collect filled values
        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                filledVariables[placeholder] = value;
            }
        });

        // Replace filled variables and highlight remaining
        let htmlContent = escapeHtml(updatedPrompt);

        variables.forEach(placeholder => {
            const escapedPlaceholder = escapeHtml(placeholder);
            const regex = new RegExp(escapeRegex(escapedPlaceholder), 'g');

            if (filledVariables[placeholder]) {
                // Show filled value with green highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable-filled">' + escapeHtml(filledVariables[placeholder]) + '</span>'
                );
            } else {
                // Show original placeholder with yellow highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable">' + escapedPlaceholder + '</span>'
                );
            }
        });

        promptContent.innerHTML = htmlContent;
    }

    function escapeRegex(string) {
        return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    }

    function escapeHtml(text) {
        const div = document.createElement('div');
        div.textContent = text;
        return div.innerHTML;
    }

    function resetPrompt() {
        // Clear all input fields
        document.querySelectorAll('.customize-input').forEach(input => {
            input.value = '';
        });

        // Re-render with original placeholders highlighted
        renderPromptWithHighlights();

        // Visual feedback
        const resetBtns = document.querySelectorAll('.prompt-header-reset, .prompt-cta-reset');
        resetBtns.forEach(btn => {
            const originalText = btn.querySelector('span').textContent;
            btn.querySelector('span').textContent = 'Reset!';
            setTimeout(() => {
                btn.querySelector('span').textContent = originalText;
            }, 1000);
        });
    }


    function getCustomizedPrompt() {
        let updatedPrompt = originalPrompt;

        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                const regex = new RegExp(escapeRegex(placeholder), 'g');
                updatedPrompt = updatedPrompt.replace(regex, value);
            }
        });

        return updatedPrompt;
    }
</script>

</div>

<div class="pro-tips-section">

<h2 class="wp-block-heading">Pro Tips for Better AI Prompt Results</h2>



<ul class="wp-block-list">

<li><strong>List your “expensive endpoints” first.</strong> Give the AI a small table of routes with why they’re costly (DB fanout, third-party calls, exports). Example follow-up: “Here are 8 endpoints; mark which need burst limits vs sustained limits, and propose different windows for each.”</li>


<li><strong>Describe abusive traffic like a story.</strong> Add what you observed: user agents, referrers, IP ASNs, request patterns, retries, and peak RPS. Then ask: “Based on this pattern, what keys should we rate-limit on (IP, token, account, org, API key), and what evasions should we expect next?”</li>

<li><strong>Force explicit 429 contracts.</strong> Many teams forget the client experience. Ask the model to output the exact JSON body, headers (including Retry-After), and which fields are safe: “Write a 429 response spec for public endpoints vs authenticated endpoints; avoid revealing internal thresholds.”</li>


<li><strong>Iterate on tuning, not just rules.</strong> After the first pass, tighten it with a controlled prompt: “Now make option A more aggressive for anonymous traffic, but keep authenticated power users under 1% false positives. Explain the tradeoffs in 6 bullets.”</li>


<li><strong>Combine it with your observability reality.</strong> Tell it what you actually use (CloudWatch, Datadog, Grafana, ELK) and request concrete metric names and alert thresholds. A good follow-up: “Propose 10 metrics, 5 dashboards, and 6 alerts; include what each alert means and the likely next action.”</li>

</ul>
<!-- /wp:post-content -->
</div>

<div class="related-prompts-section">
<!-- wp:heading {"level":2} -->
<h2 class="wp-block-heading">Related Prompts</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Once you’ve designed layered throttling, these related prompts help you operationalize the work across teams, process, and capacity.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you also need to standardize how engineering work moves from “incoming” to “done,” the maturity framework in <a href="https://flowpast.com/prompts/build-a-task-management-maturity-audit-with-this-ai-prompt/">Build a Task Management Maturity Audit with this AI Prompt</a> helps you spot bottlenecks that make rate-limit rollouts risky (unclear ownership, missing change windows, weak post-deploy checks). It pairs well when your problem isn’t only abuse, but slow execution and inconsistent follow-through.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For teams doing ongoing platform hardening, <a href="https://flowpast.com/prompts/build-an-adaptive-task-manager-blueprint-ai-prompt/">Build an Adaptive Task Manager Blueprint AI Prompt</a> is useful right after you generate your throttling blueprint. You can convert the rollout plan into a living system: recurring tuning tasks, dashboard reviews, and “attack pattern” retrospectives that don’t get forgotten.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When rate limits touch multiple groups (API, SRE, support, and sometimes sales), miscommunication becomes its own incident. <a href="https://flowpast.com/prompts/create-a-task-handoff-playbook-with-this-ai-prompt/">Create a Task Handoff Playbook with this AI Prompt</a> helps you define who owns policy changes, who handles customer escalations about 429s, and what needs to be documented before toggling stricter rules.</p>
<!-- /wp:paragraph -->

<br>

<!-- wp:paragraph -->
<p>Quick reference:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul>
<!-- wp:list-item -->
<li><a href="https://flowpast.com/prompts/build-a-task-management-maturity-audit-with-this-ai-prompt/">Build a Task Management Maturity Audit with this AI Prompt</a>: Diagnose process gaps blocking safe rollouts.</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li><a href="https://flowpast.com/prompts/build-an-adaptive-task-manager-blueprint-ai-prompt/">Build an Adaptive Task Manager Blueprint AI Prompt</a>: Turn the plan into recurring ops tasks.</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li><a href="https://flowpast.com/prompts/build-a-talent-management-blueprint-with-this-ai-prompt/">Build a Talent Management Blueprint with this AI Prompt</a>: Staff ownership for platform reliability work.</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li><a href="https://flowpast.com/prompts/build-an-inventory-management-blueprint-with-this-ai-prompt/">Build an Inventory Management Blueprint with this AI Prompt</a>: Improve tracking of “rate-limit dependencies” as assets.</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li><a href="https://flowpast.com/prompts/create-a-task-handoff-playbook-with-this-ai-prompt/">Create a Task Handoff Playbook with this AI Prompt</a>: Prevent drops during cross-team handoffs.</li>
<!-- /wp:list-item -->
</ul>
<!-- /wp:list -->
</div>

<div class="faq-section">
<!-- wp:heading {"level":2} -->
<h2 class="wp-block-heading">Common Questions</h2>
<!-- /wp:heading -->

<div class="faq-item">
<span class="question">Which roles benefit most from this API rate limits AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Backend Engineers</strong> use it to turn vague “add rate limiting” tickets into a layered policy plus middleware implementation details. <strong>Platform/SRE Leads</strong> rely on it for telemetry, alerting, and low-risk rollout steps that reduce production surprises. <strong>API Product Managers</strong> get a clearer client experience spec (429 + Retry-After, safe messages) so integrations break less often. <strong>Security Engineers</strong> apply it to map attacker behaviors to controls and to plan adaptive tuning as abuse evolves.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this API rate limits AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>SaaS companies</strong> use it to protect multi-tenant APIs where one noisy customer (or leaked token) can degrade everyone’s experience. It helps separate per-account limits from per-IP limits and avoids punishing office NAT traffic. <strong>E-commerce and marketplaces</strong> apply it to deter scraping of pricing, inventory, and search results, especially around promotions when traffic surges are normal but abuse spikes too. <strong>Fintech and payments</strong> teams use it to tame login-related retry storms and to throttle sensitive endpoints without leaking thresholds to attackers. <strong>Media and data providers</strong> get value because content and datasets attract automated extraction, so layered identity + IP throttles plus monitoring are essential.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for designing API rate limits produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like “Write me a rate limiting strategy for my API” fails because it: lacks attacker behavior modeling (bursting, IP rotation, retries) so the limits are easy to evade, provides no layered enforcement plan (IP plus identity plus fallback) and ends up as a single brittle rule, ignores state storage tradeoffs so it suggests patterns that break under load or across instances, produces generic 429 advice instead of a client-safe contract with Retry-After, and misses operational visibility so you cannot tune limits safely after launch.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this API rate limits prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes. The fastest way is to add your stack (language, framework, gateway), your traffic shape (avg/peak RPS, burstiness), and a short list of endpoints with “cost” notes so the policy can vary by route. Include identity signals you already have (API key, user ID, org ID) and clarify what unauthenticated traffic looks like (public endpoints, onboarding, webhooks). Then ask a targeted follow-up like: “Rewrite the blueprint for Node/Express behind NGINX, with Redis counters, and propose per-endpoint limits for /search, /export, /login, and /webhook.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this API rate limits prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is leaving your abuse scenario too vague — instead of “we get scraped,” provide “/search gets 300 RPS bursts for 2–3 minutes from rotating residential IPs, then a 10x retry spike on 5xx.” Another common error is not listing identity keys; “authenticated users” is weak compared to “rate-limit by org_id, then user_id, with API key as fallback.” People also forget to specify which endpoints are public vs authenticated, which leads to policies that block onboarding flows. Finally, teams often omit rollout constraints (feature flags, percentage rollout, shadow mode), so the plan is correct on paper but risky to deploy.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this API rate limits prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for teams looking for a copy-paste snippet with zero tuning, because rate limiting only works well when it reflects your routes, tenants, and traffic shape. It’s also not a fit if you cannot change application code or edge configuration at all; you may need a managed gateway/WAF approach instead. And if you haven’t identified your core identity signals (API keys, user IDs, org IDs), you’ll get a weaker plan until that foundation exists.</p>
<!-- /wp:paragraph -->
</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this API rate limits AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Backend Engineers use it to turn vague “add rate limiting” tickets into a layered policy plus middleware implementation details. Platform/SRE Leads rely on it for telemetry, alerting, and low-risk rollout steps that reduce production surprises. API Product Managers get a clearer client experience spec (429 + Retry-After, safe messages) so integrations break less often. Security Engineers apply it to map attacker behaviors to controls and to plan adaptive tuning as abuse evolves."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this API rate limits AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SaaS companies use it to protect multi-tenant APIs where one noisy customer (or leaked token) can degrade everyone’s experience. It helps separate per-account limits from per-IP limits and avoids punishing office NAT traffic. E-commerce and marketplaces apply it to deter scraping of pricing, inventory, and search results, especially around promotions when traffic surges are normal but abuse spikes too. Fintech and payments teams use it to tame login-related retry storms and to throttle sensitive endpoints without leaking thresholds to attackers. Media and data providers get value because content and datasets attract automated extraction, so layered identity + IP throttles plus monitoring are essential."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for designing API rate limits produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me a rate limiting strategy for my API” fails because it: lacks attacker behavior modeling (bursting, IP rotation, retries) so the limits are easy to evade, provides no layered enforcement plan (IP plus identity plus fallback) and ends up as a single brittle rule, ignores state storage tradeoffs so it suggests patterns that break under load or across instances, produces generic 429 advice instead of a client-safe contract with Retry-After, and misses operational visibility so you cannot tune limits safely after launch."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this API rate limits prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. The fastest way is to add your stack (language, framework, gateway), your traffic shape (avg/peak RPS, burstiness), and a short list of endpoints with “cost” notes so the policy can vary by route. Include identity signals you already have (API key, user ID, org ID) and clarify what unauthenticated traffic looks like (public endpoints, onboarding, webhooks). Then ask a targeted follow-up like: “Rewrite the blueprint for Node/Express behind NGINX, with Redis counters, and propose per-endpoint limits for /search, /export, /login, and /webhook.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this API rate limits prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving your abuse scenario too vague — instead of “we get scraped,” provide “/search gets 300 RPS bursts for 2–3 minutes from rotating residential IPs, then a 10x retry spike on 5xx.” Another common error is not listing identity keys; “authenticated users” is weak compared to “rate-limit by org_id, then user_id, with API key as fallback.” People also forget to specify which endpoints are public vs authenticated, which leads to policies that block onboarding flows. Finally, teams often omit rollout constraints (feature flags, percentage rollout, shadow mode), so the plan is correct on paper but risky to deploy."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this API rate limits prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for teams looking for a copy-paste snippet with zero tuning, because rate limiting only works well when it reflects your routes, tenants, and traffic shape. It’s also not a fit if you cannot change application code or edge configuration at all; you may need a managed gateway/WAF approach instead. And if you haven’t identified your core identity signals (API keys, user IDs, org IDs), you’ll get a weaker plan until that foundation exists."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>Abuse doesn’t wait for your roadmap. Use this prompt to design layered API rate limits you can actually deploy, observe, and tune, then paste it into your workflow and start hardening today.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5001441.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Write API Usage Guides Developers Trust AI Prompt</title>
		<link>https://flowpast.com/prompts/write-api-usage-guides-developers-trust-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:49:10 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5001599</guid>

					<description><![CDATA[API docs confuse callers - a proven AI Prompt that turns any function signature into a safe, maintainer-friendly usage guide. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: API usage guides -->
<div class="hook-introduction">

<p>Most API usage docs don’t fail because the writer is “bad.” They fail because they describe what a function <em>is</em>, not how to call it safely. So developers ship guesses, edge cases slip into production, and the maintainer gets paged later.</p>



<p>This <strong>API usage guides</strong> is built for <strong>platform engineers</strong> maintaining legacy endpoints with unclear intent, <strong>SDK maintainers</strong> who need consistent guidance across a growing surface area, and <strong>product engineers</strong> integrating an unfamiliar module under deadline pressure. The output is a scannable, maintainer-friendly guide that explains parameter intent, safe defaults, misuse risks, and practical call examples (plus targeted questions when details are missing).</p>

</div>

<div class="what-and-when-section">

<h2 class="wp-block-heading">What Does This AI Prompt Do and When to Use It?</h2>



<table class="solution-results-table three-column" role="presentation" aria-label="What this prompt does, when to use it, and what you get">
 <thead>
    <tr>
      <th scope="col">What This Prompt Does</th>
      <th scope="col">When to Use This Prompt</th>
      <th scope="col">What You&#8217;ll Get</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <ul class="automation-list">
          <li>It converts a function or method signature into a “how to call it correctly” usage guide, not just a restatement of parameters.</li>
          <li>It performs a short pre-analysis that flags missing context, highlights risks, and separates assumptions from facts that need confirmation.</li>
          <li>It triages the interface and breaks the explanation into 4–14 stages based on complexity, coupling, and likelihood of misuse.</li>
          <li>It extracts the role of each parameter (selector, config, callback, context, destination) and spells out implied invariants and constraints.</li>
          <li>It documents safe patterns and misuse cases, so the interface becomes harder to call incorrectly and easier to maintain later.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You inherit a legacy module and the only “documentation” is a signature plus a few brittle call sites.</li>
          <li>A new internal API is being adopted across teams, and you need consistent guidance that prevents foot-guns.</li>
          <li>Support tickets show recurring integration mistakes, and you want docs that address the failures directly.</li>
          <li>You are shipping an SDK and need language-norm-aware guidance (nullability, optional args, naming) without inventing details.</li>
          <li>A function has many interacting parameters and reviews keep stalling on “what does this flag even do?”</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A structured usage guide with a pre-analysis section plus a staged breakdown (4–14 sections, sized to the interface).</li>
           <li>A parameter-by-parameter meaning map that explains intent, constraints, and how each input affects behavior.</li>
           <li>At least 2 ready-to-copy call examples (a safe “default” call and a more advanced call), formatted for the target language.</li>
           <li>A “Misuse to avoid” checklist with concrete failure modes (null traps, invalid combinations, unsafe defaults, ordering issues).</li>
           <li>A targeted questions list that a maintainer can answer to finalize docs without guesswork.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

<div class="prompt-display-section">

<h2 class="wp-block-heading">The Full AI Prompt: Maintainer-Friendly API Usage Guide Generator</h2>



<div class="prompt-viewer-wrapper" id="prompt-section">
    <div class="prompt-comparison-row prompt-premium">
        <!-- Header with buttons -->
        <div class="prompt-row-header">
            <!-- <span class="prompt-row-icon">✨</span> -->
            <span class="prompt-row-title">
                                    Step 1: Customize the prompt with your input
                            </span>
            <div class="prompt-header-buttons">
                                    <button class="prompt-header-btn prompt-header-reset" onclick="resetPrompt()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                                <button class="prompt-header-btn prompt-header-copy-green flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span>Customize and Copy Full Prompt</span>
                </button>
            </div>
        </div>

        <!-- Customize the Prompt Section -->
                    <div class="prompt-customize-section">
                <span class="customize-title">Customize the Prompt</span>
                <p class="customize-subtitle">Fill in the fields below to personalize this prompt for your needs.</p>
                <table class="customize-table">
                    <thead>
                        <tr>
                            <th>Variable</th>
                            <th>What to Enter</th>
                            <th>Customise the prompt</th>
                        </tr>
                    </thead>
                    <tbody>
                                                    <tr>
                                <td class="var-name"><code>[FUNCTION_SIGNATURE]</code></td>
                                <td class="var-desc">
                                    Provide the full function or method signature, including its name, parameters, and return type as used in the code.                                    <div class="var-example">For example: "def calculate_tax(amount: float, tax_rate: float) -&gt; float"</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[FUNCTION_SIGNATURE]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[PROGRAMMING_LANGUAGE]</code></td>
                                <td class="var-desc">
                                    Specify the programming language in which the function is written to ensure the documentation aligns with its conventions and syntax.                                    <div class="var-example">For example: "Python"</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[PROGRAMMING_LANGUAGE]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[CONTEXT]</code></td>
                                <td class="var-desc">
                                    Describe the broader context where this function is used, including its purpose in the system or application.                                    <div class="var-example">For example: "Used in a financial application to calculate tax amounts for invoices."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[CONTEXT]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[TARGET_AUDIENCE]</code></td>
                                <td class="var-desc">
                                    Define the primary user group for the documentation, including their expertise level and role (e.g., developers, maintainers).                                    <div class="var-example">For example: "Mid-level Python developers maintaining legacy financial systems."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[TARGET_AUDIENCE]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[CHALLENGE]</code></td>
                                <td class="var-desc">
                                    Explain the specific difficulties or risks the audience faces when using this function, such as parameter misuse or edge cases.                                    <div class="var-example">For example: "Incorrect tax rate formats or failure to handle edge cases like negative amounts."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[CHALLENGE]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[BRAND_VOICE]</code></td>
                                <td class="var-desc">
                                    Describe the tone and style of the documentation, including any specific guidelines for phrasing or terminology.                                    <div class="var-example">For example: "Calm, precise, and focused on clarity for maintainers. Avoid jargon and prioritize actionable guidance."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[BRAND_VOICE]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[FORMAT]</code></td>
                                <td class="var-desc">
                                    Specify the desired format for the documentation output, such as plain text, Markdown, or structured JSON.                                    <div class="var-example">For example: "Markdown with code blocks for examples."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[FORMAT]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                            </tbody>
                </table>

                <button class="copy-customized-btn flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span class="copy-customized-text">Customise the prompt now</span>
                </button>
            </div>
        
        <!-- Full Prompt Code Header -->
                    <div class="prompt-code-header">
                <span class="prompt-code-title">
                    Step 2: Copy the Prompt
                </span>
                <div class="prompt-code-buttons">
                    <!-- Reset: Only visible when unlocked -->
                    <button class="prompt-header-btn prompt-header-reset btn-when-unlocked" onclick="resetPrompt()" style="display: none;">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                    <!-- Copy Full Prompt -->
                    <button class="prompt-header-btn prompt-header-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                            <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                        </svg>
                        <span>Copy Full Prompt</span>
                    </button>
                </div>
            </div>
        

        <!-- Prompt Content -->
        <div class="prompt-box prompt-gated-wrapper">
            <!-- Gated: Blurred content -->
            <div class="prompt-gated-content">
                <div class="prompt-header-visible">OBJECTIVE</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PERSONA</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">CONSTRAINTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PROCESS</div><div class="prompt-header-visible subheader">0) Pre-Analysis (required)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">1) Interface Triage</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">2) Parameter Meaning Extraction</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">3) Couplings &amp; Invalid Combinations</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">4) Value Rules &amp; Boundary Behavior</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">5) Behavior &amp; Consequences</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">6) Usage Patterns Library</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">7) Misuse-Proofing</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">8) Final Assembly</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">Edge Case Handling</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">INPUTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">OUTPUT SPECIFICATION</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">{Function Name}</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">{Signature}</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">{Parameters}</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">{Ordering Rationale}</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">{Usage Examples}</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">{Common Mistakes}</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">{Best Practices}</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">{Pre-Call Safety Checklist}</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">{Follow-Up Questions (If Needed)}</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">QUALITY CHECKS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div>            </div>
            <!-- Unlocked: Full content (hidden by default) -->
            <div class="prompt-content-full" id="premium-prompt-content" style="display: none;">
                ## OBJECTIVE
Turn any provided function/method signature into maintainer-friendly documentation that explains *how to use it correctly*, *why each parameter exists*, and *how to avoid misuse*. The result should make the interface feel obvious, safe, and hard to call incorrectly.

## PERSONA
You are a seasoned **API Interface Curator**: a veteran systems engineer who specializes in decoding legacy interfaces and translating them into practical, modern developer guidance. Your style is calm, precise, and geared toward helping future maintainers understand intent—not just syntax.

## CONSTRAINTS
- Write for the **primary user segment** specified by the user (or infer it).
- Follow the norms of the stated programming language (naming conventions, nullability, optional args, etc.).
- Prefer clarity over cleverness; explain intent, tradeoffs, and safe usage.
- If information is missing, do not invent specifics—ask targeted questions or label assumptions explicitly.
- Avoid long essays; organize content so it can be scanned quickly.
- **What This Is NOT:** a full rewrite/refactor of the function, a complete system design document, or a tutorial on the programming language itself.

## PROCESS
### 0) Pre-Analysis (required)
Before producing the documentation, briefly state your understanding of:
- what the function appears to do,
- what details are missing,
- what you will assume vs what you need confirmed.

### 1) Interface Triage
Assess the signature’s difficulty and choose an appropriate breakdown plan:
- Determine the number of stages dynamically (roughly **4–14 stages**, depending on parameter count, coupling, and domain risk).
- Increase stages when parameters interact heavily or misuse is likely.
- Decrease stages when the interface is small and straightforward.

### 2) Parameter Meaning Extraction
For each parameter:
- Identify its role (input, configuration, selector, callback, context, destination, etc.).
- Note implied invariants (must be non-empty, must be sorted, must match length of X, etc.).
- Call out defaults and “silent behaviors” (what happens when omitted/zero/empty/null).

### 3) Couplings &amp; Invalid Combinations
Explain:
- dependencies (A required when B is set),
- mutually exclusive combinations,
- ordering logic (why the args are arranged this way—frequency, grouping, legacy compatibility, etc.).

### 4) Value Rules &amp; Boundary Behavior
Document:
- accepted ranges/formats,
- conversions/coercions,
- null/empty semantics,
- boundary conditions and edge cases.

### 5) Behavior &amp; Consequences
Map parameters to outcomes:
- output variations,
- side effects,
- performance or resource implications,
- error/exception modes.

### 6) Usage Patterns Library
Provide:
- common “good” call shapes,
- recommended defaults and safer options,
- anti-patterns and what to use instead.

### 7) Misuse-Proofing
Create:
- a pre-call checklist,
- validation suggestions,
- debugging tips keyed to parameter mistakes.

### 8) Final Assembly
Produce the complete documentation using the deliverable structure below.

### Edge Case Handling
If any of the following occur, respond accordingly:
- **Missing signature or language:** request them before proceeding.
- **Unknown parameter semantics:** ask 3–8 focused questions (not a long survey).
- **Conflicting user context:** list conflicts and propose a resolution path.
- **Overloaded/generic signatures:** document per overload or per type scenario, clearly separated.

## INPUTS
- **Function or method signature (include return type when available):** [FUNCTION_SIGNATURE]
- **Programming language:** [PROGRAMMING_LANGUAGE]
- **What the function is supposed to do (brief):** [CONTEXT]
- **Primary user segment (e.g., junior devs, SDK users, internal platform team):** [TARGET_AUDIENCE]
- **Any known parameter gotchas, constraints, defaults, or domain rules:** [CHALLENGE]
- **Preferred writing style (e.g., terse reference, friendly handbook, strict spec):** [BRAND_VOICE]
- **Desired output length/shape (if you have one):** [FORMAT]

## OUTPUT SPECIFICATION
Your output must be a single, cohesive usage guide with these sections:

### {Function Name}
- **Intent:** {Intent Summary}
- **When to use:** {When To Use}
- **When not to use:** {When Not To Use}

### {Signature}
```text
{Full Signature}
```

### {Parameters}
For each parameter, provide:

#### {Parameter Name}
- **Role:** {Role}
- **Type / shape:** {Type}
- **Required?** {Required}
- **Allowed values &amp; format:** {Valid Values}
- **Defaults &amp; omissions:** {Defaults}
- **Interactions:** {Dependencies}
- **Behavior impact:** {Behavior Impact}
- **Failure modes:** {Failure Modes}
- **Example call snippet:** {Parameter Example}

### {Ordering Rationale}
{Ordering Explanation}

### {Usage Examples}
#### {Example 1 Title}
```text
{Example 1 Code}
```
- **Why this is the “normal” call:** {Example 1 Notes}

#### {Example 2 Title}
```text
{Example 2 Code}
```
- **What’s different and why:** {Example 2 Notes}

### {Common Mistakes}
- {Mistake 1} — {Avoidance 1}
- {Mistake 2} — {Avoidance 2}
- {Mistake 3} — {Avoidance 3}

### {Best Practices}
- {Best Practice 1}
- {Best Practice 2}
- {Best Practice 3}

### {Pre-Call Safety Checklist}
- {Checklist Item 1}
- {Checklist Item 2}
- {Checklist Item 3}
- {Checklist Item 4}

### {Follow-Up Questions (If Needed)}
If anything is ambiguous, list the minimum set of questions required to finalize the guide: {Questions}

## QUALITY CHECKS
At the end, verify:
- The documentation matches the provided language conventions and terminology.
- Every parameter has purpose, constraints, and at least one safe example.
- All dependencies/invalid combinations are explicitly called out.
- At least one common path and one advanced/edge path example are included.
- Unknowns are labeled as assumptions or turned into clear follow-up questions.            </div>
        </div>


    </div>

    <!-- CTA Row - Full width buttons -->
    <div class="prompt-cta-row">
        <button class="prompt-cta-btn prompt-cta-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
            </svg>
            <span class="cta-copy-text">Copy Full Prompt</span>
        </button>
    </div>
</div>

<style>
    /* Gated prompt states */
    .prompt-gated-wrapper {
        position: relative;
    }

    /* When unlocked - show full content, hide gated */
    body.flowpast-unlocked .prompt-gated-wrapper .prompt-gated-content {
        display: none;
    }

    body.flowpast-unlocked .prompt-gated-wrapper .prompt-content-full {
        display: block !important;
    }

    /* Show/hide elements based on unlock state */
    body.flowpast-unlocked .btn-when-unlocked {
        display: inline-flex !important;
    }

    .prompt-viewer-wrapper {
        scroll-margin-top: 250px;
    }

    /* ========================================
   PROMPT VIEWER - MAIN WRAPPER
   ======================================== */
    .prompt-viewer-wrapper {
        margin: 30px 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* ========================================
   PROMPT BOX CONTAINER
   ======================================== */
    .prompt-comparison-row {
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid #e0e0e0;
        background: #fff;
    }

    /* ========================================
   HEADER WITH BUTTONS
   ======================================== */
    .prompt-row-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
        flex-wrap: wrap;
    }

    .prompt-row-icon {
        font-size: 20px;
    }

    .prompt-row-title {
        font-weight: 600;
        font-size: 22px;
        color: #fff !important;
        text-decoration: underline
    }

    .prompt-header-buttons {
        margin-left: auto;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Header buttons */
    .prompt-header-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-header-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-header-copy:hover {
        background: #2a2a2a;
    }

    .prompt-header-copy.copied {
        background: #2e7d32;
    }

    .prompt-header-copy-green {
        background: #04AA6D !important;
        color: #fff !important;
    }

    .prompt-header-copy-green:hover {
        background: #039860 !important;
    }

    .prompt-header-copy-green.copied {
        background: #2e7d32 !important;
    }

    .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-header-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-1px);
    }

    /* ========================================
   PROMPT CONTENT - FULL (NO SCROLL)
   ======================================== */
    .prompt-box {
        background: #ffffff;
    }

    .prompt-content-full {
        padding: 24px;
        margin: 0;
        color: #202124;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.7;
        white-space: pre-wrap;
        word-wrap: break-word;
        /* No scroll - show full content */
        max-height: none;
        overflow: visible;
    }

    /* Highlighted variable in prompt */
    .prompt-variable {
        background: #fff3cd;
        color: #1967d2;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #ffc107;
    }

    .prompt-variable-filled {
        background: #d4edda;
        color: #155724;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #28a745;
    }

    /* ========================================
   GATED CONTENT (NO ACCESS)
   ======================================== */
    .prompt-gated-content {
        padding: 24px;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.8;
        max-height: none;
        overflow: visible;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        cursor: default;
    }

    /* ## headers - larger, black */
    .prompt-header-visible {
        color: #202124;
        font-weight: 600;
        margin: 5px 0 0px 0;
        font-size: 20px;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    /* ### headers - smaller, black */
    .prompt-header-visible.subheader {
        color: #202124;
        font-weight: 600;
        margin: 5px 0;
        font-size: 18px;
    }

    .prompt-header-visible:first-child {
        margin-top: 0;
    }

    /* ========================================
   LOCKED SECTION BLOCK
   ======================================== */
    .locked-section {
        position: relative;
        margin: 4px 0 8px 0;
        border-radius: 6px;
        overflow: hidden;
        background: linear-gradient(110deg, #e2e8f0 8%, #f1f5f9 18%, #e2e8f0 33%);
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }

    .locked-section-bg {
        position: relative;
    }

    .locked-section-lines {
        padding: 8px 12px;
        position: relative;
    }

    .locked-line {
        height: 6px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 3px;
        margin-bottom: 4px;
        margin-left: 12px;
    }

    .locked-line:last-child {
        margin-bottom: 0;
    }

    .locked-section-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        font-size: 24px;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
    }

    /* Subheader locked sections - slightly indented */
    /*  .prompt-header-visible.subheader+.locked-section {
        margin-left: 16px;
    } */

    /* ========================================
   COMPATIBILITY BADGES
   ======================================== */
    .prompt-compatibility {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        background: #f8f9fa;
        border-top: 1px solid #e0e0e0;
    }

    .compat-label {
        font-size: 13px;
        color: #5f6368;
        font-weight: 500;
    }

    .compat-badge {
        padding: 4px 10px;
        background: #e8f0fe;
        color: #1967d2;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }

    /* ========================================
   CTA ROW - FULL WIDTH BUTTONS
   ======================================== */
    .prompt-cta-row {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .prompt-cta-btn {
        flex: 1;
        min-width: 200px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 24px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-cta-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-copy:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-copy.copied {
        background: #2e7d32;
    }

    .prompt-cta-reset {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-reset:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-cta-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    /* ========================================
    CUSTOMIZE YOUR PROMPT SECTION
    ======================================== */
    .prompt-customize-section {
        padding: 24px;
        border-bottom: 1px solid #e0e0e0;
        background: #fafbfc;
    }

    .customize-title {
        margin: 0 0 8px 0;
        font-size: 18px;
        font-weight: 700;
        color: #202124;
    }

    .customize-subtitle {
        margin: 0 0 20px 0;
        font-size: 14px;
        color: #5f6368;
    }

    .customize-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }

    .customize-table th {
        text-align: left;
        padding: 12px;
        background: #f1f3f4;
        border: 1px solid #e0e0e0;
        font-size: 13px;
        font-weight: 600;
        color: #202124;
    }

    .customize-table td {
        padding: 12px;
        border: 1px solid #e0e0e0;
        vertical-align: top;
    }

    .customize-table .var-name {
        width: 25%;
        background: #f8f9fa;
    }

    .customize-table .var-name code {
        background: #fff3cd;
        color: #1967d2;
        border: 1px solid #ffc107;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        word-break: break-all;
        font-weight: 600;
    }

    .customize-table .var-desc {
        width: 35%;
        font-size: 13px;
        color: #5f6368;
        line-height: 1.5;
    }

    .customize-table .var-example {
        margin-top: 8px;
        padding: 8px 10px;
        background: #f8f9fa;
        border-left: 3px solid #dadce0;
        font-size: 12px;
        color: #5f6368;
        font-style: italic;
        border-radius: 0 4px 4px 0;
    }

    .customize-table .var-input {
        width: 40%;
    }

    .customize-input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #dadce0;
        border-radius: 6px;
        font-size: 13px;
        font-family: inherit;
        resize: vertical;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .customize-input:focus {
        outline: none;
        border-color: rgb(5, 152, 98);
        box-shadow: 0 0 0 3px rgba(5, 152, 98, 0.1);
    }

    .customize-input::placeholder {
        color: #9aa0a6;
        font-style: italic;
    }

    .copy-customized-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 16px 24px;
        background: rgb(5, 152, 98);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .copy-customized-btn:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    .copy-customized-btn.copied {
        background: #2e7d32;
    }

    /* ========================================
    FULL PROMPT CODE HEADER
    ======================================== */
    .prompt-code-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
    }

    .prompt-code-title {
        font-size: 22px;
        font-weight: 600;
        text-decoration: underline;

    }

    .prompt-code-buttons {
        display: flex;
        gap: 8px;
    }

    .prompt-code-buttons .prompt-header-btn {
        padding: 8px 14px;
        font-size: 13px;
        background: #ffffff;
        color: #202124;
        border: 1px solid #dadce0;
    }

    .prompt-code-buttons .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
        border-color: rgb(5, 152, 98);
    }

    .prompt-code-buttons .prompt-header-btn.prompt-header-access:hover {
        background: rgb(4, 130, 83) !important;
        border-color: rgb(4, 130, 83);
        color: #fff !important;
    }

    .prompt-code-buttons .prompt-header-btn:hover {
        background: #f1f3f4;
    }

    .prompt-code-buttons .prompt-header-copy.copied {
        background: #d4edda;
        color: #155724;
        border-color: #28a745;
    }

    .prompt-header-reset {
        background: #ffffff;
        color: #202124;
    }

    /* ========================================
   RESPONSIVE
   ======================================== */
    @media (max-width: 768px) {
        .prompt-row-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .prompt-header-buttons {
            margin-left: 0;
            width: 100%;
        }

        .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }

        .prompt-cta-row {
            flex-direction: column;
        }

        .prompt-cta-btn {
            width: 100%;
        }

        /* Customize table responsive */
        .customize-table,
        .customize-table thead,
        .customize-table tbody,
        .customize-table tr,
        .customize-table th,
        .customize-table td {
            display: block;
        }

        .customize-table thead {
            display: none;
        }

        .customize-table tr {
            margin-bottom: 16px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            overflow: hidden;
        }

        .customize-table td {
            width: 100% !important;
            border: none;
            border-bottom: 1px solid #e0e0e0;
        }

        .customize-table td:last-child {
            border-bottom: none;
        }

        .customize-table .var-name {
            background: #f1f3f4;
            font-weight: 600;
        }

        .prompt-code-header {
            flex-direction: column;
            gap: 12px;
            align-items: flex-start;
        }

        .prompt-code-buttons {
            width: 100%;
        }

        .prompt-code-buttons .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }
    }
</style>

<script>
    function handlePromptCopy() {
        // Check if unlocked via cookie
        if (typeof window.flowpastIsUnlocked === 'function' && !window.flowpastIsUnlocked()) {
            // Show email popup
            if (typeof window.flowpastShowEmailPopup === 'function') {
                window.flowpastShowEmailPopup('prompt');
            }
            return;
        }

        // Copy the customized prompt (with filled variables)
        const customizedPrompt = getCustomizedPrompt();
        const copyButtons = document.querySelectorAll('.prompt-header-copy, .prompt-header-copy-green, .prompt-cta-copy, .copy-customized-btn');

        navigator.clipboard.writeText(customizedPrompt).then(() => {
            copyButtons.forEach(btn => {
                btn.classList.add('copied');
                const textSpan = btn.querySelector('span');
                if (textSpan) textSpan.textContent = 'Copied!';
            });

            setTimeout(() => {
                copyButtons.forEach(btn => {
                    btn.classList.remove('copied');
                    const textSpan = btn.querySelector('span');
                    if (textSpan) textSpan.textContent = 'Copy Full Prompt';
                });
            }, 2000);
        }).catch(err => {
            console.error('Failed to copy:', err);
        });
    }

    // Store original prompt for customization
    const originalPrompt = "## OBJECTIVE\r\nTurn any provided function\/method signature into maintainer-friendly documentation that explains *how to use it correctly*, *why each parameter exists*, and *how to avoid misuse*. The result should make the interface feel obvious, safe, and hard to call incorrectly.\r\n\r\n## PERSONA\r\nYou are a seasoned **API Interface Curator**: a veteran systems engineer who specializes in decoding legacy interfaces and translating them into practical, modern developer guidance. Your style is calm, precise, and geared toward helping future maintainers understand intent\u2014not just syntax.\r\n\r\n## CONSTRAINTS\r\n- Write for the **primary user segment** specified by the user (or infer it).\r\n- Follow the norms of the stated programming language (naming conventions, nullability, optional args, etc.).\r\n- Prefer clarity over cleverness; explain intent, tradeoffs, and safe usage.\r\n- If information is missing, do not invent specifics\u2014ask targeted questions or label assumptions explicitly.\r\n- Avoid long essays; organize content so it can be scanned quickly.\r\n- **What This Is NOT:** a full rewrite\/refactor of the function, a complete system design document, or a tutorial on the programming language itself.\r\n\r\n## PROCESS\r\n### 0) Pre-Analysis (required)\r\nBefore producing the documentation, briefly state your understanding of:\r\n- what the function appears to do,\r\n- what details are missing,\r\n- what you will assume vs what you need confirmed.\r\n\r\n### 1) Interface Triage\r\nAssess the signature\u2019s difficulty and choose an appropriate breakdown plan:\r\n- Determine the number of stages dynamically (roughly **4\u201314 stages**, depending on parameter count, coupling, and domain risk).\r\n- Increase stages when parameters interact heavily or misuse is likely.\r\n- Decrease stages when the interface is small and straightforward.\r\n\r\n### 2) Parameter Meaning Extraction\r\nFor each parameter:\r\n- Identify its role (input, configuration, selector, callback, context, destination, etc.).\r\n- Note implied invariants (must be non-empty, must be sorted, must match length of X, etc.).\r\n- Call out defaults and \u201csilent behaviors\u201d (what happens when omitted\/zero\/empty\/null).\r\n\r\n### 3) Couplings & Invalid Combinations\r\nExplain:\r\n- dependencies (A required when B is set),\r\n- mutually exclusive combinations,\r\n- ordering logic (why the args are arranged this way\u2014frequency, grouping, legacy compatibility, etc.).\r\n\r\n### 4) Value Rules & Boundary Behavior\r\nDocument:\r\n- accepted ranges\/formats,\r\n- conversions\/coercions,\r\n- null\/empty semantics,\r\n- boundary conditions and edge cases.\r\n\r\n### 5) Behavior & Consequences\r\nMap parameters to outcomes:\r\n- output variations,\r\n- side effects,\r\n- performance or resource implications,\r\n- error\/exception modes.\r\n\r\n### 6) Usage Patterns Library\r\nProvide:\r\n- common \u201cgood\u201d call shapes,\r\n- recommended defaults and safer options,\r\n- anti-patterns and what to use instead.\r\n\r\n### 7) Misuse-Proofing\r\nCreate:\r\n- a pre-call checklist,\r\n- validation suggestions,\r\n- debugging tips keyed to parameter mistakes.\r\n\r\n### 8) Final Assembly\r\nProduce the complete documentation using the deliverable structure below.\r\n\r\n### Edge Case Handling\r\nIf any of the following occur, respond accordingly:\r\n- **Missing signature or language:** request them before proceeding.\r\n- **Unknown parameter semantics:** ask 3\u20138 focused questions (not a long survey).\r\n- **Conflicting user context:** list conflicts and propose a resolution path.\r\n- **Overloaded\/generic signatures:** document per overload or per type scenario, clearly separated.\r\n\r\n## INPUTS\r\n- **Function or method signature (include return type when available):** [FUNCTION_SIGNATURE]\r\n- **Programming language:** [PROGRAMMING_LANGUAGE]\r\n- **What the function is supposed to do (brief):** [CONTEXT]\r\n- **Primary user segment (e.g., junior devs, SDK users, internal platform team):** [TARGET_AUDIENCE]\r\n- **Any known parameter gotchas, constraints, defaults, or domain rules:** [CHALLENGE]\r\n- **Preferred writing style (e.g., terse reference, friendly handbook, strict spec):** [BRAND_VOICE]\r\n- **Desired output length\/shape (if you have one):** [FORMAT]\r\n\r\n## OUTPUT SPECIFICATION\r\nYour output must be a single, cohesive usage guide with these sections:\r\n\r\n### {Function Name}\r\n- **Intent:** {Intent Summary}\r\n- **When to use:** {When To Use}\r\n- **When not to use:** {When Not To Use}\r\n\r\n### {Signature}\r\n```text\r\n{Full Signature}\r\n```\r\n\r\n### {Parameters}\r\nFor each parameter, provide:\r\n\r\n#### {Parameter Name}\r\n- **Role:** {Role}\r\n- **Type \/ shape:** {Type}\r\n- **Required?** {Required}\r\n- **Allowed values & format:** {Valid Values}\r\n- **Defaults & omissions:** {Defaults}\r\n- **Interactions:** {Dependencies}\r\n- **Behavior impact:** {Behavior Impact}\r\n- **Failure modes:** {Failure Modes}\r\n- **Example call snippet:** {Parameter Example}\r\n\r\n### {Ordering Rationale}\r\n{Ordering Explanation}\r\n\r\n### {Usage Examples}\r\n#### {Example 1 Title}\r\n```text\r\n{Example 1 Code}\r\n```\r\n- **Why this is the \u201cnormal\u201d call:** {Example 1 Notes}\r\n\r\n#### {Example 2 Title}\r\n```text\r\n{Example 2 Code}\r\n```\r\n- **What\u2019s different and why:** {Example 2 Notes}\r\n\r\n### {Common Mistakes}\r\n- {Mistake 1} \u2014 {Avoidance 1}\r\n- {Mistake 2} \u2014 {Avoidance 2}\r\n- {Mistake 3} \u2014 {Avoidance 3}\r\n\r\n### {Best Practices}\r\n- {Best Practice 1}\r\n- {Best Practice 2}\r\n- {Best Practice 3}\r\n\r\n### {Pre-Call Safety Checklist}\r\n- {Checklist Item 1}\r\n- {Checklist Item 2}\r\n- {Checklist Item 3}\r\n- {Checklist Item 4}\r\n\r\n### {Follow-Up Questions (If Needed)}\r\nIf anything is ambiguous, list the minimum set of questions required to finalize the guide: {Questions}\r\n\r\n## QUALITY CHECKS\r\nAt the end, verify:\r\n- The documentation matches the provided language conventions and terminology.\r\n- Every parameter has purpose, constraints, and at least one safe example.\r\n- All dependencies\/invalid combinations are explicitly called out.\r\n- At least one common path and one advanced\/edge path example are included.\r\n- Unknowns are labeled as assumptions or turned into clear follow-up questions.";
    const variables = ["[FUNCTION_SIGNATURE]","[PROGRAMMING_LANGUAGE]","[CONTEXT]","[TARGET_AUDIENCE]","[CHALLENGE]","[BRAND_VOICE]","[FORMAT]"];
    // Initial render with highlighted variables
    document.addEventListener('DOMContentLoaded', function() {
        renderPromptWithHighlights();
    });

    // Live update prompt as user types
    document.querySelectorAll('.customize-input').forEach(input => {
        input.addEventListener('input', renderPromptWithHighlights);
    });

    function renderPromptWithHighlights() {
        const promptContent = document.getElementById('premium-prompt-content');
        if (!promptContent) return;

        let updatedPrompt = originalPrompt;
        let filledVariables = {};

        // Collect filled values
        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                filledVariables[placeholder] = value;
            }
        });

        // Replace filled variables and highlight remaining
        let htmlContent = escapeHtml(updatedPrompt);

        variables.forEach(placeholder => {
            const escapedPlaceholder = escapeHtml(placeholder);
            const regex = new RegExp(escapeRegex(escapedPlaceholder), 'g');

            if (filledVariables[placeholder]) {
                // Show filled value with green highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable-filled">' + escapeHtml(filledVariables[placeholder]) + '</span>'
                );
            } else {
                // Show original placeholder with yellow highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable">' + escapedPlaceholder + '</span>'
                );
            }
        });

        promptContent.innerHTML = htmlContent;
    }

    function escapeRegex(string) {
        return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    }

    function escapeHtml(text) {
        const div = document.createElement('div');
        div.textContent = text;
        return div.innerHTML;
    }

    function resetPrompt() {
        // Clear all input fields
        document.querySelectorAll('.customize-input').forEach(input => {
            input.value = '';
        });

        // Re-render with original placeholders highlighted
        renderPromptWithHighlights();

        // Visual feedback
        const resetBtns = document.querySelectorAll('.prompt-header-reset, .prompt-cta-reset');
        resetBtns.forEach(btn => {
            const originalText = btn.querySelector('span').textContent;
            btn.querySelector('span').textContent = 'Reset!';
            setTimeout(() => {
                btn.querySelector('span').textContent = originalText;
            }, 1000);
        });
    }


    function getCustomizedPrompt() {
        let updatedPrompt = originalPrompt;

        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                const regex = new RegExp(escapeRegex(placeholder), 'g');
                updatedPrompt = updatedPrompt.replace(regex, value);
            }
        });

        return updatedPrompt;
    }
</script>

</div>

<div class="pro-tips-section">

<h2 class="wp-block-heading">Pro Tips for Better AI Prompt Results</h2>



<ul class="wp-block-list">

<li><strong>Paste the signature and one real call site.</strong> The prompt can infer intent from names, but a real usage example exposes defaults and common combinations. After you paste both, ask: “Point out which arguments in the call are risky or ambiguous, and why.”</li>


<li><strong>Specify the primary user segment up front.</strong> “Write this for app developers integrating the SDK” leads to different guidance than “write this for maintainers extending the module.” A useful follow-up is: “Rewrite the guide for on-call engineers debugging production incidents, keep it short, add failure signals.”</li>


<li><strong>Force it to label assumptions, then resolve them.</strong> If you do not want invented behavior, tell it to treat unknowns as unknowns. Try: “In the pre-analysis, mark assumptions as ASSUMPTION and add 5 questions I can answer to remove them.”</li>


<li><strong>Iterate on parameter interactions, not wording.</strong> The best docs explain combinations and constraints (“A requires B”, “C is ignored when D is true”). After the first output, try asking: “Now make the interaction rules explicit, and add 3 invalid combinations with the expected error behavior.”</li>


<li><strong>Ask for a copy-ready section that matches your repo style.</strong> If your docs live in README.md, Javadoc, or docstrings, request the right format. Example: “Output a docstring version (language-idiomatic) plus a README section with headings: Summary, Parameters, Safe Defaults, Misuse, Examples.”</li>

</ul>

</div>

<div class="related-prompts-section">

<h2 class="wp-block-heading">Related Prompts</h2>



<p>If you’re standardizing how people learn and follow processes, these prompts pair well with maintainable API documentation.</p>



<p>If you also need a consistent ramp-up experience for new engineers who will be reading (and trusting) your docs, <a href="https://flowpast.com/prompts/build-a-full-employee-onboarding-journey-with-this-ai-prompt/">Build a Full Employee Onboarding Journey with this AI Prompt</a> helps you map the full path from day-one access to first meaningful contribution. It’s a practical complement when documentation is part of how your team prevents mistakes.</p>



<p>For teams doing enablement across multiple roles, <a href="https://flowpast.com/prompts/build-new-hire-onboarding-curriculum-with-this-ai-prompt/">Build New Hire Onboarding Curriculum with this AI Prompt</a> is useful when you want to turn “here are the docs” into an actual sequence of lessons, exercises, and checkpoints. That’s especially handy when your API surface is large and people learn it in slices.</p>



<p>When onboarding friction is the real problem (slow access, unclear ownership, missing steps), <a href="https://flowpast.com/prompts/build-a-frictionless-onboarding-journey-with-this-ai-prompt/">Build a Frictionless Onboarding Journey with this AI Prompt</a> helps identify where handoffs and ambiguity break momentum. Clean docs plus a clean journey is an underrated combo, honestly.</p>


<br>


<p>Quick reference:</p>



<ul class="wp-block-list">

<li><a href="https://flowpast.com/prompts/build-a-full-employee-onboarding-journey-with-this-ai-prompt/">Build a Full Employee Onboarding Journey with this AI Prompt</a>: Map end-to-end new hire journey steps.</li>


<li><a href="https://flowpast.com/prompts/build-new-hire-onboarding-curriculum-with-this-ai-prompt/">Build New Hire Onboarding Curriculum with this AI Prompt</a>: Turn onboarding into lessons and checkpoints.</li>


<li><a href="https://flowpast.com/prompts/build-a-frictionless-onboarding-journey-with-this-ai-prompt/">Build a Frictionless Onboarding Journey with this AI Prompt</a>: Remove blockers from onboarding flow.</li>


<li><a href="https://flowpast.com/prompts/design-an-employee-onboarding-workflow-with-this-ai-prompt/">Design an Employee Onboarding Workflow with this AI Prompt</a>: Define owners, steps, and handoffs.</li>


<li><a href="https://flowpast.com/prompts/build-an-onboarding-retention-workflow-with-this-ai-prompt/">Build an Onboarding Retention Workflow with this AI Prompt</a>: Improve retention with structured follow-through.</li>

</ul>

</div>

<div class="faq-section">

<h2 class="wp-block-heading">Common Questions</h2>


<div class="faq-item">
<span class="question">Which roles benefit most from this API usage guides AI prompt?</span>

<p class="answer"><strong>SDK Maintainers</strong> use this to ship consistent, safe usage guidance across many functions without rewriting everything by hand. <strong>Platform Engineers</strong> rely on it when they inherit legacy interfaces and need to document intent and constraints before refactoring. <strong>Developer Experience (DX) Writers</strong> get a structured draft that’s already organized around “safe calls” and “misuse to avoid,” which is what readers actually need. <strong>Senior Product Engineers</strong> use it during integration reviews to clarify parameter interactions and reduce the odds of subtle production bugs.</p>

</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this API usage guides AI prompt?</span>

<p class="answer"><strong>SaaS companies</strong> use it to reduce support load by documenting correct integration patterns and common mistakes for public APIs and SDKs. <strong>Fintech teams</strong> apply it when parameters encode compliance-sensitive choices (idempotency keys, authentication context, retry semantics) and “almost correct” is still dangerous. <strong>Healthcare and health tech</strong> benefit when interfaces touch regulated data, where safe defaults and clear invariants matter more than clever examples. <strong>Enterprise B2B platforms</strong> get value because internal APIs often outlive the original authors, and maintainers need assumptions labeled clearly.</p>

</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for writing API usage guides produce weak results?</span>

<p class="answer">A typical prompt like “<em>Write me documentation for this function</em>” fails because it: lacks a pre-analysis step to separate unknowns from facts, provides no staged breakdown to handle complexity, ignores parameter interactions (the real source of bugs), produces generic prose instead of safe call patterns and misuse warnings, and misses the “ask targeted questions, don’t invent” discipline. You end up with something that looks like docs but doesn’t prevent incorrect calls. That’s the gap this prompt is designed to close.</p>

</div>

<div class="faq-item">
<span class="question">Can I customize this API usage guides prompt for my specific situation?</span>

<p class="answer">Yes. The biggest lever is the “primary user segment” and the programming language norms, because those choices affect examples, terminology, and what “safe defaults” even means. You can also supply extra context (one call site, error messages, invariants, expected side effects) so the prompt can reduce assumptions and ask fewer questions. After the first draft, a strong follow-up is: “Rewrite this as a copy-ready docstring for our codebase, then add a short README section with a Misuse checklist and two examples.”</p>

</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this API usage guides prompt?</span>

<p class="answer">The biggest mistake is pasting only a name and expecting accurate intent; “doStuff(user, flag)” is too vague, while “createInvoice(customerId: UUID, lineItems: LineItem[], dueDate?: ISODate, opts?: CreateInvoiceOptions)” gives the model real constraints to reason about. Another common error is omitting the target language and user segment, which leads to mismatched conventions and unhelpful examples; “TypeScript for SDK consumers” is far better than “any language.” People also skip real-world failure context; include at least one error message or misuse you’ve seen, not just the signature. Finally, teams forget to answer the prompt’s targeted questions, so assumptions remain and the docs stay “almost” trustworthy.</p>

</div>

<div class="faq-item">
<span class="question">Who should NOT use this API usage guides prompt?</span>

<p class="answer">This prompt isn’t ideal for one-off snippets where the function will be thrown away next week, or for situations where you cannot share even a signature due to policy constraints. It’s also not a replacement for full system design docs when the problem is architecture, not usage. If you simply need boilerplate reference docs with no emphasis on safe calling patterns, a lightweight doc generator may be faster.</p>

</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this API usage guides AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SDK Maintainers use this to ship consistent, safe usage guidance across many functions without rewriting everything by hand. Platform Engineers rely on it when they inherit legacy interfaces and need to document intent and constraints before refactoring. Developer Experience (DX) Writers get a structured draft that’s already organized around “safe calls” and “misuse to avoid,” which is what readers actually need. Senior Product Engineers use it during integration reviews to clarify parameter interactions and reduce the odds of subtle production bugs."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this API usage guides AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SaaS companies use it to reduce support load by documenting correct integration patterns and common mistakes for public APIs and SDKs. Fintech teams apply it when parameters encode compliance-sensitive choices (idempotency keys, authentication context, retry semantics) and “almost correct” is still dangerous. Healthcare and health tech benefit when interfaces touch regulated data, where safe defaults and clear invariants matter more than clever examples. Enterprise B2B platforms get value because internal APIs often outlive the original authors, and maintainers need assumptions labeled clearly."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for writing API usage guides produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me documentation for this function” fails because it: lacks a pre-analysis step to separate unknowns from facts, provides no staged breakdown to handle complexity, ignores parameter interactions (the real source of bugs), produces generic prose instead of safe call patterns and misuse warnings, and misses the “ask targeted questions, don’t invent” discipline. You end up with something that looks like docs but doesn’t prevent incorrect calls. That’s the gap this prompt is designed to close."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this API usage guides prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. The biggest lever is the “primary user segment” and the programming language norms, because those choices affect examples, terminology, and what “safe defaults” even means. You can also supply extra context (one call site, error messages, invariants, expected side effects) so the prompt can reduce assumptions and ask fewer questions. After the first draft, a strong follow-up is: “Rewrite this as a copy-ready docstring for our codebase, then add a short README section with a Misuse checklist and two examples.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this API usage guides prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is pasting only a name and expecting accurate intent; “doStuff(user, flag)” is too vague, while “createInvoice(customerId: UUID, lineItems: LineItem[], dueDate?: ISODate, opts?: CreateInvoiceOptions)” gives the model real constraints to reason about. Another common error is omitting the target language and user segment, which leads to mismatched conventions and unhelpful examples; “TypeScript for SDK consumers” is far better than “any language.” People also skip real-world failure context; include at least one error message or misuse you’ve seen, not just the signature. Finally, teams forget to answer the prompt’s targeted questions, so assumptions remain and the docs stay “almost” trustworthy."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this API usage guides prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for one-off snippets where the function will be thrown away next week, or for situations where you cannot share even a signature due to policy constraints. It’s also not a replacement for full system design docs when the problem is architecture, not usage. If you simply need boilerplate reference docs with no emphasis on safe calling patterns, a lightweight doc generator may be faster."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">

<p>Good API docs prevent mistakes before they happen. Paste your signature into the prompt, answer the targeted questions it asks, and publish something developers will actually trust.</p>

</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5001599.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build a NIST 800-61 Incident Response Plan AI Prompt</title>
		<link>https://flowpast.com/prompts/build-a-nist-800-61-incident-response-plan-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:47:38 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5003039</guid>

					<description><![CDATA[Breach response feels chaotic - this AI Prompt builds a NIST 800-61 phase plan with roles, RACI, triage, playbooks, and templates. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: incident response plan -->
<div class="hook-introduction">

<p>When a breach hits, most “incident response plans” collapse into a messy mix of Slack pings, half-remembered steps, and conflicting opinions about who’s in charge. Documentation exists, but it’s policy-heavy and operationally thin. And in the middle of that noise, your team still has to triage, contain, brief leadership, and hit reporting deadlines.</p>



<p>This <strong>incident response plan</strong> is built for <strong>Security leaders</strong> who need a NIST 800-61-aligned program they can actually run, <strong>IT/Operations managers</strong> who must coordinate containment without breaking production, and <strong>consultants</strong> who are standing up incident response capability for clients under real time pressure. The output is a multi-phase (6–11 phases) incident response program with roles, triggers, checklists, RACI-style responsibility mapping, operational playbooks, communications paths, and maintenance cadence.</p>

</div>

<div class="what-and-when-section">

<h2 class="wp-block-heading">What Does This AI Prompt Do and When to Use It?</h2>



<table class="solution-results-table three-column" role="presentation" aria-label="What this prompt does, when to use it, and what you get">
 <thead>
    <tr>
      <th scope="col">What This Prompt Does</th>
      <th scope="col">When to Use This Prompt</th>
      <th scope="col">What You&#8217;ll Get</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <ul class="automation-list">
          <li>It structures your incident response program around NIST SP 800-61 phases, turning the framework into actionable steps.</li>
          <li>It performs a readiness scan by identifying crown-jewel systems/data, likely threat paths, and process gaps based on your context.</li>
          <li>It generates a dynamic phase architecture (6–11 phases) with names, rationale, entry conditions, and exit criteria for each phase.</li>
          <li>It builds each phase into a run-ready package: responsibilities (including backups), decision points, required artifacts, and tooling/log sources.</li>
          <li>It forces scope clarity by adding “what this is NOT,” plus assumptions and targeted questions when inputs are missing.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You’re updating an old IR plan that reads well but doesn’t tell people what to do in the first 30 minutes.</li>
          <li>An audit, cyber insurance renewal, or board request is forcing you to prove you can detect, contain, and recover (not just “have a policy”).</li>
          <li>You’ve added cloud services, new endpoints, or a third-party processor and your current playbooks no longer match reality.</li>
          <li>Regulatory exposure is rising, so you need clearer reporting deadlines, comms governance, and evidence capture.</li>
          <li>Your team is scaling, and you need consistent roles, handoffs, and drills before the next real incident teaches the lessons for you.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A 6–11 phase incident response lifecycle with phase objectives, rationale, and phase-to-phase handoffs.</li>
           <li>A readiness scan summary that lists crown jewels, top threat paths, key gaps, and prioritized fixes.</li>
           <li>Phase-level checklists and step-by-step actions, including decision points and required artifacts to capture.</li>
           <li>A roles and responsibility map (RACI-style ownership plus backup coverage) and an escalation/communications flow.</li>
           <li>A maintenance plan with exercise cadence, metrics to track, and a post-incident improvement loop.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

<div class="prompt-display-section">

<h2 class="wp-block-heading">The Full AI Prompt: NIST 800-61 Incident Response Program Builder</h2>


<!-- Prompt file not found: /home/flowpast/htdocs/flowpast.com/wp-content/data/prompts_scraped/5003247/prompt-2026.txt -->

</div>

<div class="pro-tips-section">

<h2 class="wp-block-heading">Pro Tips for Better AI Prompt Results</h2>



<ul class="wp-block-list">

<li><strong>Feed it real constraints, not aspirations.</strong> If your team is two people and an MSP, say that plainly so the plan doesn’t assume a 24/7 SOC. Add details like “we rely on M365 Defender and a small on-call rotation” so the tooling and responsibilities come out realistic.</li>


<li><strong>Define “crown jewels” in business language first.</strong> Name the datasets and the business processes they enable (payments, order fulfillment, patient scheduling), then map systems second. Follow-up prompt: “List the top 5 crown-jewel assets and rank them by impact if unavailable for 24 hours.”</li>


<li><strong>Ask for decision points at each phase.</strong> Many plans fail because they skip the “if/then” moments. After the first run, ask: “For each phase, add 3 go/no-go decisions (for example: isolate host vs keep online for forensics) and who approves them.”</li>


<li><strong>Force testability with an exercise scenario.</strong> Once you have the phases, push it into a tabletop format to see if the steps survive real conversation. Try: “Create a 90-minute tabletop exercise for a suspected credential-stuffing breach with injects every 10 minutes and expected artifacts.”</li>


<li><strong>Make communications concrete and reusable.</strong> Ask for message templates that match your actual audiences: execs, legal, affected customers, and internal staff. If you also need help tailoring the tone fast, run your draft through https://flowpast.com/prompts/rewrite-messages-for-any-audience-ai-prompt/ so the same facts land correctly with each group.</li>

</ul>

</div>

<div class="related-prompts-section">

<h2 class="wp-block-heading">Related Prompts</h2>



<p>After you’ve drafted the incident response plan, these prompts help you communicate clearly, tighten operational details, and ship stakeholder-ready messages.</p>



<p>If your plan includes customer or partner updates, https://flowpast.com/prompts/rewrite-messages-for-any-audience-ai-prompt/ is the fastest way to translate a technical incident summary into versions for executives, support teams, and external stakeholders. When you’re under time pressure, consistency matters more than perfect prose, and this helps you keep the facts aligned across audiences.</p>



<p>For teams that need to clean up internal runbooks or scripts that will be touched during containment and recovery, https://flowpast.com/prompts/clarify-code-identifier-names-with-this-ai-prompt/ pairs well. When responders are tired, unclear naming and confusing helper functions slow down hotfixes and increase the chance of mistakes.</p>



<p>If incident response training is exposing skill gaps on the team, https://flowpast.com/prompts/clarify-career-strengths-and-next-steps-ai-prompt/ can support more targeted development plans. It’s useful right after a tabletop or post-incident review, when you know exactly what needs to improve but you’re not sure how to structure next steps.</p>


<br>


<p>Quick reference:</p>



<ul class="wp-block-list">

<li><a href="https://flowpast.com/prompts/rewrite-messages-for-any-audience-ai-prompt/">Rewrite Messages for Any Audience AI Prompt</a>: Reframe updates for execs, customers, and staff.</li>


<li><a href="https://flowpast.com/prompts/clarify-code-identifier-names-with-this-ai-prompt/">Clarify Code Identifier Names with this AI Prompt</a>: Improve clarity of scripts and functions fast.</li>

<li><a href="https://flowpast.com/prompts/clarify-career-strengths-and-next-steps-ai-prompt/">Clarify Career Strengths and Next Steps AI Prompt</a>: Turn lessons learned into development actions.</li>


<li><a href="https://flowpast.com/prompts/write-influencer-outreach-messages-with-this-ai-prompt/">Write Influencer Outreach Messages with this AI Prompt</a>: Outreach templates when PR partnerships matter.</li>


<li><a href="https://flowpast.com/prompts/write-holiday-retail-messages-with-this-ai-prompt/">Write Holiday Retail Messages with this AI Prompt</a>: High-volume customer messaging for peak periods.</li>

</ul>
<!-- /wp:post-content -->
</div>

<div class="faq-section">
<!-- wp:heading {"level":2} -->
<h2 class="wp-block-heading">Common Questions</h2>
<!-- /wp:heading -->

<div class="faq-item">
<span class="question">Which roles benefit most from this incident response plan AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>CISOs and Heads of Security</strong> use it to translate NIST 800-61 into a program that survives scrutiny from executives, auditors, and insurers, with clear phases and ownership. <strong>Incident Response Managers and SOC Leads</strong> rely on it for phase entry/exit criteria, decision points, and the specific artifacts to capture during triage and containment. <strong>IT Operations Managers</strong> benefit because it clarifies handoffs, backup responsibilities, and what changes are allowed during containment without breaking production. <strong>GRC and Compliance Leads</strong> use the compliance touchpoints and reporting deadlines to align response actions with regulatory expectations and evidence needs.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this incident response plan AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>SaaS companies</strong> use it to align cloud logging, incident severity, and customer communications so incidents don’t become churn events. It helps define what to collect (auth logs, audit trails, API events) and who decides containment actions like token revocation. <strong>E-commerce and retail</strong> teams apply it to card-not-present fraud signals, credential stuffing, and third-party plugin risk, where fast containment matters and messaging can’t be improvised. <strong>Healthcare and life sciences</strong> organizations get value from the emphasis on regulated reporting, evidence handling, and recovery steps that protect patient services while the investigation runs. <strong>Professional services firms</strong> use it to build a repeatable playbook across many client environments, including clear scope boundaries and assumptions when information is incomplete.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building an incident response plan produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like &#8216;<em>Write me an incident response plan for a data breach</em>&#8216; fails because it: lacks organizational context (team size, tooling, regulatory exposure, risk appetite) so the “plan” can’t be executed; provides no phase architecture with entry/exit criteria, so responders don’t know when to move from triage to containment to recovery; ignores required artifacts and log sources, which leads to flimsy evidence and missed detection paths; produces generic roles without backup coverage or handoffs, which collapses during a real on-call event; and misses scope boundaries, so it becomes a bloated policy document instead of operational checklists and runbooks.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this incident response plan prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes. The prompt is designed to adapt the phase count (6–11) and the operational detail based on your organization’s size, complexity, maturity, regulatory landscape, available resources, and business risk appetite. To customize it, provide specifics like your current logging stack, who is on-call, which systems host sensitive data, and which regulations apply (or state that you are unsure). If you don’t have full details, let it ask targeted questions and answer them in a second pass. Follow-up prompt: “Revise the plan assuming we have no 24/7 SOC, we use Microsoft 365 + Entra ID, and we must be able to brief leadership within 60 minutes of detection.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this incident response plan prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is giving no organizational reality, which forces the AI to invent capabilities; instead of “mid-size company,” say “350 employees, one security engineer, outsourced SOC, AWS + Okta, and we handle EU customer data.” Another common error is leaving crown jewels undefined; “customer data” is vague, while “billing database containing invoices + card tokens, plus support ticket attachments” leads to better triage and containment steps. Teams also forget to state risk appetite and downtime tolerance, so the containment plan comes out unrealistic; “we can take the customer portal offline for 2 hours” is actionable, “we can’t have downtime” usually isn’t. Finally, people skip compliance and reporting constraints, which causes late-stage chaos; add what you know and let the prompt mark unknowns as assumptions.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this incident response plan prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for teams that only want a one-page template and won’t iterate, because it’s built to produce an operational program with phases, artifacts, and drills. It’s also not a replacement for legal counsel or breach notification advice, especially when regulatory interpretation is involved. And if you haven’t even identified your core systems, owners, or logging basics, you may get a plan that is mostly assumptions. In that case, start by inventorying systems and access paths first, then come back to generate the full program.</p>
<!-- /wp:paragraph -->
</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this incident response plan AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "CISOs and Heads of Security use it to translate NIST 800-61 into a program that survives scrutiny from executives, auditors, and insurers, with clear phases and ownership. Incident Response Managers and SOC Leads rely on it for phase entry/exit criteria, decision points, and the specific artifacts to capture during triage and containment. IT Operations Managers benefit because it clarifies handoffs, backup responsibilities, and what changes are allowed during containment without breaking production. GRC and Compliance Leads use the compliance touchpoints and reporting deadlines to align response actions with regulatory expectations and evidence needs."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this incident response plan AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SaaS companies use it to align cloud logging, incident severity, and customer communications so incidents don’t become churn events. It helps define what to collect (auth logs, audit trails, API events) and who decides containment actions like token revocation. E-commerce and retail teams apply it to card-not-present fraud signals, credential stuffing, and third-party plugin risk, where fast containment matters and messaging can’t be improvised. Healthcare and life sciences organizations get value from the emphasis on regulated reporting, evidence handling, and recovery steps that protect patient services while the investigation runs. Professional services firms use it to build a repeatable playbook across many client environments, including clear scope boundaries and assumptions when information is incomplete."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building an incident response plan produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like 'Write me an incident response plan for a data breach' fails because it: lacks organizational context (team size, tooling, regulatory exposure, risk appetite) so the “plan” can’t be executed; provides no phase architecture with entry/exit criteria, so responders don’t know when to move from triage to containment to recovery; ignores required artifacts and log sources, which leads to flimsy evidence and missed detection paths; produces generic roles without backup coverage or handoffs, which collapses during a real on-call event; and misses scope boundaries, so it becomes a bloated policy document instead of operational checklists and runbooks."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this incident response plan prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. The prompt is designed to adapt the phase count (6–11) and the operational detail based on your organization’s size, complexity, maturity, regulatory landscape, available resources, and business risk appetite. To customize it, provide specifics like your current logging stack, who is on-call, which systems host sensitive data, and which regulations apply (or state that you are unsure). If you don’t have full details, let it ask targeted questions and answer them in a second pass. Follow-up prompt: “Revise the plan assuming we have no 24/7 SOC, we use Microsoft 365 + Entra ID, and we must be able to brief leadership within 60 minutes of detection.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this incident response plan prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is giving no organizational reality, which forces the AI to invent capabilities; instead of “mid-size company,” say “350 employees, one security engineer, outsourced SOC, AWS + Okta, and we handle EU customer data.” Another common error is leaving crown jewels undefined; “customer data” is vague, while “billing database containing invoices + card tokens, plus support ticket attachments” leads to better triage and containment steps. Teams also forget to state risk appetite and downtime tolerance, so the containment plan comes out unrealistic; “we can take the customer portal offline for 2 hours” is actionable, “we can’t have downtime” usually isn’t. Finally, people skip compliance and reporting constraints, which causes late-stage chaos; add what you know and let the prompt mark unknowns as assumptions."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this incident response plan prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for teams that only want a one-page template and won’t iterate, because it’s built to produce an operational program with phases, artifacts, and drills. It’s also not a replacement for legal counsel or breach notification advice, especially when regulatory interpretation is involved. And if you haven’t even identified your core systems, owners, or logging basics, you may get a plan that is mostly assumptions. In that case, start by inventorying systems and access paths first, then come back to generate the full program."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>A breach response should feel rehearsed, not invented in real time. Paste this prompt into your AI tool, answer the clarifying questions honestly, and walk away with an incident response plan you can run and improve.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5003039.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build a React Error Boundary Package with this AI Prompt</title>
		<link>https://flowpast.com/prompts/build-a-react-error-boundary-package-with-this-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:47:14 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5001438</guid>

					<description><![CDATA[React crashes take pages down - the ultimate AI Prompt that delivers a reusable Error Boundary package with fallbacks, retries, tests, and telemetry. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: React error boundary -->
<div class="hook-introduction">

<p>React apps don’t usually fail gracefully. One buggy widget can trigger a blank screen, wipe out conversion paths, and leave you scrambling for logs you can’t trust. And the worst part? It often happens in production, not in your tidy local environment.</p>



<p>This <strong>React error boundary</strong> is built for <strong>frontend leads</strong> shipping complex UIs under incident pressure, <strong>SaaS product teams</strong> who need better telemetry and safer releases, and <strong>agency developers</strong> who have to deliver a reusable “drop-in” reliability layer across multiple client codebases. The output is a production-usable Error Boundary package in React (with TypeScript support), including fallback UI patterns, reset/retry flows, monitoring integration points, edge-case guidance, and realistic tests.</p>

</div>

<div class="what-and-when-section">

<h2 class="wp-block-heading">What Does This AI Prompt Do and When to Use It?</h2>



<table class="solution-results-table three-column" role="presentation" aria-label="What this prompt does, when to use it, and what you get">
 <thead>
    <tr>
      <th scope="col">What This Prompt Does</th>
      <th scope="col">When to Use This Prompt</th>
      <th scope="col">What You&#8217;ll Get</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <ul class="automation-list">
          <li>Generates a reusable ErrorBoundary “circuit breaker” system that isolates failures to a subtree instead of crashing the whole UI.</li>
          <li>Designs accessible, customizable fallback experiences that include meaningful messaging and optional reset or “try again” behaviors.</li>
          <li>Creates a clean integration surface for error reporting (with a safe default) so you can plug in Sentry, Datadog, New Relic, or custom logging.</li>
          <li>Explains placement patterns (route-level, feature-level, widget-level) and provides example layouts that match real app architectures.</li>
          <li>Adds test guidance and sample tests (unit plus integration) so the boundary behavior doesn’t regress during refactors.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>A recent release introduced intermittent “white screen” crashes and you need containment plus diagnostics fast.</li>
          <li>Your UI has third-party components (charts, editors, payment widgets) and you can’t control their failure modes.</li>
          <li>You are preparing for a high-traffic event and need graceful degradation for non-critical panels and widgets.</li>
          <li>Your incident process requires clear reporting, but current logs don’t capture component stack context reliably.</li>
          <li>You are standardizing frontend platform patterns across multiple repos and want one boundary package everyone can adopt.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A reusable ErrorBoundary package structure (components, utilities, and integration hooks) you can paste into a codebase.</li>
           <li>At least 3 fallback UI variants (minimal, user-helpful, and “retry/reset” capable) with accessibility considerations.</li>
           <li>A monitoring/reporting adapter interface with a default reporter and examples for swapping implementations.</li>
           <li>A placement guide with concrete examples for route boundaries, feature boundaries, and widget boundaries.</li>
           <li>A starter test suite outline plus example tests for fallback rendering, reset behavior, and reporter calls.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

<div class="prompt-display-section">

<h2 class="wp-block-heading">The Full AI Prompt: Enterprise React Error Boundary Package Builder</h2>



<div class="prompt-viewer-wrapper" id="prompt-section">
    <div class="prompt-comparison-row prompt-premium">
        <!-- Header with buttons -->
        <div class="prompt-row-header">
            <!-- <span class="prompt-row-icon">✨</span> -->
            <span class="prompt-row-title">
                                    Step 1: Customize the prompt with your input
                            </span>
            <div class="prompt-header-buttons">
                                    <button class="prompt-header-btn prompt-header-reset" onclick="resetPrompt()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                                <button class="prompt-header-btn prompt-header-copy-green flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span>Customize and Copy Full Prompt</span>
                </button>
            </div>
        </div>

        <!-- Customize the Prompt Section -->
                    <div class="prompt-customize-section">
                <span class="customize-title">Customize the Prompt</span>
                <p class="customize-subtitle">Fill in the fields below to personalize this prompt for your needs.</p>
                <table class="customize-table">
                    <thead>
                        <tr>
                            <th>Variable</th>
                            <th>What to Enter</th>
                            <th>Customise the prompt</th>
                        </tr>
                    </thead>
                    <tbody>
                                                    <tr>
                                <td class="var-name"><code>[APP_TYPE]</code></td>
                                <td class="var-desc">
                                    Specify the type of application being developed, including its purpose and target audience.                                    <div class="var-example">For example: "Enterprise-grade SaaS platform for project management used by mid-to-large organizations."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[APP_TYPE]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[ERROR_LOGGING_SERVICE]</code></td>
                                <td class="var-desc">
                                    Provide the name of the error monitoring or logging service to be integrated with the toolkit.                                    <div class="var-example">For example: "Sentry, a cloud-based error tracking and performance monitoring tool."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[ERROR_LOGGING_SERVICE]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[UI_FRAMEWORK]</code></td>
                                <td class="var-desc">
                                    Specify the UI framework being used for the project, such as React, Angular, or Vue.js.                                    <div class="var-example">For example: "React with Material-UI for component styling and accessibility."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[UI_FRAMEWORK]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[TYPESCRIPT_REQUIRED]</code></td>
                                <td class="var-desc">
                                    Indicate whether TypeScript is required for the implementation, including any specific version or configuration details.                                    <div class="var-example">For example: "Yes, TypeScript is mandatory and must follow strict type-checking with version 4.8 or higher."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[TYPESCRIPT_REQUIRED]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[RESET_STRATEGY]</code></td>
                                <td class="var-desc">
                                    Define the strategy for resetting the UI after an error, including whether it involves component remounting or state clearing.                                    <div class="var-example">For example: "Soft reset strategy that remounts affected components without clearing the global application state."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[RESET_STRATEGY]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                            </tbody>
                </table>

                <button class="copy-customized-btn flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span class="copy-customized-text">Customise the prompt now</span>
                </button>
            </div>
        
        <!-- Full Prompt Code Header -->
                    <div class="prompt-code-header">
                <span class="prompt-code-title">
                    Step 2: Copy the Prompt
                </span>
                <div class="prompt-code-buttons">
                    <!-- Reset: Only visible when unlocked -->
                    <button class="prompt-header-btn prompt-header-reset btn-when-unlocked" onclick="resetPrompt()" style="display: none;">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                    <!-- Copy Full Prompt -->
                    <button class="prompt-header-btn prompt-header-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                            <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                        </svg>
                        <span>Copy Full Prompt</span>
                    </button>
                </div>
            </div>
        

        <!-- Prompt Content -->
        <div class="prompt-box prompt-gated-wrapper">
            <!-- Gated: Blurred content -->
            <div class="prompt-gated-content">
                <div class="prompt-header-visible">OBJECTIVE</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PERSONA</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">CONSTRAINTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PROCESS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">Edge Case Handling Rules</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">INPUTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">OUTPUT SPECIFICATION</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">1) Error Boundary Core</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">2) Fallback UI Library</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">3) Logging &amp; Monitoring Integration</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">4) Usage Patterns</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">5) Advanced Capabilities</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">6) Testing Plan</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">7) Integration Playbook</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">QUALITY CHECKS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div>            </div>
            <!-- Unlocked: Full content (hidden by default) -->
            <div class="prompt-content-full" id="premium-prompt-content" style="display: none;">
                ## OBJECTIVE
Design an enterprise-ready React error-resilience toolkit that prevents single-component failures from taking down the entire UI. The centerpiece is a reusable ErrorBoundary system that:
- Captures render/runtime lifecycle errors from descendant components
- Shows accessible, user-friendly fallback experiences (with optional “try again”/reset)
- Reports errors to the chosen monitoring pipeline
- Supports flexible placement (route-level, feature-level, widget-level)
- Includes examples, configuration options, advanced recovery features, and tests

## PERSONA
Act as a battle-tested React/TypeScript architect who has built fault-tolerant frontends under heavy traffic and tight incident-response constraints. You favor pragmatic patterns, strong developer ergonomics, and graceful degradation over brittle “happy path” code.

## CONSTRAINTS
- Provide complete, production-usable React code; use TypeScript when requested.
- Prefer modern React (function components, hooks, context) and clean composition patterns.
- Treat error boundaries as “circuit breakers” that can be deployed at multiple layers.
- Fallback UI must be meaningful, accessible (keyboard, ARIA, contrast-minded), and customizable.
- Include clear integration points for logging/monitoring and a safe default if none is provided.
- Include guidance for edge cases (async errors, event handler errors, data fetching, SSR, StrictMode).
- Include testing approaches (unit + integration) with realistic examples.
- Add code comments/docstrings where they improve maintainability.
- What This Is NOT:
  - Not a generic “try/catch everything” solution for all JavaScript errors
  - Not a replacement for request-level retries, backend observability, or data-layer resilience
  - Not a promise that all errors (e.g., event handlers, async callbacks) are auto-captured without explicit handling

## PROCESS
1. **Pre-analysis (required):** Briefly restate your understanding of [APP_TYPE], [ERROR_LOGGING_SERVICE], [UI_FRAMEWORK], [TYPESCRIPT_REQUIRED], and [RESET_STRATEGY]. If any are missing, list assumptions and offer safe defaults.
2. **Architecture outline:** Propose where boundaries should live (app shell, routes, features, leaf widgets) and why.
3. **Core implementation:** Provide the reusable ErrorBoundary module(s) with configuration and reset/retry capabilities.
4. **Fallback system:** Provide a small set of composable fallback components plus a “render prop” option for contextual UI.
5. **Monitoring integration:** Implement adapters for [ERROR_LOGGING_SERVICE] (or a pluggable interface with one concrete example).
6. **Usage patterns:** Show multiple placements (route, layout, feature section, individual card/widget).
7. **Advanced recovery:** Add optional retry/backoff, “soft reset” remounting, and context-aware messaging.
8. **Tests:** Provide unit/integration tests and note any caveats (jsdom, console suppression, React version).
9. **Implementation guide:** Step-by-step rollout plan and best practices for production.

### Edge Case Handling Rules
- If [ERROR_LOGGING_SERVICE] is “custom” or unspecified, generate a minimal logger interface plus a safe no-op default and a console-based dev implementation.
- If [UI_FRAMEWORK] is unspecified, use accessible semantic HTML with minimal styling and clear extension points.
- If [TYPESCRIPT_REQUIRED] is “no”, provide JavaScript versions *or* TS with notes on stripping types (state your choice in pre-analysis).
- If [RESET_STRATEGY] is unclear, implement a default “remount via key” reset and also show how to plug in a custom reset callback.

## INPUTS
- **Application type:** [APP_TYPE]
- **Error logging service:** [ERROR_LOGGING_SERVICE]
- **UI framework/library:** [UI_FRAMEWORK]
- **TypeScript required (yes/no):** [TYPESCRIPT_REQUIRED]
- **Preferred reset approach:** [RESET_STRATEGY]

## OUTPUT SPECIFICATION
Return the solution in the following sections (use these exact headers):

### 1) Error Boundary Core
Provide:
- {Error Boundary File Name}
- {Complete Component Code}
- {Public Props API}
- {Reset/Retry Behavior}
- {Notes on React Limitations}

### 2) Fallback UI Library
Provide:
- {Generic Fallback Component}
- {Inline/Widget Fallback Component}
- {Full-Page Fallback Component}
- {Accessibility Notes}
- {Customization Hooks}

### 3) Logging &amp; Monitoring Integration
Provide:
- {Logger Interface}
- {Concrete Integration Example}
- {Breadcrumb/Metadata Strategy}
- {PII/Sensitive Data Guardrails}
- {Where to Call the Reporter}

### 4) Usage Patterns
Provide at least:
- {App Shell Example}
- {Route-Level Example}
- {Feature Section Example}
- {Leaf Component Example}
- {Contextual Fallback Example}

### 5) Advanced Capabilities
Include:
- {Retry Mechanism}
- {Exponential Backoff or Throttling}
- {User-Triggered Reset}
- {Programmatic Reset}
- {Circuit-Breaker Placement Guidance}

### 6) Testing Plan
Include:
- {Unit Test Examples}
- {Integration Test Examples}
- {Mocking/Stubbing Strategy}
- {What to Assert}
- {Common Pitfalls}

### 7) Integration Playbook
Include:
- {Adoption Steps}
- {Best Practices}
- {Anti-Patterns to Avoid}
- {Rollout/Observability Checklist}

## QUALITY CHECKS
At the end, include a validation list that confirms:
- The ErrorBoundary is reusable/configurable and supports the chosen [RESET_STRATEGY].
- Fallback UI is accessible and can be adapted to [UI_FRAMEWORK] without rewrites.
- Logging is pluggable and correctly wired for [ERROR_LOGGING_SERVICE] (or a safe default exists).
- Examples cover multiple boundary placements (route + feature + widget at minimum).
- Tests demonstrate failures, resets, and reporting behavior with realistic assertions.            </div>
        </div>


    </div>

    <!-- CTA Row - Full width buttons -->
    <div class="prompt-cta-row">
        <button class="prompt-cta-btn prompt-cta-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
            </svg>
            <span class="cta-copy-text">Copy Full Prompt</span>
        </button>
    </div>
</div>

<style>
    /* Gated prompt states */
    .prompt-gated-wrapper {
        position: relative;
    }

    /* When unlocked - show full content, hide gated */
    body.flowpast-unlocked .prompt-gated-wrapper .prompt-gated-content {
        display: none;
    }

    body.flowpast-unlocked .prompt-gated-wrapper .prompt-content-full {
        display: block !important;
    }

    /* Show/hide elements based on unlock state */
    body.flowpast-unlocked .btn-when-unlocked {
        display: inline-flex !important;
    }

    .prompt-viewer-wrapper {
        scroll-margin-top: 250px;
    }

    /* ========================================
   PROMPT VIEWER - MAIN WRAPPER
   ======================================== */
    .prompt-viewer-wrapper {
        margin: 30px 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* ========================================
   PROMPT BOX CONTAINER
   ======================================== */
    .prompt-comparison-row {
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid #e0e0e0;
        background: #fff;
    }

    /* ========================================
   HEADER WITH BUTTONS
   ======================================== */
    .prompt-row-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
        flex-wrap: wrap;
    }

    .prompt-row-icon {
        font-size: 20px;
    }

    .prompt-row-title {
        font-weight: 600;
        font-size: 22px;
        color: #fff !important;
        text-decoration: underline
    }

    .prompt-header-buttons {
        margin-left: auto;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Header buttons */
    .prompt-header-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-header-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-header-copy:hover {
        background: #2a2a2a;
    }

    .prompt-header-copy.copied {
        background: #2e7d32;
    }

    .prompt-header-copy-green {
        background: #04AA6D !important;
        color: #fff !important;
    }

    .prompt-header-copy-green:hover {
        background: #039860 !important;
    }

    .prompt-header-copy-green.copied {
        background: #2e7d32 !important;
    }

    .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-header-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-1px);
    }

    /* ========================================
   PROMPT CONTENT - FULL (NO SCROLL)
   ======================================== */
    .prompt-box {
        background: #ffffff;
    }

    .prompt-content-full {
        padding: 24px;
        margin: 0;
        color: #202124;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.7;
        white-space: pre-wrap;
        word-wrap: break-word;
        /* No scroll - show full content */
        max-height: none;
        overflow: visible;
    }

    /* Highlighted variable in prompt */
    .prompt-variable {
        background: #fff3cd;
        color: #1967d2;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #ffc107;
    }

    .prompt-variable-filled {
        background: #d4edda;
        color: #155724;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #28a745;
    }

    /* ========================================
   GATED CONTENT (NO ACCESS)
   ======================================== */
    .prompt-gated-content {
        padding: 24px;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.8;
        max-height: none;
        overflow: visible;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        cursor: default;
    }

    /* ## headers - larger, black */
    .prompt-header-visible {
        color: #202124;
        font-weight: 600;
        margin: 5px 0 0px 0;
        font-size: 20px;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    /* ### headers - smaller, black */
    .prompt-header-visible.subheader {
        color: #202124;
        font-weight: 600;
        margin: 5px 0;
        font-size: 18px;
    }

    .prompt-header-visible:first-child {
        margin-top: 0;
    }

    /* ========================================
   LOCKED SECTION BLOCK
   ======================================== */
    .locked-section {
        position: relative;
        margin: 4px 0 8px 0;
        border-radius: 6px;
        overflow: hidden;
        background: linear-gradient(110deg, #e2e8f0 8%, #f1f5f9 18%, #e2e8f0 33%);
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }

    .locked-section-bg {
        position: relative;
    }

    .locked-section-lines {
        padding: 8px 12px;
        position: relative;
    }

    .locked-line {
        height: 6px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 3px;
        margin-bottom: 4px;
        margin-left: 12px;
    }

    .locked-line:last-child {
        margin-bottom: 0;
    }

    .locked-section-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        font-size: 24px;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
    }

    /* Subheader locked sections - slightly indented */
    /*  .prompt-header-visible.subheader+.locked-section {
        margin-left: 16px;
    } */

    /* ========================================
   COMPATIBILITY BADGES
   ======================================== */
    .prompt-compatibility {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        background: #f8f9fa;
        border-top: 1px solid #e0e0e0;
    }

    .compat-label {
        font-size: 13px;
        color: #5f6368;
        font-weight: 500;
    }

    .compat-badge {
        padding: 4px 10px;
        background: #e8f0fe;
        color: #1967d2;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }

    /* ========================================
   CTA ROW - FULL WIDTH BUTTONS
   ======================================== */
    .prompt-cta-row {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .prompt-cta-btn {
        flex: 1;
        min-width: 200px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 24px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-cta-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-copy:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-copy.copied {
        background: #2e7d32;
    }

    .prompt-cta-reset {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-reset:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-cta-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    /* ========================================
    CUSTOMIZE YOUR PROMPT SECTION
    ======================================== */
    .prompt-customize-section {
        padding: 24px;
        border-bottom: 1px solid #e0e0e0;
        background: #fafbfc;
    }

    .customize-title {
        margin: 0 0 8px 0;
        font-size: 18px;
        font-weight: 700;
        color: #202124;
    }

    .customize-subtitle {
        margin: 0 0 20px 0;
        font-size: 14px;
        color: #5f6368;
    }

    .customize-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }

    .customize-table th {
        text-align: left;
        padding: 12px;
        background: #f1f3f4;
        border: 1px solid #e0e0e0;
        font-size: 13px;
        font-weight: 600;
        color: #202124;
    }

    .customize-table td {
        padding: 12px;
        border: 1px solid #e0e0e0;
        vertical-align: top;
    }

    .customize-table .var-name {
        width: 25%;
        background: #f8f9fa;
    }

    .customize-table .var-name code {
        background: #fff3cd;
        color: #1967d2;
        border: 1px solid #ffc107;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        word-break: break-all;
        font-weight: 600;
    }

    .customize-table .var-desc {
        width: 35%;
        font-size: 13px;
        color: #5f6368;
        line-height: 1.5;
    }

    .customize-table .var-example {
        margin-top: 8px;
        padding: 8px 10px;
        background: #f8f9fa;
        border-left: 3px solid #dadce0;
        font-size: 12px;
        color: #5f6368;
        font-style: italic;
        border-radius: 0 4px 4px 0;
    }

    .customize-table .var-input {
        width: 40%;
    }

    .customize-input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #dadce0;
        border-radius: 6px;
        font-size: 13px;
        font-family: inherit;
        resize: vertical;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .customize-input:focus {
        outline: none;
        border-color: rgb(5, 152, 98);
        box-shadow: 0 0 0 3px rgba(5, 152, 98, 0.1);
    }

    .customize-input::placeholder {
        color: #9aa0a6;
        font-style: italic;
    }

    .copy-customized-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 16px 24px;
        background: rgb(5, 152, 98);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .copy-customized-btn:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    .copy-customized-btn.copied {
        background: #2e7d32;
    }

    /* ========================================
    FULL PROMPT CODE HEADER
    ======================================== */
    .prompt-code-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
    }

    .prompt-code-title {
        font-size: 22px;
        font-weight: 600;
        text-decoration: underline;

    }

    .prompt-code-buttons {
        display: flex;
        gap: 8px;
    }

    .prompt-code-buttons .prompt-header-btn {
        padding: 8px 14px;
        font-size: 13px;
        background: #ffffff;
        color: #202124;
        border: 1px solid #dadce0;
    }

    .prompt-code-buttons .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
        border-color: rgb(5, 152, 98);
    }

    .prompt-code-buttons .prompt-header-btn.prompt-header-access:hover {
        background: rgb(4, 130, 83) !important;
        border-color: rgb(4, 130, 83);
        color: #fff !important;
    }

    .prompt-code-buttons .prompt-header-btn:hover {
        background: #f1f3f4;
    }

    .prompt-code-buttons .prompt-header-copy.copied {
        background: #d4edda;
        color: #155724;
        border-color: #28a745;
    }

    .prompt-header-reset {
        background: #ffffff;
        color: #202124;
    }

    /* ========================================
   RESPONSIVE
   ======================================== */
    @media (max-width: 768px) {
        .prompt-row-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .prompt-header-buttons {
            margin-left: 0;
            width: 100%;
        }

        .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }

        .prompt-cta-row {
            flex-direction: column;
        }

        .prompt-cta-btn {
            width: 100%;
        }

        /* Customize table responsive */
        .customize-table,
        .customize-table thead,
        .customize-table tbody,
        .customize-table tr,
        .customize-table th,
        .customize-table td {
            display: block;
        }

        .customize-table thead {
            display: none;
        }

        .customize-table tr {
            margin-bottom: 16px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            overflow: hidden;
        }

        .customize-table td {
            width: 100% !important;
            border: none;
            border-bottom: 1px solid #e0e0e0;
        }

        .customize-table td:last-child {
            border-bottom: none;
        }

        .customize-table .var-name {
            background: #f1f3f4;
            font-weight: 600;
        }

        .prompt-code-header {
            flex-direction: column;
            gap: 12px;
            align-items: flex-start;
        }

        .prompt-code-buttons {
            width: 100%;
        }

        .prompt-code-buttons .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }
    }
</style>

<script>
    function handlePromptCopy() {
        // Check if unlocked via cookie
        if (typeof window.flowpastIsUnlocked === 'function' && !window.flowpastIsUnlocked()) {
            // Show email popup
            if (typeof window.flowpastShowEmailPopup === 'function') {
                window.flowpastShowEmailPopup('prompt');
            }
            return;
        }

        // Copy the customized prompt (with filled variables)
        const customizedPrompt = getCustomizedPrompt();
        const copyButtons = document.querySelectorAll('.prompt-header-copy, .prompt-header-copy-green, .prompt-cta-copy, .copy-customized-btn');

        navigator.clipboard.writeText(customizedPrompt).then(() => {
            copyButtons.forEach(btn => {
                btn.classList.add('copied');
                const textSpan = btn.querySelector('span');
                if (textSpan) textSpan.textContent = 'Copied!';
            });

            setTimeout(() => {
                copyButtons.forEach(btn => {
                    btn.classList.remove('copied');
                    const textSpan = btn.querySelector('span');
                    if (textSpan) textSpan.textContent = 'Copy Full Prompt';
                });
            }, 2000);
        }).catch(err => {
            console.error('Failed to copy:', err);
        });
    }

    // Store original prompt for customization
    const originalPrompt = "## OBJECTIVE\r\nDesign an enterprise-ready React error-resilience toolkit that prevents single-component failures from taking down the entire UI. The centerpiece is a reusable ErrorBoundary system that:\r\n- Captures render\/runtime lifecycle errors from descendant components\r\n- Shows accessible, user-friendly fallback experiences (with optional \u201ctry again\u201d\/reset)\r\n- Reports errors to the chosen monitoring pipeline\r\n- Supports flexible placement (route-level, feature-level, widget-level)\r\n- Includes examples, configuration options, advanced recovery features, and tests\r\n\r\n## PERSONA\r\nAct as a battle-tested React\/TypeScript architect who has built fault-tolerant frontends under heavy traffic and tight incident-response constraints. You favor pragmatic patterns, strong developer ergonomics, and graceful degradation over brittle \u201chappy path\u201d code.\r\n\r\n## CONSTRAINTS\r\n- Provide complete, production-usable React code; use TypeScript when requested.\r\n- Prefer modern React (function components, hooks, context) and clean composition patterns.\r\n- Treat error boundaries as \u201ccircuit breakers\u201d that can be deployed at multiple layers.\r\n- Fallback UI must be meaningful, accessible (keyboard, ARIA, contrast-minded), and customizable.\r\n- Include clear integration points for logging\/monitoring and a safe default if none is provided.\r\n- Include guidance for edge cases (async errors, event handler errors, data fetching, SSR, StrictMode).\r\n- Include testing approaches (unit + integration) with realistic examples.\r\n- Add code comments\/docstrings where they improve maintainability.\r\n- What This Is NOT:\r\n  - Not a generic \u201ctry\/catch everything\u201d solution for all JavaScript errors\r\n  - Not a replacement for request-level retries, backend observability, or data-layer resilience\r\n  - Not a promise that all errors (e.g., event handlers, async callbacks) are auto-captured without explicit handling\r\n\r\n## PROCESS\r\n1. **Pre-analysis (required):** Briefly restate your understanding of [APP_TYPE], [ERROR_LOGGING_SERVICE], [UI_FRAMEWORK], [TYPESCRIPT_REQUIRED], and [RESET_STRATEGY]. If any are missing, list assumptions and offer safe defaults.\r\n2. **Architecture outline:** Propose where boundaries should live (app shell, routes, features, leaf widgets) and why.\r\n3. **Core implementation:** Provide the reusable ErrorBoundary module(s) with configuration and reset\/retry capabilities.\r\n4. **Fallback system:** Provide a small set of composable fallback components plus a \u201crender prop\u201d option for contextual UI.\r\n5. **Monitoring integration:** Implement adapters for [ERROR_LOGGING_SERVICE] (or a pluggable interface with one concrete example).\r\n6. **Usage patterns:** Show multiple placements (route, layout, feature section, individual card\/widget).\r\n7. **Advanced recovery:** Add optional retry\/backoff, \u201csoft reset\u201d remounting, and context-aware messaging.\r\n8. **Tests:** Provide unit\/integration tests and note any caveats (jsdom, console suppression, React version).\r\n9. **Implementation guide:** Step-by-step rollout plan and best practices for production.\r\n\r\n### Edge Case Handling Rules\r\n- If [ERROR_LOGGING_SERVICE] is \u201ccustom\u201d or unspecified, generate a minimal logger interface plus a safe no-op default and a console-based dev implementation.\r\n- If [UI_FRAMEWORK] is unspecified, use accessible semantic HTML with minimal styling and clear extension points.\r\n- If [TYPESCRIPT_REQUIRED] is \u201cno\u201d, provide JavaScript versions *or* TS with notes on stripping types (state your choice in pre-analysis).\r\n- If [RESET_STRATEGY] is unclear, implement a default \u201cremount via key\u201d reset and also show how to plug in a custom reset callback.\r\n\r\n## INPUTS\r\n- **Application type:** [APP_TYPE]\r\n- **Error logging service:** [ERROR_LOGGING_SERVICE]\r\n- **UI framework\/library:** [UI_FRAMEWORK]\r\n- **TypeScript required (yes\/no):** [TYPESCRIPT_REQUIRED]\r\n- **Preferred reset approach:** [RESET_STRATEGY]\r\n\r\n## OUTPUT SPECIFICATION\r\nReturn the solution in the following sections (use these exact headers):\r\n\r\n### 1) Error Boundary Core\r\nProvide:\r\n- {Error Boundary File Name}\r\n- {Complete Component Code}\r\n- {Public Props API}\r\n- {Reset\/Retry Behavior}\r\n- {Notes on React Limitations}\r\n\r\n### 2) Fallback UI Library\r\nProvide:\r\n- {Generic Fallback Component}\r\n- {Inline\/Widget Fallback Component}\r\n- {Full-Page Fallback Component}\r\n- {Accessibility Notes}\r\n- {Customization Hooks}\r\n\r\n### 3) Logging & Monitoring Integration\r\nProvide:\r\n- {Logger Interface}\r\n- {Concrete Integration Example}\r\n- {Breadcrumb\/Metadata Strategy}\r\n- {PII\/Sensitive Data Guardrails}\r\n- {Where to Call the Reporter}\r\n\r\n### 4) Usage Patterns\r\nProvide at least:\r\n- {App Shell Example}\r\n- {Route-Level Example}\r\n- {Feature Section Example}\r\n- {Leaf Component Example}\r\n- {Contextual Fallback Example}\r\n\r\n### 5) Advanced Capabilities\r\nInclude:\r\n- {Retry Mechanism}\r\n- {Exponential Backoff or Throttling}\r\n- {User-Triggered Reset}\r\n- {Programmatic Reset}\r\n- {Circuit-Breaker Placement Guidance}\r\n\r\n### 6) Testing Plan\r\nInclude:\r\n- {Unit Test Examples}\r\n- {Integration Test Examples}\r\n- {Mocking\/Stubbing Strategy}\r\n- {What to Assert}\r\n- {Common Pitfalls}\r\n\r\n### 7) Integration Playbook\r\nInclude:\r\n- {Adoption Steps}\r\n- {Best Practices}\r\n- {Anti-Patterns to Avoid}\r\n- {Rollout\/Observability Checklist}\r\n\r\n## QUALITY CHECKS\r\nAt the end, include a validation list that confirms:\r\n- The ErrorBoundary is reusable\/configurable and supports the chosen [RESET_STRATEGY].\r\n- Fallback UI is accessible and can be adapted to [UI_FRAMEWORK] without rewrites.\r\n- Logging is pluggable and correctly wired for [ERROR_LOGGING_SERVICE] (or a safe default exists).\r\n- Examples cover multiple boundary placements (route + feature + widget at minimum).\r\n- Tests demonstrate failures, resets, and reporting behavior with realistic assertions.";
    const variables = ["[APP_TYPE]","[ERROR_LOGGING_SERVICE]","[UI_FRAMEWORK]","[TYPESCRIPT_REQUIRED]","[RESET_STRATEGY]"];
    // Initial render with highlighted variables
    document.addEventListener('DOMContentLoaded', function() {
        renderPromptWithHighlights();
    });

    // Live update prompt as user types
    document.querySelectorAll('.customize-input').forEach(input => {
        input.addEventListener('input', renderPromptWithHighlights);
    });

    function renderPromptWithHighlights() {
        const promptContent = document.getElementById('premium-prompt-content');
        if (!promptContent) return;

        let updatedPrompt = originalPrompt;
        let filledVariables = {};

        // Collect filled values
        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                filledVariables[placeholder] = value;
            }
        });

        // Replace filled variables and highlight remaining
        let htmlContent = escapeHtml(updatedPrompt);

        variables.forEach(placeholder => {
            const escapedPlaceholder = escapeHtml(placeholder);
            const regex = new RegExp(escapeRegex(escapedPlaceholder), 'g');

            if (filledVariables[placeholder]) {
                // Show filled value with green highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable-filled">' + escapeHtml(filledVariables[placeholder]) + '</span>'
                );
            } else {
                // Show original placeholder with yellow highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable">' + escapedPlaceholder + '</span>'
                );
            }
        });

        promptContent.innerHTML = htmlContent;
    }

    function escapeRegex(string) {
        return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    }

    function escapeHtml(text) {
        const div = document.createElement('div');
        div.textContent = text;
        return div.innerHTML;
    }

    function resetPrompt() {
        // Clear all input fields
        document.querySelectorAll('.customize-input').forEach(input => {
            input.value = '';
        });

        // Re-render with original placeholders highlighted
        renderPromptWithHighlights();

        // Visual feedback
        const resetBtns = document.querySelectorAll('.prompt-header-reset, .prompt-cta-reset');
        resetBtns.forEach(btn => {
            const originalText = btn.querySelector('span').textContent;
            btn.querySelector('span').textContent = 'Reset!';
            setTimeout(() => {
                btn.querySelector('span').textContent = originalText;
            }, 1000);
        });
    }


    function getCustomizedPrompt() {
        let updatedPrompt = originalPrompt;

        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                const regex = new RegExp(escapeRegex(placeholder), 'g');
                updatedPrompt = updatedPrompt.replace(regex, value);
            }
        });

        return updatedPrompt;
    }
</script>

</div>

<div class="pro-tips-section">

<h2 class="wp-block-heading">Pro Tips for Better AI Prompt Results</h2>



<ul class="wp-block-list">

<li><strong>Decide your boundary “tiers” before you run it.</strong> Pick 2-3 layers you will actually enforce (for example: route-level for pages, widget-level for risky third-party components). Then ask: “Show a recommended boundary layout for a dashboard with 1 route shell, 3 feature areas, and 6 widgets, highlighting which ones should fail closed vs fail open.”</li>


<li><strong>Be explicit about your telemetry pipeline.</strong> If you use Sentry or Datadog, name it and specify what metadata you need (userId, accountId, route, build SHA). Follow-up prompt: “Add a reporter adapter that attaches tags: appVersion, releaseChannel, routeId, and includes componentStack in the payload.”</li>


<li><strong>Force accessibility requirements in the fallback UI.</strong> Don’t accept a generic “Something went wrong” panel. Ask for keyboard focus management and ARIA labeling: “Make the fallback place focus on the heading, include aria-live guidance, and ensure buttons are reachable and labeled for screen readers.”</li>


<li><strong>Iterate on recovery behavior, not just rendering.</strong> After the first output, try asking: “Now make option 2 more aggressive and option 4 more conservative: option 2 auto-retries once after 2 seconds; option 4 only retries on user click and clears local state.”</li>


<li><strong>Request coverage for the edge cases you actually hit.</strong> Error boundaries won’t magically catch every error type, so tell the prompt what’s been slipping through (async data fetching, event handlers, SSR quirks, StrictMode double-invocation). Example follow-up: “Add a section showing how to handle async errors via explicit try/catch + reporter calls, and how to avoid noisy duplicates in React StrictMode.”</li>

</ul>

</div>

<div class="related-prompts-section">

<h2 class="wp-block-heading">Related Prompts</h2>



<p>Once your UI stops crashing, the next step is turning that stability into measurable growth and cleaner launches.</p>



<p>If you also need to keep users engaged after reliability fixes ship, <a href="https://flowpast.com/prompts/build-a-6-email-lead-nurture-sequence-with-this-ai-prompt/">Build a 6-Email Lead Nurture Sequence with this AI Prompt</a> helps you communicate updates, rebuild trust, and move leads toward a trial or demo without sounding like you’re making excuses.</p>



<p>When you’re planning a relaunch or a big “we fixed it” announcement, <a href="https://flowpast.com/prompts/build-a-5-email-launch-sequence-with-this-ai-prompt/">Build a 5-Email Launch Sequence with this AI Prompt</a> pairs well because you can coordinate release messaging with the same discipline you bring to incident response and postmortems.</p>



<p>For teams doing longer-form education (especially if you’re explaining reliability improvements, new status pages, or best practices to customers), <a href="https://flowpast.com/prompts/build-a-5-day-email-mini-course-blueprint-ai-prompt/">Build a 5-Day Email Mini-Course Blueprint AI Prompt</a> gives you a structured way to teach, reduce support load, and prevent churn from confusion.</p>


<br>


<p>Quick reference:</p>



<ul class="wp-block-list">

<li><a href="https://flowpast.com/prompts/build-a-6-email-lead-nurture-sequence-with-this-ai-prompt/">Build a 6-Email Lead Nurture Sequence with this AI Prompt</a>: Nurture leads with structured follow-ups.</li>


<li><a href="https://flowpast.com/prompts/build-a-5-email-launch-sequence-with-this-ai-prompt/">Build a 5-Email Launch Sequence with this AI Prompt</a>: Plan a clear, conversion-focused launch.</li>


<li><a href="https://flowpast.com/prompts/build-a-5-day-email-mini-course-blueprint-ai-prompt/">Build a 5-Day Email Mini-Course Blueprint AI Prompt</a>: Teach users with a 5-day sequence.</li>

<li><a href="https://flowpast.com/prompts/generate-5-list-growth-ideas-for-buyers-ai-prompt/">Generate 5 List Growth Ideas for Buyers AI Prompt</a>: Find new ways to grow your list.</li>

<li><a href="https://flowpast.com/prompts/build-a-multichannel-seo-growth-blueprint-with-this-ai-prompt/">Build a Multichannel SEO Growth Blueprint with this AI Prompt</a>: Build an SEO plan across channels.</li>
<!-- /wp:post-content -->
</ul>
<!-- /wp:list -->
</div>

<div class="faq-section">
<!-- wp:heading {"level":2} -->
<h2 class="wp-block-heading">Common Questions</h2>
<!-- /wp:heading -->

<div class="faq-item">
<span class="question">Which roles benefit most from this React error boundary AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Frontend Tech Leads</strong> use this to standardize how failures are contained across routes, features, and widgets so on-call incidents don’t become full-site outages. <strong>Staff/Principal Engineers</strong> rely on it to design a package-level pattern (reporting adapters, clean APIs, tests) that multiple teams can adopt without bikeshedding. <strong>QA Automation Engineers</strong> benefit because the prompt includes realistic unit and integration test approaches for fallback rendering and reset behavior. <strong>Product Engineers</strong> use it to ship user-friendly recovery UX, not just developer-centric error messages.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this React error boundary AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>SaaS platforms</strong> get big wins because complex dashboards often include many independent widgets, and isolating one failure prevents churn-inducing “blank screens.” <strong>E-commerce</strong> teams use it to protect revenue paths by placing boundaries around risky UI pieces like recommendations, reviews, and third-party payment elements while keeping the cart usable. <strong>Fintech and insurance</strong> products value the telemetry and incident-friendly reporting because compliance-heavy teams need clearer audit trails of what broke and when. <strong>Media and content sites</strong> use boundaries to keep article shells stable even if interactive embeds or personalization modules fail.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building a React error boundary package produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like &#8220;<em>Write me a React error boundary</em>&#8221; fails because it: lacks a multi-layer placement strategy (route vs feature vs widget) so teams deploy it inconsistently, provides no accessible fallback requirements so you get generic panels that frustrate users, ignores monitoring integration details so errors never reach the pipeline with useful context, produces a toy component instead of a reusable package with adapters and examples, and misses edge-case guidance for async errors, event handlers, SSR, and StrictMode.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this React error boundary prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes, customize it by specifying your app type (for example: “Next.js SSR app” vs “Vite SPA”), your error logging service (Sentry, Datadog, custom endpoint), and your preferred UI library (MUI, Chakra, Tailwind, or no dependency). You can also tell it which recovery patterns you allow, such as “reset on route change,” “retry once,” or “never auto-retry.” A practical follow-up is: “Adapt the package for a Next.js App Router app, include an ErrorBoundary per route segment, and send reports to Sentry with userId, accountId, and release SHA.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this React error boundary prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is leaving your monitoring requirements vague; instead of “log it somewhere,” say “send to Sentry with tags {routeId, featureFlag, releaseSha} and include componentStack.” Another common error is asking for a fallback UI without behavior, like “show an error message,” rather than “show a fallback with a Try again button that calls reset and preserves navigation.” Teams also forget to specify placement; “add it globally” is often worse than “wrap the dashboard route and the chart widget only.” Finally, people assume it will catch async and event-handler failures automatically, so you should explicitly request patterns for try/catch + reporter calls in those areas.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this React error boundary prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for tiny one-page prototypes where a full package (adapters, tests, edge-case guidance) is more overhead than value. It also won’t help if you need backend retries or data-layer resilience, because error boundaries only address certain UI failure modes. And if your team refuses to wire in monitoring or write tests, frankly you won’t get the main payoff. In those cases, start with a minimal boundary wrapper and add observability once you can support it.</p>
<!-- /wp:paragraph -->
</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this React error boundary AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Frontend Tech Leads use this to standardize how failures are contained across routes, features, and widgets so on-call incidents don’t become full-site outages. Staff/Principal Engineers rely on it to design a package-level pattern (reporting adapters, clean APIs, tests) that multiple teams can adopt without bikeshedding. QA Automation Engineers benefit because the prompt includes realistic unit and integration test approaches for fallback rendering and reset behavior. Product Engineers use it to ship user-friendly recovery UX, not just developer-centric error messages."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this React error boundary AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SaaS platforms get big wins because complex dashboards often include many independent widgets, and isolating one failure prevents churn-inducing “blank screens.” E-commerce teams use it to protect revenue paths by placing boundaries around risky UI pieces like recommendations, reviews, and third-party payment elements while keeping the cart usable. Fintech and insurance products value the telemetry and incident-friendly reporting because compliance-heavy teams need clearer audit trails of what broke and when. Media and content sites use boundaries to keep article shells stable even if interactive embeds or personalization modules fail."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building a React error boundary package produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like \"Write me a React error boundary\" fails because it: lacks a multi-layer placement strategy (route vs feature vs widget) so teams deploy it inconsistently, provides no accessible fallback requirements so you get generic panels that frustrate users, ignores monitoring integration details so errors never reach the pipeline with useful context, produces a toy component instead of a reusable package with adapters and examples, and misses edge-case guidance for async errors, event handlers, SSR, and StrictMode."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this React error boundary prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, customize it by specifying your app type (for example: “Next.js SSR app” vs “Vite SPA”), your error logging service (Sentry, Datadog, custom endpoint), and your preferred UI library (MUI, Chakra, Tailwind, or no dependency). You can also tell it which recovery patterns you allow, such as “reset on route change,” “retry once,” or “never auto-retry.” A practical follow-up is: “Adapt the package for a Next.js App Router app, include an ErrorBoundary per route segment, and send reports to Sentry with userId, accountId, and release SHA.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this React error boundary prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving your monitoring requirements vague; instead of “log it somewhere,” say “send to Sentry with tags {routeId, featureFlag, releaseSha} and include componentStack.” Another common error is asking for a fallback UI without behavior, like “show an error message,” rather than “show a fallback with a Try again button that calls reset and preserves navigation.” Teams also forget to specify placement; “add it globally” is often worse than “wrap the dashboard route and the chart widget only.” Finally, people assume it will catch async and event-handler failures automatically, so you should explicitly request patterns for try/catch + reporter calls in those areas."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this React error boundary prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for tiny one-page prototypes where a full package (adapters, tests, edge-case guidance) is more overhead than value. It also won’t help if you need backend retries or data-layer resilience, because error boundaries only address certain UI failure modes. And if your team refuses to wire in monitoring or write tests, frankly you won’t get the main payoff. In those cases, start with a minimal boundary wrapper and add observability once you can support it."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>UI reliability is a growth lever, not just an engineering nice-to-have. Paste this prompt into your AI tool, generate the package, and ship a React app that fails safely instead of failing loudly.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5001438.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Run a Website Technical Audit Checklist AI Prompt</title>
		<link>https://flowpast.com/prompts/run-a-website-technical-audit-checklist-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:46:10 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5002243</guid>

					<description><![CDATA[Site issues hurt sales - a ready-to-use AI Prompt that outputs a prioritized technical audit checklist for speed, mobile, HTTPS, and WCAG. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: technical audit checklist -->
<div class="hook-introduction">

<p>Your website can look fine and still leak revenue. A slow homepage, a broken mobile menu, mixed-content warnings, or missing accessibility basics quietly push people to bounce (and they’re hard to spot without a process). Most teams “fix things as they notice them,” which is honestly how issues linger for months.</p>



<p>This <strong>technical audit checklist</strong> is built for <strong>marketing managers</strong> who need a clear dev handoff before a campaign push, <strong>site owners</strong> trying to pinpoint why conversions dipped after a theme/plugin change, and <strong>consultants</strong> who must deliver a credible technical audit without turning it into a six-week engagement. The output is a prioritized, checkbox-based audit across speed, mobile, HTTPS/security, accessibility (WCAG-related checks), and overall site health, plus a “next 48 hours” punch list.</p>

</div>

<div class="what-and-when-section">

<h2 class="wp-block-heading">What Does This AI Prompt Do and When to Use It?</h2>



<table class="solution-results-table three-column" role="presentation" aria-label="What this prompt does, when to use it, and what you get">
 <thead>
    <tr>
      <th scope="col">What This Prompt Does</th>
      <th scope="col">When to Use This Prompt</th>
      <th scope="col">What You&#8217;ll Get</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <ul class="automation-list">
          <li>It reviews the site at your provided URL and organizes findings across speed, mobile responsiveness, HTTPS/security, accessibility, and general health checks.</li>
          <li>It writes each finding as an action item with “what to check,” “why it matters,” and “how to fix it,” instead of generic best practices.</li>
          <li>It assigns a severity/impact rating (Critical/High/Medium/Low) and calls out the expected benefit so you can sequence work logically.</li>
          <li>It uses checkbox formatting in every section, making it easy to paste into a ticketing system or share as a remediation checklist.</li>
          <li>When live testing isn’t possible, it clearly separates inferences from items that must be verified with tools (PageSpeed Insights, Lighthouse, Search Console, etc.).</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>Your site feels “slow,” but you need a prioritized plan before asking a developer to optimize anything.</li>
          <li>You’re preparing for a launch, migration, or big traffic event and want to reduce preventable technical failures.</li>
          <li>Mobile conversions are lagging desktop, and you suspect layout shifts, tap target issues, or responsiveness bugs.</li>
          <li>You’ve seen browser warnings (not secure, mixed content) or you’re tightening trust signals for paid traffic and SEO.</li>
          <li>You’re scaling content and campaigns and need an ongoing technical baseline so small issues don’t snowball.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A multi-section technical audit checklist with 30–60 checkbox items (volume varies by site complexity).</li>
           <li>Severity-ranked findings (Critical/High/Medium/Low) with a short “expected outcome” note for each.</li>
           <li>Implementation-ready fix guidance, including tool suggestions and configuration examples where relevant.</li>
           <li>A “Next 48 hours” punch list containing the highest-impact remediation steps.</li>
           <li>A short set of follow-up questions and verification steps if the URL is invalid, blocked, or requires login.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

<div class="prompt-display-section">

<h2 class="wp-block-heading">The Full AI Prompt: Prioritized Website Technical Audit Checklist</h2>



<div class="prompt-viewer-wrapper" id="prompt-section">
    <div class="prompt-comparison-row prompt-premium">
        <!-- Header with buttons -->
        <div class="prompt-row-header">
            <!-- <span class="prompt-row-icon">✨</span> -->
            <span class="prompt-row-title">
                                    Step 1: Customize the prompt with your input
                            </span>
            <div class="prompt-header-buttons">
                                    <button class="prompt-header-btn prompt-header-reset" onclick="resetPrompt()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                                <button class="prompt-header-btn prompt-header-copy-green flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span>Customize and Copy Full Prompt</span>
                </button>
            </div>
        </div>

        <!-- Customize the Prompt Section -->
                    <div class="prompt-customize-section">
                <span class="customize-title">Customize the Prompt</span>
                <p class="customize-subtitle">Fill in the fields below to personalize this prompt for your needs.</p>
                <table class="customize-table">
                    <thead>
                        <tr>
                            <th>Variable</th>
                            <th>What to Enter</th>
                            <th>Customise the prompt</th>
                        </tr>
                    </thead>
                    <tbody>
                                                    <tr>
                                <td class="var-name"><code>[COMPANY_DOCUMENTS]</code></td>
                                <td class="var-desc">
                                    List the employment-related documents to be reviewed, such as contracts, policies, handbooks, or any other relevant materials.                                    <div class="var-example">For example: "Employee handbook, standard employment contracts, grievance procedure documentation, contractor agreements, and remote work policies."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[COMPANY_DOCUMENTS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[REGIONAL_LABOR_LAWS]</code></td>
                                <td class="var-desc">
                                    Provide the specific national and local labor laws, statutes, or regulations applicable to the jurisdictions under review.                                    <div class="var-example">For example: "United States: Fair Labor Standards Act (FLSA), Title VII of the Civil Rights Act; Germany: Arbeitszeitgesetz (Working Hours Act), Allgemeines Gleichbehandlungsgesetz (General Equal Treatment Act)."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[REGIONAL_LABOR_LAWS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[INDUSTRY_WORKFORCE_COMPOSITION]</code></td>
                                <td class="var-desc">
                                    Describe the composition of the workforce, including types of workers (e.g., full-time, part-time, contractors), their roles, and any unique employment arrangements.                                    <div class="var-example">For example: "The workforce includes 200 full-time employees, 50 part-time employees, and 30 independent contractors, with roles spanning manufacturing, logistics, and administrative support."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[INDUSTRY_WORKFORCE_COMPOSITION]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[JURISDICTIONS]</code></td>
                                <td class="var-desc">
                                    List the geographic regions or countries where the organization operates and where labor compliance needs to be assessed.                                    <div class="var-example">For example: "United States, Germany, India, and Brazil."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[JURISDICTIONS]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[PRIMARY_GOAL]</code></td>
                                <td class="var-desc">
                                    State the main objective of the audit, such as identifying compliance gaps, resolving conflicts between ILO conventions and local laws, or developing a remediation plan.                                    <div class="var-example">For example: "Identify discrepancies between company policies and ILO conventions, and recommend corrective actions to ensure compliance with both ILO standards and local labor laws."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[PRIMARY_GOAL]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[TIMEFRAME]</code></td>
                                <td class="var-desc">
                                    Specify the timeline for completing the labor compliance audit and delivering the final report.                                    <div class="var-example">For example: "Four weeks from the start of the audit process."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[TIMEFRAME]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                            </tbody>
                </table>

                <button class="copy-customized-btn flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span class="copy-customized-text">Customise the prompt now</span>
                </button>
            </div>
        
        <!-- Full Prompt Code Header -->
                    <div class="prompt-code-header">
                <span class="prompt-code-title">
                    Step 2: Copy the Prompt
                </span>
                <div class="prompt-code-buttons">
                    <!-- Reset: Only visible when unlocked -->
                    <button class="prompt-header-btn prompt-header-reset btn-when-unlocked" onclick="resetPrompt()" style="display: none;">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                    <!-- Copy Full Prompt -->
                    <button class="prompt-header-btn prompt-header-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                            <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                        </svg>
                        <span>Copy Full Prompt</span>
                    </button>
                </div>
            </div>
        

        <!-- Prompt Content -->
        <div class="prompt-box prompt-gated-wrapper">
            <!-- Gated: Blurred content -->
            <div class="prompt-gated-content">
                <div class="prompt-header-visible">OBJECTIVE</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PERSONA</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">CONSTRAINTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PROCESS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">INPUTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">OUTPUT SPECIFICATION</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">1) Executive Overview</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">2) Standards Map (ILO + Local Law Crosswalk)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">3) Phase A — Document Examination Results</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">4) Phase B — Gap &amp; Risk Analysis</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">5) Priority Matrix (Critical Issues Triage)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">6) Phase C — Remediation &amp; Control Plan</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">7) Contractor / Remote / Cross-Border Addendum (if in scope)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">8) Appendix</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">QUALITY CHECKS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div>            </div>
            <!-- Unlocked: Full content (hidden by default) -->
            <div class="prompt-content-full" id="premium-prompt-content" style="display: none;">
                ## OBJECTIVE
Produce a formal labor-standards compliance audit that crosswalks an organization’s employment documents and real-world practices against (a) relevant ILO Conventions and (b) applicable national/local labor rules across the jurisdictions provided. The deliverable must surface practical implementation gaps, highlight conflicts between standards, and lay out a prioritized remediation plan with citations, timelines, and monitoring controls.

## PERSONA
Act as a veteran labor compliance examiner who previously conducted field investigations for an international labor-body and now specializes in multi-country audits. You write with clinical clarity, strong legal referencing habits, and an operations-first mindset (what happens in practice, not just what’s written). You assume failures often come from ambiguity and inconsistent rollout—not intent—so you focus on precise fixes.

## CONSTRAINTS
- Cite ILO sources with specificity (Convention number + relevant article[s]) in brackets: e.g., **[ILO C087, Art. 2]**.
- Cite local law references similarly in brackets using what the user provides (statute name/section/article, decree number, etc.).
- Where ILO guidance and local law diverge, call out the conflict and recommend the more protective/higher standard unless the user explicitly instructs otherwise.
- Concentrate on high-exposure domains:
  - wage computation and deductions
  - working time and overtime
  - discrimination/harassment and equal opportunity
  - freedom of association / collective bargaining
- No vague conclusions (e.g., “ensure compliance”). Every finding must include a concrete corrective action.
- Rank recommendations by (1) legal/regulatory risk and (2) execution difficulty.
- Include “quick containment” actions plus deeper system changes.
- Address contractors, remote staff, cross-border employment, and third-party labor where applicable.
- **What This Is NOT**
  - Not formal legal representation or jurisdiction-specific legal advice beyond the supplied laws/documents.
  - Not an HR policy rewrite in full (only targeted redlines or clause-level suggestions when needed).
  - Not a full payroll audit with recalculation unless the user provides payroll data and requests it.

## PROCESS
1. **Pre-analysis confirmation (required):** Restate your understanding of the company footprint, worker types, and jurisdictions; list the ILO conventions you expect to be implicated; and name any missing inputs you need.
2. **Phase A — Evidence &amp; Document Examination:**  
   Review contracts, handbook/policies, SOPs, contractor templates, remote-work terms, and any enforcement materials (disciplinary process, grievance channels, timekeeping rules). Map each area to ILO requirements and the provided local laws.
3. **Phase B — Variance &amp; Root-Cause Findings:**  
   Identify mismatches between (i) written policy, (ii) likely day-to-day practice implied by the documents, and (iii) ILO/local requirements. Separate:
   - immediate non-compliance (clear breach)
   - structural weaknesses (ambiguity, missing controls, inconsistent application)
4. **Phase C — Corrective Program Design:**  
   Provide a prioritized remediation plan with:
   - specific actions and owners
   - suggested clause-level fixes (where relevant)
   - timeline bands (near-term vs medium vs long-range)
   - monitoring and evidence trails (what to measure, how often, and what records prove compliance)
5. **Edge-case handling:**  
   If inputs are incomplete, do not guess. Mark items as **“Assessment Pending”**, state what’s missing, and provide interim risk controls that can be implemented without additional data.

## INPUTS
- **Company documents (contracts, policies, handbooks, SOPs, templates):** [COMPANY_DOCUMENTS]
- **Applicable national/local labor laws (all jurisdictions in scope):** [REGIONAL_LABOR_LAWS]
- **Industry + workforce profile (roles, headcount, worker categories, locations, remote/cross-border/contractor use):** [INDUSTRY_WORKFORCE_COMPOSITION]
- **Primary jurisdictions to cover (countries/regions/sites):** [JURISDICTIONS]
- **Audit purpose and priority outcomes (e.g., regulator readiness, acquisition diligence, internal controls):** [PRIMARY_GOAL]
- **Time constraints for remediation planning (if any):** [TIMEFRAME]

## OUTPUT SPECIFICATION
Deliver a **formal compliance report** with bold section headers, bullet-point findings, numbered recommendations, and bracketed citations.

### 1) Executive Overview
- {Audit Scope Summary}
- {Top Risks Snapshot} (3–7 items)
- {Immediate Containment Actions} (if any)

### 2) Standards Map (ILO + Local Law Crosswalk)
Provide a table:
- {Compliance Domain}
- {Relevant ILO Convention/Article}
- {Relevant Local Law Citation}
- {Company Document Reference}
- {Required Standard (Higher-of-Two Note)}
- {Initial Status (Compliant / Partial / Non-Compliant / Assessment Pending)}

### 3) Phase A — Document Examination Results
For each domain (wages, working time, discrimination, collective bargaining, plus any additional triggered areas), include:
- {What the documents say} (quote or clause reference)
- {Where it applies} (worker types, jurisdictions, contractor/remote relevance)
- {Control gaps} (missing definitions, enforcement steps, recordkeeping)

### 4) Phase B — Gap &amp; Risk Analysis
For each finding, include:
- {Finding Title}
- {Observed/Implied Practice Risk}
- {ILO Basis} [ILO …]
- {Local Law Basis} [Local …]
- {Conflict Note} (if standards differ)
- {Risk Rating} (High/Med/Low)
- {Impact Pathway} (penalties, backpay, injunctions, reputational, operational disruption)
- {Root Cause Hypothesis} (policy ambiguity, training gap, vendor control weakness, etc.)

### 5) Priority Matrix (Critical Issues Triage)
Include a matrix table:
- {Issue}
- {Risk Level}
- {Required Action Window} (e.g., 0–30 days / 31–90 / 91–180 / 180+)
- {Execution Complexity}
- {Owner/Function}
- {Proof of Fix}

### 6) Phase C — Remediation &amp; Control Plan
Numbered list of recommendations, each with:
1. {Corrective Action}
2. {Legal/Standards Citation} [ILO …] [Local …]
3. {Implementation Steps}
4. {Timeline}
5. {Dependencies}
6. {Monitoring Mechanism} (KPIs, audits, grievance metrics, timekeeping checks)
7. {Evidence to Retain} (records, acknowledgments, logs, committee minutes, etc.)

### 7) Contractor / Remote / Cross-Border Addendum (if in scope)
- {Third-Party Labor Risks}
- {Contract Clauses to Add or Tighten}
- {Onboarding/Training/Monitoring Requirements}
- {Jurisdictional Triggers} (permanent establishment, local registration, mandatory benefits, etc.)

### 8) Appendix
- {Document Index Reviewed}
- {Open Questions / Missing Inputs}
- {Assumptions Log} (only if the user authorizes assumptions)

## QUALITY CHECKS
Before finalizing, verify:
- All non-trivial claims are backed by at least one bracketed ILO reference and/or provided local-law citation.
- Every identified gap includes a specific corrective action, an owner, and measurable proof-of-fix.
- Conflicts between ILO and local rules are explicitly flagged and the recommended standard is justified.
- The priority matrix aligns with the remediation plan (no “orphan” high-risk issues).
- Any ambiguity or missing data is labeled **Assessment Pending** with clear next-request items.            </div>
        </div>


    </div>

    <!-- CTA Row - Full width buttons -->
    <div class="prompt-cta-row">
        <button class="prompt-cta-btn prompt-cta-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
            </svg>
            <span class="cta-copy-text">Copy Full Prompt</span>
        </button>
    </div>
</div>

<style>
    /* Gated prompt states */
    .prompt-gated-wrapper {
        position: relative;
    }

    /* When unlocked - show full content, hide gated */
    body.flowpast-unlocked .prompt-gated-wrapper .prompt-gated-content {
        display: none;
    }

    body.flowpast-unlocked .prompt-gated-wrapper .prompt-content-full {
        display: block !important;
    }

    /* Show/hide elements based on unlock state */
    body.flowpast-unlocked .btn-when-unlocked {
        display: inline-flex !important;
    }

    .prompt-viewer-wrapper {
        scroll-margin-top: 250px;
    }

    /* ========================================
   PROMPT VIEWER - MAIN WRAPPER
   ======================================== */
    .prompt-viewer-wrapper {
        margin: 30px 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* ========================================
   PROMPT BOX CONTAINER
   ======================================== */
    .prompt-comparison-row {
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid #e0e0e0;
        background: #fff;
    }

    /* ========================================
   HEADER WITH BUTTONS
   ======================================== */
    .prompt-row-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
        flex-wrap: wrap;
    }

    .prompt-row-icon {
        font-size: 20px;
    }

    .prompt-row-title {
        font-weight: 600;
        font-size: 22px;
        color: #fff !important;
        text-decoration: underline
    }

    .prompt-header-buttons {
        margin-left: auto;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Header buttons */
    .prompt-header-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-header-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-header-copy:hover {
        background: #2a2a2a;
    }

    .prompt-header-copy.copied {
        background: #2e7d32;
    }

    .prompt-header-copy-green {
        background: #04AA6D !important;
        color: #fff !important;
    }

    .prompt-header-copy-green:hover {
        background: #039860 !important;
    }

    .prompt-header-copy-green.copied {
        background: #2e7d32 !important;
    }

    .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-header-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-1px);
    }

    /* ========================================
   PROMPT CONTENT - FULL (NO SCROLL)
   ======================================== */
    .prompt-box {
        background: #ffffff;
    }

    .prompt-content-full {
        padding: 24px;
        margin: 0;
        color: #202124;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.7;
        white-space: pre-wrap;
        word-wrap: break-word;
        /* No scroll - show full content */
        max-height: none;
        overflow: visible;
    }

    /* Highlighted variable in prompt */
    .prompt-variable {
        background: #fff3cd;
        color: #1967d2;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #ffc107;
    }

    .prompt-variable-filled {
        background: #d4edda;
        color: #155724;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #28a745;
    }

    /* ========================================
   GATED CONTENT (NO ACCESS)
   ======================================== */
    .prompt-gated-content {
        padding: 24px;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.8;
        max-height: none;
        overflow: visible;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        cursor: default;
    }

    /* ## headers - larger, black */
    .prompt-header-visible {
        color: #202124;
        font-weight: 600;
        margin: 5px 0 0px 0;
        font-size: 20px;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    /* ### headers - smaller, black */
    .prompt-header-visible.subheader {
        color: #202124;
        font-weight: 600;
        margin: 5px 0;
        font-size: 18px;
    }

    .prompt-header-visible:first-child {
        margin-top: 0;
    }

    /* ========================================
   LOCKED SECTION BLOCK
   ======================================== */
    .locked-section {
        position: relative;
        margin: 4px 0 8px 0;
        border-radius: 6px;
        overflow: hidden;
        background: linear-gradient(110deg, #e2e8f0 8%, #f1f5f9 18%, #e2e8f0 33%);
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }

    .locked-section-bg {
        position: relative;
    }

    .locked-section-lines {
        padding: 8px 12px;
        position: relative;
    }

    .locked-line {
        height: 6px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 3px;
        margin-bottom: 4px;
        margin-left: 12px;
    }

    .locked-line:last-child {
        margin-bottom: 0;
    }

    .locked-section-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        font-size: 24px;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
    }

    /* Subheader locked sections - slightly indented */
    /*  .prompt-header-visible.subheader+.locked-section {
        margin-left: 16px;
    } */

    /* ========================================
   COMPATIBILITY BADGES
   ======================================== */
    .prompt-compatibility {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        background: #f8f9fa;
        border-top: 1px solid #e0e0e0;
    }

    .compat-label {
        font-size: 13px;
        color: #5f6368;
        font-weight: 500;
    }

    .compat-badge {
        padding: 4px 10px;
        background: #e8f0fe;
        color: #1967d2;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }

    /* ========================================
   CTA ROW - FULL WIDTH BUTTONS
   ======================================== */
    .prompt-cta-row {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .prompt-cta-btn {
        flex: 1;
        min-width: 200px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 24px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-cta-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-copy:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-copy.copied {
        background: #2e7d32;
    }

    .prompt-cta-reset {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-reset:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-cta-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    /* ========================================
    CUSTOMIZE YOUR PROMPT SECTION
    ======================================== */
    .prompt-customize-section {
        padding: 24px;
        border-bottom: 1px solid #e0e0e0;
        background: #fafbfc;
    }

    .customize-title {
        margin: 0 0 8px 0;
        font-size: 18px;
        font-weight: 700;
        color: #202124;
    }

    .customize-subtitle {
        margin: 0 0 20px 0;
        font-size: 14px;
        color: #5f6368;
    }

    .customize-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }

    .customize-table th {
        text-align: left;
        padding: 12px;
        background: #f1f3f4;
        border: 1px solid #e0e0e0;
        font-size: 13px;
        font-weight: 600;
        color: #202124;
    }

    .customize-table td {
        padding: 12px;
        border: 1px solid #e0e0e0;
        vertical-align: top;
    }

    .customize-table .var-name {
        width: 25%;
        background: #f8f9fa;
    }

    .customize-table .var-name code {
        background: #fff3cd;
        color: #1967d2;
        border: 1px solid #ffc107;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        word-break: break-all;
        font-weight: 600;
    }

    .customize-table .var-desc {
        width: 35%;
        font-size: 13px;
        color: #5f6368;
        line-height: 1.5;
    }

    .customize-table .var-example {
        margin-top: 8px;
        padding: 8px 10px;
        background: #f8f9fa;
        border-left: 3px solid #dadce0;
        font-size: 12px;
        color: #5f6368;
        font-style: italic;
        border-radius: 0 4px 4px 0;
    }

    .customize-table .var-input {
        width: 40%;
    }

    .customize-input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #dadce0;
        border-radius: 6px;
        font-size: 13px;
        font-family: inherit;
        resize: vertical;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .customize-input:focus {
        outline: none;
        border-color: rgb(5, 152, 98);
        box-shadow: 0 0 0 3px rgba(5, 152, 98, 0.1);
    }

    .customize-input::placeholder {
        color: #9aa0a6;
        font-style: italic;
    }

    .copy-customized-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 16px 24px;
        background: rgb(5, 152, 98);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .copy-customized-btn:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    .copy-customized-btn.copied {
        background: #2e7d32;
    }

    /* ========================================
    FULL PROMPT CODE HEADER
    ======================================== */
    .prompt-code-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
    }

    .prompt-code-title {
        font-size: 22px;
        font-weight: 600;
        text-decoration: underline;

    }

    .prompt-code-buttons {
        display: flex;
        gap: 8px;
    }

    .prompt-code-buttons .prompt-header-btn {
        padding: 8px 14px;
        font-size: 13px;
        background: #ffffff;
        color: #202124;
        border: 1px solid #dadce0;
    }

    .prompt-code-buttons .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
        border-color: rgb(5, 152, 98);
    }

    .prompt-code-buttons .prompt-header-btn.prompt-header-access:hover {
        background: rgb(4, 130, 83) !important;
        border-color: rgb(4, 130, 83);
        color: #fff !important;
    }

    .prompt-code-buttons .prompt-header-btn:hover {
        background: #f1f3f4;
    }

    .prompt-code-buttons .prompt-header-copy.copied {
        background: #d4edda;
        color: #155724;
        border-color: #28a745;
    }

    .prompt-header-reset {
        background: #ffffff;
        color: #202124;
    }

    /* ========================================
   RESPONSIVE
   ======================================== */
    @media (max-width: 768px) {
        .prompt-row-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .prompt-header-buttons {
            margin-left: 0;
            width: 100%;
        }

        .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }

        .prompt-cta-row {
            flex-direction: column;
        }

        .prompt-cta-btn {
            width: 100%;
        }

        /* Customize table responsive */
        .customize-table,
        .customize-table thead,
        .customize-table tbody,
        .customize-table tr,
        .customize-table th,
        .customize-table td {
            display: block;
        }

        .customize-table thead {
            display: none;
        }

        .customize-table tr {
            margin-bottom: 16px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            overflow: hidden;
        }

        .customize-table td {
            width: 100% !important;
            border: none;
            border-bottom: 1px solid #e0e0e0;
        }

        .customize-table td:last-child {
            border-bottom: none;
        }

        .customize-table .var-name {
            background: #f1f3f4;
            font-weight: 600;
        }

        .prompt-code-header {
            flex-direction: column;
            gap: 12px;
            align-items: flex-start;
        }

        .prompt-code-buttons {
            width: 100%;
        }

        .prompt-code-buttons .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }
    }
</style>

<script>
    function handlePromptCopy() {
        // Check if unlocked via cookie
        if (typeof window.flowpastIsUnlocked === 'function' && !window.flowpastIsUnlocked()) {
            // Show email popup
            if (typeof window.flowpastShowEmailPopup === 'function') {
                window.flowpastShowEmailPopup('prompt');
            }
            return;
        }

        // Copy the customized prompt (with filled variables)
        const customizedPrompt = getCustomizedPrompt();
        const copyButtons = document.querySelectorAll('.prompt-header-copy, .prompt-header-copy-green, .prompt-cta-copy, .copy-customized-btn');

        navigator.clipboard.writeText(customizedPrompt).then(() => {
            copyButtons.forEach(btn => {
                btn.classList.add('copied');
                const textSpan = btn.querySelector('span');
                if (textSpan) textSpan.textContent = 'Copied!';
            });

            setTimeout(() => {
                copyButtons.forEach(btn => {
                    btn.classList.remove('copied');
                    const textSpan = btn.querySelector('span');
                    if (textSpan) textSpan.textContent = 'Copy Full Prompt';
                });
            }, 2000);
        }).catch(err => {
            console.error('Failed to copy:', err);
        });
    }

    // Store original prompt for customization
    const originalPrompt = "## OBJECTIVE\r\nProduce a formal labor-standards compliance audit that crosswalks an organization\u2019s employment documents and real-world practices against (a) relevant ILO Conventions and (b) applicable national\/local labor rules across the jurisdictions provided. The deliverable must surface practical implementation gaps, highlight conflicts between standards, and lay out a prioritized remediation plan with citations, timelines, and monitoring controls.\r\n\r\n## PERSONA\r\nAct as a veteran labor compliance examiner who previously conducted field investigations for an international labor-body and now specializes in multi-country audits. You write with clinical clarity, strong legal referencing habits, and an operations-first mindset (what happens in practice, not just what\u2019s written). You assume failures often come from ambiguity and inconsistent rollout\u2014not intent\u2014so you focus on precise fixes.\r\n\r\n## CONSTRAINTS\r\n- Cite ILO sources with specificity (Convention number + relevant article[s]) in brackets: e.g., **[ILO C087, Art. 2]**.\r\n- Cite local law references similarly in brackets using what the user provides (statute name\/section\/article, decree number, etc.).\r\n- Where ILO guidance and local law diverge, call out the conflict and recommend the more protective\/higher standard unless the user explicitly instructs otherwise.\r\n- Concentrate on high-exposure domains:\r\n  - wage computation and deductions\r\n  - working time and overtime\r\n  - discrimination\/harassment and equal opportunity\r\n  - freedom of association \/ collective bargaining\r\n- No vague conclusions (e.g., \u201censure compliance\u201d). Every finding must include a concrete corrective action.\r\n- Rank recommendations by (1) legal\/regulatory risk and (2) execution difficulty.\r\n- Include \u201cquick containment\u201d actions plus deeper system changes.\r\n- Address contractors, remote staff, cross-border employment, and third-party labor where applicable.\r\n- **What This Is NOT**\r\n  - Not formal legal representation or jurisdiction-specific legal advice beyond the supplied laws\/documents.\r\n  - Not an HR policy rewrite in full (only targeted redlines or clause-level suggestions when needed).\r\n  - Not a full payroll audit with recalculation unless the user provides payroll data and requests it.\r\n\r\n## PROCESS\r\n1. **Pre-analysis confirmation (required):** Restate your understanding of the company footprint, worker types, and jurisdictions; list the ILO conventions you expect to be implicated; and name any missing inputs you need.\r\n2. **Phase A \u2014 Evidence & Document Examination:**  \r\n   Review contracts, handbook\/policies, SOPs, contractor templates, remote-work terms, and any enforcement materials (disciplinary process, grievance channels, timekeeping rules). Map each area to ILO requirements and the provided local laws.\r\n3. **Phase B \u2014 Variance & Root-Cause Findings:**  \r\n   Identify mismatches between (i) written policy, (ii) likely day-to-day practice implied by the documents, and (iii) ILO\/local requirements. Separate:\r\n   - immediate non-compliance (clear breach)\r\n   - structural weaknesses (ambiguity, missing controls, inconsistent application)\r\n4. **Phase C \u2014 Corrective Program Design:**  \r\n   Provide a prioritized remediation plan with:\r\n   - specific actions and owners\r\n   - suggested clause-level fixes (where relevant)\r\n   - timeline bands (near-term vs medium vs long-range)\r\n   - monitoring and evidence trails (what to measure, how often, and what records prove compliance)\r\n5. **Edge-case handling:**  \r\n   If inputs are incomplete, do not guess. Mark items as **\u201cAssessment Pending\u201d**, state what\u2019s missing, and provide interim risk controls that can be implemented without additional data.\r\n\r\n## INPUTS\r\n- **Company documents (contracts, policies, handbooks, SOPs, templates):** [COMPANY_DOCUMENTS]\r\n- **Applicable national\/local labor laws (all jurisdictions in scope):** [REGIONAL_LABOR_LAWS]\r\n- **Industry + workforce profile (roles, headcount, worker categories, locations, remote\/cross-border\/contractor use):** [INDUSTRY_WORKFORCE_COMPOSITION]\r\n- **Primary jurisdictions to cover (countries\/regions\/sites):** [JURISDICTIONS]\r\n- **Audit purpose and priority outcomes (e.g., regulator readiness, acquisition diligence, internal controls):** [PRIMARY_GOAL]\r\n- **Time constraints for remediation planning (if any):** [TIMEFRAME]\r\n\r\n## OUTPUT SPECIFICATION\r\nDeliver a **formal compliance report** with bold section headers, bullet-point findings, numbered recommendations, and bracketed citations.\r\n\r\n### 1) Executive Overview\r\n- {Audit Scope Summary}\r\n- {Top Risks Snapshot} (3\u20137 items)\r\n- {Immediate Containment Actions} (if any)\r\n\r\n### 2) Standards Map (ILO + Local Law Crosswalk)\r\nProvide a table:\r\n- {Compliance Domain}\r\n- {Relevant ILO Convention\/Article}\r\n- {Relevant Local Law Citation}\r\n- {Company Document Reference}\r\n- {Required Standard (Higher-of-Two Note)}\r\n- {Initial Status (Compliant \/ Partial \/ Non-Compliant \/ Assessment Pending)}\r\n\r\n### 3) Phase A \u2014 Document Examination Results\r\nFor each domain (wages, working time, discrimination, collective bargaining, plus any additional triggered areas), include:\r\n- {What the documents say} (quote or clause reference)\r\n- {Where it applies} (worker types, jurisdictions, contractor\/remote relevance)\r\n- {Control gaps} (missing definitions, enforcement steps, recordkeeping)\r\n\r\n### 4) Phase B \u2014 Gap & Risk Analysis\r\nFor each finding, include:\r\n- {Finding Title}\r\n- {Observed\/Implied Practice Risk}\r\n- {ILO Basis} [ILO \u2026]\r\n- {Local Law Basis} [Local \u2026]\r\n- {Conflict Note} (if standards differ)\r\n- {Risk Rating} (High\/Med\/Low)\r\n- {Impact Pathway} (penalties, backpay, injunctions, reputational, operational disruption)\r\n- {Root Cause Hypothesis} (policy ambiguity, training gap, vendor control weakness, etc.)\r\n\r\n### 5) Priority Matrix (Critical Issues Triage)\r\nInclude a matrix table:\r\n- {Issue}\r\n- {Risk Level}\r\n- {Required Action Window} (e.g., 0\u201330 days \/ 31\u201390 \/ 91\u2013180 \/ 180+)\r\n- {Execution Complexity}\r\n- {Owner\/Function}\r\n- {Proof of Fix}\r\n\r\n### 6) Phase C \u2014 Remediation & Control Plan\r\nNumbered list of recommendations, each with:\r\n1. {Corrective Action}\r\n2. {Legal\/Standards Citation} [ILO \u2026] [Local \u2026]\r\n3. {Implementation Steps}\r\n4. {Timeline}\r\n5. {Dependencies}\r\n6. {Monitoring Mechanism} (KPIs, audits, grievance metrics, timekeeping checks)\r\n7. {Evidence to Retain} (records, acknowledgments, logs, committee minutes, etc.)\r\n\r\n### 7) Contractor \/ Remote \/ Cross-Border Addendum (if in scope)\r\n- {Third-Party Labor Risks}\r\n- {Contract Clauses to Add or Tighten}\r\n- {Onboarding\/Training\/Monitoring Requirements}\r\n- {Jurisdictional Triggers} (permanent establishment, local registration, mandatory benefits, etc.)\r\n\r\n### 8) Appendix\r\n- {Document Index Reviewed}\r\n- {Open Questions \/ Missing Inputs}\r\n- {Assumptions Log} (only if the user authorizes assumptions)\r\n\r\n## QUALITY CHECKS\r\nBefore finalizing, verify:\r\n- All non-trivial claims are backed by at least one bracketed ILO reference and\/or provided local-law citation.\r\n- Every identified gap includes a specific corrective action, an owner, and measurable proof-of-fix.\r\n- Conflicts between ILO and local rules are explicitly flagged and the recommended standard is justified.\r\n- The priority matrix aligns with the remediation plan (no \u201corphan\u201d high-risk issues).\r\n- Any ambiguity or missing data is labeled **Assessment Pending** with clear next-request items.";
    const variables = ["[COMPANY_DOCUMENTS]","[REGIONAL_LABOR_LAWS]","[INDUSTRY_WORKFORCE_COMPOSITION]","[JURISDICTIONS]","[PRIMARY_GOAL]","[TIMEFRAME]"];
    // Initial render with highlighted variables
    document.addEventListener('DOMContentLoaded', function() {
        renderPromptWithHighlights();
    });

    // Live update prompt as user types
    document.querySelectorAll('.customize-input').forEach(input => {
        input.addEventListener('input', renderPromptWithHighlights);
    });

    function renderPromptWithHighlights() {
        const promptContent = document.getElementById('premium-prompt-content');
        if (!promptContent) return;

        let updatedPrompt = originalPrompt;
        let filledVariables = {};

        // Collect filled values
        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                filledVariables[placeholder] = value;
            }
        });

        // Replace filled variables and highlight remaining
        let htmlContent = escapeHtml(updatedPrompt);

        variables.forEach(placeholder => {
            const escapedPlaceholder = escapeHtml(placeholder);
            const regex = new RegExp(escapeRegex(escapedPlaceholder), 'g');

            if (filledVariables[placeholder]) {
                // Show filled value with green highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable-filled">' + escapeHtml(filledVariables[placeholder]) + '</span>'
                );
            } else {
                // Show original placeholder with yellow highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable">' + escapedPlaceholder + '</span>'
                );
            }
        });

        promptContent.innerHTML = htmlContent;
    }

    function escapeRegex(string) {
        return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    }

    function escapeHtml(text) {
        const div = document.createElement('div');
        div.textContent = text;
        return div.innerHTML;
    }

    function resetPrompt() {
        // Clear all input fields
        document.querySelectorAll('.customize-input').forEach(input => {
            input.value = '';
        });

        // Re-render with original placeholders highlighted
        renderPromptWithHighlights();

        // Visual feedback
        const resetBtns = document.querySelectorAll('.prompt-header-reset, .prompt-cta-reset');
        resetBtns.forEach(btn => {
            const originalText = btn.querySelector('span').textContent;
            btn.querySelector('span').textContent = 'Reset!';
            setTimeout(() => {
                btn.querySelector('span').textContent = originalText;
            }, 1000);
        });
    }


    function getCustomizedPrompt() {
        let updatedPrompt = originalPrompt;

        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                const regex = new RegExp(escapeRegex(placeholder), 'g');
                updatedPrompt = updatedPrompt.replace(regex, value);
            }
        });

        return updatedPrompt;
    }
</script>

</div>

<div class="pro-tips-section">

<h2 class="wp-block-heading">Pro Tips for Better AI Prompt Results</h2>



<ul class="wp-block-list">

<li><strong>Give a real URL and a test path, not just the homepage.</strong> If your money page is <em>/pricing</em> or <em>/checkout</em>, include that in your context so the checklist reflects the pages that matter. Try: “Audit https://example.com and prioritize issues impacting /pricing and /checkout on mobile.”</li>


<li><strong>Add business context so prioritization matches reality.</strong> Use the optional context field to say what “success” looks like (lead gen, bookings, ecommerce) and what changed recently. A helpful add-on prompt is: “Given this is a Shopify store, prioritize fixes that reduce cart abandonment and improve Core Web Vitals.”</li>


<li><strong>Ask for tool-specific verification steps.</strong> The prompt already flags what must be verified, but you can make it sharper by requesting exact checks. For example: “For every ‘verify with tools’ item, specify the exact Lighthouse metric or Search Console report to review, plus pass/fail thresholds.”</li>


<li><strong>Iterate with two passes: triage, then implementation.</strong> After the first output, ask: “Now rewrite the Critical and High items as Jira tickets with acceptance criteria, reproduction steps (if relevant), and an estimated effort (S/M/L).” You’ll get something a developer can act on immediately.</li>


<li><strong>Force tradeoffs when you’re resource-constrained.</strong> If you only have one sprint, make the model choose. Use: “Assume we have 8 developer-hours this week. Pick the top 5 actions with the best impact-to-effort ratio and explain the reasoning in one sentence each.”</li>

</ul>

</div>

<div class="related-prompts-section">

<h2 class="wp-block-heading">Related Prompts</h2>



<p>Once your technical checklist is drafted, these prompts can help you schedule the work and keep execution from drifting.</p>



<p>If you also need a realistic plan for knocking out the “next 48 hours” items without derailing everything else, <a href="https://flowpast.com/prompts/create-a-daily-time-block-schedule-with-this-ai-prompt/">Create a Daily Time-Block Schedule with this AI Prompt</a> is a clean companion. It’s especially useful when the audit produces cross-functional tasks (dev fixes, content tweaks, QA checks) and you want a day-by-day layout.</p>



<p>For teams doing recurring site maintenance, <a href="https://flowpast.com/prompts/build-a-daily-time-blocked-schedule-with-this-ai-prompt/">Build a Daily Time-Blocked Schedule with this AI Prompt</a> helps you turn “we should monitor this weekly” into an actual routine. Pair it with your audit by time-blocking ongoing verification like Lighthouse retests, broken-link scans, and accessibility spot checks.</p>



<p>When you’re planning a full remediation sprint (or a week of cleanup before a launch), <a href="https://flowpast.com/prompts/build-a-7-day-time-blocking-template-ai-prompt/">Build a 7-Day Time-Blocking Template AI Prompt</a> is the simplest way to map tasks to specific days. It pairs well with the severity ratings from the audit, so Critical items land early and QA is not an afterthought.</p>


<br>


<p>Quick reference:</p>



<ul class="wp-block-list">

<li><a href="https://flowpast.com/prompts/create-a-daily-time-block-schedule-with-this-ai-prompt/">Create a Daily Time-Block Schedule with this AI Prompt</a>: Plan your day around top fixes.</li>


<li><a href="https://flowpast.com/prompts/build-a-daily-time-blocked-schedule-with-this-ai-prompt/">Build a Daily Time-Blocked Schedule with this AI Prompt</a>: Turn maintenance into a daily routine.</li>


<li><a href="https://flowpast.com/prompts/build-a-7-day-time-blocking-template-ai-prompt/">Build a 7-Day Time-Blocking Template AI Prompt</a>: Schedule a one-week remediation sprint.</li>

<li><a href="https://flowpast.com/prompts/build-a-student-stress-reduction-plan-with-this-ai-prompt/">Build a Student Stress Reduction Plan with this AI Prompt</a>: Reduce overload while juggling deadlines.</li>


<li><a href="https://flowpast.com/prompts/build-a-student-risk-early-warning-system-ai-prompt/">Build a Student Risk Early-Warning System AI Prompt</a>: Flag risks before they become emergencies.</li>

</ul>
<!-- /wp:post-content -->
</div>

<div class="faq-section">
<!-- wp:heading {"level":2} -->
<h2 class="wp-block-heading">Common Questions</h2>
<!-- /wp:heading -->

<div class="faq-item">
<span class="question">Which roles benefit most from this technical audit checklist AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Marketing Managers</strong> use this to translate “the site feels slow” into a prioritized list a developer can implement before paid campaigns and launches. <strong>Technical SEO Specialists</strong> lean on it to structure audits around Core Web Vitals, mobile behavior, HTTPS, and crawl/index hygiene without missing basics. <strong>Freelance Web Developers</strong> use the checkbox format to scope work, estimate effort, and avoid vague requests like “make it faster.” <strong>Agency Consultants</strong> apply it when they need a credible, impact-ranked audit deliverable they can review with a client in one call.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this technical audit checklist AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>E-commerce brands</strong> get value because speed, mobile UX, and HTTPS trust signals directly affect add-to-cart and checkout completion; the “next 48 hours” list is perfect before a promotion. <strong>SaaS companies</strong> use it to tighten landing page performance and mobile responsiveness for demo requests and trial signups, where small delays can cut conversion rates. <strong>Professional services firms</strong> (law, accounting, clinics) benefit from accessibility and mobile checks that reduce friction for lead forms and appointment requests, especially on local-intent traffic. <strong>Publishers and content sites</strong> use it to improve load speed, reduce layout shift, and protect ad/analytics performance without breaking core templates.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for running a website technical audit checklist produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like “<em>Write me a technical SEO audit for my website</em>” fails because it: lacks a required scope (speed, mobile, HTTPS/security, accessibility, and health) so the output is random, provides no checkbox structure that you can execute, ignores severity/impact ranking so teams don’t know what to fix first, produces generic advice (“compress images”) instead of concrete checks and fixes (“convert hero JPG to AVIF; set long-cache headers for /assets/*”), and skips tool-verification guidance when the model can’t test the site live. This prompt forces a process: restated goal, categorized findings, prioritized actions, and a short punch list to start immediately.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this technical audit checklist prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes. The easiest way is to be specific with the input fields: use a precise <strong>[WEBSITE_URL]</strong> (include the exact path you care about), and use <strong>[CONTEXT]</strong> to describe your stack (WordPress, Shopify, Webflow), recent changes, and what “primary goal” means (leads, checkout, bookings). After you get the first checklist, run a follow-up like: “Rewrite only the Critical/High items for a WordPress site using Cloudflare, and include exact plugin/config suggestions.” If the site is behind login or blocks scanning, tell the model what it can assume and what you can provide (screenshots, Lighthouse reports, server headers).</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this technical audit checklist prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is leaving <strong>[WEBSITE_URL]</strong> too vague — instead of “my site,” use “https://example.com/pricing” or “https://example.com/checkout” so the audit targets high-impact pages. Another common error is skipping <strong>[CONTEXT]</strong>; “WordPress site” is thin, while “WordPress + Elementor, WooCommerce, Cloudflare, added a chat widget last week” leads to much more actionable fixes. People also forget to state the <strong>primary goal</strong>, which changes prioritization (e.g., lead form reliability vs. product page speed). Finally, some users treat the output as a legal accessibility certification; the prompt is a practical WCAG-oriented checklist, not a compliance opinion.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this technical audit checklist prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for penetration testing, legal compliance certification, or deep application security reviews, because it explicitly avoids those scopes. It’s also a poor fit if you need a full code rewrite plan or a complete UX/brand redesign; you’ll get engineering-focused remediation steps, not a creative replatform strategy. If you’re not ready to act on findings (no dev access, no budget, no sprint time), run a smaller diagnostic first using PageSpeed Insights and pick one bottleneck to fix.</p>
<!-- /wp:paragraph -->
</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this technical audit checklist AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Marketing Managers use this to translate “the site feels slow” into a prioritized list a developer can implement before paid campaigns and launches. Technical SEO Specialists lean on it to structure audits around Core Web Vitals, mobile behavior, HTTPS, and crawl/index hygiene without missing basics. Freelance Web Developers use the checkbox format to scope work, estimate effort, and avoid vague requests like “make it faster.” Agency Consultants apply it when they need a credible, impact-ranked audit deliverable they can review with a client in one call."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this technical audit checklist AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "E-commerce brands get value because speed, mobile UX, and HTTPS trust signals directly affect add-to-cart and checkout completion; the “next 48 hours” list is perfect before a promotion. SaaS companies use it to tighten landing page performance and mobile responsiveness for demo requests and trial signups, where small delays can cut conversion rates. Professional services firms (law, accounting, clinics) benefit from accessibility and mobile checks that reduce friction for lead forms and appointment requests, especially on local-intent traffic. Publishers and content sites use it to improve load speed, reduce layout shift, and protect ad/analytics performance without breaking core templates."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for running a website technical audit checklist produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me a technical SEO audit for my website” fails because it: lacks a required scope (speed, mobile, HTTPS/security, accessibility, and health) so the output is random, provides no checkbox structure that you can execute, ignores severity/impact ranking so teams don’t know what to fix first, produces generic advice (“compress images”) instead of concrete checks and fixes (“convert hero JPG to AVIF; set long-cache headers for /assets/*”), and skips tool-verification guidance when the model can’t test the site live. This prompt forces a process: restated goal, categorized findings, prioritized actions, and a short punch list to start immediately."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this technical audit checklist prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. The easiest way is to be specific with the input fields: use a precise [WEBSITE_URL] (include the exact path you care about), and use [CONTEXT] to describe your stack (WordPress, Shopify, Webflow), recent changes, and what “primary goal” means (leads, checkout, bookings). After you get the first checklist, run a follow-up like: “Rewrite only the Critical/High items for a WordPress site using Cloudflare, and include exact plugin/config suggestions.” If the site is behind login or blocks scanning, tell the model what it can assume and what you can provide (screenshots, Lighthouse reports, server headers)."
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this technical audit checklist prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving [WEBSITE_URL] too vague — instead of “my site,” use “https://example.com/pricing” or “https://example.com/checkout” so the audit targets high-impact pages. Another common error is skipping [CONTEXT]; “WordPress site” is thin, while “WordPress + Elementor, WooCommerce, Cloudflare, added a chat widget last week” leads to much more actionable fixes. People also forget to state the primary goal, which changes prioritization (e.g., lead form reliability vs. product page speed). Finally, some users treat the output as a legal accessibility certification; the prompt is a practical WCAG-oriented checklist, not a compliance opinion."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this technical audit checklist prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for penetration testing, legal compliance certification, or deep application security reviews, because it explicitly avoids those scopes. It’s also a poor fit if you need a full code rewrite plan or a complete UX/brand redesign; you’ll get engineering-focused remediation steps, not a creative replatform strategy. If you’re not ready to act on findings (no dev access, no budget, no sprint time), run a smaller diagnostic first using PageSpeed Insights and pick one bottleneck to fix."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>Technical issues don’t announce themselves. They just chip away at rankings, trust, and conversion rate. Paste this prompt into your AI tool, run the checklist, and start with the “next 48 hours” items while momentum is high.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5002243.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build an Ongoing SEO Monitoring Plan AI Prompt</title>
		<link>https://flowpast.com/prompts/build-an-ongoing-seo-monitoring-plan-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:45:05 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5002242</guid>

					<description><![CDATA[Rankings feel unpredictable - use this AI Prompt to build an ongoing SEO monitoring plan with cadence, 7 metrics, and next steps. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: SEO monitoring plan -->
<div class="hook-introduction">

<p>Rankings move, traffic dips, and suddenly everyone wants an explanation by tomorrow morning. The problem is most “SEO reporting” is really just a screenshot routine with no agreed cadence, no shared definitions, and no next steps. So you end up reacting, not managing.</p>



<p>This <strong>SEO monitoring plan</strong> is built for <strong>in-house SEO managers</strong> who need a repeatable way to brief leadership, <strong>marketing generalists</strong> juggling SEO alongside paid and email without dropping key signals, and <strong>agency consultants</strong> who want a clean monitoring blueprint to hand off after onboarding. The output is a practical cadence (weekly + monthly, with quarterly if needed), a 7-metric interpretation table using ▲/▼ trend symbols, and an implementation checklist you can put into motion immediately.</p>

</div>

<div class="what-and-when-section">

<h2 class="wp-block-heading">What Does This AI Prompt Do and When to Use It?</h2>



<table class="solution-results-table three-column" role="presentation" aria-label="What this prompt does, when to use it, and what you get">
 <thead>
    <tr>
      <th scope="col">What This Prompt Does</th>
      <th scope="col">When to Use This Prompt</th>
      <th scope="col">What You&#8217;ll Get</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <ul class="automation-list">
          <li>Restates the site context and monitoring goal in a short pre-analysis so the plan stays focused.</li>
          <li>Selects a review cadence that includes weekly and monthly touchpoints (and adds quarterly check-ins when it makes sense).</li>
          <li>Chooses exactly 7 SEO metrics that cover visibility, traffic quality, technical health, and engagement/conversions.</li>
          <li>Builds a clean interpretation table that assigns ▲ or ▼ based on what “better” means for each metric.</li>
          <li>Ends with an operational checklist that turns “we saw movement” into specific follow-up actions to investigate.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You’re about to start SEO work on a new site and want a baseline + ongoing rhythm before making changes.</li>
          <li>Rankings and clicks are unstable, and the team keeps asking “Is this technical, content, or authority?”</li>
          <li>You need a lightweight reporting system that a non-SEO stakeholder can understand without a 30-slide deck.</li>
          <li>Competitors are publishing aggressively, and you want early warning signals before traffic drops become painful.</li>
          <li>You’re scaling content production and want to spot quality issues (indexation, cannibalization, engagement) early.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A monitoring cadence with weekly and monthly tasks (plus quarterly items when relevant).</li>
           <li>A 7-row metrics interpretation table with trend symbols (▲/▼) and “what to check next” guidance.</li>
           <li>A short pre-analysis summary (2–3 sentences) that documents the site and the monitoring objective.</li>
           <li>A prioritized implementation checklist with do-this-next steps you can assign to a person or role.</li>
           <li>Clear assumptions called out when inputs are missing, so the plan remains usable and honest.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

<div class="prompt-display-section">

<h2 class="wp-block-heading">The Full AI Prompt: Ongoing SEO Monitoring Blueprint</h2>



<div class="prompt-viewer-wrapper" id="prompt-section">
    <div class="prompt-comparison-row prompt-premium">
        <!-- Header with buttons -->
        <div class="prompt-row-header">
            <!-- <span class="prompt-row-icon">✨</span> -->
            <span class="prompt-row-title">
                                    Step 1: Customize the prompt with your input
                            </span>
            <div class="prompt-header-buttons">
                                    <button class="prompt-header-btn prompt-header-reset" onclick="resetPrompt()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                                <button class="prompt-header-btn prompt-header-copy-green flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span>Customize and Copy Full Prompt</span>
                </button>
            </div>
        </div>

        <!-- Customize the Prompt Section -->
                    <div class="prompt-customize-section">
                <span class="customize-title">Customize the Prompt</span>
                <p class="customize-subtitle">Fill in the fields below to personalize this prompt for your needs.</p>
                <table class="customize-table">
                    <thead>
                        <tr>
                            <th>Variable</th>
                            <th>What to Enter</th>
                            <th>Customise the prompt</th>
                        </tr>
                    </thead>
                    <tbody>
                                                    <tr>
                                <td class="var-name"><code>[INDUSTRY]</code></td>
                                <td class="var-desc">
                                    Specify the industry or sector where the workplace operates. Include details about the type of work performed and any unique operational characteristics.                                    <div class="var-example">For example: "Manufacturing of automotive parts, involving assembly lines, welding stations, and robotic systems."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[INDUSTRY]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[CONTEXT]</code></td>
                                <td class="var-desc">
                                    Provide a brief overview of the workplace environment, including key operational details, safety concerns, and goals for the audit.                                    <div class="var-example">For example: "A mid-sized warehouse handling chemical storage and distribution, aiming to improve hazard identification and emergency response protocols."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[CONTEXT]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[WORKFORCE_SIZE_AND_AREAS]</code></td>
                                <td class="var-desc">
                                    State the number of workers, their roles, and the physical areas they occupy or interact with during work operations.                                    <div class="var-example">For example: "150 workers across three shifts, including forklift operators, inventory staff, and maintenance technicians working in a 50,000 sq. ft. warehouse."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[WORKFORCE_SIZE_AND_AREAS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[CHALLENGE]</code></td>
                                <td class="var-desc">
                                    Describe the main safety challenges or concerns facing the workplace, including any recurring issues or high-risk scenarios.                                    <div class="var-example">For example: "Frequent near-misses during loading dock operations due to poor visibility and inconsistent use of PPE."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[CHALLENGE]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[SAFETY_MATURITY_LEVEL]</code></td>
                                <td class="var-desc">
                                    Indicate the current level of safety culture maturity, ranging from basic compliance to proactive hazard prevention and continuous improvement.                                    <div class="var-example">For example: "Basic compliance with OSHA standards, but limited proactive measures and inconsistent safety training."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[SAFETY_MATURITY_LEVEL]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[WORKPLACE_LAYOUT]</code></td>
                                <td class="var-desc">
                                    Describe the physical layout of the workplace, including key areas, equipment locations, and any features that affect safety dynamics.                                    <div class="var-example">For example: "A multi-story facility with designated chemical storage zones, assembly lines, and shared corridors for workers and forklifts."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[WORKPLACE_LAYOUT]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[EXISTING_PROGRAMS]</code></td>
                                <td class="var-desc">
                                    List any current safety programs, procedures, or initiatives already in place at the workplace.                                    <div class="var-example">For example: "Monthly safety meetings, basic PPE requirements, and a lockout/tagout program for maintenance activities."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[EXISTING_PROGRAMS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[INCIDENT_HISTORY]</code></td>
                                <td class="var-desc">
                                    Provide details about past incidents, near-misses, or recurring safety issues, including dates, causes, and outcomes if available.                                    <div class="var-example">For example: "Two slip-and-fall incidents in the past year, both involving improperly cleaned spill areas in the loading dock."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[INCIDENT_HISTORY]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[RESOURCE_CONSTRAINTS]</code></td>
                                <td class="var-desc">
                                    Describe any limitations in budget, personnel, time, or tools that may affect the implementation of safety programs.                                    <div class="var-example">For example: "Limited budget for new equipment, with only one safety officer overseeing a multi-shift operation."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[RESOURCE_CONSTRAINTS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[TIMEFRAME]</code></td>
                                <td class="var-desc">
                                    Specify the desired timeline for completing the audit and implementing the recommended safety measures.                                    <div class="var-example">For example: "Three months to complete the audit and roll out initial corrective actions."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[TIMEFRAME]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                            </tbody>
                </table>

                <button class="copy-customized-btn flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span class="copy-customized-text">Customise the prompt now</span>
                </button>
            </div>
        
        <!-- Full Prompt Code Header -->
                    <div class="prompt-code-header">
                <span class="prompt-code-title">
                    Step 2: Copy the Prompt
                </span>
                <div class="prompt-code-buttons">
                    <!-- Reset: Only visible when unlocked -->
                    <button class="prompt-header-btn prompt-header-reset btn-when-unlocked" onclick="resetPrompt()" style="display: none;">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                    <!-- Copy Full Prompt -->
                    <button class="prompt-header-btn prompt-header-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                            <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                        </svg>
                        <span>Copy Full Prompt</span>
                    </button>
                </div>
            </div>
        

        <!-- Prompt Content -->
        <div class="prompt-box prompt-gated-wrapper">
            <!-- Gated: Blurred content -->
            <div class="prompt-gated-content">
                <div class="prompt-header-visible">OBJECTIVE</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PERSONA</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">CONSTRAINTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PROCESS</div><div class="prompt-header-visible subheader">1) Pre-Analysis (required before doing the work)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">2) Risk Fingerprint Discovery</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">3) Phase Blueprinting (dynamic)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">4) OSHA Alignment Layer</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">5) Deliverables Creation</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">6) Edge-Case Handling</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">INPUTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">OUTPUT SPECIFICATION</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">1) Task Understanding (Pre-Analysis)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">2) Phase Plan (3–15 phases)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">3) Risk Architecture Findings</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">4) OSHA-Aligned Audit Framework</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">5) Custom Audit Checklists (tailored)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">6) Implementation Roadmap</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">7) Optional Advanced Modules (only if justified)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">QUALITY CHECKS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div>            </div>
            <!-- Unlocked: Full content (hidden by default) -->
            <div class="prompt-content-full" id="premium-prompt-content" style="display: none;">
                ## OBJECTIVE
Build an adaptive, OSHA-grounded workplace safety audit experience that evolves from a compliance checklist into a proactive hazard-prevention system. The prompt must gather key workplace details, diagnose risk patterns, and then generate a phased audit-and-implementation program that scales with complexity and safety-culture maturity.

## PERSONA
Act as a **Workplace Safety Systems Designer** with **15 years of OSHA field-inspection experience**, shaped by investigating serious preventable incidents. You now create **predictive, worker-friendly audit systems** by analyzing facilities like an investigator reconstructing events from physical and behavioral clues. Your writing should be clear, practical, and firm—focused on preventing harm, not performing paperwork.

## CONSTRAINTS
- Use **OSHA standards as the baseline** and align outputs to typical OSHA inspection logic (hazard identification, controls, training, documentation, follow-up).
- Adapt the plan to:
  - industry and operational complexity
  - workforce size and layout
  - incident history and near-miss trends
  - maturity of the current safety culture
  - resource limits (people, time, budget, tools)
- Create a **dynamic phase count**:
  - simple compliance environments: **3–5 phases**
  - typical operations: **6–8 phases**
  - high-hazard settings: **9–12 phases**
  - complex industrial ecosystems: **13–15 phases**
- If any input is missing or unclear, **pause and ask targeted questions** rather than inventing specifics.
- **What This Is NOT**:
  - Not legal advice or a substitute for an OSHA compliance officer or attorney
  - Not a guarantee of regulatory outcomes
  - Not a one-size-fits-all checklist detached from actual operations
  - Not medical, industrial hygiene lab analysis, or engineering sign-off (though it can recommend when those are needed)

## PROCESS
### 1) Pre-Analysis (required before doing the work)
- Briefly restate what you believe the workplace situation is and what the user wants to achieve.
- List any missing inputs that block accuracy and ask concise follow-up questions.

### 2) Risk Fingerprint Discovery
- Interpret the workplace’s “risk fingerprint” (tasks, energy sources, exposures, human factors, process variability).
- Identify likely hidden hazard clusters and failure modes (e.g., maintenance windows, contractor overlap, shift handoffs).

### 3) Phase Blueprinting (dynamic)
- Choose the appropriate number of phases (3–15) based on complexity and maturity.
- Name each phase and define its purpose, inputs needed, and outputs produced.

### 4) OSHA Alignment Layer
- Map relevant OSHA focus areas and compliance obligations appropriate to the described environment.
- Translate compliance requirements into practical inspection and control checks workers can execute.

### 5) Deliverables Creation
- Produce:
  - a tailored audit framework
  - a customized checklist set (by hazard category)
  - an implementation roadmap with timelines, owners, and success measures
- Add optional advanced modules only if they match the user’s readiness and constraints.

### 6) Edge-Case Handling
- If the workplace is multi-site, high turnover, heavily contractor-driven, or has limited records:
  - propose a “minimum viable audit system” first
  - add an upgrade path once data quality improves

## INPUTS
- **Industry / workplace type:** [INDUSTRY]  
- **Workplace description (operations, major tasks, shifts):** [CONTEXT]  
- **Workforce size and number of work areas:** [WORKFORCE_SIZE_AND_AREAS]  
- **Top hazards, concerns, or recent incidents (include near-misses):** [CHALLENGE]  
- **Safety culture/program maturity (starting/basic/established/advanced):** [SAFETY_MATURITY_LEVEL]  
- **Layout and main operational zones (brief):** [WORKPLACE_LAYOUT]  
- **Existing safety programs/policies (or none):** [EXISTING_PROGRAMS]  
- **Incident summary from last 12 months (if available):** [INCIDENT_HISTORY]  
- **Resource constraints (time/people/tools):** [RESOURCE_CONSTRAINTS]  
- **Time horizon for rollout:** [TIMEFRAME]  

## OUTPUT SPECIFICATION
Provide the deliverable in this order and format:

### 1) Task Understanding (Pre-Analysis)
- {Interpretation Summary}
- {Assumptions}
- {Missing Info Questions}

### 2) Phase Plan (3–15 phases)
For each phase include:
- {Phase Number}
- {Phase Name}
- {Objective}
- {Who Is Involved}
- {Inputs Needed}
- {Actions}
- {Outputs/Artifacts}
- {Completion Criteria}

### 3) Risk Architecture Findings
- {Critical Risk Zones}
- {Hidden Hazard Patterns}
- {Compliance Gaps}
- {Quick Wins}
- {Longer-Term System Changes}

### 4) OSHA-Aligned Audit Framework
- {Relevant OSHA Focus Areas} (high-level, non-cited unless user requests citations)
- {Hazard Categories Customized To Workplace}
- {Inspection Rhythm} (frequency, triggers, sampling approach)
- {Worker-Friendly Execution Method} (how to make it doable on the floor)

### 5) Custom Audit Checklists (tailored)
Include sections:
- {Physical/Operational Hazards Checklist}
- {Administrative Controls Checklist}
- {Engineering Controls Checklist}
- {Training &amp; Competency Checklist}
- {Emergency Readiness Checklist}
- {Documentation &amp; Recordkeeping Checklist}

### 6) Implementation Roadmap
- {Immediate Actions Timeline} (roughly first 5–10 days)
- {Near-Term Buildout Timeline} (roughly first 3–5 weeks)
- {Stabilization &amp; Improvement Timeline} (roughly next 2–7 months)
- {Roles &amp; Ownership Model}
- {Metrics} (leading + lagging indicators)
- {Review &amp; Continuous Improvement Loop}

### 7) Optional Advanced Modules (only if justified)
Provide a short menu with:
- {Module Name}
- {When To Add It}
- {Benefit}
- {Effort Level}

## QUALITY CHECKS
Before finalizing, verify:
- OSHA alignment is present **without** pretending to provide legal determinations.
- The number of phases matches complexity and maturity (within the 3–15 bounds).
- Checklists are specific to the described tasks/areas, not generic filler.
- Recommendations respect stated constraints (time/people/tools).
- Any unknowns are flagged with clear follow-up questions instead of fabricated details.            </div>
        </div>


    </div>

    <!-- CTA Row - Full width buttons -->
    <div class="prompt-cta-row">
        <button class="prompt-cta-btn prompt-cta-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
            </svg>
            <span class="cta-copy-text">Copy Full Prompt</span>
        </button>
    </div>
</div>

<style>
    /* Gated prompt states */
    .prompt-gated-wrapper {
        position: relative;
    }

    /* When unlocked - show full content, hide gated */
    body.flowpast-unlocked .prompt-gated-wrapper .prompt-gated-content {
        display: none;
    }

    body.flowpast-unlocked .prompt-gated-wrapper .prompt-content-full {
        display: block !important;
    }

    /* Show/hide elements based on unlock state */
    body.flowpast-unlocked .btn-when-unlocked {
        display: inline-flex !important;
    }

    .prompt-viewer-wrapper {
        scroll-margin-top: 250px;
    }

    /* ========================================
   PROMPT VIEWER - MAIN WRAPPER
   ======================================== */
    .prompt-viewer-wrapper {
        margin: 30px 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* ========================================
   PROMPT BOX CONTAINER
   ======================================== */
    .prompt-comparison-row {
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid #e0e0e0;
        background: #fff;
    }

    /* ========================================
   HEADER WITH BUTTONS
   ======================================== */
    .prompt-row-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
        flex-wrap: wrap;
    }

    .prompt-row-icon {
        font-size: 20px;
    }

    .prompt-row-title {
        font-weight: 600;
        font-size: 22px;
        color: #fff !important;
        text-decoration: underline
    }

    .prompt-header-buttons {
        margin-left: auto;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Header buttons */
    .prompt-header-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-header-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-header-copy:hover {
        background: #2a2a2a;
    }

    .prompt-header-copy.copied {
        background: #2e7d32;
    }

    .prompt-header-copy-green {
        background: #04AA6D !important;
        color: #fff !important;
    }

    .prompt-header-copy-green:hover {
        background: #039860 !important;
    }

    .prompt-header-copy-green.copied {
        background: #2e7d32 !important;
    }

    .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-header-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-1px);
    }

    /* ========================================
   PROMPT CONTENT - FULL (NO SCROLL)
   ======================================== */
    .prompt-box {
        background: #ffffff;
    }

    .prompt-content-full {
        padding: 24px;
        margin: 0;
        color: #202124;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.7;
        white-space: pre-wrap;
        word-wrap: break-word;
        /* No scroll - show full content */
        max-height: none;
        overflow: visible;
    }

    /* Highlighted variable in prompt */
    .prompt-variable {
        background: #fff3cd;
        color: #1967d2;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #ffc107;
    }

    .prompt-variable-filled {
        background: #d4edda;
        color: #155724;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #28a745;
    }

    /* ========================================
   GATED CONTENT (NO ACCESS)
   ======================================== */
    .prompt-gated-content {
        padding: 24px;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.8;
        max-height: none;
        overflow: visible;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        cursor: default;
    }

    /* ## headers - larger, black */
    .prompt-header-visible {
        color: #202124;
        font-weight: 600;
        margin: 5px 0 0px 0;
        font-size: 20px;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    /* ### headers - smaller, black */
    .prompt-header-visible.subheader {
        color: #202124;
        font-weight: 600;
        margin: 5px 0;
        font-size: 18px;
    }

    .prompt-header-visible:first-child {
        margin-top: 0;
    }

    /* ========================================
   LOCKED SECTION BLOCK
   ======================================== */
    .locked-section {
        position: relative;
        margin: 4px 0 8px 0;
        border-radius: 6px;
        overflow: hidden;
        background: linear-gradient(110deg, #e2e8f0 8%, #f1f5f9 18%, #e2e8f0 33%);
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }

    .locked-section-bg {
        position: relative;
    }

    .locked-section-lines {
        padding: 8px 12px;
        position: relative;
    }

    .locked-line {
        height: 6px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 3px;
        margin-bottom: 4px;
        margin-left: 12px;
    }

    .locked-line:last-child {
        margin-bottom: 0;
    }

    .locked-section-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        font-size: 24px;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
    }

    /* Subheader locked sections - slightly indented */
    /*  .prompt-header-visible.subheader+.locked-section {
        margin-left: 16px;
    } */

    /* ========================================
   COMPATIBILITY BADGES
   ======================================== */
    .prompt-compatibility {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        background: #f8f9fa;
        border-top: 1px solid #e0e0e0;
    }

    .compat-label {
        font-size: 13px;
        color: #5f6368;
        font-weight: 500;
    }

    .compat-badge {
        padding: 4px 10px;
        background: #e8f0fe;
        color: #1967d2;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }

    /* ========================================
   CTA ROW - FULL WIDTH BUTTONS
   ======================================== */
    .prompt-cta-row {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .prompt-cta-btn {
        flex: 1;
        min-width: 200px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 24px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-cta-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-copy:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-copy.copied {
        background: #2e7d32;
    }

    .prompt-cta-reset {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-reset:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-cta-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    /* ========================================
    CUSTOMIZE YOUR PROMPT SECTION
    ======================================== */
    .prompt-customize-section {
        padding: 24px;
        border-bottom: 1px solid #e0e0e0;
        background: #fafbfc;
    }

    .customize-title {
        margin: 0 0 8px 0;
        font-size: 18px;
        font-weight: 700;
        color: #202124;
    }

    .customize-subtitle {
        margin: 0 0 20px 0;
        font-size: 14px;
        color: #5f6368;
    }

    .customize-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }

    .customize-table th {
        text-align: left;
        padding: 12px;
        background: #f1f3f4;
        border: 1px solid #e0e0e0;
        font-size: 13px;
        font-weight: 600;
        color: #202124;
    }

    .customize-table td {
        padding: 12px;
        border: 1px solid #e0e0e0;
        vertical-align: top;
    }

    .customize-table .var-name {
        width: 25%;
        background: #f8f9fa;
    }

    .customize-table .var-name code {
        background: #fff3cd;
        color: #1967d2;
        border: 1px solid #ffc107;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        word-break: break-all;
        font-weight: 600;
    }

    .customize-table .var-desc {
        width: 35%;
        font-size: 13px;
        color: #5f6368;
        line-height: 1.5;
    }

    .customize-table .var-example {
        margin-top: 8px;
        padding: 8px 10px;
        background: #f8f9fa;
        border-left: 3px solid #dadce0;
        font-size: 12px;
        color: #5f6368;
        font-style: italic;
        border-radius: 0 4px 4px 0;
    }

    .customize-table .var-input {
        width: 40%;
    }

    .customize-input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #dadce0;
        border-radius: 6px;
        font-size: 13px;
        font-family: inherit;
        resize: vertical;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .customize-input:focus {
        outline: none;
        border-color: rgb(5, 152, 98);
        box-shadow: 0 0 0 3px rgba(5, 152, 98, 0.1);
    }

    .customize-input::placeholder {
        color: #9aa0a6;
        font-style: italic;
    }

    .copy-customized-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 16px 24px;
        background: rgb(5, 152, 98);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .copy-customized-btn:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    .copy-customized-btn.copied {
        background: #2e7d32;
    }

    /* ========================================
    FULL PROMPT CODE HEADER
    ======================================== */
    .prompt-code-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
    }

    .prompt-code-title {
        font-size: 22px;
        font-weight: 600;
        text-decoration: underline;

    }

    .prompt-code-buttons {
        display: flex;
        gap: 8px;
    }

    .prompt-code-buttons .prompt-header-btn {
        padding: 8px 14px;
        font-size: 13px;
        background: #ffffff;
        color: #202124;
        border: 1px solid #dadce0;
    }

    .prompt-code-buttons .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
        border-color: rgb(5, 152, 98);
    }

    .prompt-code-buttons .prompt-header-btn.prompt-header-access:hover {
        background: rgb(4, 130, 83) !important;
        border-color: rgb(4, 130, 83);
        color: #fff !important;
    }

    .prompt-code-buttons .prompt-header-btn:hover {
        background: #f1f3f4;
    }

    .prompt-code-buttons .prompt-header-copy.copied {
        background: #d4edda;
        color: #155724;
        border-color: #28a745;
    }

    .prompt-header-reset {
        background: #ffffff;
        color: #202124;
    }

    /* ========================================
   RESPONSIVE
   ======================================== */
    @media (max-width: 768px) {
        .prompt-row-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .prompt-header-buttons {
            margin-left: 0;
            width: 100%;
        }

        .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }

        .prompt-cta-row {
            flex-direction: column;
        }

        .prompt-cta-btn {
            width: 100%;
        }

        /* Customize table responsive */
        .customize-table,
        .customize-table thead,
        .customize-table tbody,
        .customize-table tr,
        .customize-table th,
        .customize-table td {
            display: block;
        }

        .customize-table thead {
            display: none;
        }

        .customize-table tr {
            margin-bottom: 16px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            overflow: hidden;
        }

        .customize-table td {
            width: 100% !important;
            border: none;
            border-bottom: 1px solid #e0e0e0;
        }

        .customize-table td:last-child {
            border-bottom: none;
        }

        .customize-table .var-name {
            background: #f1f3f4;
            font-weight: 600;
        }

        .prompt-code-header {
            flex-direction: column;
            gap: 12px;
            align-items: flex-start;
        }

        .prompt-code-buttons {
            width: 100%;
        }

        .prompt-code-buttons .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }
    }
</style>

<script>
    function handlePromptCopy() {
        // Check if unlocked via cookie
        if (typeof window.flowpastIsUnlocked === 'function' && !window.flowpastIsUnlocked()) {
            // Show email popup
            if (typeof window.flowpastShowEmailPopup === 'function') {
                window.flowpastShowEmailPopup('prompt');
            }
            return;
        }

        // Copy the customized prompt (with filled variables)
        const customizedPrompt = getCustomizedPrompt();
        const copyButtons = document.querySelectorAll('.prompt-header-copy, .prompt-header-copy-green, .prompt-cta-copy, .copy-customized-btn');

        navigator.clipboard.writeText(customizedPrompt).then(() => {
            copyButtons.forEach(btn => {
                btn.classList.add('copied');
                const textSpan = btn.querySelector('span');
                if (textSpan) textSpan.textContent = 'Copied!';
            });

            setTimeout(() => {
                copyButtons.forEach(btn => {
                    btn.classList.remove('copied');
                    const textSpan = btn.querySelector('span');
                    if (textSpan) textSpan.textContent = 'Copy Full Prompt';
                });
            }, 2000);
        }).catch(err => {
            console.error('Failed to copy:', err);
        });
    }

    // Store original prompt for customization
    const originalPrompt = "## OBJECTIVE\r\nBuild an adaptive, OSHA-grounded workplace safety audit experience that evolves from a compliance checklist into a proactive hazard-prevention system. The prompt must gather key workplace details, diagnose risk patterns, and then generate a phased audit-and-implementation program that scales with complexity and safety-culture maturity.\r\n\r\n## PERSONA\r\nAct as a **Workplace Safety Systems Designer** with **15 years of OSHA field-inspection experience**, shaped by investigating serious preventable incidents. You now create **predictive, worker-friendly audit systems** by analyzing facilities like an investigator reconstructing events from physical and behavioral clues. Your writing should be clear, practical, and firm\u2014focused on preventing harm, not performing paperwork.\r\n\r\n## CONSTRAINTS\r\n- Use **OSHA standards as the baseline** and align outputs to typical OSHA inspection logic (hazard identification, controls, training, documentation, follow-up).\r\n- Adapt the plan to:\r\n  - industry and operational complexity\r\n  - workforce size and layout\r\n  - incident history and near-miss trends\r\n  - maturity of the current safety culture\r\n  - resource limits (people, time, budget, tools)\r\n- Create a **dynamic phase count**:\r\n  - simple compliance environments: **3\u20135 phases**\r\n  - typical operations: **6\u20138 phases**\r\n  - high-hazard settings: **9\u201312 phases**\r\n  - complex industrial ecosystems: **13\u201315 phases**\r\n- If any input is missing or unclear, **pause and ask targeted questions** rather than inventing specifics.\r\n- **What This Is NOT**:\r\n  - Not legal advice or a substitute for an OSHA compliance officer or attorney\r\n  - Not a guarantee of regulatory outcomes\r\n  - Not a one-size-fits-all checklist detached from actual operations\r\n  - Not medical, industrial hygiene lab analysis, or engineering sign-off (though it can recommend when those are needed)\r\n\r\n## PROCESS\r\n### 1) Pre-Analysis (required before doing the work)\r\n- Briefly restate what you believe the workplace situation is and what the user wants to achieve.\r\n- List any missing inputs that block accuracy and ask concise follow-up questions.\r\n\r\n### 2) Risk Fingerprint Discovery\r\n- Interpret the workplace\u2019s \u201crisk fingerprint\u201d (tasks, energy sources, exposures, human factors, process variability).\r\n- Identify likely hidden hazard clusters and failure modes (e.g., maintenance windows, contractor overlap, shift handoffs).\r\n\r\n### 3) Phase Blueprinting (dynamic)\r\n- Choose the appropriate number of phases (3\u201315) based on complexity and maturity.\r\n- Name each phase and define its purpose, inputs needed, and outputs produced.\r\n\r\n### 4) OSHA Alignment Layer\r\n- Map relevant OSHA focus areas and compliance obligations appropriate to the described environment.\r\n- Translate compliance requirements into practical inspection and control checks workers can execute.\r\n\r\n### 5) Deliverables Creation\r\n- Produce:\r\n  - a tailored audit framework\r\n  - a customized checklist set (by hazard category)\r\n  - an implementation roadmap with timelines, owners, and success measures\r\n- Add optional advanced modules only if they match the user\u2019s readiness and constraints.\r\n\r\n### 6) Edge-Case Handling\r\n- If the workplace is multi-site, high turnover, heavily contractor-driven, or has limited records:\r\n  - propose a \u201cminimum viable audit system\u201d first\r\n  - add an upgrade path once data quality improves\r\n\r\n## INPUTS\r\n- **Industry \/ workplace type:** [INDUSTRY]  \r\n- **Workplace description (operations, major tasks, shifts):** [CONTEXT]  \r\n- **Workforce size and number of work areas:** [WORKFORCE_SIZE_AND_AREAS]  \r\n- **Top hazards, concerns, or recent incidents (include near-misses):** [CHALLENGE]  \r\n- **Safety culture\/program maturity (starting\/basic\/established\/advanced):** [SAFETY_MATURITY_LEVEL]  \r\n- **Layout and main operational zones (brief):** [WORKPLACE_LAYOUT]  \r\n- **Existing safety programs\/policies (or none):** [EXISTING_PROGRAMS]  \r\n- **Incident summary from last 12 months (if available):** [INCIDENT_HISTORY]  \r\n- **Resource constraints (time\/people\/tools):** [RESOURCE_CONSTRAINTS]  \r\n- **Time horizon for rollout:** [TIMEFRAME]  \r\n\r\n## OUTPUT SPECIFICATION\r\nProvide the deliverable in this order and format:\r\n\r\n### 1) Task Understanding (Pre-Analysis)\r\n- {Interpretation Summary}\r\n- {Assumptions}\r\n- {Missing Info Questions}\r\n\r\n### 2) Phase Plan (3\u201315 phases)\r\nFor each phase include:\r\n- {Phase Number}\r\n- {Phase Name}\r\n- {Objective}\r\n- {Who Is Involved}\r\n- {Inputs Needed}\r\n- {Actions}\r\n- {Outputs\/Artifacts}\r\n- {Completion Criteria}\r\n\r\n### 3) Risk Architecture Findings\r\n- {Critical Risk Zones}\r\n- {Hidden Hazard Patterns}\r\n- {Compliance Gaps}\r\n- {Quick Wins}\r\n- {Longer-Term System Changes}\r\n\r\n### 4) OSHA-Aligned Audit Framework\r\n- {Relevant OSHA Focus Areas} (high-level, non-cited unless user requests citations)\r\n- {Hazard Categories Customized To Workplace}\r\n- {Inspection Rhythm} (frequency, triggers, sampling approach)\r\n- {Worker-Friendly Execution Method} (how to make it doable on the floor)\r\n\r\n### 5) Custom Audit Checklists (tailored)\r\nInclude sections:\r\n- {Physical\/Operational Hazards Checklist}\r\n- {Administrative Controls Checklist}\r\n- {Engineering Controls Checklist}\r\n- {Training & Competency Checklist}\r\n- {Emergency Readiness Checklist}\r\n- {Documentation & Recordkeeping Checklist}\r\n\r\n### 6) Implementation Roadmap\r\n- {Immediate Actions Timeline} (roughly first 5\u201310 days)\r\n- {Near-Term Buildout Timeline} (roughly first 3\u20135 weeks)\r\n- {Stabilization & Improvement Timeline} (roughly next 2\u20137 months)\r\n- {Roles & Ownership Model}\r\n- {Metrics} (leading + lagging indicators)\r\n- {Review & Continuous Improvement Loop}\r\n\r\n### 7) Optional Advanced Modules (only if justified)\r\nProvide a short menu with:\r\n- {Module Name}\r\n- {When To Add It}\r\n- {Benefit}\r\n- {Effort Level}\r\n\r\n## QUALITY CHECKS\r\nBefore finalizing, verify:\r\n- OSHA alignment is present **without** pretending to provide legal determinations.\r\n- The number of phases matches complexity and maturity (within the 3\u201315 bounds).\r\n- Checklists are specific to the described tasks\/areas, not generic filler.\r\n- Recommendations respect stated constraints (time\/people\/tools).\r\n- Any unknowns are flagged with clear follow-up questions instead of fabricated details.";
    const variables = ["[INDUSTRY]","[CONTEXT]","[WORKFORCE_SIZE_AND_AREAS]","[CHALLENGE]","[SAFETY_MATURITY_LEVEL]","[WORKPLACE_LAYOUT]","[EXISTING_PROGRAMS]","[INCIDENT_HISTORY]","[RESOURCE_CONSTRAINTS]","[TIMEFRAME]"];
    // Initial render with highlighted variables
    document.addEventListener('DOMContentLoaded', function() {
        renderPromptWithHighlights();
    });

    // Live update prompt as user types
    document.querySelectorAll('.customize-input').forEach(input => {
        input.addEventListener('input', renderPromptWithHighlights);
    });

    function renderPromptWithHighlights() {
        const promptContent = document.getElementById('premium-prompt-content');
        if (!promptContent) return;

        let updatedPrompt = originalPrompt;
        let filledVariables = {};

        // Collect filled values
        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                filledVariables[placeholder] = value;
            }
        });

        // Replace filled variables and highlight remaining
        let htmlContent = escapeHtml(updatedPrompt);

        variables.forEach(placeholder => {
            const escapedPlaceholder = escapeHtml(placeholder);
            const regex = new RegExp(escapeRegex(escapedPlaceholder), 'g');

            if (filledVariables[placeholder]) {
                // Show filled value with green highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable-filled">' + escapeHtml(filledVariables[placeholder]) + '</span>'
                );
            } else {
                // Show original placeholder with yellow highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable">' + escapedPlaceholder + '</span>'
                );
            }
        });

        promptContent.innerHTML = htmlContent;
    }

    function escapeRegex(string) {
        return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    }

    function escapeHtml(text) {
        const div = document.createElement('div');
        div.textContent = text;
        return div.innerHTML;
    }

    function resetPrompt() {
        // Clear all input fields
        document.querySelectorAll('.customize-input').forEach(input => {
            input.value = '';
        });

        // Re-render with original placeholders highlighted
        renderPromptWithHighlights();

        // Visual feedback
        const resetBtns = document.querySelectorAll('.prompt-header-reset, .prompt-cta-reset');
        resetBtns.forEach(btn => {
            const originalText = btn.querySelector('span').textContent;
            btn.querySelector('span').textContent = 'Reset!';
            setTimeout(() => {
                btn.querySelector('span').textContent = originalText;
            }, 1000);
        });
    }


    function getCustomizedPrompt() {
        let updatedPrompt = originalPrompt;

        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                const regex = new RegExp(escapeRegex(placeholder), 'g');
                updatedPrompt = updatedPrompt.replace(regex, value);
            }
        });

        return updatedPrompt;
    }
</script>

</div>

<div class="pro-tips-section">

<h2 class="wp-block-heading">Pro Tips for Better AI Prompt Results</h2>



<ul class="wp-block-list">

<li><strong>Give the prompt a real monitoring objective.</strong> Don’t leave the goal as “track SEO.” Use something concrete, like “Protect non-brand organic leads for the pricing + integrations pages” or “Grow qualified blog traffic without tanking conversions.” If you’re unsure, add a note like: “Primary conversions are demo requests; secondary is newsletter signups.”</li>


<li><strong>Tell it how the site makes money.</strong> A SaaS, a local service business, and an e-commerce store should not interpret the same engagement signal the same way. Add one line: “Business model: e-commerce; top categories are /mens/ and /womens/; AOV is $85.” Then follow up with: “Adjust the 7 metrics to match this model.”</li>


<li><strong>Ask for metric definitions in your language, not Google’s.</strong> The prompt already explains what each metric means, but you can push it to be more operational. Try: “In the interpretation table, define each metric in plain English for a VP of Marketing and include one ‘if this moves’ diagnostic check.”</li>


<li><strong>Force prioritization after the first draft.</strong> Once you get the cadence and table, ask for a tighter routine that your team will actually do. Use: “Now rewrite the plan for a 60-minute weekly review and a 90-minute monthly review; keep the 7 metrics, but specify the top 3 ‘must-check’ items each week.”</li>


<li><strong>Pair the plan with a keyword intent system.</strong> Monitoring works best when you know which pages and queries are supposed to drive buyer intent versus awareness. After you generate the plan, run a second pass: “Add a section that monitors buyer-intent pages separately from informational content.” If you need that intent structure, start with <a href="https://flowpast.com/prompts/build-a-buyer-intent-keyword-plan-ai-prompt/">Build a Buyer-Intent Keyword Plan AI Prompt</a> and then come back to refine the monitoring cadence.</li>

</ul>

</div>

<div class="related-prompts-section">

<h2 class="wp-block-heading">Related Prompts</h2>



<p>Once your monitoring routine is in place, these related prompts help you decide what to track next and where to focus content effort.</p>



<p>If you also need a tighter link between rankings and revenue, use <a href="https://flowpast.com/prompts/build-a-buyer-intent-keyword-plan-ai-prompt/">Build a Buyer-Intent Keyword Plan AI Prompt</a> to define the specific queries and pages that should be treated as “money pages.” It pairs well with an SEO monitoring plan because it tells you which segments deserve their own reporting slice and faster investigation when they slip.</p>



<p>When your monitoring shows you’re losing visibility in specific clusters, <a href="https://flowpast.com/prompts/ai-prompt-to-find-low-competition-long-tail-keywords/">AI Prompt to Find Low-Competition Long-Tail Keywords</a> helps you find realistic opportunities you can publish quickly. It’s a clean next step after a monthly review reveals stagnation or a competitor leapfrogs you on mid-tail terms.</p>



<p>For teams planning content in batches, <a href="https://flowpast.com/prompts/build-a-long-tail-keyword-research-plan-ai-prompt/">Build a Long-Tail Keyword Research Plan AI Prompt</a> is useful right after you set your cadence. Your monitoring plan tells you what’s happening; the research plan helps you decide what to create over the next 4–8 weeks to change the trend.</p>


<br>


<p>Quick reference:</p>



<ul class="wp-block-list">

<li><a href="https://flowpast.com/prompts/build-a-buyer-intent-keyword-plan-ai-prompt/">Build a Buyer-Intent Keyword Plan AI Prompt</a>: Map revenue-focused keywords and pages.</li>


<li><a href="https://flowpast.com/prompts/ai-prompt-to-find-low-competition-long-tail-keywords/">AI Prompt to Find Low-Competition Long-Tail Keywords</a>: Discover easier keywords to win.</li>


<li><a href="https://flowpast.com/prompts/build-a-long-tail-keyword-research-plan-ai-prompt/">Build a Long-Tail Keyword Research Plan AI Prompt</a>: Plan long-tail research for production.</li>


<li><a href="https://flowpast.com/prompts/build-buyer-intent-qualification-questions-ai-prompt/">Build Buyer-Intent Qualification Questions AI Prompt</a>: Qualify demand behind target queries.</li>


<li><a href="https://flowpast.com/prompts/long-tail-keyword-research-table-ai-prompt/">Long-Tail Keyword Research Table AI Prompt</a>: Generate a structured keyword table.</li>

</ul>

</div>

<div class="faq-section">

<h2 class="wp-block-heading">Common Questions</h2>


<div class="faq-item">
<span class="question">Which roles benefit most from this SEO monitoring plan AI prompt?</span>

<p class="answer"><strong>SEO Managers</strong> use this to standardize ongoing reporting and stop ad-hoc “why did traffic drop?” investigations from derailing the week. <strong>Demand Generation Managers</strong> rely on it to connect organic visibility changes to pipeline pages (product, pricing, demos) and decide when to escalate. <strong>Content Leads</strong> use the 7-metric table to detect content quality issues like cannibalization, poor engagement, or indexation gaps. <strong>Agency Strategists</strong> apply it to create a consistent client monitoring rhythm that drives clear next actions instead of generic monthly summaries.</p>

</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this SEO monitoring plan AI prompt?</span>

<p class="answer"><strong>SaaS companies</strong> get value because small ranking shifts on high-intent pages (integrations, alternatives, pricing) can materially change demo volume, so weekly monitoring prevents slow leaks. <strong>E-commerce brands</strong> benefit when seasonal demand and category changes make it easy to miss early technical or merchandising issues that affect indexation and clicks. <strong>Local service businesses</strong> use a monitoring cadence to catch visibility drops tied to service pages, location pages, or changing SERP features before leads disappear. <strong>Content-heavy publishers</strong> like media and affiliates use it to spot performance decay and UX/engagement issues that often show up before revenue does.</p>

</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building an ongoing SEO monitoring plan produce weak results?</span>

<p class="answer">A typical prompt like &#8220;<em>Write me an SEO monitoring plan for my website</em>&#8221; fails because it: lacks a pre-analysis that restates the site and goal (so the plan becomes generic), provides no tight cadence with weekly and monthly touchpoints, ignores the need to interpret metrics with a clear “good direction” (▲/▼), produces a random list of KPIs instead of exactly 7 high-signal metrics that balance tech + content + engagement, and misses the operational checklist that turns reporting into next actions.</p>

</div>

<div class="faq-item">
<span class="question">Can I customize this SEO monitoring plan prompt for my specific situation?</span>

<p class="answer">Yes. Even though the prompt template is simple, you can steer the output by adding specifics for [WEBSITE_URL], [PRIMARY_GOAL], and [INDUSTRY] before you run it. If you care about one funnel stage, say so (example: “Primary goal is qualified demo requests from organic; deprioritize vanity traffic”). After the first output, follow up with: “Revise the 7 metrics and the checklist for my industry and goal, and add a separate weekly mini-review for our top 10 buyer-intent pages.”</p>

</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this SEO monitoring plan prompt?</span>

<p class="answer">The biggest mistake is leaving [PRIMARY_GOAL] too vague — instead of “grow traffic,” try “increase non-brand organic signups for our payroll software demo” or “drive calls from emergency plumbing location pages.” Another common error is entering [INDUSTRY] as “B2B” (too broad); use something like “B2B SaaS for AP automation selling to controllers” so the engagement and conversion signals make sense. People also paste [WEBSITE_URL] without noting site reality, like “site has 12k legacy posts” or “new domain, low authority,” which changes cadence and expectations. Finally, teams forget to assign owners; the plan becomes a doc, not a routine, so add “weekly owner: SEO lead; monthly owner: marketing ops” to the checklist.</p>

</div>

<div class="faq-item">
<span class="question">Who should NOT use this SEO monitoring plan prompt?</span>

<p class="answer">This prompt isn&#8217;t ideal for one-time projects where you won’t maintain a cadence, or for teams that really need a full technical audit and remediation plan right now. It’s also not a fit if you expect tool-specific dashboards or guaranteed ranking outcomes, because it stays intentionally tool-agnostic and action-focused. If you’re in “we have no baseline, everything is broken” mode, start with an audit workflow, then come back to this to keep things stable over time.</p>

</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this SEO monitoring plan AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SEO Managers use this to standardize ongoing reporting and stop ad-hoc “why did traffic drop?” investigations from derailing the week. Demand Generation Managers rely on it to connect organic visibility changes to pipeline pages (product, pricing, demos) and decide when to escalate. Content Leads use the 7-metric table to detect content quality issues like cannibalization, poor engagement, or indexation gaps. Agency Strategists apply it to create a consistent client monitoring rhythm that drives clear next actions instead of generic monthly summaries."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this SEO monitoring plan AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SaaS companies get value because small ranking shifts on high-intent pages (integrations, alternatives, pricing) can materially change demo volume, so weekly monitoring prevents slow leaks. E-commerce brands benefit when seasonal demand and category changes make it easy to miss early technical or merchandising issues that affect indexation and clicks. Local service businesses use a monitoring cadence to catch visibility drops tied to service pages, location pages, or changing SERP features before leads disappear. Content-heavy publishers like media and affiliates use it to spot performance decay and UX/engagement issues that often show up before revenue does."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building an ongoing SEO monitoring plan produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like \"Write me an SEO monitoring plan for my website\" fails because it: lacks a pre-analysis that restates the site and goal (so the plan becomes generic), provides no tight cadence with weekly and monthly touchpoints, ignores the need to interpret metrics with a clear “good direction” (▲/▼), produces a random list of KPIs instead of exactly 7 high-signal metrics that balance tech + content + engagement, and misses the operational checklist that turns reporting into next actions."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this SEO monitoring plan prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. Even though the prompt template is simple, you can steer the output by adding specifics for [WEBSITE_URL], [PRIMARY_GOAL], and [INDUSTRY] before you run it. If you care about one funnel stage, say so (example: “Primary goal is qualified demo requests from organic; deprioritize vanity traffic”). After the first output, follow up with: “Revise the 7 metrics and the checklist for my industry and goal, and add a separate weekly mini-review for our top 10 buyer-intent pages.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this SEO monitoring plan prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving [PRIMARY_GOAL] too vague — instead of “grow traffic,” try “increase non-brand organic signups for our payroll software demo” or “drive calls from emergency plumbing location pages.” Another common error is entering [INDUSTRY] as “B2B” (too broad); use something like “B2B SaaS for AP automation selling to controllers” so the engagement and conversion signals make sense. People also paste [WEBSITE_URL] without noting site reality, like “site has 12k legacy posts” or “new domain, low authority,” which changes cadence and expectations. Finally, teams forget to assign owners; the plan becomes a doc, not a routine, so add “weekly owner: SEO lead; monthly owner: marketing ops” to the checklist."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this SEO monitoring plan prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn't ideal for one-time projects where you won’t maintain a cadence, or for teams that really need a full technical audit and remediation plan right now. It’s also not a fit if you expect tool-specific dashboards or guaranteed ranking outcomes, because it stays intentionally tool-agnostic and action-focused. If you’re in “we have no baseline, everything is broken” mode, start with an audit workflow, then come back to this to keep things stable over time."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">

<p>SEO gets easier when you stop treating it like a surprise and start treating it like an operating system. Paste the prompt into your AI tool, generate your monitoring blueprint, and set the first weekly review on the calendar today.</p>

</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5002242.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build a Safe Folder Cleanup System AI Prompt</title>
		<link>https://flowpast.com/prompts/build-a-safe-folder-cleanup-system-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:44:03 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5001594</guid>

					<description><![CDATA[Storage clutter keeps growing - use this AI Prompt to build a safe cleanup system with retention rules, archive paths, quarantine, and audit logs. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: safe folder cleanup -->
<div class="hook-introduction">

<p>Your storage isn’t “messy.” It’s risky. Important files get buried, duplicates multiply, and you hesitate to delete anything because the downside feels permanent.</p>



<p>This <strong>safe folder cleanup</strong> is built for <strong>ops managers</strong> who inherited a shared drive no one trusts, <strong>agency leads</strong> who juggle client assets across project folders, and <strong>founders</strong> who keep paying for more storage instead of fixing the system. The output is a practical cleanup blueprint with retention rules, archive and quarantine paths, low-activity scheduling, notifications, and an audit/exception-report structure you can implement step by step.</p>

</div>

<div class="what-and-when-section">

<h2 class="wp-block-heading">What Does This AI Prompt Do and When to Use It?</h2>



<table class="solution-results-table three-column" role="presentation" aria-label="What this prompt does, when to use it, and what you get">
 <thead>
    <tr>
      <th scope="col">What This Prompt Does</th>
      <th scope="col">When to Use This Prompt</th>
      <th scope="col">What You&#8217;ll Get</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <ul class="automation-list">
          <li>It maps your folders into “active projects” versus “archive candidates” so different rules apply to each category.</li>
          <li>It builds retention logic based on last modified time (not creation date), including separate timelines per folder type.</li>
          <li>It defines critical file patterns (contracts, taxes, licenses, etc.) and routes them into exception handling instead of the normal cleanup flow.</li>
          <li>It designs a two-step removal process: archive that preserves structure first, then staged quarantine for 30 days before any permanent deletion.</li>
          <li>It specifies safeguards like pre-cleanup notifications, a user intervention window, low-activity scheduling, and audit logs for traceability.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You’re about to migrate to Google Drive, SharePoint, Dropbox, or a new NAS and you want to reduce clutter without losing context.</li>
          <li>Your team avoids cleaning because “last time something broke,” and now shared assets and dependencies make deletion feel dangerous.</li>
          <li>You need a repeatable monthly or quarterly cleanup routine, not a one-time “big bang” purge that everyone regrets later.</li>
          <li>Storage costs keep climbing, but leadership won’t approve more spend until you prove you can manage what you already have.</li>
          <li>You’re scaling projects and clients, and folder sprawl is starting to slow onboarding, handoffs, and findability.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A folder classification plan that flags active project directories, archive candidates, and “do-not-touch” areas.</li>
           <li>A retention-rule set with specific time windows (for example, 30/90/365-day tiers) and different logic per folder category.</li>
           <li>A defined archive destination path that preserves original folder structure to keep project context intact.</li>
           <li>A quarantine/staging workflow specifying a 30-day holding area, restore steps, and criteria for final removal.</li>
           <li>An exception report outline for critical patterns, plus an audit log schema that records what moved, when, and why.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

<div class="prompt-display-section">

<h2 class="wp-block-heading">The Full AI Prompt: Safe Folder Cleanup System Blueprint</h2>



<div class="prompt-viewer-wrapper" id="prompt-section">
    <div class="prompt-comparison-row prompt-premium">
        <!-- Header with buttons -->
        <div class="prompt-row-header">
            <!-- <span class="prompt-row-icon">✨</span> -->
            <span class="prompt-row-title">
                                    Step 1: Customize the prompt with your input
                            </span>
            <div class="prompt-header-buttons">
                                    <button class="prompt-header-btn prompt-header-reset" onclick="resetPrompt()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                                <button class="prompt-header-btn prompt-header-copy-green flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span>Customize and Copy Full Prompt</span>
                </button>
            </div>
        </div>

        <!-- Customize the Prompt Section -->
                    <div class="prompt-customize-section">
                <span class="customize-title">Customize the Prompt</span>
                <p class="customize-subtitle">Fill in the fields below to personalize this prompt for your needs.</p>
                <table class="customize-table">
                    <thead>
                        <tr>
                            <th>Variable</th>
                            <th>What to Enter</th>
                            <th>Customise the prompt</th>
                        </tr>
                    </thead>
                    <tbody>
                                                    <tr>
                                <td class="var-name"><code>[LIST_SPECIFIC_FOLDERS_TO_CLEAN]</code></td>
                                <td class="var-desc">
                                    List the folders that should be included in the cleanup process. Provide full paths or clear names of the directories.                                    <div class="var-example">For example: "Documents/Work/Projects, Downloads/Old, Desktop/Unused_Files"</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[LIST_SPECIFIC_FOLDERS_TO_CLEAN]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[NUMBER_OF_DAYS_FILES_SHOULD_REMAIN]</code></td>
                                <td class="var-desc">
                                    Specify the number of days files should remain untouched before being considered for cleanup or archiving.                                    <div class="var-example">For example: "90"</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[NUMBER_OF_DAYS_FILES_SHOULD_REMAIN]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[FILE_TYPES_NAMES_THAT_SHOULD_NEVER_BE_AUTO_DELETED]</code></td>
                                <td class="var-desc">
                                    List file types or specific naming patterns that should be excluded from automated deletion, regardless of age or location.                                    <div class="var-example">For example: ".pdf, .docx, contracts_*, tax_records_2023.*"</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[FILE_TYPES_NAMES_THAT_SHOULD_NEVER_BE_AUTO_DELETED]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[WHEN_AUTOMATION_SHOULD_RUN]</code></td>
                                <td class="var-desc">
                                    Specify the low-activity time window during which automation should run. Include days and hours if applicable.                                    <div class="var-example">For example: "Weekdays between 2:00 AM and 5:00 AM"</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[WHEN_AUTOMATION_SHOULD_RUN]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[WHERE_ARCHIVED_FILES_SHOULD_BE_MOVED]</code></td>
                                <td class="var-desc">
                                    Provide the location or folder path where archived files should be moved. Ensure the destination is accessible and organized.                                    <div class="var-example">For example: "ExternalDrive/Archives/2023, CloudStorage/Archived_Files"</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[WHERE_ARCHIVED_FILES_SHOULD_BE_MOVED]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[CONTEXT]</code></td>
                                <td class="var-desc">
                                    Explain the purpose or specific goals of the cleanup process to guide rule creation and safeguards. Include any relevant details about the user’s file management habits or needs.                                    <div class="var-example">For example: "Organize work files while preserving critical contracts and licenses. Reduce clutter in personal directories without risking loss of sentimental photos."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[CONTEXT]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                            </tbody>
                </table>

                <button class="copy-customized-btn flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span class="copy-customized-text">Customise the prompt now</span>
                </button>
            </div>
        
        <!-- Full Prompt Code Header -->
                    <div class="prompt-code-header">
                <span class="prompt-code-title">
                    Step 2: Copy the Prompt
                </span>
                <div class="prompt-code-buttons">
                    <!-- Reset: Only visible when unlocked -->
                    <button class="prompt-header-btn prompt-header-reset btn-when-unlocked" onclick="resetPrompt()" style="display: none;">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                    <!-- Copy Full Prompt -->
                    <button class="prompt-header-btn prompt-header-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                            <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                        </svg>
                        <span>Copy Full Prompt</span>
                    </button>
                </div>
            </div>
        

        <!-- Prompt Content -->
        <div class="prompt-box prompt-gated-wrapper">
            <!-- Gated: Blurred content -->
            <div class="prompt-gated-content">
                <div class="prompt-header-visible">OBJECTIVE</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PERSONA</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">CONSTRAINTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">What This Is NOT (Scope Boundaries)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PROCESS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">Edge Case Handling</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">INPUTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">OUTPUT SPECIFICATION</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">Delivery Standards</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">QUALITY CHECKS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div>            </div>
            <!-- Unlocked: Full content (hidden by default) -->
            <div class="prompt-content-full" id="premium-prompt-content" style="display: none;">
                ## OBJECTIVE
Design an automated digital file cleanup and archiving system that applies “intentional keeping” principles to a user’s folders. The system must use configurable retention rules, separate archiving from deletion, and include strong safeguards so cleanup feels deliberate—not risky.

## PERSONA
You are a digital decluttering systems designer who previously lost years of work in a storage failure, then rebuilt your own file practices through painstaking recovery and behavioral research. You specialize in automation that reduces anxiety-driven hoarding while protecting irreplaceable material through layered controls, audits, and reversible actions.

## CONSTRAINTS
- Evaluate files by **last modified time** (not creation time).
- Treat **active project directories** differently from **archive candidates**.
- Apply special handling for **critical file patterns** (e.g., contracts, taxes, licenses) regardless of age.
- Send **pre-cleanup notifications** and allow a user intervention window.
- Any deletion must first go to a **staging/quarantine area for 30 days** before permanent removal.
- Preserve **folder structure** when archiving to maintain context.
- Run automation only inside the user’s **low-activity window** schedule.
- Produce **exception reports** for anything matching critical patterns.
- Avoid:
  - Removing files without consent pathways
  - Breaking dependencies (e.g., project folders that rely on shared assets)
  - Applying one rule to every folder
  - Building a system more complicated than the mess it replaces

### What This Is NOT (Scope Boundaries)
- Not a full enterprise records-management or legal compliance policy.
- Not a guarantee that automated rules perfectly infer business value.
- Not a data recovery service for already-lost files.
- Not a replacement for backups; it assumes you maintain backups separately.

## PROCESS
1. **Pre-analysis (state understanding before building):**
   - Restate the user’s folders, schedule window, retention intent, archival destination, and critical patterns.
   - List any assumptions you must make.
   - Ask up to 5 clarifying questions if inputs are missing or unclear.

2. **System blueprint:**
   - Map the lifecycle: discovery → classification → decision → notification → archive/stage → final removal → reporting.
   - Define how “active” vs “archive candidate” folders are identified.

3. **Policy design:**
   - Create a retention matrix by folder and by file type/pattern.
   - Specify how last-modified age thresholds are applied.

4. **Protection layers:**
   - Detail multiple safeguards (dry-runs, allowlists/denylists, dependency checks, staging delay, approvals, backups).

5. **Archival plan:**
   - Define archive structure, naming conventions, and hierarchy preservation rules.
   - Include rehydration (restore) instructions.

6. **Automation implementation:**
   - Provide step-by-step setup instructions.
   - Include sample rules/scripts in monospace (platform-agnostic pseudocode is acceptable if platform isn’t specified).

7. **Reporting &amp; operations:**
   - Specify report contents, cadence, storage location, and how to interpret them.
   - Include troubleshooting guidance.

### Edge Case Handling
- If [LIST_SPECIFIC_FOLDERS_TO_CLEAN] contains mixed-use folders, propose splitting or tagging rules.
- If [NUMBER_OF_DAYS_FILES_SHOULD_REMAIN] is a single value, recommend tiered defaults (e.g., shorter for downloads, longer for finance) while keeping the user’s value as baseline.
- If [FILE_TYPES_NAMES_THAT_SHOULD_NEVER_BE_AUTO_DELETED] is vague, create a conservative initial pattern set and require manual confirmation.
- If [WHEN_AUTOMATION_SHOULD_RUN] is not a true low-activity window, propose alternative windows and rate-limit behavior.

## INPUTS
- **Target folders to clean:** [LIST_SPECIFIC_FOLDERS_TO_CLEAN]  
- **Retention period in days:** [NUMBER_OF_DAYS_FILES_SHOULD_REMAIN]  
- **Critical file patterns (never auto-delete):** [FILE_TYPES_NAMES_THAT_SHOULD_NEVER_BE_AUTO_DELETED]  
- **Archive destination:** [WHERE_ARCHIVED_FILES_SHOULD_BE_MOVED]  
- **Automation schedule window:** [WHEN_AUTOMATION_SHOULD_RUN]  
- **Operating system / environment (optional but recommended):** [CONTEXT]  

## OUTPUT SPECIFICATION
Provide a structured implementation guide with clear headings and numbered steps. Include:

1. **Understanding &amp; Assumptions**
   - {Restated Inputs}
   - {Assumptions}
   - {Clarifying Questions (if needed)}

2. **Automation Workflow (Architecture Overview)**
   - {Discovery Method}
   - {Classification Logic}
   - {Decision Tree}
   - {Disposition Paths}

3. **Retention Policy Framework**
   - {Retention Matrix Table} (by folder, file type, and pattern)
   - {Active Project Rules}
   - {Archive Candidate Rules}

4. **Safety Layers (Warnings Included)**
   - Use callouts labeled **WARNING:** for any irreversible step
   - {Dry Run Mode}
   - {Approval / Notification Window}
   - {Staging/Quarantine Rules (30 days)}
   - {Dependency &amp; “Do Not Touch” Protections}
   - {Backup/Restore Preconditions}

5. **Archival Strategy**
   - {Archive Folder Layout}
   - {Hierarchy Preservation Rules}
   - {How To Restore Archived Items}

6. **Reporting System**
   - {Summary Report Template}
   - {Exception Report Template}
   - {Key Metrics} (moved, staged, deleted, excluded, matched critical)

7. **Implementation Steps (Numbered)**
   - {Step-by-Step Setup}
   - Include code/rules in monospace blocks, e.g.:
     ```
     {Automation Rule or Script Snippet}
     ```
   - {Scheduling Instructions}
   - {Notification Setup}

8. **Example Scenarios**
   - {Scenario 1} (e.g., old downloads moved to archive, critical items exempt)
   - {Scenario 2} (e.g., active project folder skipped, assets protected)
   - {Scenario 3} (e.g., staged deletion with 30-day reversal)

9. **Troubleshooting**
   - {Common Issue} → {Likely Cause} → {Fix}
   - Include at least 6 common problems (permissions, wrong timestamps, noisy patterns, schedule conflicts, archive bloat, missing reports)

### Delivery Standards
- Keep the system “minimal moving parts” unless complexity is justified by safety.
- Use last-modified time as the primary aging signal everywhere.
- Preserve context in archives by maintaining relative paths.
- Never propose immediate permanent deletion.

## QUALITY CHECKS
Before finalizing, verify:
- Retention decisions use **last modified** (not created) timestamps.
- Critical patterns are **exempt from auto-deletion** and appear in an exception report.
- Deletion path includes **notification → staging (30 days) → permanent removal**.
- Archiving preserves **folder hierarchy** and includes restore steps.
- The schedule respects **[WHEN_AUTOMATION_SHOULD_RUN]** and avoids high-activity periods.            </div>
        </div>


    </div>

    <!-- CTA Row - Full width buttons -->
    <div class="prompt-cta-row">
        <button class="prompt-cta-btn prompt-cta-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
            </svg>
            <span class="cta-copy-text">Copy Full Prompt</span>
        </button>
    </div>
</div>

<style>
    /* Gated prompt states */
    .prompt-gated-wrapper {
        position: relative;
    }

    /* When unlocked - show full content, hide gated */
    body.flowpast-unlocked .prompt-gated-wrapper .prompt-gated-content {
        display: none;
    }

    body.flowpast-unlocked .prompt-gated-wrapper .prompt-content-full {
        display: block !important;
    }

    /* Show/hide elements based on unlock state */
    body.flowpast-unlocked .btn-when-unlocked {
        display: inline-flex !important;
    }

    .prompt-viewer-wrapper {
        scroll-margin-top: 250px;
    }

    /* ========================================
   PROMPT VIEWER - MAIN WRAPPER
   ======================================== */
    .prompt-viewer-wrapper {
        margin: 30px 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* ========================================
   PROMPT BOX CONTAINER
   ======================================== */
    .prompt-comparison-row {
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid #e0e0e0;
        background: #fff;
    }

    /* ========================================
   HEADER WITH BUTTONS
   ======================================== */
    .prompt-row-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
        flex-wrap: wrap;
    }

    .prompt-row-icon {
        font-size: 20px;
    }

    .prompt-row-title {
        font-weight: 600;
        font-size: 22px;
        color: #fff !important;
        text-decoration: underline
    }

    .prompt-header-buttons {
        margin-left: auto;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Header buttons */
    .prompt-header-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-header-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-header-copy:hover {
        background: #2a2a2a;
    }

    .prompt-header-copy.copied {
        background: #2e7d32;
    }

    .prompt-header-copy-green {
        background: #04AA6D !important;
        color: #fff !important;
    }

    .prompt-header-copy-green:hover {
        background: #039860 !important;
    }

    .prompt-header-copy-green.copied {
        background: #2e7d32 !important;
    }

    .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-header-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-1px);
    }

    /* ========================================
   PROMPT CONTENT - FULL (NO SCROLL)
   ======================================== */
    .prompt-box {
        background: #ffffff;
    }

    .prompt-content-full {
        padding: 24px;
        margin: 0;
        color: #202124;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.7;
        white-space: pre-wrap;
        word-wrap: break-word;
        /* No scroll - show full content */
        max-height: none;
        overflow: visible;
    }

    /* Highlighted variable in prompt */
    .prompt-variable {
        background: #fff3cd;
        color: #1967d2;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #ffc107;
    }

    .prompt-variable-filled {
        background: #d4edda;
        color: #155724;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #28a745;
    }

    /* ========================================
   GATED CONTENT (NO ACCESS)
   ======================================== */
    .prompt-gated-content {
        padding: 24px;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.8;
        max-height: none;
        overflow: visible;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        cursor: default;
    }

    /* ## headers - larger, black */
    .prompt-header-visible {
        color: #202124;
        font-weight: 600;
        margin: 5px 0 0px 0;
        font-size: 20px;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    /* ### headers - smaller, black */
    .prompt-header-visible.subheader {
        color: #202124;
        font-weight: 600;
        margin: 5px 0;
        font-size: 18px;
    }

    .prompt-header-visible:first-child {
        margin-top: 0;
    }

    /* ========================================
   LOCKED SECTION BLOCK
   ======================================== */
    .locked-section {
        position: relative;
        margin: 4px 0 8px 0;
        border-radius: 6px;
        overflow: hidden;
        background: linear-gradient(110deg, #e2e8f0 8%, #f1f5f9 18%, #e2e8f0 33%);
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }

    .locked-section-bg {
        position: relative;
    }

    .locked-section-lines {
        padding: 8px 12px;
        position: relative;
    }

    .locked-line {
        height: 6px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 3px;
        margin-bottom: 4px;
        margin-left: 12px;
    }

    .locked-line:last-child {
        margin-bottom: 0;
    }

    .locked-section-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        font-size: 24px;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
    }

    /* Subheader locked sections - slightly indented */
    /*  .prompt-header-visible.subheader+.locked-section {
        margin-left: 16px;
    } */

    /* ========================================
   COMPATIBILITY BADGES
   ======================================== */
    .prompt-compatibility {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        background: #f8f9fa;
        border-top: 1px solid #e0e0e0;
    }

    .compat-label {
        font-size: 13px;
        color: #5f6368;
        font-weight: 500;
    }

    .compat-badge {
        padding: 4px 10px;
        background: #e8f0fe;
        color: #1967d2;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }

    /* ========================================
   CTA ROW - FULL WIDTH BUTTONS
   ======================================== */
    .prompt-cta-row {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .prompt-cta-btn {
        flex: 1;
        min-width: 200px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 24px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-cta-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-copy:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-copy.copied {
        background: #2e7d32;
    }

    .prompt-cta-reset {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-reset:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-cta-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    /* ========================================
    CUSTOMIZE YOUR PROMPT SECTION
    ======================================== */
    .prompt-customize-section {
        padding: 24px;
        border-bottom: 1px solid #e0e0e0;
        background: #fafbfc;
    }

    .customize-title {
        margin: 0 0 8px 0;
        font-size: 18px;
        font-weight: 700;
        color: #202124;
    }

    .customize-subtitle {
        margin: 0 0 20px 0;
        font-size: 14px;
        color: #5f6368;
    }

    .customize-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }

    .customize-table th {
        text-align: left;
        padding: 12px;
        background: #f1f3f4;
        border: 1px solid #e0e0e0;
        font-size: 13px;
        font-weight: 600;
        color: #202124;
    }

    .customize-table td {
        padding: 12px;
        border: 1px solid #e0e0e0;
        vertical-align: top;
    }

    .customize-table .var-name {
        width: 25%;
        background: #f8f9fa;
    }

    .customize-table .var-name code {
        background: #fff3cd;
        color: #1967d2;
        border: 1px solid #ffc107;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        word-break: break-all;
        font-weight: 600;
    }

    .customize-table .var-desc {
        width: 35%;
        font-size: 13px;
        color: #5f6368;
        line-height: 1.5;
    }

    .customize-table .var-example {
        margin-top: 8px;
        padding: 8px 10px;
        background: #f8f9fa;
        border-left: 3px solid #dadce0;
        font-size: 12px;
        color: #5f6368;
        font-style: italic;
        border-radius: 0 4px 4px 0;
    }

    .customize-table .var-input {
        width: 40%;
    }

    .customize-input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #dadce0;
        border-radius: 6px;
        font-size: 13px;
        font-family: inherit;
        resize: vertical;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .customize-input:focus {
        outline: none;
        border-color: rgb(5, 152, 98);
        box-shadow: 0 0 0 3px rgba(5, 152, 98, 0.1);
    }

    .customize-input::placeholder {
        color: #9aa0a6;
        font-style: italic;
    }

    .copy-customized-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 16px 24px;
        background: rgb(5, 152, 98);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .copy-customized-btn:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    .copy-customized-btn.copied {
        background: #2e7d32;
    }

    /* ========================================
    FULL PROMPT CODE HEADER
    ======================================== */
    .prompt-code-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
    }

    .prompt-code-title {
        font-size: 22px;
        font-weight: 600;
        text-decoration: underline;

    }

    .prompt-code-buttons {
        display: flex;
        gap: 8px;
    }

    .prompt-code-buttons .prompt-header-btn {
        padding: 8px 14px;
        font-size: 13px;
        background: #ffffff;
        color: #202124;
        border: 1px solid #dadce0;
    }

    .prompt-code-buttons .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
        border-color: rgb(5, 152, 98);
    }

    .prompt-code-buttons .prompt-header-btn.prompt-header-access:hover {
        background: rgb(4, 130, 83) !important;
        border-color: rgb(4, 130, 83);
        color: #fff !important;
    }

    .prompt-code-buttons .prompt-header-btn:hover {
        background: #f1f3f4;
    }

    .prompt-code-buttons .prompt-header-copy.copied {
        background: #d4edda;
        color: #155724;
        border-color: #28a745;
    }

    .prompt-header-reset {
        background: #ffffff;
        color: #202124;
    }

    /* ========================================
   RESPONSIVE
   ======================================== */
    @media (max-width: 768px) {
        .prompt-row-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .prompt-header-buttons {
            margin-left: 0;
            width: 100%;
        }

        .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }

        .prompt-cta-row {
            flex-direction: column;
        }

        .prompt-cta-btn {
            width: 100%;
        }

        /* Customize table responsive */
        .customize-table,
        .customize-table thead,
        .customize-table tbody,
        .customize-table tr,
        .customize-table th,
        .customize-table td {
            display: block;
        }

        .customize-table thead {
            display: none;
        }

        .customize-table tr {
            margin-bottom: 16px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            overflow: hidden;
        }

        .customize-table td {
            width: 100% !important;
            border: none;
            border-bottom: 1px solid #e0e0e0;
        }

        .customize-table td:last-child {
            border-bottom: none;
        }

        .customize-table .var-name {
            background: #f1f3f4;
            font-weight: 600;
        }

        .prompt-code-header {
            flex-direction: column;
            gap: 12px;
            align-items: flex-start;
        }

        .prompt-code-buttons {
            width: 100%;
        }

        .prompt-code-buttons .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }
    }
</style>

<script>
    function handlePromptCopy() {
        // Check if unlocked via cookie
        if (typeof window.flowpastIsUnlocked === 'function' && !window.flowpastIsUnlocked()) {
            // Show email popup
            if (typeof window.flowpastShowEmailPopup === 'function') {
                window.flowpastShowEmailPopup('prompt');
            }
            return;
        }

        // Copy the customized prompt (with filled variables)
        const customizedPrompt = getCustomizedPrompt();
        const copyButtons = document.querySelectorAll('.prompt-header-copy, .prompt-header-copy-green, .prompt-cta-copy, .copy-customized-btn');

        navigator.clipboard.writeText(customizedPrompt).then(() => {
            copyButtons.forEach(btn => {
                btn.classList.add('copied');
                const textSpan = btn.querySelector('span');
                if (textSpan) textSpan.textContent = 'Copied!';
            });

            setTimeout(() => {
                copyButtons.forEach(btn => {
                    btn.classList.remove('copied');
                    const textSpan = btn.querySelector('span');
                    if (textSpan) textSpan.textContent = 'Copy Full Prompt';
                });
            }, 2000);
        }).catch(err => {
            console.error('Failed to copy:', err);
        });
    }

    // Store original prompt for customization
    const originalPrompt = "## OBJECTIVE\r\nDesign an automated digital file cleanup and archiving system that applies \u201cintentional keeping\u201d principles to a user\u2019s folders. The system must use configurable retention rules, separate archiving from deletion, and include strong safeguards so cleanup feels deliberate\u2014not risky.\r\n\r\n## PERSONA\r\nYou are a digital decluttering systems designer who previously lost years of work in a storage failure, then rebuilt your own file practices through painstaking recovery and behavioral research. You specialize in automation that reduces anxiety-driven hoarding while protecting irreplaceable material through layered controls, audits, and reversible actions.\r\n\r\n## CONSTRAINTS\r\n- Evaluate files by **last modified time** (not creation time).\r\n- Treat **active project directories** differently from **archive candidates**.\r\n- Apply special handling for **critical file patterns** (e.g., contracts, taxes, licenses) regardless of age.\r\n- Send **pre-cleanup notifications** and allow a user intervention window.\r\n- Any deletion must first go to a **staging\/quarantine area for 30 days** before permanent removal.\r\n- Preserve **folder structure** when archiving to maintain context.\r\n- Run automation only inside the user\u2019s **low-activity window** schedule.\r\n- Produce **exception reports** for anything matching critical patterns.\r\n- Avoid:\r\n  - Removing files without consent pathways\r\n  - Breaking dependencies (e.g., project folders that rely on shared assets)\r\n  - Applying one rule to every folder\r\n  - Building a system more complicated than the mess it replaces\r\n\r\n### What This Is NOT (Scope Boundaries)\r\n- Not a full enterprise records-management or legal compliance policy.\r\n- Not a guarantee that automated rules perfectly infer business value.\r\n- Not a data recovery service for already-lost files.\r\n- Not a replacement for backups; it assumes you maintain backups separately.\r\n\r\n## PROCESS\r\n1. **Pre-analysis (state understanding before building):**\r\n   - Restate the user\u2019s folders, schedule window, retention intent, archival destination, and critical patterns.\r\n   - List any assumptions you must make.\r\n   - Ask up to 5 clarifying questions if inputs are missing or unclear.\r\n\r\n2. **System blueprint:**\r\n   - Map the lifecycle: discovery \u2192 classification \u2192 decision \u2192 notification \u2192 archive\/stage \u2192 final removal \u2192 reporting.\r\n   - Define how \u201cactive\u201d vs \u201carchive candidate\u201d folders are identified.\r\n\r\n3. **Policy design:**\r\n   - Create a retention matrix by folder and by file type\/pattern.\r\n   - Specify how last-modified age thresholds are applied.\r\n\r\n4. **Protection layers:**\r\n   - Detail multiple safeguards (dry-runs, allowlists\/denylists, dependency checks, staging delay, approvals, backups).\r\n\r\n5. **Archival plan:**\r\n   - Define archive structure, naming conventions, and hierarchy preservation rules.\r\n   - Include rehydration (restore) instructions.\r\n\r\n6. **Automation implementation:**\r\n   - Provide step-by-step setup instructions.\r\n   - Include sample rules\/scripts in monospace (platform-agnostic pseudocode is acceptable if platform isn\u2019t specified).\r\n\r\n7. **Reporting & operations:**\r\n   - Specify report contents, cadence, storage location, and how to interpret them.\r\n   - Include troubleshooting guidance.\r\n\r\n### Edge Case Handling\r\n- If [LIST_SPECIFIC_FOLDERS_TO_CLEAN] contains mixed-use folders, propose splitting or tagging rules.\r\n- If [NUMBER_OF_DAYS_FILES_SHOULD_REMAIN] is a single value, recommend tiered defaults (e.g., shorter for downloads, longer for finance) while keeping the user\u2019s value as baseline.\r\n- If [FILE_TYPES_NAMES_THAT_SHOULD_NEVER_BE_AUTO_DELETED] is vague, create a conservative initial pattern set and require manual confirmation.\r\n- If [WHEN_AUTOMATION_SHOULD_RUN] is not a true low-activity window, propose alternative windows and rate-limit behavior.\r\n\r\n## INPUTS\r\n- **Target folders to clean:** [LIST_SPECIFIC_FOLDERS_TO_CLEAN]  \r\n- **Retention period in days:** [NUMBER_OF_DAYS_FILES_SHOULD_REMAIN]  \r\n- **Critical file patterns (never auto-delete):** [FILE_TYPES_NAMES_THAT_SHOULD_NEVER_BE_AUTO_DELETED]  \r\n- **Archive destination:** [WHERE_ARCHIVED_FILES_SHOULD_BE_MOVED]  \r\n- **Automation schedule window:** [WHEN_AUTOMATION_SHOULD_RUN]  \r\n- **Operating system \/ environment (optional but recommended):** [CONTEXT]  \r\n\r\n## OUTPUT SPECIFICATION\r\nProvide a structured implementation guide with clear headings and numbered steps. Include:\r\n\r\n1. **Understanding & Assumptions**\r\n   - {Restated Inputs}\r\n   - {Assumptions}\r\n   - {Clarifying Questions (if needed)}\r\n\r\n2. **Automation Workflow (Architecture Overview)**\r\n   - {Discovery Method}\r\n   - {Classification Logic}\r\n   - {Decision Tree}\r\n   - {Disposition Paths}\r\n\r\n3. **Retention Policy Framework**\r\n   - {Retention Matrix Table} (by folder, file type, and pattern)\r\n   - {Active Project Rules}\r\n   - {Archive Candidate Rules}\r\n\r\n4. **Safety Layers (Warnings Included)**\r\n   - Use callouts labeled **WARNING:** for any irreversible step\r\n   - {Dry Run Mode}\r\n   - {Approval \/ Notification Window}\r\n   - {Staging\/Quarantine Rules (30 days)}\r\n   - {Dependency & \u201cDo Not Touch\u201d Protections}\r\n   - {Backup\/Restore Preconditions}\r\n\r\n5. **Archival Strategy**\r\n   - {Archive Folder Layout}\r\n   - {Hierarchy Preservation Rules}\r\n   - {How To Restore Archived Items}\r\n\r\n6. **Reporting System**\r\n   - {Summary Report Template}\r\n   - {Exception Report Template}\r\n   - {Key Metrics} (moved, staged, deleted, excluded, matched critical)\r\n\r\n7. **Implementation Steps (Numbered)**\r\n   - {Step-by-Step Setup}\r\n   - Include code\/rules in monospace blocks, e.g.:\r\n     ```\r\n     {Automation Rule or Script Snippet}\r\n     ```\r\n   - {Scheduling Instructions}\r\n   - {Notification Setup}\r\n\r\n8. **Example Scenarios**\r\n   - {Scenario 1} (e.g., old downloads moved to archive, critical items exempt)\r\n   - {Scenario 2} (e.g., active project folder skipped, assets protected)\r\n   - {Scenario 3} (e.g., staged deletion with 30-day reversal)\r\n\r\n9. **Troubleshooting**\r\n   - {Common Issue} \u2192 {Likely Cause} \u2192 {Fix}\r\n   - Include at least 6 common problems (permissions, wrong timestamps, noisy patterns, schedule conflicts, archive bloat, missing reports)\r\n\r\n### Delivery Standards\r\n- Keep the system \u201cminimal moving parts\u201d unless complexity is justified by safety.\r\n- Use last-modified time as the primary aging signal everywhere.\r\n- Preserve context in archives by maintaining relative paths.\r\n- Never propose immediate permanent deletion.\r\n\r\n## QUALITY CHECKS\r\nBefore finalizing, verify:\r\n- Retention decisions use **last modified** (not created) timestamps.\r\n- Critical patterns are **exempt from auto-deletion** and appear in an exception report.\r\n- Deletion path includes **notification \u2192 staging (30 days) \u2192 permanent removal**.\r\n- Archiving preserves **folder hierarchy** and includes restore steps.\r\n- The schedule respects **[WHEN_AUTOMATION_SHOULD_RUN]** and avoids high-activity periods.";
    const variables = ["[LIST_SPECIFIC_FOLDERS_TO_CLEAN]","[NUMBER_OF_DAYS_FILES_SHOULD_REMAIN]","[FILE_TYPES_NAMES_THAT_SHOULD_NEVER_BE_AUTO_DELETED]","[WHEN_AUTOMATION_SHOULD_RUN]","[WHERE_ARCHIVED_FILES_SHOULD_BE_MOVED]","[CONTEXT]"];
    // Initial render with highlighted variables
    document.addEventListener('DOMContentLoaded', function() {
        renderPromptWithHighlights();
    });

    // Live update prompt as user types
    document.querySelectorAll('.customize-input').forEach(input => {
        input.addEventListener('input', renderPromptWithHighlights);
    });

    function renderPromptWithHighlights() {
        const promptContent = document.getElementById('premium-prompt-content');
        if (!promptContent) return;

        let updatedPrompt = originalPrompt;
        let filledVariables = {};

        // Collect filled values
        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                filledVariables[placeholder] = value;
            }
        });

        // Replace filled variables and highlight remaining
        let htmlContent = escapeHtml(updatedPrompt);

        variables.forEach(placeholder => {
            const escapedPlaceholder = escapeHtml(placeholder);
            const regex = new RegExp(escapeRegex(escapedPlaceholder), 'g');

            if (filledVariables[placeholder]) {
                // Show filled value with green highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable-filled">' + escapeHtml(filledVariables[placeholder]) + '</span>'
                );
            } else {
                // Show original placeholder with yellow highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable">' + escapedPlaceholder + '</span>'
                );
            }
        });

        promptContent.innerHTML = htmlContent;
    }

    function escapeRegex(string) {
        return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    }

    function escapeHtml(text) {
        const div = document.createElement('div');
        div.textContent = text;
        return div.innerHTML;
    }

    function resetPrompt() {
        // Clear all input fields
        document.querySelectorAll('.customize-input').forEach(input => {
            input.value = '';
        });

        // Re-render with original placeholders highlighted
        renderPromptWithHighlights();

        // Visual feedback
        const resetBtns = document.querySelectorAll('.prompt-header-reset, .prompt-cta-reset');
        resetBtns.forEach(btn => {
            const originalText = btn.querySelector('span').textContent;
            btn.querySelector('span').textContent = 'Reset!';
            setTimeout(() => {
                btn.querySelector('span').textContent = originalText;
            }, 1000);
        });
    }


    function getCustomizedPrompt() {
        let updatedPrompt = originalPrompt;

        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                const regex = new RegExp(escapeRegex(placeholder), 'g');
                updatedPrompt = updatedPrompt.replace(regex, value);
            }
        });

        return updatedPrompt;
    }
</script>

</div>

<div class="pro-tips-section">

<h2 class="wp-block-heading">Pro Tips for Better AI Prompt Results</h2>



<ul class="wp-block-list">

<li><strong>Paste a real folder snapshot, not a summary.</strong> Give the AI a trimmed but representative tree (top 2–3 levels) and note what’s shared vs personal. For example: “/Clients/Acme/Design, /Clients/Acme/Invoices, /Shared/Brand-Assets, /Finance/Taxes.” The prompt works best when it can treat active project directories differently from long-term storage.</li>


<li><strong>Define “active” with a business rule.</strong> Don’t say “active projects are recent.” Say what recent means for you. Follow-up prompt: “Assume a project is active if any file in the folder changed in the last 21 days, but keep ‘/Shared/Brand-Assets’ always active regardless of timestamps.”</li>


<li><strong>List your critical patterns explicitly.</strong> The prompt includes special handling for contracts, taxes, and licenses, but you should add your own landmines. Add patterns like “SOW,” “MSA,” “W-9,” “1099,” “insurance,” “renewal,” or client-specific keywords, then ask: “Generate the exception report fields you’d want for each match.”</li>


<li><strong>Force a dependency check pass before cleanup.</strong> Shared assets are where systems break. After the first output, ask: “Now add a dependency safeguard for folders that appear to be referenced by multiple projects (e.g., /Shared/Assets). Show how the system avoids moving or deleting those until a manual review step is completed.”</li>


<li><strong>Use a two-run rollout: ‘dry run’ then ‘move only.’</strong> First, request a simulation: “Create a dry-run mode that outputs a proposed action list with counts by folder and risk level.” Second, implement archive moves without deletion. Honestly, most anxiety disappears once people see that everything is reversible through quarantine.</li>

</ul>

</div>

<div class="related-prompts-section">

<h2 class="wp-block-heading">Related Prompts</h2>



<p>Once you have a safe cleanup system, these prompts help you document it, roll it out, and keep implementation tidy.</p>



<p>If you also need a concrete rollout plan that people will actually follow, pair this with <a href="https://flowpast.com/prompts/build-a-kotter-change-implementation-playbook-ai-prompt/">Build a Kotter Change Implementation Playbook AI Prompt</a>. Folder cleanup touches habits, not just files, so a change plan helps you set expectations, run a pilot, and avoid the “why did my stuff move?” backlash.</p>



<p>For teams doing operational standardization beyond storage, <a href="https://flowpast.com/prompts/build-a-crm-implementation-playbook-with-this-ai-prompt/">Build a CRM Implementation Playbook with this AI Prompt</a> is a good companion. It gives you a way to turn the cleanup rules into a repeatable process document, ownership model, and training checklist that new hires can follow.</p>



<p>When your cleanup effort is part of a broader site and SEO overhaul, <a href="https://flowpast.com/prompts/build-breadcrumb-navigation-checklists-with-this-ai-prompt/">Build Breadcrumb Navigation Checklists with this AI Prompt</a> fits nicely. It’s the same idea in a different domain: clear structure, fewer dead ends, and less “where does this belong?” confusion after you reorganize.</p>


<br>


<p>Quick reference:</p>



<ul class="wp-block-list">

<li><a href="https://flowpast.com/prompts/build-a-kotter-change-implementation-playbook-ai-prompt/">Build a Kotter Change Implementation Playbook AI Prompt</a>: Adoption plan for rolling out new processes.</li>


<li><a href="https://flowpast.com/prompts/build-a-crm-implementation-playbook-with-this-ai-prompt/">Build a CRM Implementation Playbook with this AI Prompt</a>: Document ownership, training, and rollout steps.</li>

<li><a href="https://flowpast.com/prompts/build-breadcrumb-navigation-checklists-with-this-ai-prompt/">Build Breadcrumb Navigation Checklists with this AI Prompt</a>: Structure checklists that reduce navigation confusion.</li>


<li><a href="https://flowpast.com/prompts/build-schema-markup-implementation-playbook-ai-prompt/">Build Schema Markup Implementation Playbook AI Prompt</a>: Implementation playbook with QA and validation steps.</li>


<li><a href="https://flowpast.com/prompts/build-an-amp-implementation-playbook-ai-prompt/">Build an AMP Implementation Playbook AI Prompt</a>: Rollout plan for performance-focused technical changes.</li>

</ul>
<!-- /wp:post-content -->
</div>

<div class="faq-section">
<!-- wp:heading {"level":2} -->
<h2 class="wp-block-heading">Common Questions</h2>
<!-- /wp:heading -->

<div class="faq-item">
<span class="question">Which roles benefit most from this safe folder cleanup AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Operations Managers</strong> use this to turn a messy shared drive into a governed system with schedules, approvals, and audit trails. <strong>Creative Ops or Studio Managers</strong> rely on it to separate active client work from archives without breaking shared asset dependencies. <strong>IT Coordinators</strong> apply it to reduce storage waste safely by using quarantine and exception reports instead of direct deletion. <strong>Agency Owners</strong> use it to create a calmer, faster handoff process when staff changes happen mid-project.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this safe folder cleanup AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Agencies and studios</strong> get immediate value because client folders contain shared assets, contracts, revisions, and exports that must stay recoverable, even when old. <strong>SaaS companies</strong> use it to keep product, marketing, and sales folders clean while protecting sensitive documents like vendor agreements and licenses through critical-pattern exception handling. <strong>E-commerce brands</strong> benefit when creative production (photos, video, ads) creates massive file volume; archiving while preserving folder structure keeps campaigns searchable later. <strong>Professional services firms</strong> apply it to separate active engagements from long-term records, with a quarantine buffer that reduces fear of deleting the wrong thing.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building a folder cleanup system produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like “Write me a folder cleanup plan for my computer” fails because it: lacks last-modified-time logic and accidentally relies on creation dates that don’t reflect real usage, provides no separation between archiving and deletion, ignores critical file patterns like contracts and taxes that should never follow generic rules, produces generic advice instead of a staged workflow with notifications and a user intervention window, and misses safeguards like a 30-day quarantine plus audit/exception reporting to make actions reversible and traceable.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this safe folder cleanup prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes, customize it by supplying your real folder categories (active projects, shared assets, finance/legal, personal), your low-activity window, and the retention windows that match how your team works. You should also tailor the critical patterns list to your business language (for example: “SOW,” “MSA,” “invoice,” “renewal,” “tax,” “license key”). Then ask a follow-up like: “Rewrite the rules for a team of 12 with 6 concurrent client projects, and add a weekly notification summary plus a monthly exception review meeting agenda.” The more specific your folder reality is, the safer the automation design becomes.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this safe folder cleanup prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is leaving your “active project” definition vague; instead of “active means recent,” use “active if any file changed in the last 21 days, or if the folder name includes 2026-Q1.” Another common error is skipping critical patterns; “legal docs” is weak, while “MSA, SOW, W-9, 1099, insurance, license” is actionable and produces a real exception report. People also forget to specify the low-activity window, which leads to disruptive runs; “overnight sometime” is risky, while “Mon–Fri 1:00–5:00 a.m. local time” is clear. Finally, many set one retention rule for everything; better is “90 days for exports, 365 for source files, never auto-delete finance/legal.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this safe folder cleanup prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for environments that require formal records management or legal compliance policy design, because it’s intentionally not an enterprise governance framework. It’s also a poor fit if you refuse to run backups separately, since the system assumes you already maintain reliable backups. And if you need a one-click “delete everything old” script, this will feel too cautious and process-heavy. In those cases, start with a manual audit and a backup plan, then come back when you’re ready for staged automation.</p>
<!-- /wp:paragraph -->
</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this safe folder cleanup AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Operations Managers use this to turn a messy shared drive into a governed system with schedules, approvals, and audit trails. Creative Ops or Studio Managers rely on it to separate active client work from archives without breaking shared asset dependencies. IT Coordinators apply it to reduce storage waste safely by using quarantine and exception reports instead of direct deletion. Agency Owners use it to create a calmer, faster handoff process when staff changes happen mid-project."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this safe folder cleanup AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Agencies and studios get immediate value because client folders contain shared assets, contracts, revisions, and exports that must stay recoverable, even when old. SaaS companies use it to keep product, marketing, and sales folders clean while protecting sensitive documents like vendor agreements and licenses through critical-pattern exception handling. E-commerce brands benefit when creative production (photos, video, ads) creates massive file volume; archiving while preserving folder structure keeps campaigns searchable later. Professional services firms apply it to separate active engagements from long-term records, with a quarantine buffer that reduces fear of deleting the wrong thing."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building a folder cleanup system produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me a folder cleanup plan for my computer” fails because it: lacks last-modified-time logic and accidentally relies on creation dates that don’t reflect real usage, provides no separation between archiving and deletion, ignores critical file patterns like contracts and taxes that should never follow generic rules, produces generic advice instead of a staged workflow with notifications and a user intervention window, and misses safeguards like a 30-day quarantine plus audit/exception reporting to make actions reversible and traceable."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this safe folder cleanup prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, customize it by supplying your real folder categories (active projects, shared assets, finance/legal, personal), your low-activity window, and the retention windows that match how your team works. You should also tailor the critical patterns list to your business language (for example: “SOW,” “MSA,” “invoice,” “renewal,” “tax,” “license key”). Then ask a follow-up like: “Rewrite the rules for a team of 12 with 6 concurrent client projects, and add a weekly notification summary plus a monthly exception review meeting agenda.” The more specific your folder reality is, the safer the automation design becomes."
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this safe folder cleanup prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving your “active project” definition vague; instead of “active means recent,” use “active if any file changed in the last 21 days, or if the folder name includes 2026-Q1.” Another common error is skipping critical patterns; “legal docs” is weak, while “MSA, SOW, W-9, 1099, insurance, license” is actionable and produces a real exception report. People also forget to specify the low-activity window, which leads to disruptive runs; “overnight sometime” is risky, while “Mon–Fri 1:00–5:00 a.m. local time” is clear. Finally, many set one retention rule for everything; better is “90 days for exports, 365 for source files, never auto-delete finance/legal.”"
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this safe folder cleanup prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for environments that require formal records management or legal compliance policy design, because it’s intentionally not an enterprise governance framework. It’s also a poor fit if you refuse to run backups separately, since the system assumes you already maintain reliable backups. And if you need a one-click “delete everything old” script, this will feel too cautious and process-heavy. In those cases, start with a manual audit and a backup plan, then come back when you’re ready for staged automation."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>Cleanup shouldn’t feel like gambling with your business history. Use this prompt to design a system that keeps what matters, archives the rest, and makes every “delete” reversible long before it’s final.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5001594.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build an E-commerce Security Action Plan AI Prompt</title>
		<link>https://flowpast.com/prompts/build-an-e-commerce-security-action-plan-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:40:34 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5003032</guid>

					<description><![CDATA[Payment data risks growing - a ready-to-use AI Prompt that builds an e-commerce security assessment with compliance, integration hardening, and roadmap. Thousands of ready-to-use AI prompts for all models.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: e-commerce security action plan -->

<div class="hook-introduction">

<p>Your store is collecting names, addresses, and card-related payment data every day, but security usually gets handled in scraps. A plugin gets added. A contractor gets admin access. Then one day you realize nobody owns the “what could go wrong” list, let alone a plan to fix it.</p>



<p>This <strong>e-commerce security action plan</strong> is built for <strong>e-commerce operations managers</strong> who need a prioritized hardening backlog without slowing checkout, <strong>agency leads</strong> inheriting messy client stacks with too many integrations, and <strong>founders</strong> who need a practical security assessment that aligns with real compliance obligations. The output is an implementation-ready assessment: threat mapping, environment-specific controls, integration risk callouts, and a sequenced roadmap your team can actually execute.</p>

</div>

<div class="what-and-when-section">

<h2 class="wp-block-heading">What Does This AI Prompt Do and When to Use It?</h2>



<table class="solution-results-table three-column" role="presentation" aria-label="What this prompt does, when to use it, and what you get">
 <thead>
    <tr>
      <th scope="col">What This Prompt Does</th>
      <th scope="col">When to Use This Prompt</th>
      <th scope="col">What You&#8217;ll Get</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <ul class="automation-list">
          <li>It restates your platform context, region, and integration footprint to confirm assumptions before recommending controls.</li>
          <li>It maps likely e-commerce attack paths (ATO, payment abuse, API exploitation, plugin supply-chain risk) and ties each path to the places your stack can break.</li>
          <li>It produces environment-specific hardening actions that fit your hosting limits, not generic “turn on every enterprise feature” advice.</li>
          <li>It evaluates each planned third-party integration as a risk junction, then suggests concrete mitigations (scopes, keys, webhooks, logging, least privilege).</li>
          <li>It balances security with UX and conversion by calling out friction points (auth, checkout, bot controls) and offering lower-friction alternatives.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You are adding or changing payment providers, fraud tooling, shipping apps, analytics tags, or CRM connections and want to avoid surprise risk.</li>
          <li>A compliance request landed (PCI-related questions, GDPR/UK GDPR expectations, breach response readiness) and you need a realistic plan fast.</li>
          <li>You have “too many admins” or unclear access practices, and offboarding or contractor access is starting to feel unsafe.</li>
          <li>There’s been a near-miss: odd login spikes, card testing, suspicious refunds, credential stuffing, or weird API traffic you can’t explain.</li>
          <li>You are scaling from scrappy to steady and need a security baseline that can be maintained by a small-to-mid e-commerce team.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A tailored threat map with 6–10 prioritized attack paths linked to your stack and integrations.</li>
           <li>A control checklist split into technical controls and procedural controls, written so tasks can be assigned to owners.</li>
           <li>A prioritized roadmap (Now / Next / Later) with rationale, effort level, and expected risk reduction.</li>
           <li>A set of integration-specific hardening notes for each planned integration (API keys, permissions, data flows, webhook verification).</li>
           <li>A short clarifying-question list when your inputs are missing, so you can refine the plan in one more pass.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

<div class="prompt-display-section">

<h2 class="wp-block-heading">The Full AI Prompt: E-commerce Security Assessment + Hardening Roadmap</h2>


<!-- Prompt file not found: /home/flowpast/htdocs/flowpast.com/wp-content/data/prompts_scraped/5003240/prompt-2026.txt -->

</div>

<div class="pro-tips-section">

<h2 class="wp-block-heading">Pro Tips for Better AI Prompt Results</h2>



<ul class="wp-block-list">

<li><strong>Write your “stack inventory” first.</strong> Before you run the prompt, list your storefront platform, hosting, payment flow (redirect vs on-site), and every integration that touches customer data. If you’re unsure, paste your plugin/app list and ask: “Group these by risk: payments, auth, analytics, fulfillment, marketing, admin.”</li>


<li><strong>Be specific about the host environment constraints.</strong> The prompt is designed to align recommendations to the capabilities and limits of your hosting platform, so give it real boundaries. Follow-up example: “Assume we cannot install kernel agents and we have no SIEM; propose lightweight logging and alerting options that still catch account takeover and card testing.”</li>


<li><strong>Spell out your region and what “compliance” means to you.</strong> “We sell globally” is vague; “We’re US-based, 40% EU customers, and we store order history for 3 years” is useful. A good add-on prompt: “List the top 5 compliance-driven controls we can implement this month without legal review, and what evidence we should save.”</li>


<li><strong>Force prioritization after the first pass.</strong> Ask the model to rank items by impact and effort so the plan becomes executable, not aspirational. Try: “Now rewrite the roadmap as a 2-week sprint plan for a team of 3 (dev, ops, support), and make option 2 more aggressive and option 4 more conservative.”</li>


<li><strong>Stress-test the integration junctions.</strong> Most real incidents in e-commerce show up where systems connect: webhooks, admin apps, API tokens, analytics scripts, and vendor dashboards. Follow-up example: “For each integration, list the exact data elements exchanged, worst-case abuse scenario, and one control that detects it (not just prevents it).” Honestly, detection is where small teams usually underinvest.</li>

</ul>

</div>

<div class="related-prompts-section">

<h2 class="wp-block-heading">Related Prompts</h2>



<p>Once you’ve outlined your security action plan, these prompts help you document decisions, train the team, and communicate the “why” behind the controls.</p>



<p>If you also need to get internal buy-in, <a href="https://flowpast.com/prompts/create-essential-topic-takeaways-with-this-ai-prompt/">Create Essential Topic Takeaways with this AI Prompt</a> is useful for turning your hardening backlog into a one-page summary that leadership will actually read. It’s a clean way to explain what changes now, what changes later, and the risk you’re reducing in plain language.</p>



<p>When onboarding new staff or contractors, <a href="https://flowpast.com/prompts/build-a-teachable-concept-map-with-this-ai-prompt/">Build a Teachable Concept Map with this AI Prompt</a> helps you map your security model (access, data flows, payment boundaries, incident response) into a simple learning path. That matters because procedural controls fail when nobody understands the system they’re trying to protect.</p>



<p>For teams doing training in a more interactive way, <a href="https://flowpast.com/prompts/ai-prompt-to-teach-business-concepts-as-socratic-dialogue/">AI Prompt to Teach Business Concepts as Socratic Dialogue</a> can turn “security rules” into a guided Q&amp;A session. Use it to walk through scenarios like credential stuffing, compromised API keys, or a shady plugin update, then capture the decisions your team should make.</p>


<br>


<p>Quick reference:</p>



<ul class="wp-block-list">

<li><a href="https://flowpast.com/prompts/create-essential-topic-takeaways-with-this-ai-prompt/">Create Essential Topic Takeaways with this AI Prompt</a>: One-page summary for stakeholder buy-in.</li>


<li><a href="https://flowpast.com/prompts/build-a-teachable-concept-map-with-this-ai-prompt/">Build a Teachable Concept Map with this AI Prompt</a>: Train teams on security data flows.</li>


<li><a href="https://flowpast.com/prompts/ai-prompt-to-teach-business-concepts-as-socratic-dialogue/">AI Prompt to Teach Business Concepts as Socratic Dialogue</a>: Scenario-based security decision training.</li>

<li><a href="https://flowpast.com/prompts/build-a-topic-concept-map-with-this-ai-prompt/">Build a Topic Concept Map with this AI Prompt</a>: Visualize policy, access, and controls.</li>

<li><a href="https://flowpast.com/prompts/master-any-topic-faster-with-this-ai-prompt/">Master Any Topic Faster with this AI Prompt</a>: Ramp up on PCI, ATO, and fraud.</li>
<!-- /wp:post-content -->
</ul>
<!-- /wp:list -->
</div>

<div class="faq-section">
<!-- wp:heading {"level":2} -->
<h2 class="wp-block-heading">Common Questions</h2>
<!-- /wp:heading -->

<div class="faq-item">
<span class="question">Which roles benefit most from this e-commerce security action plan AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>E-commerce Operations Managers</strong> use this to turn scattered security “to-dos” into a prioritized roadmap that doesn’t break checkout. <strong>Security Leads at small companies</strong> rely on it to rapidly threat-map real e-commerce attack paths and translate them into implementable controls. <strong>CTOs or Lead Developers</strong> get value because the output separates configuration, code, and infrastructure tasks, so work can be scheduled and owned. <strong>Agency Owners</strong> apply it when inheriting client stores with risky plugin stacks and unclear access governance.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this e-commerce security action plan AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Direct-to-consumer (DTC) brands</strong> use this to reduce account takeover, fraud refund loops, and third-party script risk without tanking conversion. It’s especially helpful when marketing keeps adding tags and tools that touch customer data. <strong>Subscription e-commerce</strong> teams apply it to protect recurring billing flows, customer portals, and “update payment method” journeys that attract attackers. <strong>Digital goods and online marketplaces</strong> leverage it to harden anti-abuse controls (bot defense, rate limits, identity checks) where fraudsters target instant fulfillment. <strong>Retailers modernizing legacy commerce</strong> find it useful when they’re stitching together ERP, CRM, and shipping systems and need safer integration patterns.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building an e-commerce security action plan produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like “Write me a security plan for my online store” fails because it: lacks your hosting platform constraints, so it recommends tools you can’t deploy; provides no threat mapping, so you get generic checklists instead of likely attack paths; ignores your region and compliance realities, so guidance becomes a messy global summary; skips integration junctions, where real breaches often happen; and produces vague “best practices” rather than prioritized tasks with owners and sequencing.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this e-commerce security action plan prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes. The prompt is designed to adapt to your HOSTING_PLATFORM, REGION_COUNTRY, and PLANNED_INTEGRATIONS so recommendations match what you can actually implement. If the first output feels too generic, rerun it with tighter details such as “Shopify + 12 apps,” “AWS ECS behind CloudFront,” or “EU customers with UK operations,” plus the exact vendors you’re integrating. A strong follow-up is: “Rewrite the roadmap for our team capacity (2 devs, no dedicated security), and flag anything that could add checkout friction with alternatives.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this e-commerce security action plan prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is leaving HOSTING_PLATFORM too vague — instead of “cloud hosting,” say “Shopify (hosted) with custom theme” or “WooCommerce on managed WordPress hosting.” Another common error is flattening PLANNED_INTEGRATIONS into “some apps,” rather than listing specifics like “Klaviyo, Recharge, ShipStation, GA4 via GTM, Zendesk,” which prevents integration-by-integration risk controls. People also misstate REGION_COUNTRY as “global,” when “US-based selling to EU customers” changes what data handling and retention recommendations look like. Finally, teams forget to mention UX constraints (for example, “no CAPTCHA at checkout”), so the plan can accidentally hurt conversion unless you clarify that boundary.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this e-commerce security action plan prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for one-off projects where you will not revisit the plan after your stack changes, because integrations and risk shift constantly. It’s also not a substitute for a formal audit if you need certified compliance validation or penetration testing evidence for a partner. And if you have zero clarity on your platform, integrations, or data flows, you’ll get assumptions you must correct. In that case, start by inventorying your stack and access model, then rerun the prompt with those specifics.</p>
<!-- /wp:paragraph -->
</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this e-commerce security action plan AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "E-commerce Operations Managers use this to turn scattered security “to-dos” into a prioritized roadmap that doesn’t break checkout. Security Leads at small companies rely on it to rapidly threat-map real e-commerce attack paths and translate them into implementable controls. CTOs or Lead Developers get value because the output separates configuration, code, and infrastructure tasks, so work can be scheduled and owned. Agency Owners apply it when inheriting client stores with risky plugin stacks and unclear access governance."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this e-commerce security action plan AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Direct-to-consumer (DTC) brands use this to reduce account takeover, fraud refund loops, and third-party script risk without tanking conversion. It’s especially helpful when marketing keeps adding tags and tools that touch customer data. Subscription e-commerce teams apply it to protect recurring billing flows, customer portals, and “update payment method” journeys that attract attackers. Digital goods and online marketplaces leverage it to harden anti-abuse controls (bot defense, rate limits, identity checks) where fraudsters target instant fulfillment. Retailers modernizing legacy commerce find it useful when they’re stitching together ERP, CRM, and shipping systems and need safer integration patterns."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building an e-commerce security action plan produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me a security plan for my online store” fails because it: lacks your hosting platform constraints, so it recommends tools you can’t deploy; provides no threat mapping, so you get generic checklists instead of likely attack paths; ignores your region and compliance realities, so guidance becomes a messy global summary; skips integration junctions, where real breaches often happen; and produces vague “best practices” rather than prioritized tasks with owners and sequencing."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this e-commerce security action plan for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. The prompt is designed to adapt to your HOSTING_PLATFORM, REGION_COUNTRY, and PLANNED_INTEGRATIONS so recommendations match what you can actually implement. If the first output feels too generic, rerun it with tighter details such as “Shopify + 12 apps,” “AWS ECS behind CloudFront,” or “EU customers with UK operations,” plus the exact vendors you’re integrating. A strong follow-up is: “Rewrite the roadmap for our team capacity (2 devs, no dedicated security), and flag anything that could add checkout friction with alternatives.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this e-commerce security action plan prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving HOSTING_PLATFORM too vague — instead of “cloud hosting,” say “Shopify (hosted) with custom theme” or “WooCommerce on managed WordPress hosting.” Another common error is flattening PLANNED_INTEGRATIONS into “some apps,” rather than listing specifics like “Klaviyo, Recharge, ShipStation, GA4 via GTM, Zendesk,” which prevents integration-by-integration risk controls. People also misstate REGION_COUNTRY as “global,” when “US-based selling to EU customers” changes what data handling and retention recommendations look like. Finally, teams forget to mention UX constraints (for example, “no CAPTCHA at checkout”), so the plan can accidentally hurt conversion unless you clarify that boundary."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this e-commerce security action plan prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for one-off projects where you will not revisit the plan after your stack changes, because integrations and risk shift constantly. It’s also not a substitute for a formal audit if you need certified compliance validation or penetration testing evidence for a partner. And if you have zero clarity on your platform, integrations, or data flows, you’ll get assumptions you must correct. In that case, start by inventorying your stack and access model, then rerun the prompt with those specifics."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>Security gets easier when you stop treating it like a random checklist and start treating it like a roadmap. Paste this prompt into your AI tool, run it against your current stack, and turn the output into the next set of fixes you ship.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5003032.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build Email Reporting Automation with this AI Prompt</title>
		<link>https://flowpast.com/prompts/build-email-reporting-automation-with-this-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:39:53 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5001589</guid>

					<description><![CDATA[Fire drills keep happening - the ultimate AI Prompt that designs an automated email reporting system with readable digests, routing, and secure auth. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: email reporting automation -->
<div class="hook-introduction">

<p>Your inbox is full, but you still don’t know what’s going wrong until it’s already on fire. So you scramble, ask for screenshots, pull reports manually, and ship a “quick update” that solves nothing. It’s exhausting. And frankly, it’s avoidable.</p>



<p>This <strong>email reporting automation</strong> is built for <strong>marketing ops leads</strong> who need clean weekly performance digests without chasing data, <strong>sales operations managers</strong> who want role-aware pipeline and activity summaries that actually get read, and <strong>IT/RevOps owners</strong> who must keep auth secure while routing alerts quietly to admins. The output is a practical implementation plan (cadence, routing, auth, logging, safeguards) plus ready-to-use report templates with sortable subject lines, digest layouts, and unsubscribe/opt-down rules.</p>

</div>

<div class="what-and-when-section">

<h2 class="wp-block-heading">What Does This AI Prompt Do and When to Use It?</h2>



<table class="solution-results-table three-column" role="presentation" aria-label="What this prompt does, when to use it, and what you get">
 <thead>
    <tr>
      <th scope="col">What This Prompt Does</th>
      <th scope="col">When to Use This Prompt</th>
      <th scope="col">What You&#8217;ll Get</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <ul class="automation-list">
          <li>It designs an email-based reporting system that turns raw signals into readable digests, with clarity prioritized over exhaustiveness.</li>
          <li>It defines subject line rules that are immediately sortable, including report category, date range, and an urgency indicator.</li>
          <li>It maps role-aware routing (who receives what) and adds opt-down/unsubscribe mechanisms that honor communication preferences.</li>
          <li>It specifies secure authentication and secret-handling patterns using OAuth2 and/or app passwords, explicitly avoiding basic auth and plain-text secrets.</li>
          <li>It adds failure handling, admin-only alerts, and diagnostic logging so the system can break quietly for recipients but loudly for maintainers.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You’re dealing with recurring “what happened?” threads after something dips, and leadership wants earlier warning without more meetings.</li>
          <li>Your team is exporting dashboards into email by hand, and the process fails whenever the one person who knows it is out.</li>
          <li>Stakeholders ignore existing reports because they’re too long, poorly timed, or impossible to scan in 30 seconds.</li>
          <li>You need to tighten security posture (no basic auth, no shared passwords) while still distributing reports broadly.</li>
          <li>You’re scaling channels, regions, or time zones, and report cadence/blackout windows now matter as much as the metrics.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A complete implementation plan that covers cadence, time zones, blackout windows, routing logic, and escalation rules.</li>
           <li>At least 6 subject line templates with category/date-range/urgency formatting you can standardize across teams.</li>
           <li>Three email digest templates (daily, weekly, and exception-based) with scan-friendly sections and action cues.</li>
           <li>A failure-and-logging blueprint, including admin alerting flows, “quiet failure” rules for end users, and log fields.</li>
           <li>A safeguards checklist for auth, secret storage, notification fatigue controls, and opt-down/unsubscribe mechanisms.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

<div class="prompt-display-section">

<h2 class="wp-block-heading">The Full AI Prompt: Email Reporting Automation System Designer</h2>



<div class="prompt-viewer-wrapper" id="prompt-section">
    <div class="prompt-comparison-row prompt-premium">
        <!-- Header with buttons -->
        <div class="prompt-row-header">
            <!-- <span class="prompt-row-icon">✨</span> -->
            <span class="prompt-row-title">
                                    Step 1: Customize the prompt with your input
                            </span>
            <div class="prompt-header-buttons">
                                    <button class="prompt-header-btn prompt-header-reset" onclick="resetPrompt()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                                <button class="prompt-header-btn prompt-header-copy-green flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span>Customize and Copy Full Prompt</span>
                </button>
            </div>
        </div>

        <!-- Customize the Prompt Section -->
                    <div class="prompt-customize-section">
                <span class="customize-title">Customize the Prompt</span>
                <p class="customize-subtitle">Fill in the fields below to personalize this prompt for your needs.</p>
                <table class="customize-table">
                    <thead>
                        <tr>
                            <th>Variable</th>
                            <th>What to Enter</th>
                            <th>Customise the prompt</th>
                        </tr>
                    </thead>
                    <tbody>
                                                    <tr>
                                <td class="var-name"><code>[SMTP_SERVER_DETAILS]</code></td>
                                <td class="var-desc">
                                    Provide the configuration details for the SMTP server, including hostname, port, and encryption method.                                    <div class="var-example">For example: "Hostname: smtp.example.com, Port: 587, Encryption: TLS"</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[SMTP_SERVER_DETAILS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[SMTP_AUTH_DETAILS]</code></td>
                                <td class="var-desc">
                                    Specify the authentication credentials for the SMTP server, such as OAuth2 tokens or app passwords.                                    <div class="var-example">For example: "OAuth2 Token: ya29.a0AfH6SMC_example_token, App Password: abcd1234"</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[SMTP_AUTH_DETAILS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[RECIPIENT_LISTS]</code></td>
                                <td class="var-desc">
                                    Define the groups or individuals who will receive the reports, including their email addresses and roles if applicable.                                    <div class="var-example">For example: "Operations Team: ops-team@example.com, Admins: admin@example.com, Executives: ceo@example.com"</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[RECIPIENT_LISTS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[REPORT_SPECS]</code></td>
                                <td class="var-desc">
                                    Detail the structure, content, and categories of the reports, including key metrics and highlights to include.                                    <div class="var-example">For example: "Weekly Incident Summary: Include resolved and unresolved issues, trends, and early-warning indicators. Monthly Performance Overview: Highlight KPIs, system uptime, and exception patterns."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[REPORT_SPECS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[SCHEDULING_REQUIREMENTS]</code></td>
                                <td class="var-desc">
                                    Specify the timing and frequency for sending reports, considering work habits, time zones, and blackout windows.                                    <div class="var-example">For example: "Daily Reports: Sent at 8 AM local time. Weekly Reports: Sent every Monday at 9 AM. Avoid sending during weekends and public holidays."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[SCHEDULING_REQUIREMENTS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[COMMUNICATION_CULTURE]</code></td>
                                <td class="var-desc">
                                    Describe the organization&#039;s preferences for communication style, tone, and level of formality in reports.                                    <div class="var-example">For example: "Concise and formal tone, avoiding technical jargon. Use bullet points for clarity and include actionable recommendations."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[COMMUNICATION_CULTURE]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[ADMIN_ALERT_RECIPIENTS]</code></td>
                                <td class="var-desc">
                                    List the email addresses of administrators who should receive alerts about system failures or critical errors.                                    <div class="var-example">For example: "System Admin: sysadmin@example.com, IT Manager: itmanager@example.com"</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[ADMIN_ALERT_RECIPIENTS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[IMPLEMENTATION_STACK]</code></td>
                                <td class="var-desc">
                                    Specify the tools, platforms, and frameworks that will be used to build and operate the email reporting system.                                    <div class="var-example">For example: "Mail Transport: Postfix, Scheduler: cron jobs, Report Assembly: Python scripts with Jinja templates, Logging: ELK Stack."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[IMPLEMENTATION_STACK]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                            </tbody>
                </table>

                <button class="copy-customized-btn flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                    <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                        <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                        <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                    </svg>
                    <span class="copy-customized-text">Customise the prompt now</span>
                </button>
            </div>
        
        <!-- Full Prompt Code Header -->
                    <div class="prompt-code-header">
                <span class="prompt-code-title">
                    Step 2: Copy the Prompt
                </span>
                <div class="prompt-code-buttons">
                    <!-- Reset: Only visible when unlocked -->
                    <button class="prompt-header-btn prompt-header-reset btn-when-unlocked" onclick="resetPrompt()" style="display: none;">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path fill-rule="evenodd" d="M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z" />
                            <path d="M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z" />
                        </svg>
                        <span>Reset</span>
                    </button>
                    <!-- Copy Full Prompt -->
                    <button class="prompt-header-btn prompt-header-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
                            <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                            <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
                        </svg>
                        <span>Copy Full Prompt</span>
                    </button>
                </div>
            </div>
        

        <!-- Prompt Content -->
        <div class="prompt-box prompt-gated-wrapper">
            <!-- Gated: Blurred content -->
            <div class="prompt-gated-content">
                <div class="prompt-header-visible">OBJECTIVE</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PERSONA</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">CONSTRAINTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div><div class="locked-line" style="width: 70%;"></div><div class="locked-line" style="width: 83%;"></div><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">PROCESS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">INPUTS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div><div class="locked-line" style="width: 80%;"></div><div class="locked-line" style="width: 95%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">OUTPUT SPECIFICATION</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">1) SMTP Configuration Setup</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">2) Recipient Management System</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">3) Report Generation Pipeline</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">4) Scheduling Engine</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">5) Subject Line Templates</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">6) Error Handling Framework</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">7) Logging Architecture</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">8) Testing Protocol</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">9) Maintenance Procedures</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">Security Warning Box Template (use when relevant)</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div></div></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible">QUALITY CHECKS</div><div class="locked-section"><div class="locked-section-bg"><div class="locked-section-lines"><div class="locked-line" style="width: 85%;"></div><div class="locked-line" style="width: 78%;"></div><div class="locked-line" style="width: 92%;"></div><div class="locked-line" style="width: 75%;"></div><div class="locked-line" style="width: 88%;"></div><div class="locked-line" style="width: 72%;"></div></div></div><div class="locked-section-icon">🔒</div></div>            </div>
            <!-- Unlocked: Full content (hidden by default) -->
            <div class="prompt-content-full" id="premium-prompt-content" style="display: none;">
                ## OBJECTIVE
Design an email-based reporting automation system that stops reactive firefighting by delivering timely, readable, role-aware reports—so issues are surfaced early (important-not-urgent) rather than exploding into emergencies (urgent-and-important). The deliverable is a practical implementation plan plus templates, safeguards, and operational guidance.

## PERSONA
You are an automation systems architect with a background in incident response and operational continuity. You think in terms of preventing escalation, building calm information flow, and aligning automation with real human behavior (what people actually read, when they read it, and what makes them act).

## CONSTRAINTS
- Use modern mail authentication options (OAuth2 and/or app passwords). Do not assume basic auth.
- Prioritize clarity: reports must be easy to scan and interpret before they are exhaustive.
- Subject lines must be immediately sortable and recognizable: include report category, date range, and an urgency indicator.
- Send cadence must match work habits, time zones, and blackout windows—not arbitrary timers.
- Failures must be handled quietly for end users: alert administrators without blasting recipients.
- Logs must be diagnostic: include context and actionable clues, not just event times.
- Prevent notification fatigue: fewer, higher-signal messages over constant pings.
- Include proactive/predictive patterns (early-warning indicators, trend thresholds, exception reporting).
- Never store secrets in plain text or trivially reversible forms; recommend secure secret storage.
- Always include unsubscribe/opt-down mechanisms and honor communication preferences.
- **What This Is NOT**
  - Not a vendor-specific step-by-step for a single tool unless explicitly provided.
  - Not a legal/compliance opinion (e.g., GDPR/Can-SPAM counsel).
  - Not a full BI dashboard build; this focuses on automated email reporting and its plumbing.
  - Not a complete SOC/incident response runbook beyond reporting-related alerts.

## PROCESS
1. **Pre-Analysis Step (state understanding first):** Briefly summarize your interpretation of the organization’s situation, goals, and constraints based on the provided inputs. List any assumptions.
2. **Clarify gaps:** If any inputs are missing or ambiguous, ask targeted questions and propose safe defaults (clearly labeled) so implementation can still proceed.
3. **Architect the system:** Define the components (mail transport, recipient routing, report assembly, scheduler, subject taxonomy, error controls, logging, testing, maintenance).
4. **Human-centered reporting:** Specify how each report will be structured for scanning (headlines, highlights, “what changed,” “what needs attention,” and links/attachments).
5. **Proactive logic:** Add early-warning triggers (thresholds, anomalies, trend breaks) and a rule for when to suppress routine messages.
6. **Security by design:** Explain secret handling, access boundaries, least privilege, and preference management.
7. **Operational readiness:** Provide testing, rollout, and ongoing tuning steps.

## INPUTS
- **SMTP server details (host/port/TLS or equivalent):** [SMTP_SERVER_DETAILS]
- **Authentication method and credentials (OAuth token or app password; no plain text storage):** [SMTP_AUTH_DETAILS]
- **Recipient list with roles and routing notes:** [RECIPIENT_LISTS]
- **Report data sources, metrics, and formatting preferences:** [REPORT_SPECS]
- **Send frequency, time zones, blackout periods:** [SCHEDULING_REQUIREMENTS]
- **Reading habits, urgency patterns, and comms culture:** [COMMUNICATION_CULTURE]
- **Admin/on-call addresses for failure notifications (if different):** [ADMIN_ALERT_RECIPIENTS]
- **Preferred implementation environment/tooling (e.g., Python, Power Automate, Zapier, Airflow):** [IMPLEMENTATION_STACK]

## OUTPUT SPECIFICATION
Produce a stepwise implementation plan with the following sections (use the exact headings). Use:
- Code blocks for configuration examples (redact secrets; show placeholders).
- Bullet lists for capabilities/features.
- Numbered procedures for action steps.
- Security callouts in boxed formatting (see template below).

### 1) SMTP Configuration Setup
Include:
- Connection parameters, TLS/STARTTLS guidance, and modern auth setup (OAuth2/app password).
- Secret storage approach (e.g., vault, OS keychain, managed secrets).
- Example config snippet using placeholders such as {SmtpHost}, {SmtpPort}, {SecurityMode}.

### 2) Recipient Management System
Include:
- Role-based distribution rules (e.g., exec summary vs. operator detail).
- Preference management (opt-down, unsubscribe, digest vs immediate).
- Format for maintaining lists (directory sync, config file, database), plus validation checks.

### 3) Report Generation Pipeline
Include:
- Data ingestion from multiple sources, normalization, and rendering.
- Human-readable layout guidance (TL;DR block, key deltas, exceptions, glossary).
- Attachment rules and fallbacks (inline tables vs attachments).
- Templates using placeholders like {ReportType}, {DateRange}, {TopFindings}, {ActionsNeeded}.

### 4) Scheduling Engine
Include:
- Time zone handling, blackout windows, and “send only on meaningful change” options.
- Cadence recommendation aligned to [COMMUNICATION_CULTURE].
- A rule for escalation: when to switch from digest to urgent alert.

### 5) Subject Line Templates
Provide 5–8 subject patterns with placeholders like:
- {ReportType}, {StartDate}, {EndDate}, {UrgencyLevel}, {BusinessUnit}
Ensure they’re consistent, filter-friendly, and date-stamped.

### 6) Error Handling Framework
Include:
- Bounce/invalid recipient handling, retries with backoff, timeout behavior.
- Admin notification policy that avoids user spam.
- A small decision table mapping {FailureType} → {Action} → {WhoIsNotified}.

### 7) Logging Architecture
Include:
- What to log (message ID, recipient group, render version, data freshness, error context).
- Where logs live, retention, and audit trail design.
- Examples of “actionable” log entries (with placeholders like {CorrelationId}, {DatasetVersion}).

### 8) Testing Protocol
Include:
- Unit tests (rendering, routing, scheduling), integration tests (SMTP), and UAT steps.
- A staging/dry-run mode that generates but does not send.
- Acceptance criteria checklist before go-live.

### 9) Maintenance Procedures
Include:
- Monitoring, periodic review of report usefulness, and fatigue controls.
- Credential rotation, permission reviews, template updates.
- A quarterly optimization routine to keep everything in the “important-not-urgent” zone.

### Security Warning Box Template (use when relevant)
&gt; **Security Note**  
&gt; {SecurityConcern}  
&gt; **Do instead:** {RecommendedPractice}  
&gt; **Why it matters:** {Impact}

## QUALITY CHECKS
At the end, include a short verification list (4–5 items) confirming:
- Modern auth is supported and secrets are handled safely (no plain text).
- Subject lines meet the filterability standard (type + date range + urgency).
- Scheduling respects time zones, blackout periods, and reading patterns.
- Error handling informs admins without overwhelming recipients.
- Logs contain troubleshooting context (not only timestamps).            </div>
        </div>


    </div>

    <!-- CTA Row - Full width buttons -->
    <div class="prompt-cta-row">
        <button class="prompt-cta-btn prompt-cta-copy flowpast-copy-prompt-btn" onclick="handlePromptCopy()">
            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
                <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
                <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
            </svg>
            <span class="cta-copy-text">Copy Full Prompt</span>
        </button>
    </div>
</div>

<style>
    /* Gated prompt states */
    .prompt-gated-wrapper {
        position: relative;
    }

    /* When unlocked - show full content, hide gated */
    body.flowpast-unlocked .prompt-gated-wrapper .prompt-gated-content {
        display: none;
    }

    body.flowpast-unlocked .prompt-gated-wrapper .prompt-content-full {
        display: block !important;
    }

    /* Show/hide elements based on unlock state */
    body.flowpast-unlocked .btn-when-unlocked {
        display: inline-flex !important;
    }

    .prompt-viewer-wrapper {
        scroll-margin-top: 250px;
    }

    /* ========================================
   PROMPT VIEWER - MAIN WRAPPER
   ======================================== */
    .prompt-viewer-wrapper {
        margin: 30px 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* ========================================
   PROMPT BOX CONTAINER
   ======================================== */
    .prompt-comparison-row {
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid #e0e0e0;
        background: #fff;
    }

    /* ========================================
   HEADER WITH BUTTONS
   ======================================== */
    .prompt-row-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
        flex-wrap: wrap;
    }

    .prompt-row-icon {
        font-size: 20px;
    }

    .prompt-row-title {
        font-weight: 600;
        font-size: 22px;
        color: #fff !important;
        text-decoration: underline
    }

    .prompt-header-buttons {
        margin-left: auto;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Header buttons */
    .prompt-header-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-header-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-header-copy:hover {
        background: #2a2a2a;
    }

    .prompt-header-copy.copied {
        background: #2e7d32;
    }

    .prompt-header-copy-green {
        background: #04AA6D !important;
        color: #fff !important;
    }

    .prompt-header-copy-green:hover {
        background: #039860 !important;
    }

    .prompt-header-copy-green.copied {
        background: #2e7d32 !important;
    }

    .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-header-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-1px);
    }

    /* ========================================
   PROMPT CONTENT - FULL (NO SCROLL)
   ======================================== */
    .prompt-box {
        background: #ffffff;
    }

    .prompt-content-full {
        padding: 24px;
        margin: 0;
        color: #202124;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.7;
        white-space: pre-wrap;
        word-wrap: break-word;
        /* No scroll - show full content */
        max-height: none;
        overflow: visible;
    }

    /* Highlighted variable in prompt */
    .prompt-variable {
        background: #fff3cd;
        color: #1967d2;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #ffc107;
    }

    .prompt-variable-filled {
        background: #d4edda;
        color: #155724;
        font-weight: 700;
        padding: 2px 4px;
        border-radius: 3px;
        border: 1px solid #28a745;
    }

    /* ========================================
   GATED CONTENT (NO ACCESS)
   ======================================== */
    .prompt-gated-content {
        padding: 24px;
        background: #ffffff;
        font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
        font-size: 13px;
        line-height: 1.8;
        max-height: none;
        overflow: visible;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        cursor: default;
    }

    /* ## headers - larger, black */
    .prompt-header-visible {
        color: #202124;
        font-weight: 600;
        margin: 5px 0 0px 0;
        font-size: 20px;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        text-decoration: underline;
        text-underline-offset: 4px;
    }

    /* ### headers - smaller, black */
    .prompt-header-visible.subheader {
        color: #202124;
        font-weight: 600;
        margin: 5px 0;
        font-size: 18px;
    }

    .prompt-header-visible:first-child {
        margin-top: 0;
    }

    /* ========================================
   LOCKED SECTION BLOCK
   ======================================== */
    .locked-section {
        position: relative;
        margin: 4px 0 8px 0;
        border-radius: 6px;
        overflow: hidden;
        background: linear-gradient(110deg, #e2e8f0 8%, #f1f5f9 18%, #e2e8f0 33%);
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }

    .locked-section-bg {
        position: relative;
    }

    .locked-section-lines {
        padding: 8px 12px;
        position: relative;
    }

    .locked-line {
        height: 6px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 3px;
        margin-bottom: 4px;
        margin-left: 12px;
    }

    .locked-line:last-child {
        margin-bottom: 0;
    }

    .locked-section-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        font-size: 24px;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
    }

    /* Subheader locked sections - slightly indented */
    /*  .prompt-header-visible.subheader+.locked-section {
        margin-left: 16px;
    } */

    /* ========================================
   COMPATIBILITY BADGES
   ======================================== */
    .prompt-compatibility {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 12px 20px;
        background: #f8f9fa;
        border-top: 1px solid #e0e0e0;
    }

    .compat-label {
        font-size: 13px;
        color: #5f6368;
        font-weight: 500;
    }

    .compat-badge {
        padding: 4px 10px;
        background: #e8f0fe;
        color: #1967d2;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }

    /* ========================================
   CTA ROW - FULL WIDTH BUTTONS
   ======================================== */
    .prompt-cta-row {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
    }

    .prompt-cta-btn {
        flex: 1;
        min-width: 200px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 16px 24px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        border: none;
    }

    .prompt-cta-copy {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-copy:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-copy.copied {
        background: #2e7d32;
    }

    .prompt-cta-reset {
        background: #3a3a3a;
        color: #fff;
    }

    .prompt-cta-reset:hover {
        background: #2a2a2a;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .prompt-cta-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
    }

    .prompt-cta-access:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    /* ========================================
    CUSTOMIZE YOUR PROMPT SECTION
    ======================================== */
    .prompt-customize-section {
        padding: 24px;
        border-bottom: 1px solid #e0e0e0;
        background: #fafbfc;
    }

    .customize-title {
        margin: 0 0 8px 0;
        font-size: 18px;
        font-weight: 700;
        color: #202124;
    }

    .customize-subtitle {
        margin: 0 0 20px 0;
        font-size: 14px;
        color: #5f6368;
    }

    .customize-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }

    .customize-table th {
        text-align: left;
        padding: 12px;
        background: #f1f3f4;
        border: 1px solid #e0e0e0;
        font-size: 13px;
        font-weight: 600;
        color: #202124;
    }

    .customize-table td {
        padding: 12px;
        border: 1px solid #e0e0e0;
        vertical-align: top;
    }

    .customize-table .var-name {
        width: 25%;
        background: #f8f9fa;
    }

    .customize-table .var-name code {
        background: #fff3cd;
        color: #1967d2;
        border: 1px solid #ffc107;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 12px;
        word-break: break-all;
        font-weight: 600;
    }

    .customize-table .var-desc {
        width: 35%;
        font-size: 13px;
        color: #5f6368;
        line-height: 1.5;
    }

    .customize-table .var-example {
        margin-top: 8px;
        padding: 8px 10px;
        background: #f8f9fa;
        border-left: 3px solid #dadce0;
        font-size: 12px;
        color: #5f6368;
        font-style: italic;
        border-radius: 0 4px 4px 0;
    }

    .customize-table .var-input {
        width: 40%;
    }

    .customize-input {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #dadce0;
        border-radius: 6px;
        font-size: 13px;
        font-family: inherit;
        resize: vertical;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    .customize-input:focus {
        outline: none;
        border-color: rgb(5, 152, 98);
        box-shadow: 0 0 0 3px rgba(5, 152, 98, 0.1);
    }

    .customize-input::placeholder {
        color: #9aa0a6;
        font-style: italic;
    }

    .copy-customized-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 16px 24px;
        background: rgb(5, 152, 98);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .copy-customized-btn:hover {
        background: rgb(4, 130, 83);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(5, 152, 98, 0.3);
    }

    .copy-customized-btn.copied {
        background: #2e7d32;
    }

    /* ========================================
    FULL PROMPT CODE HEADER
    ======================================== */
    .prompt-code-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
        color: #fff !important;
        background: #141414;
        border-bottom: 1px solid #e0e0e0;
    }

    .prompt-code-title {
        font-size: 22px;
        font-weight: 600;
        text-decoration: underline;

    }

    .prompt-code-buttons {
        display: flex;
        gap: 8px;
    }

    .prompt-code-buttons .prompt-header-btn {
        padding: 8px 14px;
        font-size: 13px;
        background: #ffffff;
        color: #202124;
        border: 1px solid #dadce0;
    }

    .prompt-code-buttons .prompt-header-access {
        background: rgb(5, 152, 98);
        color: #fff !important;
        border-color: rgb(5, 152, 98);
    }

    .prompt-code-buttons .prompt-header-btn.prompt-header-access:hover {
        background: rgb(4, 130, 83) !important;
        border-color: rgb(4, 130, 83);
        color: #fff !important;
    }

    .prompt-code-buttons .prompt-header-btn:hover {
        background: #f1f3f4;
    }

    .prompt-code-buttons .prompt-header-copy.copied {
        background: #d4edda;
        color: #155724;
        border-color: #28a745;
    }

    .prompt-header-reset {
        background: #ffffff;
        color: #202124;
    }

    /* ========================================
   RESPONSIVE
   ======================================== */
    @media (max-width: 768px) {
        .prompt-row-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .prompt-header-buttons {
            margin-left: 0;
            width: 100%;
        }

        .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }

        .prompt-cta-row {
            flex-direction: column;
        }

        .prompt-cta-btn {
            width: 100%;
        }

        /* Customize table responsive */
        .customize-table,
        .customize-table thead,
        .customize-table tbody,
        .customize-table tr,
        .customize-table th,
        .customize-table td {
            display: block;
        }

        .customize-table thead {
            display: none;
        }

        .customize-table tr {
            margin-bottom: 16px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            overflow: hidden;
        }

        .customize-table td {
            width: 100% !important;
            border: none;
            border-bottom: 1px solid #e0e0e0;
        }

        .customize-table td:last-child {
            border-bottom: none;
        }

        .customize-table .var-name {
            background: #f1f3f4;
            font-weight: 600;
        }

        .prompt-code-header {
            flex-direction: column;
            gap: 12px;
            align-items: flex-start;
        }

        .prompt-code-buttons {
            width: 100%;
        }

        .prompt-code-buttons .prompt-header-btn {
            flex: 1;
            justify-content: center;
        }
    }
</style>

<script>
    function handlePromptCopy() {
        // Check if unlocked via cookie
        if (typeof window.flowpastIsUnlocked === 'function' && !window.flowpastIsUnlocked()) {
            // Show email popup
            if (typeof window.flowpastShowEmailPopup === 'function') {
                window.flowpastShowEmailPopup('prompt');
            }
            return;
        }

        // Copy the customized prompt (with filled variables)
        const customizedPrompt = getCustomizedPrompt();
        const copyButtons = document.querySelectorAll('.prompt-header-copy, .prompt-header-copy-green, .prompt-cta-copy, .copy-customized-btn');

        navigator.clipboard.writeText(customizedPrompt).then(() => {
            copyButtons.forEach(btn => {
                btn.classList.add('copied');
                const textSpan = btn.querySelector('span');
                if (textSpan) textSpan.textContent = 'Copied!';
            });

            setTimeout(() => {
                copyButtons.forEach(btn => {
                    btn.classList.remove('copied');
                    const textSpan = btn.querySelector('span');
                    if (textSpan) textSpan.textContent = 'Copy Full Prompt';
                });
            }, 2000);
        }).catch(err => {
            console.error('Failed to copy:', err);
        });
    }

    // Store original prompt for customization
    const originalPrompt = "## OBJECTIVE\r\nDesign an email-based reporting automation system that stops reactive firefighting by delivering timely, readable, role-aware reports\u2014so issues are surfaced early (important-not-urgent) rather than exploding into emergencies (urgent-and-important). The deliverable is a practical implementation plan plus templates, safeguards, and operational guidance.\r\n\r\n## PERSONA\r\nYou are an automation systems architect with a background in incident response and operational continuity. You think in terms of preventing escalation, building calm information flow, and aligning automation with real human behavior (what people actually read, when they read it, and what makes them act).\r\n\r\n## CONSTRAINTS\r\n- Use modern mail authentication options (OAuth2 and\/or app passwords). Do not assume basic auth.\r\n- Prioritize clarity: reports must be easy to scan and interpret before they are exhaustive.\r\n- Subject lines must be immediately sortable and recognizable: include report category, date range, and an urgency indicator.\r\n- Send cadence must match work habits, time zones, and blackout windows\u2014not arbitrary timers.\r\n- Failures must be handled quietly for end users: alert administrators without blasting recipients.\r\n- Logs must be diagnostic: include context and actionable clues, not just event times.\r\n- Prevent notification fatigue: fewer, higher-signal messages over constant pings.\r\n- Include proactive\/predictive patterns (early-warning indicators, trend thresholds, exception reporting).\r\n- Never store secrets in plain text or trivially reversible forms; recommend secure secret storage.\r\n- Always include unsubscribe\/opt-down mechanisms and honor communication preferences.\r\n- **What This Is NOT**\r\n  - Not a vendor-specific step-by-step for a single tool unless explicitly provided.\r\n  - Not a legal\/compliance opinion (e.g., GDPR\/Can-SPAM counsel).\r\n  - Not a full BI dashboard build; this focuses on automated email reporting and its plumbing.\r\n  - Not a complete SOC\/incident response runbook beyond reporting-related alerts.\r\n\r\n## PROCESS\r\n1. **Pre-Analysis Step (state understanding first):** Briefly summarize your interpretation of the organization\u2019s situation, goals, and constraints based on the provided inputs. List any assumptions.\r\n2. **Clarify gaps:** If any inputs are missing or ambiguous, ask targeted questions and propose safe defaults (clearly labeled) so implementation can still proceed.\r\n3. **Architect the system:** Define the components (mail transport, recipient routing, report assembly, scheduler, subject taxonomy, error controls, logging, testing, maintenance).\r\n4. **Human-centered reporting:** Specify how each report will be structured for scanning (headlines, highlights, \u201cwhat changed,\u201d \u201cwhat needs attention,\u201d and links\/attachments).\r\n5. **Proactive logic:** Add early-warning triggers (thresholds, anomalies, trend breaks) and a rule for when to suppress routine messages.\r\n6. **Security by design:** Explain secret handling, access boundaries, least privilege, and preference management.\r\n7. **Operational readiness:** Provide testing, rollout, and ongoing tuning steps.\r\n\r\n## INPUTS\r\n- **SMTP server details (host\/port\/TLS or equivalent):** [SMTP_SERVER_DETAILS]\r\n- **Authentication method and credentials (OAuth token or app password; no plain text storage):** [SMTP_AUTH_DETAILS]\r\n- **Recipient list with roles and routing notes:** [RECIPIENT_LISTS]\r\n- **Report data sources, metrics, and formatting preferences:** [REPORT_SPECS]\r\n- **Send frequency, time zones, blackout periods:** [SCHEDULING_REQUIREMENTS]\r\n- **Reading habits, urgency patterns, and comms culture:** [COMMUNICATION_CULTURE]\r\n- **Admin\/on-call addresses for failure notifications (if different):** [ADMIN_ALERT_RECIPIENTS]\r\n- **Preferred implementation environment\/tooling (e.g., Python, Power Automate, Zapier, Airflow):** [IMPLEMENTATION_STACK]\r\n\r\n## OUTPUT SPECIFICATION\r\nProduce a stepwise implementation plan with the following sections (use the exact headings). Use:\r\n- Code blocks for configuration examples (redact secrets; show placeholders).\r\n- Bullet lists for capabilities\/features.\r\n- Numbered procedures for action steps.\r\n- Security callouts in boxed formatting (see template below).\r\n\r\n### 1) SMTP Configuration Setup\r\nInclude:\r\n- Connection parameters, TLS\/STARTTLS guidance, and modern auth setup (OAuth2\/app password).\r\n- Secret storage approach (e.g., vault, OS keychain, managed secrets).\r\n- Example config snippet using placeholders such as {SmtpHost}, {SmtpPort}, {SecurityMode}.\r\n\r\n### 2) Recipient Management System\r\nInclude:\r\n- Role-based distribution rules (e.g., exec summary vs. operator detail).\r\n- Preference management (opt-down, unsubscribe, digest vs immediate).\r\n- Format for maintaining lists (directory sync, config file, database), plus validation checks.\r\n\r\n### 3) Report Generation Pipeline\r\nInclude:\r\n- Data ingestion from multiple sources, normalization, and rendering.\r\n- Human-readable layout guidance (TL;DR block, key deltas, exceptions, glossary).\r\n- Attachment rules and fallbacks (inline tables vs attachments).\r\n- Templates using placeholders like {ReportType}, {DateRange}, {TopFindings}, {ActionsNeeded}.\r\n\r\n### 4) Scheduling Engine\r\nInclude:\r\n- Time zone handling, blackout windows, and \u201csend only on meaningful change\u201d options.\r\n- Cadence recommendation aligned to [COMMUNICATION_CULTURE].\r\n- A rule for escalation: when to switch from digest to urgent alert.\r\n\r\n### 5) Subject Line Templates\r\nProvide 5\u20138 subject patterns with placeholders like:\r\n- {ReportType}, {StartDate}, {EndDate}, {UrgencyLevel}, {BusinessUnit}\r\nEnsure they\u2019re consistent, filter-friendly, and date-stamped.\r\n\r\n### 6) Error Handling Framework\r\nInclude:\r\n- Bounce\/invalid recipient handling, retries with backoff, timeout behavior.\r\n- Admin notification policy that avoids user spam.\r\n- A small decision table mapping {FailureType} \u2192 {Action} \u2192 {WhoIsNotified}.\r\n\r\n### 7) Logging Architecture\r\nInclude:\r\n- What to log (message ID, recipient group, render version, data freshness, error context).\r\n- Where logs live, retention, and audit trail design.\r\n- Examples of \u201cactionable\u201d log entries (with placeholders like {CorrelationId}, {DatasetVersion}).\r\n\r\n### 8) Testing Protocol\r\nInclude:\r\n- Unit tests (rendering, routing, scheduling), integration tests (SMTP), and UAT steps.\r\n- A staging\/dry-run mode that generates but does not send.\r\n- Acceptance criteria checklist before go-live.\r\n\r\n### 9) Maintenance Procedures\r\nInclude:\r\n- Monitoring, periodic review of report usefulness, and fatigue controls.\r\n- Credential rotation, permission reviews, template updates.\r\n- A quarterly optimization routine to keep everything in the \u201cimportant-not-urgent\u201d zone.\r\n\r\n### Security Warning Box Template (use when relevant)\r\n> **Security Note**  \r\n> {SecurityConcern}  \r\n> **Do instead:** {RecommendedPractice}  \r\n> **Why it matters:** {Impact}\r\n\r\n## QUALITY CHECKS\r\nAt the end, include a short verification list (4\u20135 items) confirming:\r\n- Modern auth is supported and secrets are handled safely (no plain text).\r\n- Subject lines meet the filterability standard (type + date range + urgency).\r\n- Scheduling respects time zones, blackout periods, and reading patterns.\r\n- Error handling informs admins without overwhelming recipients.\r\n- Logs contain troubleshooting context (not only timestamps).";
    const variables = ["[SMTP_SERVER_DETAILS]","[SMTP_AUTH_DETAILS]","[RECIPIENT_LISTS]","[REPORT_SPECS]","[SCHEDULING_REQUIREMENTS]","[COMMUNICATION_CULTURE]","[ADMIN_ALERT_RECIPIENTS]","[IMPLEMENTATION_STACK]"];
    // Initial render with highlighted variables
    document.addEventListener('DOMContentLoaded', function() {
        renderPromptWithHighlights();
    });

    // Live update prompt as user types
    document.querySelectorAll('.customize-input').forEach(input => {
        input.addEventListener('input', renderPromptWithHighlights);
    });

    function renderPromptWithHighlights() {
        const promptContent = document.getElementById('premium-prompt-content');
        if (!promptContent) return;

        let updatedPrompt = originalPrompt;
        let filledVariables = {};

        // Collect filled values
        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                filledVariables[placeholder] = value;
            }
        });

        // Replace filled variables and highlight remaining
        let htmlContent = escapeHtml(updatedPrompt);

        variables.forEach(placeholder => {
            const escapedPlaceholder = escapeHtml(placeholder);
            const regex = new RegExp(escapeRegex(escapedPlaceholder), 'g');

            if (filledVariables[placeholder]) {
                // Show filled value with green highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable-filled">' + escapeHtml(filledVariables[placeholder]) + '</span>'
                );
            } else {
                // Show original placeholder with yellow highlight
                htmlContent = htmlContent.replace(regex,
                    '<span class="prompt-variable">' + escapedPlaceholder + '</span>'
                );
            }
        });

        promptContent.innerHTML = htmlContent;
    }

    function escapeRegex(string) {
        return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
    }

    function escapeHtml(text) {
        const div = document.createElement('div');
        div.textContent = text;
        return div.innerHTML;
    }

    function resetPrompt() {
        // Clear all input fields
        document.querySelectorAll('.customize-input').forEach(input => {
            input.value = '';
        });

        // Re-render with original placeholders highlighted
        renderPromptWithHighlights();

        // Visual feedback
        const resetBtns = document.querySelectorAll('.prompt-header-reset, .prompt-cta-reset');
        resetBtns.forEach(btn => {
            const originalText = btn.querySelector('span').textContent;
            btn.querySelector('span').textContent = 'Reset!';
            setTimeout(() => {
                btn.querySelector('span').textContent = originalText;
            }, 1000);
        });
    }


    function getCustomizedPrompt() {
        let updatedPrompt = originalPrompt;

        document.querySelectorAll('.customize-input').forEach(input => {
            const placeholder = input.dataset.placeholder;
            const value = input.value.trim();

            if (value) {
                const regex = new RegExp(escapeRegex(placeholder), 'g');
                updatedPrompt = updatedPrompt.replace(regex, value);
            }
        });

        return updatedPrompt;
    }
</script>

</div>

<div class="pro-tips-section">

<h2 class="wp-block-heading">Pro Tips for Better AI Prompt Results</h2>



<ul class="wp-block-list">

<li><strong>Start from decisions, not metrics.</strong> Before you run the prompt, write down 3 decisions your team makes weekly (pause a campaign, reassign leads, fix deliverability). Then ask the AI to align each report section to a decision and a “next action.” A simple follow-up: “Rewrite the weekly digest so every section ends with a decision it supports and a default action.”</li>


<li><strong>Define “role-aware” with a recipient map.</strong> Give the AI a small table of roles and what they control (e.g., “VP Sales can change territories; SDR Manager can change activity coaching”). Then prompt: “Create routing rules so each role receives only what they can act on, plus one early-warning indicator.” The system gets leaner fast.</li>

<li><strong>Be explicit about cadence friction.</strong> Don’t just say “daily” or “weekly.” Include time zones, meeting schedules, and blackout windows (Monday 8–10am pipeline call, no sends during product launches). Ask: “Propose a cadence that matches these work habits and reduces notification fatigue, including opt-down defaults.”</li>


<li><strong>Iterate the subject lines until they’re sortable in real life.</strong> After the first output, test the subject format against your inbox rules (filters, labels, search). Then ask: “Now generate 10 subject line variations that preserve category + date range + urgency, and make them scannable on mobile.” If two look similar on a lock screen, keep going.</li>


<li><strong>Force the prompt to include failure modes and logs.</strong> Many reporting plans ignore the boring parts, and those are what wake you up at night. Add a follow-up like: “List the top 12 failure modes (auth expiry, API limits, missing fields, delayed jobs), the quiet user-facing behavior, and the exact admin alert message plus diagnostic log fields.” You’ll get something you can actually operate.</li>

</ul>
<!-- /wp:post-content -->
</div>

<div class="related-prompts-section">
<!-- wp:heading {"level":2} -->
<h2 class="wp-block-heading">Related Prompts</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Once your email reporting automation is mapped, these prompts help you turn the reporting signals into decisions, plans, and repeatable improvement loops:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you also need a clear “so what do we do now?” layer, pair this with <a href="https://flowpast.com/prompts/build-a-business-strategy-outline-with-this-ai-prompt/">Build a Business Strategy Outline with this AI Prompt</a>. When your digests reveal trends (conversion slipping, churn rising, costs creeping), a strategy outline helps you decide priorities instead of reacting to the loudest metric.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>For teams doing continuous optimization, <a href="https://flowpast.com/prompts/build-a-growth-experimentation-blueprint-with-this-ai-prompt/">Build a Growth Experimentation Blueprint with this AI Prompt</a> is a natural next step. Exception reporting is great, but it’s even better when a threshold breach automatically feeds an experiment backlog with hypotheses, owners, and success criteria.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When your reporting is tied to pipeline health and rep activity, <a href="https://flowpast.com/prompts/build-a-sales-strategy-plan-with-this-ai-prompt/">Build a Sales Strategy Plan with this AI Prompt</a> helps you interpret the signals and set rules for action. It’s especially useful if your emails will be “role-aware” across AEs, SDRs, managers, and leadership, because each level needs different visibility and different levers.</p>
<!-- /wp:paragraph -->

<br>

<!-- wp:paragraph -->
<p>Quick reference:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul>
<!-- wp:list-item -->
<li><a href="https://flowpast.com/prompts/build-a-business-strategy-outline-with-this-ai-prompt/">Build a Business Strategy Outline with this AI Prompt</a>: Turn trends into priorities and direction.</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li><a href="https://flowpast.com/prompts/build-a-growth-experimentation-blueprint-with-this-ai-prompt/">Build a Growth Experimentation Blueprint with this AI Prompt</a>: Convert signals into structured experiments.</li>
<!-- /wp:list-item -->
<!-- wp:list-item -->
<li><a href="https://flowpast.com/prompts/build-a-sales-strategy-plan-with-this-ai-prompt/">Build a Sales Strategy Plan with this AI Prompt</a>: Align pipeline reporting with sales actions.</li>
<!-- /wp:list-item -->
<li><a href="https://flowpast.com/prompts/build-a-leadership-growth-blueprint-with-this-ai-prompt/">Build a Leadership Growth Blueprint with this AI Prompt</a>: Improve operating rhythms and accountability.</li>
<!-- /wp:list -->
<li><a href="https://flowpast.com/prompts/build-a-career-growth-blueprint-with-this-ai-prompt/">Build a Career Growth Blueprint with this AI Prompt</a>: Build personal operating systems around KPIs.</li>
<!-- /wp:list-item -->
</ul>
<!-- /wp:list -->
</div>

<div class="faq-section">
<!-- wp:heading {"level":2} -->
<h2 class="wp-block-heading">Common Questions</h2>
<!-- /wp:heading -->

<div class="faq-item">
<span class="question">Which roles benefit most from this email reporting automation AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Marketing Operations Managers</strong> use this to turn scattered channel metrics into consistent weekly digests with clear subject lines, cadence rules, and early-warning indicators. <strong>Revenue Operations Leads</strong> benefit because the prompt forces role-aware routing, secure auth, and opt-down preferences, which are usually the messy parts. <strong>Sales Operations Managers</strong> apply it to deliver pipeline and activity summaries that managers can scan quickly, without blasting reps with noise. <strong>IT Administrators</strong> like it because it calls out OAuth2/app-password patterns, secret storage hygiene, and quiet end-user failures with admin-only alerts.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this email reporting automation AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>SaaS companies</strong> get value when they need role-based reporting across product, growth, and revenue teams, especially when churn or activation issues should surface early instead of at the end of the quarter. Exception-based emails can flag usage drop-offs, support spikes, or trial-to-paid conversion slippage without asking everyone to live in dashboards. <strong>E-commerce brands</strong> use it for daily and weekly performance digests (spend efficiency, inventory risk signals, deliverability issues) that are timed around launch calendars and blackout windows. <strong>Agencies</strong> benefit because they can standardize subject lines, cadence, and routing across multiple clients while keeping failures quiet for recipients and actionable for operators. <strong>Professional services firms</strong> apply it to operational continuity reporting (capacity, project health indicators, overdue tasks) that needs to be readable and consistent, not “another spreadsheet.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for designing email reporting automation produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like “Write me an email reporting system for my business” fails because it: lacks clear constraints around modern authentication (so you get insecure basic-auth assumptions), provides no subject-line framework for sorting (so recipients can’t triage quickly), ignores work habits like time zones and blackout windows (so the cadence becomes annoying), produces verbose metric dumps instead of scan-friendly digests (so nobody reads it), and misses failure handling (so errors either spam end users or disappear without diagnostic logs).</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this email reporting automation prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes, but you will customize it through the context you provide before running it, since the prompt itself has no fill-in variables. Add your recipient roles, time zones, preferred cadences, and the systems you’re pulling from (CRM, ad platforms, support tools), plus any blackout windows and escalation rules. Also include your security requirements, like “OAuth2 only” or “app passwords allowed with vault storage,” so the plan fits your environment. A helpful follow-up prompt is: “Rewrite the implementation plan for these tools and roles, and generate 3 report templates: weekly exec, daily operator, and exception alerts with thresholds.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this email reporting automation prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is leaving the recipient definition too vague — instead of “send to the team,” specify “VP Sales (weekly summary), SDR Manager (daily activity + exceptions), AEs (no daily, weekly only).” Another common error is skipping work-habit details; “send Monday mornings” is weaker than “send Monday 6:30am local time, avoid 8–10am pipeline meeting, no sends during launch day.” People also forget to define failure behavior, which leads to noisy blasts; you want “end users see nothing, admins get a single alert with log context and a retry status.” Finally, teams often omit opt-down rules, so reports become spam; define defaults like “execs get weekly only, operators get daily plus exceptions, everyone can opt down.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this email reporting automation prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for one-off reporting needs where you will not maintain anything after it ships, because the value comes from safeguards, cadence tuning, and operational logging. It’s also not the best fit if you’re looking for a vendor-specific click-by-click tutorial inside a single platform, since it intentionally stays tool-agnostic. And if your real need is a full BI dashboard build (not email plumbing and digests), you’ll want a dashboard-focused process instead.</p>
<!-- /wp:paragraph -->
</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this email reporting automation AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Marketing Operations Managers use this to turn scattered channel metrics into consistent weekly digests with clear subject lines, cadence rules, and early-warning indicators. Revenue Operations Leads benefit because the prompt forces role-aware routing, secure auth, and opt-down preferences, which are usually the messy parts. Sales Operations Managers apply it to deliver pipeline and activity summaries that managers can scan quickly, without blasting reps with noise. IT Administrators like it because it calls out OAuth2/app-password patterns, secret storage hygiene, and quiet end-user failures with admin-only alerts."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this email reporting automation AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SaaS companies get value when they need role-based reporting across product, growth, and revenue teams, especially when churn or activation issues should surface early instead of at the end of the quarter. Exception-based emails can flag usage drop-offs, support spikes, or trial-to-paid conversion slippage without asking everyone to live in dashboards. E-commerce brands use it for daily and weekly performance digests (spend efficiency, inventory risk signals, deliverability issues) that are timed around launch calendars and blackout windows. Agencies benefit because they can standardize subject lines, cadence, and routing across multiple clients while keeping failures quiet for recipients and actionable for operators. Professional services firms apply it to operational continuity reporting (capacity, project health indicators, overdue tasks) that needs to be readable and consistent, not “another spreadsheet.”"
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for designing email reporting automation produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me an email reporting system for my business” fails because it: lacks clear constraints around modern authentication (so you get insecure basic-auth assumptions), provides no subject-line framework for sorting (so recipients can’t triage quickly), ignores work habits like time zones and blackout windows (so the cadence becomes annoying), produces verbose metric dumps instead of scan-friendly digests (so nobody reads it), and misses failure handling (so errors either spam end users or disappear without diagnostic logs)."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this email reporting automation prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, but you will customize it through the context you provide before running it, since the prompt itself has no fill-in variables. Add your recipient roles, time zones, preferred cadences, and the systems you’re pulling from (CRM, ad platforms, support tools), plus any blackout windows and escalation rules. Also include your security requirements, like “OAuth2 only” or “app passwords allowed with vault storage,” so the plan fits your environment. A helpful follow-up prompt is: “Rewrite the implementation plan for these tools and roles, and generate 3 report templates: weekly exec, daily operator, and exception alerts with thresholds.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this email reporting automation prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving the recipient definition too vague — instead of “send to the team,” specify “VP Sales (weekly summary), SDR Manager (daily activity + exceptions), AEs (no daily, weekly only).” Another common error is skipping work-habit details; “send Monday mornings” is weaker than “send Monday 6:30am local time, avoid 8–10am pipeline meeting, no sends during launch day.” People also forget to define failure behavior, which leads to noisy blasts; you want “end users see nothing, admins get a single alert with log context and a retry status.” Finally, teams often omit opt-down rules, so reports become spam; define defaults like “execs get weekly only, operators get daily plus exceptions, everyone can opt down.”"
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this email reporting automation prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for one-off reporting needs where you will not maintain anything after it ships, because the value comes from safeguards, cadence tuning, and operational logging. It’s also not the best fit if you’re looking for a vendor-specific click-by-click tutorial inside a single platform, since it intentionally stays tool-agnostic. And if your real need is a full BI dashboard build (not email plumbing and digests), you’ll want a dashboard-focused process instead."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>Fire drills thrive on silence until it’s too late. Build the calm information flow instead, then let your reports surface issues early and route them to the right people. Paste the prompt into ChatGPT and start designing your email reporting automation today.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5001589.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build an E-commerce Security Architecture with this AI Prompt</title>
		<link>https://flowpast.com/prompts/build-an-e-commerce-security-architecture-with-this-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:39:27 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5003031</guid>

					<description><![CDATA[Integrations create hidden holes - the ultimate AI Prompt that builds a platform-specific security architecture with an action plan and checklist. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: e-commerce security architecture -->

<div class="hook-introduction">

<p>Your e-commerce stack probably isn’t “one platform.” It’s a platform plus a payment flow, a handful of apps, tracking scripts, fulfillment tools, and admin accounts spread across a team. That’s where security breaks: in the seams, not the homepage.</p>



<p>This <strong>e-commerce security architecture</strong> is built for <strong>e-commerce operators</strong> who keep adding integrations and want to stop creating new attack paths, <strong>growth marketers</strong> who rely on third-party pixels and tools but still need a safe data flow, and <strong>consultants</strong> who must hand clients a clear security plan that’s practical, not theoretical. The output is a platform-tailored architecture with prioritized risks, implementable controls (configs and workflows), tradeoffs, and a customized checklist plus incident response planning.</p>

</div>

<div class="what-and-when-section">

<h2 class="wp-block-heading">What Does This AI Prompt Do and When to Use It?</h2>



<table class="solution-results-table three-column" role="presentation" aria-label="What this prompt does, when to use it, and what you get">
 <thead>
    <tr>
      <th scope="col">What This Prompt Does</th>
      <th scope="col">When to Use This Prompt</th>
      <th scope="col">What You&#8217;ll Get</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <ul class="automation-list">
          <li>It restates your environment first, then identifies the top likely attack surfaces across infrastructure, application layers, and vendor connections.</li>
          <li>It models realistic attack paths tied to hosting environment, region, and third-party integrations, focusing on how compromises typically unfold.</li>
          <li>It translates risks into actionable controls with concrete settings and workflows, not generic “best practices.”</li>
          <li>It adds “what to do, why it matters, and what goes wrong if skipped” for every measure so the plan is executable by a team.</li>
          <li>It includes prevention plus incident response planning, and it addresses technical failures alongside human-driven compromise (phishing, credential reuse, admin error).</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You’re adding new integrations (reviews, subscriptions, loyalty, analytics, fulfillment) and you need to understand the new entry points you just created.</li>
          <li>A payment or account incident scared the team, and you want an architecture that reduces risk without derailing growth work.</li>
          <li>You’re migrating regions or changing hosting patterns and need to rethink data flows, permissions, and monitoring in a specific context.</li>
          <li>Partners keep requesting access (agency logins, support vendors, contractors), and your admin surface area is getting out of control.</li>
          <li>You’re scaling order volume and automation, and manual, periodic security routines are no longer reliable enough.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A prioritized list of the top 5 attack surfaces with environment-specific notes on why they’re likely.</li>
           <li>A set of concrete control recommendations where each item includes “do this,” “why,” and “if skipped” failure modes.</li>
           <li>A lightweight cost–benefit view for each control (time/effort/cost versus risk reduction) to support decision-making.</li>
           <li>An incident response outline customized to your stack, including what to monitor and how to react when something looks wrong.</li>
           <li>A customized security checklist you can operationalize, with an emphasis on automation and continuous controls.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

<div class="prompt-display-section">

<h2 class="wp-block-heading">The Full AI Prompt: Platform-Tailored E-commerce Security Architecture Builder</h2>


<!-- Prompt file not found: /home/flowpast/htdocs/flowpast.com/wp-content/data/prompts_scraped/5003239/prompt-2026.txt -->

</div>

<div class="pro-tips-section">

<h2 class="wp-block-heading">Pro Tips for Better AI Prompt Results</h2>



<p>This prompt is unusually strict (in a good way). It’s designed to force specificity: environment, region, integrations, and how humans actually make mistakes. If you feed it vague context, you’ll still get a plan, but it will not be as sharp as it can be.</p>



<ul class="wp-block-list">

<li><strong>Describe your “seams,” not just your store.</strong> List the tools that touch customer data, admin access, or order workflows. Include things like helpdesk systems, fulfillment portals, tag managers, subscription apps, data connectors, and any middleware. Follow-up prompt: “Map the data flow between these integrations and point out the riskiest trust boundaries.”</li>


<li><strong>Force it to name the likely attack path.</strong> Don’t accept generic risk statements like “phishing is a threat.” Ask for a concrete chain, such as “contractor Gmail compromised → reused password → admin login → app token created → data exfiltration.” Follow-up prompt: “Give me three plausible intrusion chains for my setup and the earliest detection point for each.”</li>


<li><strong>Make tradeoffs explicit before you socialize the plan.</strong> Security recommendations die in meetings when effort isn’t acknowledged. After the first run, ask: “Rewrite the control list as a phased rollout: Week 1 quick wins, Month 1 foundation, Quarter 1 maturity.”</li>


<li><strong>Iterate by tightening the checklist into operations.</strong> The first checklist is usually too broad. After it generates the list, try asking: “Now convert the checklist into continuous controls and alerts. For each item, tell me what can be automated, what needs human review, and how often.”</li>


<li><strong>Pair it with your customer comms plan.</strong> Incidents become marketing problems fast, especially if customers notice before you do. Once you have the incident response outline, use a messaging prompt to prepare calm, consistent replies; for example, <a href="https://flowpast.com/prompts/write-social-media-comment-replies-with-this-ai-prompt/">Write Social Media Comment Replies with this AI Prompt</a> can help you draft responses that don’t overshare but still build trust.</li>

</ul>

</div>

<div class="related-prompts-section">

<h2 class="wp-block-heading">Related Prompts</h2>



<p>Once your security architecture is clear, these prompts help you communicate proof, handle public feedback, and keep campaigns moving without improvising.</p>



<p>If you also need credibility assets after tightening security, <a href="https://flowpast.com/prompts/testimonial-led-social-proof-plan-ai-prompt/">Testimonial-Led Social Proof Plan AI Prompt</a> helps you shape customer evidence into a structured plan. This is useful when you want to reinforce trust post-incident, or when you’re proactively improving perception while you implement controls behind the scenes.</p>



<p>When you’re turning real customer language into narratives that feel human (and not like compliance copy), <a href="https://flowpast.com/prompts/turn-testimonials-into-influencer-stories-ai-prompt/">Turn Testimonials Into Influencer Stories AI Prompt</a> can bridge the gap. It pairs well if your security upgrades affect policies, returns, shipping, or account experiences and you need reassuring stories that still sound authentic.</p>



<p>If your team runs paid campaigns while security work is in progress, <a href="https://flowpast.com/prompts/write-social-ad-copy-with-this-ai-prompt/">Write Social Ad Copy with this AI Prompt</a> can keep performance creative flowing without last-minute scramble. It’s especially handy if you must adjust offers or messaging because you changed checkout steps, authentication, or fraud controls.</p>


<br>


<p>Quick reference:</p>



<ul class="wp-block-list">

<li><a href="https://flowpast.com/prompts/turn-testimonials-into-influencer-stories-ai-prompt/">Turn Testimonials Into Influencer Stories AI Prompt</a>: Transform testimonials into story-driven content.</li>


<li><a href="https://flowpast.com/prompts/testimonial-led-social-proof-plan-ai-prompt/">Testimonial-Led Social Proof Plan AI Prompt</a>: Build a structured social proof plan.</li>


<li><a href="https://flowpast.com/prompts/write-social-media-comment-replies-with-this-ai-prompt/">Write Social Media Comment Replies with this AI Prompt</a>: Draft calm, on-brand public replies.</li>


<li><a href="https://flowpast.com/prompts/create-20-social-post-ideas-from-a-question-wheel-ai-prompt/">Create 20 Social Post Ideas from a Question Wheel AI Prompt</a>: Generate post ideas from customer questions.</li>


<li><a href="https://flowpast.com/prompts/write-social-ad-copy-with-this-ai-prompt/">Write Social Ad Copy with this AI Prompt</a>: Produce ad variants for offers and campaigns.</li>

</ul>

</div>

<div class="faq-section">

<h2 class="wp-block-heading">Common Questions</h2>


<div class="faq-item">
<span class="question">Which roles benefit most from this e-commerce security architecture AI prompt?</span>

<p class="answer"><strong>E-commerce Directors</strong> use this to turn a messy plugin-and-vendor reality into a prioritized security plan they can actually fund and schedule. <strong>Revenue Operations Managers</strong> find it valuable because it forces clarity around integrations, permissions, and the workflows that quietly leak risk (tokens, shared logins, admin sprawl). <strong>Security Engineers</strong> use it to pressure-test the stack with realistic attack paths and convert findings into implementable controls with “why” and “what breaks if skipped.” <strong>Consultants</strong> leverage it to deliver a tailored architecture, checklist, and incident response outline without writing a generic report clients ignore.</p>

</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this e-commerce security architecture AI prompt?</span>

<p class="answer"><strong>Direct-to-consumer brands</strong> get value because their growth stack often includes dozens of third-party tools touching customer data, and one weak integration can become the entry point. <strong>Subscription commerce</strong> teams benefit since billing retries, account portals, and subscription apps expand the attack surface beyond a one-time checkout. <strong>Marketplace sellers building standalone stores</strong> use it when they move from platform-contained risk to running their own integrations, admin accounts, and data flows. <strong>High-volume promotional retailers</strong> find it helpful because spikes in traffic and campaign tooling make monitoring, abuse prevention, and incident readiness much more than a quarterly task.</p>

</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building an e-commerce security architecture produce weak results?</span>

<p class="answer">A typical prompt like &#8220;<em>Write me a security plan for my online store</em>&#8221; fails because it: lacks environment and region specificity, so it can’t tie risks to how your hosting and access are really configured; provides no realistic attack-path modeling, which leads to generic lists instead of defensible priorities; ignores integration touchpoints, where tokens, webhooks, and vendor access often create the easiest entry routes; produces abstract advice instead of actionable configurations and workflows; and misses incident response planning, so you’re left with prevention talk but no plan for detection and containment when something goes sideways.</p>

</div>

<div class="faq-item">
<span class="question">Can I customize this e-commerce security architecture prompt for my specific situation?</span>

<p class="answer">Yes, and you should. The prompt is designed to adapt based on the hosting environment, region, and the exact third-party integrations in your stack, so your best “customization” is to provide those details explicitly in your chat before you run it. Add operational constraints too: team size, who has admin access, and which parts are handled by agencies or contractors. Follow-up prompt to refine: “Re-rank the controls for a two-person team, prioritize automation, and call out anything that is likely to break analytics or conversion if implemented incorrectly.”</p>

</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this e-commerce security architecture prompt?</span>

<p class="answer">The biggest mistake is leaving the environment vague — instead of “we’re on the cloud,” say “Shopify storefront with third-party apps, GA4 via tag manager, helpdesk integration, and a fulfillment portal with shared accounts.” Another common error is listing integrations without describing permissions or data flow; “Klaviyo connected” is weaker than “Klaviyo has customer email + purchase events, API key stored in a shared password manager.” People also skip the human element: “Team uses SSO” is less useful than “Two agencies have admin access, contractors rotate monthly, and MFA isn’t enforced everywhere.” Finally, teams forget incident reality; don’t just ask for prevention, ask for detection signals and the first 60 minutes of response steps.</p>

</div>

<div class="faq-item">
<span class="question">Who should NOT use this e-commerce security architecture prompt?</span>

<p class="answer">This prompt isn’t ideal for teams looking for formal compliance certification or audit sign-off, because it explicitly does not replace a formal assessment. It’s also a poor fit if you want a one-page template with no iteration; the value comes from tailoring to your environment and revising tradeoffs with your constraints. And if you’re expecting guaranteed breach prevention, frankly, that’s not realistic. In those cases, use it as a starting architecture, then engage a qualified professional to validate and implement high-impact changes.</p>

</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this e-commerce security architecture AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "E-commerce Directors use this to turn a messy plugin-and-vendor reality into a prioritized security plan they can actually fund and schedule. Revenue Operations Managers find it valuable because it forces clarity around integrations, permissions, and the workflows that quietly leak risk (tokens, shared logins, admin sprawl). Security Engineers use it to pressure-test the stack with realistic attack paths and convert findings into implementable controls with “why” and “what breaks if skipped.” Consultants leverage it to deliver a tailored architecture, checklist, and incident response outline without writing a generic report clients ignore."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this e-commerce security architecture AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Direct-to-consumer brands get value because their growth stack often includes dozens of third-party tools touching customer data, and one weak integration can become the entry point. Subscription commerce teams benefit since billing retries, account portals, and subscription apps expand the attack surface beyond a one-time checkout. Marketplace sellers building standalone stores use it when they move from platform-contained risk to running their own integrations, admin accounts, and data flows. High-volume promotional retailers find it helpful because spikes in traffic and campaign tooling make monitoring, abuse prevention, and incident readiness much more than a quarterly task."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building an e-commerce security architecture produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like \"Write me a security plan for my online store\" fails because it: lacks environment and region specificity, so it can’t tie risks to how your hosting and access are really configured; provides no realistic attack-path modeling, which leads to generic lists instead of defensible priorities; ignores integration touchpoints, where tokens, webhooks, and vendor access often create the easiest entry routes; produces abstract advice instead of actionable configurations and workflows; and misses incident response planning, so you’re left with prevention talk but no plan for detection and containment when something goes sideways."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this e-commerce security architecture prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, and you should. The prompt is designed to adapt based on the hosting environment, region, and the exact third-party integrations in your stack, so your best “customization” is to provide those details explicitly in your chat before you run it. Add operational constraints too: team size, who has admin access, and which parts are handled by agencies or contractors. Follow-up prompt to refine: “Re-rank the controls for a two-person team, prioritize automation, and call out anything that is likely to break analytics or conversion if implemented incorrectly.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this e-commerce security architecture prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving the environment vague — instead of “we’re on the cloud,” say “Shopify storefront with third-party apps, GA4 via tag manager, helpdesk integration, and a fulfillment portal with shared accounts.” Another common error is listing integrations without describing permissions or data flow; “Klaviyo connected” is weaker than “Klaviyo has customer email + purchase events, API key stored in a shared password manager.” People also skip the human element: “Team uses SSO” is less useful than “Two agencies have admin access, contractors rotate monthly, and MFA isn’t enforced everywhere.” Finally, teams forget incident reality; don’t just ask for prevention, ask for detection signals and the first 60 minutes of response steps."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this e-commerce security architecture prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for teams looking for formal compliance certification or audit sign-off, because it explicitly does not replace a formal assessment. It’s also a poor fit if you want a one-page template with no iteration; the value comes from tailoring to your environment and revising tradeoffs with your constraints. And if you’re expecting guaranteed breach prevention, frankly, that’s not realistic. In those cases, use it as a starting architecture, then engage a qualified professional to validate and implement high-impact changes."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">

<p>Integrations and admin access don’t just add features. They add attack paths. Use this prompt to turn your current stack into a clear, environment-specific security architecture you can implement and maintain.</p>

</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5003031.webp" medium="image"></media:content>
            	</item>
	</channel>
</rss>
