<?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>Cybersecurity &#038; SecOps &#8211; Flowpast.com &#8211; Your Workflow Automation Library</title>
	<atom:link href="https://flowpast.com/function/cybersecurity-secops/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:53: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>Cybersecurity &#038; SecOps &#8211; Flowpast.com &#8211; Your Workflow Automation Library</title>
	<link>https://flowpast.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Build a Small Business Risk Strategy with this AI Prompt</title>
		<link>https://flowpast.com/prompts/build-a-small-business-risk-strategy-with-this-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:53:32 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5001754</guid>

					<description><![CDATA[Disruptions derail growth - this AI Prompt builds a small business risk strategy with scoring, mitigations, playbooks, and KRIs. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: risk strategy prompt -->
<div class="hook-introduction">

<p>Most small businesses don’t “manage risk.” They react to it. A vendor fails, a key employee quits, a chargeback spike hits, or a cyber scare burns a week—and suddenly your growth plan is on pause.</p>



<p>This <strong>risk strategy prompt</strong> is built for <strong>operators</strong> who are trying to scale without adding chaos, <strong>founders</strong> who keep too much in their heads and need a decision-ready plan, and <strong>consultants</strong> who must walk clients through practical controls without turning it into a formal audit. The output is a realistic, end-to-end risk management blueprint with prioritized risks, probability × impact scoring, mitigations, disruption playbooks, and KRIs you can track on a simple 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 scans risk across operations, finance, compliance/legal, technology/cyber, people, supply chain, reputation, and market dynamics.</li>
          <li>It applies SWOT and PESTLE-style lenses to surface second-order risks you might not name on a first pass.</li>
          <li>It ranks risks using a probability × impact scoring model instead of producing an unprioritized list.</li>
          <li>It prescribes feasible controls and mitigations that fit small-business constraints like limited headcount and budget.</li>
          <li>It handles missing context by stating assumptions, asking targeted questions, and still delivering a “best-available” plan.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You’re growing revenue, but the back office and delivery process are starting to creak.</li>
          <li>A near-miss happened (payment fraud, shipment delay, compliance warning), and you don’t want the next one to be worse.</li>
          <li>You’re about to sign a major vendor contract, hire critical roles, or expand channels and need a clear risk tradeoff.</li>
          <li>Competitors are forcing faster decisions, and you need guardrails so speed doesn’t create avoidable exposure.</li>
          <li>You want a repeatable monthly or quarterly risk cadence instead of “we’ll deal with it later.”</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A categorized risk register with 12–20 risks tailored to your situation.</li>
           <li>A probability × impact scoring model and a ranked top-5 “act now” list.</li>
           <li>Practical mitigation actions, including who owns each control and what “done” looks like.</li>
           <li>A disruption playbook for high-priority scenarios (triggers, first 24 hours, communications, and recovery steps).</li>
           <li>A KRI set (8–15 indicators) with thresholds and a suggested review cadence.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

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

<h2 class="wp-block-heading">The Full AI Prompt: Small Business Risk Management 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>[PRODUCT_DESCRIPTION]</code></td>
                                <td class="var-desc">
                                    Provide a clear and concise description of the product or service your business offers, including its main features and purpose.                                    <div class="var-example">For example: "A subscription-based software platform that automates payroll processing for small businesses, ensuring compliance with tax regulations."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[PRODUCT_DESCRIPTION]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[TARGET_AUDIENCE]</code></td>
                                <td class="var-desc">
                                    Describe the primary audience or customer segment your business serves, including their demographics, needs, and challenges.                                    <div class="var-example">For example: "Small retail business owners aged 30-50 who need affordable and easy-to-use inventory management solutions."</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>[INDUSTRY]</code></td>
                                <td class="var-desc">
                                    Specify the industry or sector your business operates in, including any relevant subcategories.                                    <div class="var-example">For example: "Hospitality and tourism, specifically boutique hotels and vacation rentals."</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>[KEY_OPERATIONS]</code></td>
                                <td class="var-desc">
                                    List the core activities or processes essential to your business operations.                                    <div class="var-example">For example: "Manufacturing custom furniture, managing supply chain logistics, and direct-to-consumer e-commerce sales."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[KEY_OPERATIONS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[MAIN_FINANCIAL_ACTIVITIES]</code></td>
                                <td class="var-desc">
                                    Describe the primary financial activities of your business, such as revenue generation methods, payment processing, or financial planning.                                    <div class="var-example">For example: "Revenue generation through subscription services, invoicing clients monthly, and managing payroll for 15 employees."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[MAIN_FINANCIAL_ACTIVITIES]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[MARKET_ENVIRONMENT]</code></td>
                                <td class="var-desc">
                                    Summarize the competitive and economic conditions your business operates in, including market trends, customer expectations, and challenges.                                    <div class="var-example">For example: "Highly competitive market with increasing demand for eco-friendly products, but price sensitivity among consumers remains a challenge."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[MARKET_ENVIRONMENT]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[KNOWN_RISKS]</code></td>
                                <td class="var-desc">
                                    List any risks or vulnerabilities your business is already aware of, including operational, financial, or compliance-related risks.                                    <div class="var-example">For example: "Dependence on a single supplier for raw materials, potential cybersecurity threats, and fluctuating demand due to seasonality."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[KNOWN_RISKS]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[PRIMARY_GOAL]</code></td>
                                <td class="var-desc">
                                    State the main objective or outcome you want to achieve with the risk management blueprint.                                    <div class="var-example">For example: "Minimize financial losses from supply chain disruptions while ensuring compliance with industry regulations."</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>[AVAILABLE_RESOURCES]</code></td>
                                <td class="var-desc">
                                    Detail the resources your business can allocate to risk management, such as staff, tools, or expertise.                                    <div class="var-example">For example: "A team of 3 managers, access to basic project management software, and a $10,000 contingency budget."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[AVAILABLE_RESOURCES]"
                                            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 time period within which you want to implement the risk management plan.                                    <div class="var-example">For example: "3 months to have the initial plan in place, with ongoing quarterly updates."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[TIMEFRAME]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[BUDGET]</code></td>
                                <td class="var-desc">
                                    Provide the total budget available for implementing the risk management plan.                                    <div class="var-example">For example: "$15,000 allocated for risk assessment, training, and software tools."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[BUDGET]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[TONE]</code></td>
                                <td class="var-desc">
                                    Specify the tone or style of communication you want the risk management blueprint to use.                                    <div class="var-example">For example: "Professional and concise, with a focus on actionable insights and clear next steps."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[TONE]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[UPPERCASE_WITH_UNDERSCORES]</code></td>
                                <td class="var-desc">
                                    Provide text in uppercase letters separated by underscores, typically for technical or formatting purposes.                                    <div class="var-example">For example: "RISK_MANAGEMENT_BLUEPRINT"</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[UPPERCASE_WITH_UNDERSCORES]"
                                            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="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></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 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">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></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 customized, end-to-end risk management blueprint for a small business that surfaces major threats, prioritizes them by probability and severity, prescribes practical controls, and includes both a disruption playbook and a cadence for keeping the risk profile current—while staying realistic about the business’s goals, capacity, and industry expectations.

## PERSONA
Act as a Business Development Specialist who routinely partners with leadership teams to grow safely. You balance commercial opportunity with operational, financial, compliance, and market risk, and you communicate in clear, decision-ready language.

## CONSTRAINTS
- Keep recommendations feasible for a small-business environment (limited headcount, budget, and time).
- Address risks across: operations, finance, compliance/legal, technology/cyber, people, supply chain, reputation, and market/competitive dynamics.
- Use both qualitative and quantitative thinking where possible (e.g., financial exposure ranges + reputational/people impacts).
- Provide a prioritization method (e.g., a probability × impact scoring model) rather than an unranked list.
- **Edge-case handling:** If any inputs are missing or vague, state assumptions explicitly, list targeted questions, and still provide a “best-available” plan using reasonable defaults.
- **What This Is NOT:** This is not legal advice, not a full audit, not an insurance binder, and not a guarantee that losses will be prevented; it is a practical management framework to reduce and respond to risk.

## PROCESS
1. **Pre-analysis (confirm understanding)**
   - Briefly restate the business context and what success looks like.
   - Call out any unclear/missing inputs and the assumptions you’ll use.

2. **Risk discovery**
   - Scan the business across internal and external drivers.
   - Use SWOT and PESTLE-style lenses to ensure coverage of hidden or second-order risks.
   - Separate risks into clear categories (operational, financial, regulatory, market, etc.) and identify likely root causes.

3. **Risk evaluation &amp; prioritization**
   - For each risk, estimate likelihood and impact (financial + non-financial).
   - Score and rank risks using a simple matrix (e.g., 1–5 likelihood and 1–5 impact), then label priority tiers.

4. **Controls &amp; mitigation design**
   - For top-tier items, propose layered controls (prevent, detect, respond).
   - For moderate/low items, propose lightweight guardrails and monitoring triggers.
   - Include options that match resource levels (e.g., “minimum viable control” vs “enhanced control”).

5. **Contingency &amp; disruption playbooks**
   - Build response steps for the most critical scenarios (who does what, in what order).
   - Include communications guidance (customers, vendors, employees, regulators if relevant).
   - Define recovery objectives and resource needs.

6. **Implementation roadmap**
   - Assign ownership, timelines, and required budget/tools.
   - Identify quick wins (0–30 days), mid-term actions (30–90 days), and longer-term investments (90–180 days), adjusting as needed.

7. **Monitoring, review, and refresh**
   - Define leading indicators/KRIs and a routine to revisit scores.
   - Establish a recurring review cycle and a change-trigger list (new vendor, new regulation, rapid growth, incident, etc.).
   - Incorporate stakeholder feedback and document versioning.

## INPUTS
- **Business overview:** [PRODUCT_DESCRIPTION]
- **Primary user segment served:** [TARGET_AUDIENCE]
- **Industry/sector:** [INDUSTRY]
- **Core operations (how work is delivered):** [KEY_OPERATIONS]
- **Primary financial activities (revenue, expenses, cashflow, credit, etc.):** [MAIN_FINANCIAL_ACTIVITIES]
- **Market context (competition, demand shifts, regulations, macro factors):** [MARKET_ENVIRONMENT]
- **Known risks already on your radar:** [KNOWN_RISKS]
- **Business goals (growth, profitability, expansion, stability, exit, etc.):** [PRIMARY_GOAL]
- **Resources available for risk management (people, tools, budget):** [AVAILABLE_RESOURCES]
- **Planning horizon:** [TIMEFRAME]
- **Budget range (if known):** [BUDGET]
- **Preferred tone (e.g., formal, pragmatic, concise):** [TONE]

## OUTPUT SPECIFICATION
Deliver a single structured document containing:

1. **{Executive Summary}**
   - {Top Risks Snapshot}
   - {Priority Recommendations}

2. **{Business Profile &amp; Assumptions}**
   - {Context Summary}
   - {Assumptions}
   - {Open Questions}

3. **{Risk Register (Ranked)}** (table)
   - Columns: {Risk}, {Category}, {Root Cause}, {Likelihood Score}, {Impact Score}, {Overall Rating}, {Financial Exposure}, {Non-Financial Impact}, {Early Warning Indicators}, {Current Controls}, {Recommended Controls}, {Owner}, {Target Date}

4. **{Risk Heat Map Summary}**
   - {High Tier}, {Medium Tier}, {Low Tier} with brief rationale

5. **{Mitigation Plan by Priority Tier}**
   - {High-Priority Control Plan}
   - {Medium-Priority Guardrails}
   - {Low-Priority Monitoring Approach}

6. **{Contingency Playbooks}** (for the highest-impact scenarios)
   - For each: {Scenario}, {Trigger}, {Immediate Actions (0–24h)}, {Stabilization (1–7d)}, {Recovery (2–6w)}, {Comms Plan}, {Resources Needed}, {Decision Owner}

7. **{Implementation Roadmap}**
   - {0–30 Day Actions}
   - {30–90 Day Actions}
   - {90–180 Day Actions}
   - {Dependencies &amp; Budget Notes}

8. **{Monitoring &amp; Review System}**
   - {Key Risk Indicators}
   - {Review Cadence}
   - {Change Triggers}
   - {Update Workflow &amp; Versioning}

## QUALITY CHECKS
Before finalizing, verify:
- Coverage spans operations, finance, compliance/legal, people, technology, supply chain, reputation, and market forces.
- Every high-tier risk has: an owner, early-warning indicators, and a concrete mitigation + contingency component.
- Prioritization is transparent (scoring method is stated and consistently applied).
- Recommendations match [AVAILABLE_RESOURCES] and [BUDGET] (offer tiered alternatives if constrained).
- All user inputs use **[UPPERCASE_WITH_UNDERSCORES]** and all AI-filled placeholders use **{Title Case}** format only.            </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 customized, end-to-end risk management blueprint for a small business that surfaces major threats, prioritizes them by probability and severity, prescribes practical controls, and includes both a disruption playbook and a cadence for keeping the risk profile current\u2014while staying realistic about the business\u2019s goals, capacity, and industry expectations.\r\n\r\n## PERSONA\r\nAct as a Business Development Specialist who routinely partners with leadership teams to grow safely. You balance commercial opportunity with operational, financial, compliance, and market risk, and you communicate in clear, decision-ready language.\r\n\r\n## CONSTRAINTS\r\n- Keep recommendations feasible for a small-business environment (limited headcount, budget, and time).\r\n- Address risks across: operations, finance, compliance\/legal, technology\/cyber, people, supply chain, reputation, and market\/competitive dynamics.\r\n- Use both qualitative and quantitative thinking where possible (e.g., financial exposure ranges + reputational\/people impacts).\r\n- Provide a prioritization method (e.g., a probability \u00d7 impact scoring model) rather than an unranked list.\r\n- **Edge-case handling:** If any inputs are missing or vague, state assumptions explicitly, list targeted questions, and still provide a \u201cbest-available\u201d plan using reasonable defaults.\r\n- **What This Is NOT:** This is not legal advice, not a full audit, not an insurance binder, and not a guarantee that losses will be prevented; it is a practical management framework to reduce and respond to risk.\r\n\r\n## PROCESS\r\n1. **Pre-analysis (confirm understanding)**\r\n   - Briefly restate the business context and what success looks like.\r\n   - Call out any unclear\/missing inputs and the assumptions you\u2019ll use.\r\n\r\n2. **Risk discovery**\r\n   - Scan the business across internal and external drivers.\r\n   - Use SWOT and PESTLE-style lenses to ensure coverage of hidden or second-order risks.\r\n   - Separate risks into clear categories (operational, financial, regulatory, market, etc.) and identify likely root causes.\r\n\r\n3. **Risk evaluation & prioritization**\r\n   - For each risk, estimate likelihood and impact (financial + non-financial).\r\n   - Score and rank risks using a simple matrix (e.g., 1\u20135 likelihood and 1\u20135 impact), then label priority tiers.\r\n\r\n4. **Controls & mitigation design**\r\n   - For top-tier items, propose layered controls (prevent, detect, respond).\r\n   - For moderate\/low items, propose lightweight guardrails and monitoring triggers.\r\n   - Include options that match resource levels (e.g., \u201cminimum viable control\u201d vs \u201cenhanced control\u201d).\r\n\r\n5. **Contingency & disruption playbooks**\r\n   - Build response steps for the most critical scenarios (who does what, in what order).\r\n   - Include communications guidance (customers, vendors, employees, regulators if relevant).\r\n   - Define recovery objectives and resource needs.\r\n\r\n6. **Implementation roadmap**\r\n   - Assign ownership, timelines, and required budget\/tools.\r\n   - Identify quick wins (0\u201330 days), mid-term actions (30\u201390 days), and longer-term investments (90\u2013180 days), adjusting as needed.\r\n\r\n7. **Monitoring, review, and refresh**\r\n   - Define leading indicators\/KRIs and a routine to revisit scores.\r\n   - Establish a recurring review cycle and a change-trigger list (new vendor, new regulation, rapid growth, incident, etc.).\r\n   - Incorporate stakeholder feedback and document versioning.\r\n\r\n## INPUTS\r\n- **Business overview:** [PRODUCT_DESCRIPTION]\r\n- **Primary user segment served:** [TARGET_AUDIENCE]\r\n- **Industry\/sector:** [INDUSTRY]\r\n- **Core operations (how work is delivered):** [KEY_OPERATIONS]\r\n- **Primary financial activities (revenue, expenses, cashflow, credit, etc.):** [MAIN_FINANCIAL_ACTIVITIES]\r\n- **Market context (competition, demand shifts, regulations, macro factors):** [MARKET_ENVIRONMENT]\r\n- **Known risks already on your radar:** [KNOWN_RISKS]\r\n- **Business goals (growth, profitability, expansion, stability, exit, etc.):** [PRIMARY_GOAL]\r\n- **Resources available for risk management (people, tools, budget):** [AVAILABLE_RESOURCES]\r\n- **Planning horizon:** [TIMEFRAME]\r\n- **Budget range (if known):** [BUDGET]\r\n- **Preferred tone (e.g., formal, pragmatic, concise):** [TONE]\r\n\r\n## OUTPUT SPECIFICATION\r\nDeliver a single structured document containing:\r\n\r\n1. **{Executive Summary}**\r\n   - {Top Risks Snapshot}\r\n   - {Priority Recommendations}\r\n\r\n2. **{Business Profile & Assumptions}**\r\n   - {Context Summary}\r\n   - {Assumptions}\r\n   - {Open Questions}\r\n\r\n3. **{Risk Register (Ranked)}** (table)\r\n   - Columns: {Risk}, {Category}, {Root Cause}, {Likelihood Score}, {Impact Score}, {Overall Rating}, {Financial Exposure}, {Non-Financial Impact}, {Early Warning Indicators}, {Current Controls}, {Recommended Controls}, {Owner}, {Target Date}\r\n\r\n4. **{Risk Heat Map Summary}**\r\n   - {High Tier}, {Medium Tier}, {Low Tier} with brief rationale\r\n\r\n5. **{Mitigation Plan by Priority Tier}**\r\n   - {High-Priority Control Plan}\r\n   - {Medium-Priority Guardrails}\r\n   - {Low-Priority Monitoring Approach}\r\n\r\n6. **{Contingency Playbooks}** (for the highest-impact scenarios)\r\n   - For each: {Scenario}, {Trigger}, {Immediate Actions (0\u201324h)}, {Stabilization (1\u20137d)}, {Recovery (2\u20136w)}, {Comms Plan}, {Resources Needed}, {Decision Owner}\r\n\r\n7. **{Implementation Roadmap}**\r\n   - {0\u201330 Day Actions}\r\n   - {30\u201390 Day Actions}\r\n   - {90\u2013180 Day Actions}\r\n   - {Dependencies & Budget Notes}\r\n\r\n8. **{Monitoring & Review System}**\r\n   - {Key Risk Indicators}\r\n   - {Review Cadence}\r\n   - {Change Triggers}\r\n   - {Update Workflow & Versioning}\r\n\r\n## QUALITY CHECKS\r\nBefore finalizing, verify:\r\n- Coverage spans operations, finance, compliance\/legal, people, technology, supply chain, reputation, and market forces.\r\n- Every high-tier risk has: an owner, early-warning indicators, and a concrete mitigation + contingency component.\r\n- Prioritization is transparent (scoring method is stated and consistently applied).\r\n- Recommendations match [AVAILABLE_RESOURCES] and [BUDGET] (offer tiered alternatives if constrained).\r\n- All user inputs use **[UPPERCASE_WITH_UNDERSCORES]** and all AI-filled placeholders use **{Title Case}** format only.";
    const variables = ["[PRODUCT_DESCRIPTION]","[TARGET_AUDIENCE]","[INDUSTRY]","[KEY_OPERATIONS]","[MAIN_FINANCIAL_ACTIVITIES]","[MARKET_ENVIRONMENT]","[KNOWN_RISKS]","[PRIMARY_GOAL]","[AVAILABLE_RESOURCES]","[TIMEFRAME]","[BUDGET]","[TONE]","[UPPERCASE_WITH_UNDERSCORES]"];
    // 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 sharp business snapshot first.</strong> Add 5–8 lines on what you sell, your fulfillment model, and your constraints (cash, staff, tools). For example: “B2C Shopify brand, 3-person team, ships from 3PL, $70K/month, high return rates, one ad channel.” That context makes the scoring far more believable.</li>


<li><strong>Force numbers where they matter.</strong> Even rough ranges improve prioritization. After the first output, ask: “Add financial exposure bands for the top 10 risks (e.g., $1–5K, $5–25K, $25–100K+) and explain the assumptions behind each band.”</li>


<li><strong>Use a “top-5 only” round for speed.</strong> If you’re short on time, run one pass and then follow with: “Reduce this to the five most urgent risks and write a 30-day mitigation plan with owners and weekly checkpoints.” Frankly, most teams implement more when the list is smaller.</li>


<li><strong>Iterate by changing risk appetite.</strong> After you review the ranking, try: “Re-score using a conservative risk appetite (lower tolerance for compliance and cash-flow risk), then re-score using an aggressive growth posture.” The delta shows where you’re making a strategic choice, not just “being careful.”</li>


<li><strong>Turn KRIs into an operating rhythm.</strong> Don’t leave indicators as a list. Follow up with: “Convert the KRIs into a one-page dashboard spec: metric definition, data source, owner, threshold, and what action to take when it’s breached.” Then you can drop it into a spreadsheet or BI tool the same day.</li>

</ul>

</div>

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

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



<p>Once you’ve mapped your risk strategy, these prompts help you communicate it clearly (internally and externally) with stronger narrative structure:</p>



<p>If you also need to brief stakeholders on “what happened, what we learned, and what changes now,” <a href="https://flowpast.com/prompts/write-a-breakthrough-feature-story-with-this-ai-prompt/">Write a Breakthrough Feature Story with this AI Prompt</a> helps you shape a compelling, readable story from messy notes. It pairs well when you’re documenting a disruption, a turnaround, or a hard-won fix to a recurring operational risk.</p>



<p>For teams doing deeper internal write-ups, <a href="https://flowpast.com/prompts/write-a-long-form-news-feature-with-this-ai-prompt/">Write a Long-Form News Feature with this AI Prompt</a> is useful when you want a structured narrative that still stays factual. It’s a smart follow-on when your risk plan needs cross-team buy-in and you want to explain the “why” behind new controls.</p>



<p>When a risk event has uncertainty (fraud patterns, vendor issues, policy violations) and you need to assemble facts before you act, <a href="https://flowpast.com/prompts/write-an-investigative-feature-with-this-ai-prompt/">Write an Investigative Feature with this AI Prompt</a> can help you outline lines of inquiry and organize evidence. It’s not a substitute for legal or HR process, but it can help you think clearly and avoid gaps in your timeline.</p>


<br>


<p>Quick reference:</p>



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

<li><a href="https://flowpast.com/prompts/write-a-breakthrough-feature-story-with-this-ai-prompt/">Write a Breakthrough Feature Story with this AI Prompt</a>: Turn risk events into clear narratives.</li>


<li><a href="https://flowpast.com/prompts/write-a-long-form-news-feature-with-this-ai-prompt/">Write a Long-Form News Feature with this AI Prompt</a>: Build stakeholder-ready internal reporting.</li>


<li><a href="https://flowpast.com/prompts/write-an-investigative-feature-with-this-ai-prompt/">Write an Investigative Feature with this AI Prompt</a>: Organize inquiry for uncertain incidents.</li>


<li><a href="https://flowpast.com/prompts/write-an-investigative-feature-article-ai-prompt/">Write an Investigative Feature Article AI Prompt</a>: Create a structured investigation draft.</li>


<li><a href="https://flowpast.com/prompts/build-a-fiction-book-outline-with-this-ai-prompt/">Build a Fiction Book Outline with this AI Prompt</a>: Practice scenario thinking with plot arcs.</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 risk strategy prompt AI prompt?</span>

<p class="answer"><strong>Operations Managers</strong> use this to identify fragile steps in fulfillment, service delivery, and vendor dependencies, then turn them into controls someone actually owns. <strong>Founders and CEOs</strong> get a prioritized view of risk instead of a scattered worry list, which makes tradeoffs (hire, automate, change policy) easier to justify. <strong>Finance Leads</strong> benefit from the probability × impact scoring and exposure ranges, especially when cash flow is tight and one disruption can domino. <strong>Fractional COOs and consultants</strong> apply it to standardize risk reviews across multiple clients without pretending it’s a full audit.</p>

</div>

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

<p class="answer"><strong>E-commerce brands</strong> use this to pressure-test supply chain risk, chargebacks, fraud, 3PL performance, and reputation risk from shipping delays. It’s particularly useful when one paid channel drives most revenue and a platform change could hurt quickly. <strong>Local service businesses</strong> apply it to people risk (no-shows, hiring gaps), compliance basics, and operational continuity when equipment breaks or a key tech is out. <strong>SaaS companies</strong> leverage it for technology and security risk, uptime and incident response playbooks, and clear KRIs like failed payments or support backlog thresholds. <strong>Professional services firms</strong> use it to manage scope creep, client concentration, regulatory exposure, and delivery capacity while staying realistic about small-team bandwidth.</p>

</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building a small business risk strategy produce weak results?</span>

<p class="answer">A typical prompt like “Write me a risk management plan for my small business” fails because it: lacks your real constraints (headcount, cash, tools), provides no prioritization method like probability × impact scoring, ignores second-order risks that show up through SWOT/PESTLE scanning, produces generic advice instead of decision-ready controls with owners, and misses the disruption playbook/KRI cadence that keeps the plan alive after week one. You end up with a long document that feels responsible, but doesn’t change what anyone does on Monday.</p>

</div>

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

<p class="answer">Yes. Start by pasting a short context block before you run it: your business model, team size, core systems (POS, Shopify, QuickBooks, CRM), top revenue drivers, and any recent incidents. Then specify your risk tolerance (“We accept market risk but have zero tolerance for compliance fines” or “Cash flow is the number-one constraint”). A useful follow-up is: “Rewrite the plan for a 90-day horizon, and label each mitigation as Low/Medium/High effort with an estimated cost range.” If you leave details vague, the prompt will still proceed, but you will get assumption-heavy outputs.</p>

</div>

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

<p class="answer">The biggest mistake is leaving the business context too vague—instead of “a small retail business,” try “single-location specialty grocery, $1.2M/year, 12 staff, heavy weekend traffic, two main suppliers.” Another common error is ignoring constraints; “do a full ISO program” is unrealistic, while “two hours per week and $500/month tools budget” yields usable controls. People also skip incident history, even though “we had two ransomware attempts and a payroll error last quarter” changes the priority list fast. Finally, teams treat the output as a document rather than a cadence; if you don’t assign owners and pick a KRI review rhythm, nothing sticks.</p>

</div>

<div class="faq-item">
<span class="question">Who should NOT use this risk strategy prompt?</span>

<p class="answer">This prompt isn’t ideal for regulated enterprises that require formal risk frameworks, audits, or legal sign-off as part of compliance. It’s also a poor fit when you want a one-time template and have no intention of reviewing KRIs or updating the register as the business changes. And if you have not validated your core offer yet, you may get more value by focusing on product-market fit before formalizing risk controls. In those cases, use a lightweight checklist approach first, then come back when you’re operating in repeatable cycles.</p>

</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this risk strategy prompt AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Operations Managers use this to identify fragile steps in fulfillment, service delivery, and vendor dependencies, then turn them into controls someone actually owns. Founders and CEOs get a prioritized view of risk instead of a scattered worry list, which makes tradeoffs (hire, automate, change policy) easier to justify. Finance Leads benefit from the probability × impact scoring and exposure ranges, especially when cash flow is tight and one disruption can domino. Fractional COOs and consultants apply it to standardize risk reviews across multiple clients without pretending it’s a full audit."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this risk strategy prompt AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "E-commerce brands use this to pressure-test supply chain risk, chargebacks, fraud, 3PL performance, and reputation risk from shipping delays. It’s particularly useful when one paid channel drives most revenue and a platform change could hurt quickly. Local service businesses apply it to people risk (no-shows, hiring gaps), compliance basics, and operational continuity when equipment breaks or a key tech is out. SaaS companies leverage it for technology and security risk, uptime and incident response playbooks, and clear KRIs like failed payments or support backlog thresholds. Professional services firms use it to manage scope creep, client concentration, regulatory exposure, and delivery capacity while staying realistic about small-team bandwidth."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building a small business risk strategy produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me a risk management plan for my small business” fails because it: lacks your real constraints (headcount, cash, tools), provides no prioritization method like probability × impact scoring, ignores second-order risks that show up through SWOT/PESTLE scanning, produces generic advice instead of decision-ready controls with owners, and misses the disruption playbook/KRI cadence that keeps the plan alive after week one. You end up with a long document that feels responsible, but doesn’t change what anyone does on Monday."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this risk strategy prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. Start by pasting a short context block before you run it: your business model, team size, core systems (POS, Shopify, QuickBooks, CRM), top revenue drivers, and any recent incidents. Then specify your risk tolerance (“We accept market risk but have zero tolerance for compliance fines” or “Cash flow is the number-one constraint”). A useful follow-up is: “Rewrite the plan for a 90-day horizon, and label each mitigation as Low/Medium/High effort with an estimated cost range.” If you leave details vague, the prompt will still proceed, but you will get assumption-heavy outputs."
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this risk strategy prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving the business context too vague—instead of “a small retail business,” try “single-location specialty grocery, $1.2M/year, 12 staff, heavy weekend traffic, two main suppliers.” Another common error is ignoring constraints; “do a full ISO program” is unrealistic, while “two hours per week and $500/month tools budget” yields usable controls. People also skip incident history, even though “we had two ransomware attempts and a payroll error last quarter” changes the priority list fast. Finally, teams treat the output as a document rather than a cadence; if you don’t assign owners and pick a KRI review rhythm, nothing sticks."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this risk strategy prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for regulated enterprises that require formal risk frameworks, audits, or legal sign-off as part of compliance. It’s also a poor fit when you want a one-time template and have no intention of reviewing KRIs or updating the register as the business changes. And if you have not validated your core offer yet, you may get more value by focusing on product-market fit before formalizing risk controls. In those cases, use a lightweight checklist approach first, then come back when you’re operating in repeatable cycles."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">

<p>Risk doesn’t go away because you’re busy. Put structure around it, prioritize what matters, and move forward with fewer surprises. Paste the prompt into ChatGPT, answer the clarifying questions, and build your first decision-ready risk plan today.</p>

</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5001754.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>AI Prompt to Build an FLSA Compliance Forensics Report</title>
		<link>https://flowpast.com/prompts/ai-prompt-to-build-an-flsa-compliance-forensics-report/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:53:02 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5003044</guid>

					<description><![CDATA[DOL scrutiny is looming - the ultimate AI Prompt that builds an FLSA forensics report with citations, exposure ranges, and remediation steps. Access our full AI prompt library for every model.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: FLSA compliance forensics report -->

<div class="hook-introduction">

<p>You can’t “gut feel” wage-and-hour risk. Not with the DOL, not during due diligence, and definitely not when payroll records don’t reconcile cleanly across systems. The usual outcome is predictable: lots of opinions, not enough evidence, and a remediation plan that collapses the moment someone asks, “Based on what?”</p>



<p>This <strong>FLSA compliance forensics report</strong> is built for <strong>HR leaders</strong> trying to pressure-test exemption and overtime exposure before a board update, <strong>deal teams</strong> who need a regulator-ready risk narrative ahead of acquisition, and <strong>operations executives</strong> who must turn messy timekeeping and pay practices into a prioritized fix list. The output is a documentation-driven forensic report with DOL trigger risks, FLSA citations, exposure ranges, and a step-by-step remediation plan tied to the records you provide.</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 fact pattern from your payroll, classification, and policy documents in an evidence-first “pre-analysis understanding” summary.</li>
          <li>Creates an intake and assumption log that calls out missing time periods, incomplete datasets, and any reasonable inference the report must rely on.</li>
          <li>Flags likely DOL investigation triggers based on observable data points (for example, inconsistent overtime treatment, thin time records, or shaky exemption signals).</li>
          <li>Builds findings that tie each potential issue to an FLSA citation and explicitly frames conclusions as pending counsel review rather than “final legal advice.”</li>
          <li>Prioritizes remediation by combining “scrutiny likelihood” and estimated dollar exposure so you get a fix plan that can be executed fast.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You are heading into diligence and need a defensible wage-and-hour risk packet, not a generic compliance checklist.</li>
          <li>You have payroll exports and time records, but leaders disagree on how big the problem is and what to fix first.</li>
          <li>A complaint, union activity, or sudden turnover has increased the odds of DOL scrutiny, and documentation needs to be tightened immediately.</li>
          <li>You suspect overtime/regular-rate math is wrong when bonuses, commissions, or differentials hit payroll, and you need a clean way to test it.</li>
          <li>Your team has to make remediation decisions under time pressure, with limited appetite for “best practices” that aren’t tied to evidence.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A regulator-ready forensic report with an executive summary plus a numbered findings section.</li>
           <li>A documented evidence and assumption log listing what was provided, what is missing, and how gaps affect confidence.</li>
           <li>A prioritized risk register that ranks issues by DOL-trigger likelihood and estimated exposure range.</li>
           <li>A remediation plan with sequenced actions (now/next/later) designed for quick execution before acquisition.</li>
           <li>A citation-backed appendix-style set of references you can hand to counsel for review and refinement.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

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

<h2 class="wp-block-heading">The Full AI Prompt: Regulator-Ready FLSA Forensics Report Builder</h2>


<!-- Prompt file not found: /home/flowpast/htdocs/flowpast.com/wp-content/data/prompts_scraped/5003252/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 “raw,” then a clean slice.</strong> Start by providing your exports as-is (even if ugly), then run a second pass with a narrowed date range like “the last two quarters.” After the first output, ask: “Re-run the findings assuming the audit window is Jan 1–Jun 30 only; remove anything outside that period.”</li>


<li><strong>Make your records easy to cite.</strong> The prompt is evidence-driven, so label documents and tables clearly (e.g., “PayrollRegister_Q2.csv,” “TimeclockExport_May.xlsx,” “Handbook_2024.pdf”). A helpful follow-up: “In each finding, cite the exact document name and the relevant row/field (if available).”</li>


<li><strong>Force a reconciliation check.</strong> If you have multiple sources (payroll system, timekeeping tool, bonus tracker), tell the model to look for mismatches. Ask: “Add a section called ‘Reconciliation Tests’ comparing hours, OT, and gross pay between the time records and payroll register; list discrepancies by employee group.”</li>


<li><strong>Iterate the remediation plan like a deal team would.</strong> The first plan will usually be broad. After you see it, try: “Now rewrite the fix plan with two lanes: (1) actions we can complete in 14 days pre-close, and (2) actions that require systems changes post-close; keep owners and dependencies explicit.”</li>


<li><strong>Use a companion risk audit to widen the net.</strong> This prompt is intentionally constrained to what’s in the supplied records, so pair it with a structured HR scan to catch adjacent exposures. If you also need that, run <a href="https://flowpast.com/prompts/create-a-5-step-hr-risk-audit-ai-prompt/">Create a 5-Step HR Risk Audit AI Prompt</a> first, then feed the top wage-and-hour artifacts into this report for a tighter, citation-backed narrative.</li>

</ul>

</div>

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

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



<p>Once your forensic report is drafted, these prompts help you operationalize findings, track risk, and standardize audit work across teams.</p>



<p>If you also need a broader pre-deal scan (beyond wage and hour) to decide what to dig into, <a href="https://flowpast.com/prompts/create-a-5-step-hr-risk-audit-ai-prompt/">Create a 5-Step HR Risk Audit AI Prompt</a> gives you a fast, structured way to surface HR risk areas and identify which documents to request next.</p>



<p>For teams doing ongoing oversight after you’ve remediated the biggest items, <a href="https://flowpast.com/prompts/design-an-hr-compliance-risk-dashboard-with-this-ai-prompt/">Design an HR Compliance Risk Dashboard with this AI Prompt</a> is a practical next step. It helps turn one-time findings into a standing set of metrics, owners, and review cadence.</p>



<p>When you need audit rigor and repeatability across sites, business units, or portfolio companies, <a href="https://flowpast.com/prompts/build-iso-19011-legal-audit-templates-ai-prompt/">Build ISO 19011 Legal Audit Templates AI Prompt</a> pairs well with this report by standardizing audit planning, evidence capture, and corrective-action tracking in a way leadership recognizes.</p>


<br>


<p>Quick reference:</p>



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

<li><a href="https://flowpast.com/prompts/create-a-5-step-hr-risk-audit-ai-prompt/">Create a 5-Step HR Risk Audit AI Prompt</a>: Fast scan to prioritize HR risks.</li>


<li><a href="https://flowpast.com/prompts/design-an-hr-compliance-risk-dashboard-with-this-ai-prompt/">Design an HR Compliance Risk Dashboard with this AI Prompt</a>: Turns findings into trackable metrics.</li>


<li><a href="https://flowpast.com/prompts/build-iso-19011-legal-audit-templates-ai-prompt/">Build ISO 19011 Legal Audit Templates AI Prompt</a>: Standardizes audit execution and evidence.</li>


<li><a href="https://flowpast.com/prompts/build-iso-9001-background-check-templates-ai-prompt/">Build ISO 9001 Background Check Templates AI Prompt</a>: Hiring-screening documentation and consistency toolkit.</li>


<li><a href="https://flowpast.com/prompts/labor-standards-compliance-audit-report-ai-prompt/">Labor Standards Compliance Audit Report AI Prompt</a>: Broader labor-standards audit report format.</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 FLSA compliance forensics report AI prompt?</span>

<p class="answer"><strong>HR Directors</strong> use this to translate payroll, classification, and handbook artifacts into a prioritized set of wage-and-hour risks they can brief to executives without hand-waving. <strong>In-house Counsel or Compliance Managers</strong> value the citation-backed, “potential violation pending review” framing, because it accelerates legal triage instead of replacing it. <strong>Private Equity Operating Partners</strong> lean on it to sanity-check diligence narratives and avoid surprises that blow up purchase price adjustments. <strong>Payroll Managers</strong> benefit when the report points to specific math and recordkeeping weak spots that can be tested and corrected quickly.</p>

</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this FLSA compliance forensics report AI prompt?</span>

<p class="answer"><strong>Retail and multi-location services</strong> get value because timekeeping variance, manager overrides, and mixed job duties can create consistent DOL scrutiny triggers; this prompt helps turn those patterns into documented findings tied to records. <strong>Manufacturing and logistics</strong> teams use it to pressure-test shift differentials, bonuses, and overtime calculations that can quietly inflate exposure when regular-rate math is off. <strong>Healthcare providers</strong> often benefit where pay practices include blended rates, on-call structures, or complicated scheduling; the report format helps isolate what is supported by the data versus what needs follow-up. <strong>PE-backed platform companies</strong> use it to standardize wage-and-hour risk assessment across acquisitions, especially when payroll systems and policies differ by entity.</p>

</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building an FLSA compliance forensics report produce weak results?</span>

<p class="answer">A typical prompt like “<em>Write me an FLSA compliance report for my company</em>” fails because it: lacks an evidence intake and assumption log, so gaps in records get hidden instead of documented; provides no structure for prioritizing DOL scrutiny triggers versus low-signal issues; ignores the need to tie every finding to a specific observable data point plus an FLSA citation; produces generic “best practices” language instead of a defensible, record-based narrative; and misses exposure-range thinking that leadership needs for remediation decisions and deal conversations.</p>

</div>

<div class="faq-item">
<span class="question">Can I customize this FLSA compliance forensics report prompt for my specific situation?</span>

<p class="answer">Yes, but customization happens through what you include inside the provided materials: your [PAYROLL_RECORDS], [CLASSIFICATION_DATA], and [POLICY_DOCUMENTS]. If you want the output to focus on one business unit, provide those slices as separate files or clearly labeled sections (for example, “CA stores only” vs “all locations”). You can also steer the analysis by adding a one-page cover note inside your documents stating the audit window, known pay types (bonuses, commissions, differentials), and any planned transaction timeline. A useful follow-up prompt is: “Rewrite the executive summary for a buyer diligence audience, and add a ‘30/60/90-day remediation plan’ that matches the deal timeline.”</p>

</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this FLSA compliance forensics report prompt?</span>

<p class="answer">The biggest mistake is supplying [PAYROLL_RECORDS] without the underlying timekeeping detail; “payroll register only” is weak, while “payroll register plus time clock export by employee/day” gives the model something testable. Another common error is dumping [CLASSIFICATION_DATA] as titles only (bad) instead of titles plus salary/hourly status, exemption designation, and any job duty indicators you actually have (good). Teams also provide [POLICY_DOCUMENTS] that are outdated or unlabeled; “EmployeeHandbook.pdf” is vague, but “Handbook_Effective_2024-07-01.pdf” and “OvertimePolicy_2023.pdf” makes citations cleaner. Finally, mixing time periods without stating an audit window leads to muddled findings, so keep the period explicit and consistent across files.</p>

</div>

<div class="faq-item">
<span class="question">Who should NOT use this FLSA compliance forensics report prompt?</span>

<p class="answer">This prompt isn’t ideal for teams who have little to no documentary evidence and want the model to “fill in” unwritten practices. It also won’t replace counsel if you need a formal legal opinion, negotiation language, or jurisdiction-specific advice beyond what the records support. If you only need a lightweight checklist for internal training, a simpler HR audit tool may be a better starting point before you invest time assembling the right [PAYROLL_RECORDS], [CLASSIFICATION_DATA], and [POLICY_DOCUMENTS].</p>

</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this FLSA compliance forensics report AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "HR Directors use this to translate payroll, classification, and handbook artifacts into a prioritized set of wage-and-hour risks they can brief to executives without hand-waving. In-house Counsel or Compliance Managers value the citation-backed, “potential violation pending review” framing, because it accelerates legal triage instead of replacing it. Private Equity Operating Partners lean on it to sanity-check diligence narratives and avoid surprises that blow up purchase price adjustments. Payroll Managers benefit when the report points to specific math and recordkeeping weak spots that can be tested and corrected quickly."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this FLSA compliance forensics report AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Retail and multi-location services get value because timekeeping variance, manager overrides, and mixed job duties can create consistent DOL scrutiny triggers; this prompt helps turn those patterns into documented findings tied to records. Manufacturing and logistics teams use it to pressure-test shift differentials, bonuses, and overtime calculations that can quietly inflate exposure when regular-rate math is off. Healthcare providers often benefit where pay practices include blended rates, on-call structures, or complicated scheduling; the report format helps isolate what is supported by the data versus what needs follow-up. PE-backed platform companies use it to standardize wage-and-hour risk assessment across acquisitions, especially when payroll systems and policies differ by entity."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building an FLSA compliance forensics report produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me an FLSA compliance report for my company” fails because it: lacks an evidence intake and assumption log, so gaps in records get hidden instead of documented; provides no structure for prioritizing DOL scrutiny triggers versus low-signal issues; ignores the need to tie every finding to a specific observable data point plus an FLSA citation; produces generic “best practices” language instead of a defensible, record-based narrative; and misses exposure-range thinking that leadership needs for remediation decisions and deal conversations."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this FLSA compliance forensics report prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, but customization happens through what you include inside the provided materials: your [PAYROLL_RECORDS], [CLASSIFICATION_DATA], and [POLICY_DOCUMENTS]. If you want the output to focus on one business unit, provide those slices as separate files or clearly labeled sections (for example, “CA stores only” vs “all locations”). You can also steer the analysis by adding a one-page cover note inside your documents stating the audit window, known pay types (bonuses, commissions, differentials), and any planned transaction timeline. A useful follow-up prompt is: “Rewrite the executive summary for a buyer diligence audience, and add a ‘30/60/90-day remediation plan’ that matches the deal timeline.”"
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this FLSA compliance forensics report prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is supplying [PAYROLL_RECORDS] without the underlying timekeeping detail; “payroll register only” is weak, while “payroll register plus time clock export by employee/day” gives the model something testable. Another common error is dumping [CLASSIFICATION_DATA] as titles only (bad) instead of titles plus salary/hourly status, exemption designation, and any job duty indicators you actually have (good). Teams also provide [POLICY_DOCUMENTS] that are outdated or unlabeled; “EmployeeHandbook.pdf” is vague, but “Handbook_Effective_2024-07-01.pdf” and “OvertimePolicy_2023.pdf” makes citations cleaner. Finally, mixing time periods without stating an audit window leads to muddled findings, so keep the period explicit and consistent across files."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this FLSA compliance forensics report prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for teams who have little to no documentary evidence and want the model to “fill in” unwritten practices. It also won’t replace counsel if you need a formal legal opinion, negotiation language, or jurisdiction-specific advice beyond what the records support. If you only need a lightweight checklist for internal training, a simpler HR audit tool may be a better starting point before you invest time assembling the right [PAYROLL_RECORDS], [CLASSIFICATION_DATA], and [POLICY_DOCUMENTS]."
      }
    }
    }
  ]
}
</script>
</div>

<div class="closing-section">

<p>DOL risk doesn’t get smaller because everyone’s busy. Put your records to work, generate a citation-backed forensic narrative, and walk into diligence or remediation planning with something solid. Paste the prompt into your model and start tightening the story today.</p>

</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5003044.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build an ISO 30414 HR Compliance Audit AI Prompt</title>
		<link>https://flowpast.com/prompts/build-an-iso-30414-hr-compliance-audit-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:51:54 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5003043</guid>

					<description><![CDATA[HR controls fail under scrutiny - a proven AI Prompt that builds ISO 30414 audit checkpoints with evidence, scoring, and remediation. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: ISO 30414 audit prompt -->

<div class="hook-introduction">

<p>Most HR “compliance” audits fall apart the moment someone asks for proof. Policies exist. Slide decks look polished. But the evidence trail is missing, the scoring is fuzzy, and cross-functional handoffs (HRIS to Payroll, Legal to HR, Finance to reporting) are where things quietly fail.</p>



<p>This <strong>ISO 30414 audit prompt</strong> is built for <strong>HR operations leaders</strong> who need an audit plan that stands up to external scrutiny, <strong>internal audit teams</strong> who must test “policy executed” not just “policy written,” and <strong>people analytics managers</strong> who are responsible for human capital reporting accuracy under ISO 30414. The output is a regulator-ready checkpoint system: ISO 30414-linked tests, required evidence artifacts, weighted scoring, and a remediation timeline tied to risk and effort.</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>Converts ISO 30414 human capital reporting topics into audit checkpoints that each cite the relevant ISO 30414 topic/subtopic.</li>
          <li>Defines “how to verify” for every checkpoint using quantitative measures (rates, ratios, thresholds) plus qualitative tests (interviews, sampling, exception handling).</li>
          <li>Specifies the evidence and audit trail required to pass each test, such as HRIS reports, approvals, access logs, tickets, and meeting minutes.</li>
          <li>Maps cross-functional handoffs that commonly break compliance, including HRIS, Payroll, Legal, Finance, DEI, IT/Security, and operational managers.</li>
          <li>Weights high-exposure risk areas more heavily and ties remediation windows to both risk severity and implementation effort.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You are preparing for an external review, regulator inquiry, or assurance-style audit where “show me the proof” is the default stance.</li>
          <li>Your HR reporting has inconsistent numbers across HRIS, Finance, and People Analytics, and leadership wants one defensible source of truth.</li>
          <li>Recent incidents (complaints, investigations, pay equity concerns) have raised your penalty and reputational risk, and you need control maturity fast.</li>
          <li>A merger, geographic expansion, or new works council/legal requirements introduces new handoffs that have not been tested end-to-end.</li>
          <li>You are scaling headcount and need a repeatable internal audit cadence that catches control breaks before they become public problems.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A structured audit architecture with 4 domains and ISO 30414-linked checkpoints under each domain.</li>
           <li>A verification playbook that lists test procedures, sampling guidance, and interview targets for each checkpoint.</li>
           <li>An evidence register that names specific artifacts to collect (reports, logs, approvals, tickets) and where they should come from.</li>
           <li>A weighted scoring model that prioritizes high-exposure gaps and makes pass/fail defensible in writing.</li>
           <li>A remediation plan with timing windows (quick wins vs medium vs longer fixes) tied to risk and effort.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

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

<h2 class="wp-block-heading">The Full AI Prompt: ISO 30414 HR Compliance Audit Builder</h2>


<!-- Prompt file not found: /home/flowpast/htdocs/flowpast.com/wp-content/data/prompts_scraped/5003251/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>Start by feeding it your “messy reality,” not your policy binder.</strong> Paste in how work actually flows between HRIS, Payroll, Finance, and Legal, including known pain points. If you only provide the official process, you will get checkpoints that pass on paper and fail in execution. Try adding a note like: “Payroll adjustments happen via email approvals, not tickets.”</li>


<li><strong>Ask for evidence examples your systems can actually produce.</strong> The prompt already demands audit trails, but you can make it sharper by naming your tools (Workday, SAP, ADP, ServiceNow, Jira, Google Drive, SharePoint). Follow up with: “For each evidence artifact, tell me the system of record and the exact report/log name to pull, plus the owner.”</li>


<li><strong>Force clear thresholds and sampling rules.</strong> Audits stall when “review a sample” is left undefined. After the first run, ask: “Rewrite each checkpoint with a minimum sample size rule (e.g., 25 records per quarter) and a pass threshold (e.g., ≥ 95% completeness), with an exception-handling step.”</li>


<li><strong>Iterate the scoring model based on your real risk profile.</strong> The prompt weights high-exposure areas, but you should tune it to your context (regulated industry, public company, multiple countries). After the first output, try asking: “Now make the scoring more aggressive for pay equity and turnover reporting, and more conservative for low-penalty disclosures; show the new weights and justify them.”</li>


<li><strong>Turn it into an operating rhythm, not a one-off document.</strong> Use the checkpoint list to create a monthly/quarterly control calendar with owners and due dates, then rerun the prompt to refine the test procedures as you learn. A strong follow-up is: “Convert the remediation plan into a 90-day roadmap with weekly milestones, required stakeholders, and sign-off points.” Honestly, this is where the prompt pays for itself.</li>

</ul>

</div>

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

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



<p>Once your ISO 30414 audit checkpoints are defined, these related prompts help you coordinate cross-functional execution and keep owners accountable.</p>



<p>If you also need a clean way to align HR, Finance, IT, and Legal on who does what (and what each team gets in return), use <a href="https://flowpast.com/prompts/build-a-partnership-playbook-with-this-ai-prompt/">Build a Partnership Playbook with this AI Prompt</a>. It pairs well when your audit findings show broken handoffs and unclear ownership, because it helps formalize operating agreements and escalation paths.</p>



<p>For teams doing multi-department change rollout after audit findings, <a href="https://flowpast.com/prompts/build-a-partner-referral-sales-roadmap-with-this-ai-prompt/">Build a Partner Referral Sales Roadmap with this AI Prompt</a> is surprisingly useful as a planning format. Treat “partner” as any internal stakeholder group and use the roadmap structure to sequence communications, enablement, and adoption steps across the remediation timeline.</p>



<p>When you need buy-in fast and want a simple mechanism to drive participation (for example, managers completing turnover interviews on time or teams submitting evidence packets consistently), <a href="https://flowpast.com/prompts/build-a-referral-strategy-plan-with-this-ai-prompt/">Build a Referral Strategy Plan with this AI Prompt</a> can help you design incentives and messaging. It’s not HR-specific, but the strategy framework transfers well to internal programs that depend on behavior change.</p>


<br>


<p>Quick reference:</p>



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

<li><a href="https://flowpast.com/prompts/build-a-partnership-playbook-with-this-ai-prompt/">Build a Partnership Playbook with this AI Prompt</a>: Clarify ownership, handoffs, and escalation.</li>


<li><a href="https://flowpast.com/prompts/build-a-partner-referral-sales-roadmap-with-this-ai-prompt/">Build a Partner Referral Sales Roadmap with this AI Prompt</a>: Rollout roadmap structure for adoption.</li>


<li><a href="https://flowpast.com/prompts/build-a-referral-strategy-plan-with-this-ai-prompt/">Build a Referral Strategy Plan with this AI Prompt</a>: Incentives and messaging for participation.</li>


<li><a href="https://flowpast.com/prompts/build-a-referral-program-launch-plan-with-this-ai-prompt/">Build a Referral Program Launch Plan with this AI Prompt</a>: Launch plan format for internal initiatives.</li>


<li><a href="https://flowpast.com/prompts/build-a-customer-referral-program-with-this-ai-prompt/">Build a Customer Referral Program with this AI Prompt</a>: Program mechanics you can mirror internally.</li>

</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 ISO 30414 audit prompt AI prompt?</span>

<p class="answer"><strong>HR Compliance Managers</strong> use this to translate ISO 30414 requirements into checkpoints with explicit evidence requests, so audit preparation stops being guesswork. <strong>Internal Auditors</strong> rely on it to build repeatable test procedures (sampling, interviews, exception handling) that prove controls operate consistently. <strong>People Analytics Leads</strong> benefit because the prompt forces metrics definitions and traceability back to systems of record, which improves reporting accuracy. <strong>HR Ops / HRIS Owners</strong> use the evidence lists to pinpoint where logs, approvals, and workflows must exist inside the tools teams already use.</p>

</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this ISO 30414 audit prompt AI prompt?</span>

<p class="answer"><strong>Financial services</strong> teams use it to create defensible evidence trails and weighted scoring where regulators expect strong controls and documented exception handling. <strong>Healthcare and life sciences</strong> apply it when workforce reporting, turnover, and compensation practices can trigger legal exposure and reputational damage, especially across multiple facilities. <strong>Large multi-country manufacturers</strong> get value because cross-functional handoffs (plants, payroll cycles, works councils, local legal requirements) are exactly where compliance breaks. <strong>High-growth tech companies</strong> use it to mature HR controls quickly as headcount scales and reporting needs shift from “internal dashboards” to audit-ready disclosures.</p>

</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building an ISO 30414 HR compliance audit produce weak results?</span>

<p class="answer">A typical prompt like “Write me an ISO 30414 HR compliance audit checklist” fails because it: lacks explicit ISO 30414 topic/subtopic mapping per checkpoint, provides no verification procedures (sampling, interviews, exception tests), ignores evidence requirements so nothing is provable, produces generic best-practice HR advice instead of audit-ready control tests, and misses cross-functional handoffs where data and approvals actually move. The result looks professional but can’t survive scrutiny when someone asks, “Show me the log, the ticket, and the approval trail.” This prompt is designed to prevent that failure mode.</p>

</div>

<div class="faq-item">
<span class="question">Can I customize this ISO 30414 audit prompt for my specific situation?</span>

<p class="answer">Yes, and you should, because the best audit checkpoints depend on your systems, geographies, and risk exposure. Add your context before running it: HRIS/Payroll tools, headcount, countries, union/works council presence, recent incidents, and the reporting cadence you must meet. Then follow up with a tightening prompt such as: “Revise the checkpoints to match our systems of record (Workday + ADP), include EU works council considerations, and set sampling rules for quarterly reporting; keep the ISO 30414 citations in every checkpoint.” You can also ask it to rebalance weights toward your highest-penalty areas, like compensation equity or turnover disclosures.</p>

</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this ISO 30414 audit prompt prompt?</span>

<p class="answer">The biggest mistake is providing no organization context at all, which forces the model to assume generic systems and generic workflows; instead of “we use an HRIS,” say “Workday is HRIS, ADP is payroll, approvals live in ServiceNow, and Finance reconciles headcount monthly.” Another common error is accepting checkpoints that describe outcomes rather than tests; push for “how to verify” with sample sizes and pass thresholds (good: “sample 25 terminations per quarter,” bad: “review terminations”). Teams also forget to demand named evidence artifacts, so nothing is collectible (good: “Workday report X + payroll adjustment ticket IDs,” bad: “provide documentation”). Finally, people skip cross-functional handoffs; explicitly request handoff tests between HRIS, Payroll, Legal, and Finance so gaps are surfaced early.</p>

</div>

<div class="faq-item">
<span class="question">Who should NOT use this ISO 30414 audit prompt prompt?</span>

<p class="answer">This prompt isn’t ideal for one-time HR documentation projects where you only need a lightweight checklist and won’t collect evidence or run tests. It’s also a poor fit if your organization has not committed to ISO 30414-style reporting at all and you’re still validating what you even want to measure. And if you need legal advice on jurisdiction-specific employment law, use specialist counsel; this is an audit design and verification framework, not legal guidance. In those cases, start with a simpler internal policy review, then come back when you’re ready to operationalize controls.</p>

</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this ISO 30414 audit prompt AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "HR Compliance Managers use this to translate ISO 30414 requirements into checkpoints with explicit evidence requests, so audit preparation stops being guesswork. Internal Auditors rely on it to build repeatable test procedures (sampling, interviews, exception handling) that prove controls operate consistently. People Analytics Leads benefit because the prompt forces metrics definitions and traceability back to systems of record, which improves reporting accuracy. HR Ops / HRIS Owners use the evidence lists to pinpoint where logs, approvals, and workflows must exist inside the tools teams already use."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this ISO 30414 audit prompt AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Financial services teams use it to create defensible evidence trails and weighted scoring where regulators expect strong controls and documented exception handling. Healthcare and life sciences apply it when workforce reporting, turnover, and compensation practices can trigger legal exposure and reputational damage, especially across multiple facilities. Large multi-country manufacturers get value because cross-functional handoffs (plants, payroll cycles, works councils, local legal requirements) are exactly where compliance breaks. High-growth tech companies use it to mature HR controls quickly as headcount scales and reporting needs shift from internal dashboards to audit-ready disclosures."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building an ISO 30414 HR compliance audit produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me an ISO 30414 HR compliance audit checklist” fails because it: lacks explicit ISO 30414 topic/subtopic mapping per checkpoint, provides no verification procedures (sampling, interviews, exception tests), ignores evidence requirements so nothing is provable, produces generic best-practice HR advice instead of audit-ready control tests, and misses cross-functional handoffs where data and approvals actually move. The result looks professional but can’t survive scrutiny when someone asks, “Show me the log, the ticket, and the approval trail.” This prompt is designed to prevent that failure mode."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this ISO 30414 audit prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, and you should, because the best audit checkpoints depend on your systems, geographies, and risk exposure. Add your context before running it: HRIS/Payroll tools, headcount, countries, union/works council presence, recent incidents, and the reporting cadence you must meet. Then follow up with a tightening prompt such as: “Revise the checkpoints to match our systems of record (Workday + ADP), include EU works council considerations, and set sampling rules for quarterly reporting; keep the ISO 30414 citations in every checkpoint.” You can also ask it to rebalance weights toward your highest-penalty areas, like compensation equity or turnover disclosures."
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this ISO 30414 audit prompt prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is providing no organization context at all, which forces the model to assume generic systems and generic workflows; instead of “we use an HRIS,” say “Workday is HRIS, ADP is payroll, approvals live in ServiceNow, and Finance reconciles headcount monthly.” Another common error is accepting checkpoints that describe outcomes rather than tests; push for “how to verify” with sample sizes and pass thresholds (good: “sample 25 terminations per quarter,” bad: “review terminations”). Teams also forget to demand named evidence artifacts, so nothing is collectible (good: “Workday report X + payroll adjustment ticket IDs,” bad: “provide documentation”). Finally, people skip cross-functional handoffs; explicitly request handoff tests between HRIS, Payroll, Legal, and Finance so gaps are surfaced early."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this ISO 30414 audit prompt prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for one-time HR documentation projects where you only need a lightweight checklist and won’t collect evidence or run tests. It’s also a poor fit if your organization has not committed to ISO 30414-style reporting at all and you’re still validating what you even want to measure. And if you need legal advice on jurisdiction-specific employment law, use specialist counsel; this is an audit design and verification framework, not legal guidance. In those cases, start with a simpler internal policy review, then come back when you’re ready to operationalize controls."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">

<p>Audits don’t reward good intentions. They reward verifiable controls, clean evidence, and clear remediation. Paste this prompt into your AI tool, generate the checkpoint system, and start closing the gaps with a plan you can defend.</p>

</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5003043.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build an Enterprise RBAC Plan with this AI Prompt</title>
		<link>https://flowpast.com/prompts/build-an-enterprise-rbac-plan-with-this-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:51:37 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5001442</guid>

					<description><![CDATA[Access gaps expose data - the ultimate AI Prompt that designs enterprise RBAC with schema, middleware, UI gating, tests, and audits. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: enterprise RBAC plan -->

<div class="hook-introduction">

<p>Your app “kind of” has permissions. A few admin checks, a couple of feature flags, and some UI hiding that makes stakeholders feel safe. Then you find a direct API call that bypasses the frontend, an internal role that can quietly escalate, or a contractor account that still works months later.</p>



<p>This <strong>enterprise RBAC plan</strong> is built for <strong>security-minded software architects</strong> who need enforcement patterns that developers won’t accidentally bypass, <strong>engineering managers</strong> cleaning up messy, inconsistent authorization rules across services, and <strong>product teams in regulated environments</strong> that need audit-ready access controls without making the UX miserable. The output is a complete, implementation-ready RBAC blueprint: roles and permissions, a data schema with indexes and constraints, middleware/guard patterns, UI gating guidance, test plans, auditing workflows, and a clear “What This Is NOT” scope section.</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 authorization situation and lists the specific risks it is designed to close (unauthorized access, privilege escalation, and permission sprawl).</li>
          <li>It designs an RBAC model that defines roles, resources, actions, and role structure (flat vs. hierarchical) with escalation-resistant admin patterns.</li>
          <li>It proposes a data-layer schema (tables/collections) with indexes, constraints, and migration notes, including performance implications as roles and tenants grow.</li>
          <li>It outputs backend enforcement patterns (middleware/guards) plus frontend experience guidance so the UI never becomes the only gate.</li>
          <li>It adds concrete operational guardrails: tests, auditing, and a “What This Is NOT” section that prevents scope creep and false security assumptions.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You found an endpoint that should be restricted, but it is callable with a basic user token.</li>
          <li>Your current “admin” role is a catch-all and you need separation of duties before you add more internal teams.</li>
          <li>You are refactoring services and want consistent authorization rules before APIs multiply across microservices.</li>
          <li>Compliance or enterprise customers are asking for least privilege, audit logs, and clear access review processes.</li>
          <li>Multi-tenant complexity is arriving (or already here), and you need patterns that scale without exploding permission counts.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A complete RBAC model with defined roles, resources, actions, and at least one safe admin escalation pattern.</li>
           <li>A proposed schema with tables/collections, key columns/fields, and index recommendations to keep permission checks fast.</li>
           <li>Ready-to-implement enforcement guidance, including middleware/guard logic and where checks must live in the request lifecycle.</li>
           <li>A practical test plan (unit, integration, and abuse-case tests) plus examples of what to assert for deny-by-default behavior.</li>
           <li>An auditing and access-review checklist, including events to log and periodic review steps that stay maintainable.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

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

<h2 class="wp-block-heading">The Full AI Prompt: Enterprise RBAC 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>[UPPERCASE_WITH_UNDERSCORES]</code></td>
                                <td class="var-desc">
                                    Specify the naming convention to be used for user-provided values, adhering to the format of uppercase letters separated by underscores.                                    <div class="var-example">For example: "USER_ROLE_PERMISSIONS or RESOURCE_ACCESS_LEVEL"</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[UPPERCASE_WITH_UNDERSCORES]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[FORMAT]</code></td>
                                <td class="var-desc">
                                    Define the format or structure required for the RBAC blueprint, such as JSON, YAML, or database schema.                                    <div class="var-example">For example: "JSON structure with nested roles and permissions, or SQL schema for relational databases."</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 details about the application, including its purpose, architecture, and any specific constraints or requirements.                                    <div class="var-example">For example: "A multi-tenant SaaS application for project management, supporting both web and mobile platforms with high user concurrency."</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">
                                    Specify the industry or domain the application serves, as this can influence compliance requirements and access control patterns.                                    <div class="var-example">For example: "Healthcare industry requiring HIPAA compliance and strict data privacy controls."</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>[PRODUCT_DESCRIPTION]</code></td>
                                <td class="var-desc">
                                    Briefly describe the product, including its main features, functionality, and target user base.                                    <div class="var-example">For example: "A cloud-based CRM platform enabling sales teams to manage customer relationships, track leads, and automate workflows."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[PRODUCT_DESCRIPTION]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[TARGET_AUDIENCE]</code></td>
                                <td class="var-desc">
                                    Describe the primary users of the application, including their roles, needs, and any defining characteristics.                                    <div class="var-example">For example: "Enterprise security teams managing access control for 500+ employees across multiple departments and locations."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[TARGET_AUDIENCE]"
                                            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></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">What This Is NOT</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">Role 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">Database Schema</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">Middleware Implementation</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">UI Access Control</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">API Route Protection</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">Error 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 subheader">Testing Strategy</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">Monitoring &amp; Audit</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">Deployment 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">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 complete, implementation-ready Role-Based Access Control (RBAC) blueprint tailored to the given application. The deliverable must close active unauthorized access issues, prevent privilege escalation (external and internal), and remain maintainable as the product and team scale—without degrading user experience.

## PERSONA
Act as a security-focused software architect and ex–enterprise security advisor who has led multiple zero-trust and least-privilege rollouts in high-compliance environments. Communicate like a pragmatic builder: precise, code-forward, and opinionated about guardrails that developers will actually keep in place.

## CONSTRAINTS
- Prioritize least privilege, explicit deny-by-default, and separation of duties.
- Avoid vague security platitudes; every recommendation must map to a concrete implementation step.
- Optimize for long-term scalability (more roles, more resources, more endpoints, more tenants if applicable).
- Include both backend enforcement and frontend experience patterns (UI should never be the only gate).
- Prefer patterns that reduce “permission sprawl” and minimize performance overhead.
- Add a “What This Is NOT” subsection to clarify excluded scope.
- Handle unclear or missing inputs by stating assumptions and offering 2–3 safe options.
- Follow variable format compliance: user-provided values use [UPPERCASE_WITH_UNDERSCORES]; AI-filled placeholders use {Title Case}.

## PROCESS
1. **Pre-Analysis (required):** Restate the situation in your own words, list the key security risks you’re addressing, and confirm the main technical constraints inferred from the inputs.
2. **RBAC model design:** Define roles, permissions, resources, and actions; decide on role hierarchy vs. flat roles; include escalation-resistant admin patterns.
3. **Data layer plan:** Propose a schema (tables/collections), indexes, and constraints; include migration guidance and performance notes.
4. **Enforcement layer:** Provide middleware/guards/hooks for backend authorization and token/session strategy integration.
5. **Frontend access patterns:** Show safe UI gating patterns (feature flags vs. authorization), including loading states and optimistic UI cautions.
6. **Failure handling:** Design user-friendly denial flows, error payload conventions, and fallback components.
7. **Validation:** Provide tests (unit/integration/e2e) that prove boundaries hold and cannot be bypassed.
8. **Telemetry:** Specify audit events, log fields, alerting signals, and review workflows.
9. **Deployment hardening:** Produce a rollout checklist that reduces lockouts and prevents “too permissive” regressions.

### What This Is NOT
- Not a full identity provider (IdP) selection guide or SSO procurement document.
- Not a generic OWASP checklist dump.
- Not permissioning based purely on frontend conditions.
- Not a replacement for threat modeling beyond access control (you may note adjacent risks, but stay centered on RBAC).

## INPUTS
- **Application type:** [FORMAT]
- **Technology stack:** [CONTEXT]
- **Database system:** [INDUSTRY]
- **Current authentication setup:** [PRODUCT_DESCRIPTION]
- **User base size + growth expectation:** [TARGET_AUDIENCE]

## OUTPUT SPECIFICATION
Use the following sections and populate each with concrete, buildable detail. Include code snippets in the dominant stack implied by [CONTEXT], and tailor data structures to [INDUSTRY]. Use these placeholders where needed: {Role}, {Permission}, {Resource}, {Action}, {Endpoint}, {Table}, {Column}, {Index}, {Error Code}, {Log Event}.

### Role Architecture
- {Role} catalog with purpose, allowed {Action}s, and guarded {Resource}s  
- Role hierarchy or composition strategy (and why)  
- Admin design that avoids “god mode” by default (break-glass, time-bound elevation, approvals if applicable)  
- Least-privilege defaults and onboarding/offboarding implications  

### Database Schema
- Tables/collections for users, roles, permissions, and mappings (e.g., user↔role, role↔permission)  
- Constraints, indexes, and query patterns for fast checks  
- Guidance for multi-tenant support if relevant (safe scoping rules)  
- Example migrations or schema definitions matching [INDUSTRY]  

### Middleware Implementation
- Backend authorization middleware/guards with:
  - token/session parsing tied to [PRODUCT_DESCRIPTION]
  - permission resolution (cached where appropriate)
  - deny-by-default logic and explicit checks
- Frontend hooks/utilities for permission queries (never authoritative alone)
- Examples:
  - checking {Permission} for {Endpoint}
  - securing sensitive admin actions
  - preventing IDOR-style access to {Resource} by ownership/tenant scope  

### UI Access Control
- Component patterns for conditional rendering with safe defaults  
- Strategies for route-level gating, feature visibility vs. capability enforcement  
- Loading/unknown-permission states and “request access” UX  
- Guidance to avoid leaking sensitive data via prefetching or cached responses  

### API Route Protection
- Endpoint policy mapping: {Endpoint} → required {Permission}s  
- Object-level authorization (resource ownership/tenant boundaries)  
- Rate limiting and abuse controls where RBAC intersects with brute-force/admin endpoints  
- Examples in the primary backend framework implied by [CONTEXT]  

### Error Handling
- Standard error contract (e.g., {Error Code}, message, correlation id)  
- User-facing copy that’s helpful without revealing sensitive authorization logic  
- Fallback UI components for forbidden/unauthenticated states  
- Safe redirects and post-login continuation patterns  

### Testing Strategy
- Unit tests for permission evaluation  
- Integration tests for middleware and endpoint coverage  
- E2E tests for common role journeys and regression traps  
- Negative tests proving privilege escalation is blocked (role tampering, token replay, forced browsing)  

### Monitoring &amp; Audit
- Audit log schema and storage guidance:
  - {Log Event} types (role change, permission change, denied access, admin actions)
  - required fields (actor, target, resource, scope, timestamp, request id)
- Alerting signals (spikes in denied access, repeated admin probing, anomalous role changes)
- Review/retention policy recommendations aligned to enterprise expectations  

### Deployment Checklist
- Rollout plan to avoid lockouts (staged enforcement, shadow mode, allowlists with expiry)  
- Data backfill/migration steps for existing users  
- Performance checks (cache hit rates, authz query latency)  
- Security verification gates before release  

## QUALITY CHECKS
At the end, include a short verification list confirming:
- Least-privilege defaults are enforced and “implicit allow” is eliminated.
- Authorization is enforced server-side for every protected {Endpoint} and object-level access is handled.
- Schema supports growth (more roles/permissions/users) without slow permission checks.
- Tests include negative cases for privilege escalation and forced browsing.
- Audit trails capture role/permission changes and sensitive access attempts with enough context to investigate.            </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 complete, implementation-ready Role-Based Access Control (RBAC) blueprint tailored to the given application. The deliverable must close active unauthorized access issues, prevent privilege escalation (external and internal), and remain maintainable as the product and team scale\u2014without degrading user experience.\r\n\r\n## PERSONA\r\nAct as a security-focused software architect and ex\u2013enterprise security advisor who has led multiple zero-trust and least-privilege rollouts in high-compliance environments. Communicate like a pragmatic builder: precise, code-forward, and opinionated about guardrails that developers will actually keep in place.\r\n\r\n## CONSTRAINTS\r\n- Prioritize least privilege, explicit deny-by-default, and separation of duties.\r\n- Avoid vague security platitudes; every recommendation must map to a concrete implementation step.\r\n- Optimize for long-term scalability (more roles, more resources, more endpoints, more tenants if applicable).\r\n- Include both backend enforcement and frontend experience patterns (UI should never be the only gate).\r\n- Prefer patterns that reduce \u201cpermission sprawl\u201d and minimize performance overhead.\r\n- Add a \u201cWhat This Is NOT\u201d subsection to clarify excluded scope.\r\n- Handle unclear or missing inputs by stating assumptions and offering 2\u20133 safe options.\r\n- Follow variable format compliance: user-provided values use [UPPERCASE_WITH_UNDERSCORES]; AI-filled placeholders use {Title Case}.\r\n\r\n## PROCESS\r\n1. **Pre-Analysis (required):** Restate the situation in your own words, list the key security risks you\u2019re addressing, and confirm the main technical constraints inferred from the inputs.\r\n2. **RBAC model design:** Define roles, permissions, resources, and actions; decide on role hierarchy vs. flat roles; include escalation-resistant admin patterns.\r\n3. **Data layer plan:** Propose a schema (tables\/collections), indexes, and constraints; include migration guidance and performance notes.\r\n4. **Enforcement layer:** Provide middleware\/guards\/hooks for backend authorization and token\/session strategy integration.\r\n5. **Frontend access patterns:** Show safe UI gating patterns (feature flags vs. authorization), including loading states and optimistic UI cautions.\r\n6. **Failure handling:** Design user-friendly denial flows, error payload conventions, and fallback components.\r\n7. **Validation:** Provide tests (unit\/integration\/e2e) that prove boundaries hold and cannot be bypassed.\r\n8. **Telemetry:** Specify audit events, log fields, alerting signals, and review workflows.\r\n9. **Deployment hardening:** Produce a rollout checklist that reduces lockouts and prevents \u201ctoo permissive\u201d regressions.\r\n\r\n### What This Is NOT\r\n- Not a full identity provider (IdP) selection guide or SSO procurement document.\r\n- Not a generic OWASP checklist dump.\r\n- Not permissioning based purely on frontend conditions.\r\n- Not a replacement for threat modeling beyond access control (you may note adjacent risks, but stay centered on RBAC).\r\n\r\n## INPUTS\r\n- **Application type:** [FORMAT]\r\n- **Technology stack:** [CONTEXT]\r\n- **Database system:** [INDUSTRY]\r\n- **Current authentication setup:** [PRODUCT_DESCRIPTION]\r\n- **User base size + growth expectation:** [TARGET_AUDIENCE]\r\n\r\n## OUTPUT SPECIFICATION\r\nUse the following sections and populate each with concrete, buildable detail. Include code snippets in the dominant stack implied by [CONTEXT], and tailor data structures to [INDUSTRY]. Use these placeholders where needed: {Role}, {Permission}, {Resource}, {Action}, {Endpoint}, {Table}, {Column}, {Index}, {Error Code}, {Log Event}.\r\n\r\n### Role Architecture\r\n- {Role} catalog with purpose, allowed {Action}s, and guarded {Resource}s  \r\n- Role hierarchy or composition strategy (and why)  \r\n- Admin design that avoids \u201cgod mode\u201d by default (break-glass, time-bound elevation, approvals if applicable)  \r\n- Least-privilege defaults and onboarding\/offboarding implications  \r\n\r\n### Database Schema\r\n- Tables\/collections for users, roles, permissions, and mappings (e.g., user\u2194role, role\u2194permission)  \r\n- Constraints, indexes, and query patterns for fast checks  \r\n- Guidance for multi-tenant support if relevant (safe scoping rules)  \r\n- Example migrations or schema definitions matching [INDUSTRY]  \r\n\r\n### Middleware Implementation\r\n- Backend authorization middleware\/guards with:\r\n  - token\/session parsing tied to [PRODUCT_DESCRIPTION]\r\n  - permission resolution (cached where appropriate)\r\n  - deny-by-default logic and explicit checks\r\n- Frontend hooks\/utilities for permission queries (never authoritative alone)\r\n- Examples:\r\n  - checking {Permission} for {Endpoint}\r\n  - securing sensitive admin actions\r\n  - preventing IDOR-style access to {Resource} by ownership\/tenant scope  \r\n\r\n### UI Access Control\r\n- Component patterns for conditional rendering with safe defaults  \r\n- Strategies for route-level gating, feature visibility vs. capability enforcement  \r\n- Loading\/unknown-permission states and \u201crequest access\u201d UX  \r\n- Guidance to avoid leaking sensitive data via prefetching or cached responses  \r\n\r\n### API Route Protection\r\n- Endpoint policy mapping: {Endpoint} \u2192 required {Permission}s  \r\n- Object-level authorization (resource ownership\/tenant boundaries)  \r\n- Rate limiting and abuse controls where RBAC intersects with brute-force\/admin endpoints  \r\n- Examples in the primary backend framework implied by [CONTEXT]  \r\n\r\n### Error Handling\r\n- Standard error contract (e.g., {Error Code}, message, correlation id)  \r\n- User-facing copy that\u2019s helpful without revealing sensitive authorization logic  \r\n- Fallback UI components for forbidden\/unauthenticated states  \r\n- Safe redirects and post-login continuation patterns  \r\n\r\n### Testing Strategy\r\n- Unit tests for permission evaluation  \r\n- Integration tests for middleware and endpoint coverage  \r\n- E2E tests for common role journeys and regression traps  \r\n- Negative tests proving privilege escalation is blocked (role tampering, token replay, forced browsing)  \r\n\r\n### Monitoring & Audit\r\n- Audit log schema and storage guidance:\r\n  - {Log Event} types (role change, permission change, denied access, admin actions)\r\n  - required fields (actor, target, resource, scope, timestamp, request id)\r\n- Alerting signals (spikes in denied access, repeated admin probing, anomalous role changes)\r\n- Review\/retention policy recommendations aligned to enterprise expectations  \r\n\r\n### Deployment Checklist\r\n- Rollout plan to avoid lockouts (staged enforcement, shadow mode, allowlists with expiry)  \r\n- Data backfill\/migration steps for existing users  \r\n- Performance checks (cache hit rates, authz query latency)  \r\n- Security verification gates before release  \r\n\r\n## QUALITY CHECKS\r\nAt the end, include a short verification list confirming:\r\n- Least-privilege defaults are enforced and \u201cimplicit allow\u201d is eliminated.\r\n- Authorization is enforced server-side for every protected {Endpoint} and object-level access is handled.\r\n- Schema supports growth (more roles\/permissions\/users) without slow permission checks.\r\n- Tests include negative cases for privilege escalation and forced browsing.\r\n- Audit trails capture role\/permission changes and sensitive access attempts with enough context to investigate.";
    const variables = ["[UPPERCASE_WITH_UNDERSCORES]","[FORMAT]","[CONTEXT]","[INDUSTRY]","[PRODUCT_DESCRIPTION]","[TARGET_AUDIENCE]"];
    // 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>Bring a real resource map, not just “users and admins”.</strong> Before you run the prompt, list 10–30 concrete resources and verbs (for example: “Invoices: create, view, refund, export” and “Users: invite, deactivate, reset MFA”). If you only say “secure my app,” you will get abstract roles that fall apart the moment a new endpoint ships.</li>


<li><strong>Force explicit deny-by-default in the output.</strong> After you get the first draft, follow up with: “Show me the deny-by-default rule and the exact middleware/guard behavior when a permission is missing.” This keeps the design from drifting into “allow unless blocked,” which honestly is how privilege escalation sneaks in.</li>


<li><strong>Ask it to model your riskiest flows first.</strong> Pick 2–3 scenarios like “refunds,” “PII export,” or “role assignment,” and prompt: “Design roles and permissions around these flows, then generalize.” You will get cleaner separation of duties and less permission sprawl than starting from org charts.</li>


<li><strong>Iterate on role granularity with targeted contrasts.</strong> After the first output, try asking: “Now make option 2 more aggressive (fewer roles, broader permissions) and option 4 more conservative (more separation of duties), then score each for auditability and developer friction.” Seeing tradeoffs side-by-side makes stakeholder approval much faster.</li>


<li><strong>Combine RBAC with auditing requirements as a second pass.</strong> Once roles and middleware are drafted, ask: “Add an audit event taxonomy with event names, required fields, retention guidance, and 3 example log lines for the most sensitive actions.” It turns a theoretical RBAC model into something you can defend during an incident review.</li>

</ul>

</div>

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

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



<p>If you’re building serious systems documentation, these prompts can help you produce clean, reviewable artifacts quickly (just in very different formats).</p>



<p>If you also need a tight, memorable way to communicate a complex initiative internally, <a href="https://flowpast.com/prompts/write-a-singable-song-chorus-with-this-ai-prompt/">Write a Singable Song Chorus with this AI Prompt</a> can be a surprisingly useful creative constraint. Use it when you’re crafting security training hooks or internal campaign lines that teams actually remember.</p>



<p>For teams doing polished enablement content, <a href="https://flowpast.com/prompts/compose-a-catchy-song-melody-blueprint-with-this-ai-prompt/">Compose a Catchy Song Melody Blueprint with this AI Prompt</a> pairs well when your rollout needs a structured “blueprint” mindset. Different domain, same advantage: you get a repeatable plan instead of improvising every time.</p>



<p>When your org needs a step-by-step sequence for deliverables and checkpoints, <a href="https://flowpast.com/prompts/build-a-song-arrangement-blueprint-with-this-ai-prompt/">Build a Song Arrangement Blueprint with this AI Prompt</a> is a handy reference for turning raw ideas into a staged outline. That can complement an RBAC rollout plan where sequencing matters: schema first, then enforcement, then tests, then audits.</p>


<br>


<p>Quick reference:</p>



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

<li><a href="https://flowpast.com/prompts/write-a-singable-song-chorus-with-this-ai-prompt/">Write a Singable Song Chorus with this AI Prompt</a>: Memorable internal messaging and training hooks.</li>


<li><a href="https://flowpast.com/prompts/compose-a-catchy-song-melody-blueprint-with-this-ai-prompt/">Compose a Catchy Song Melody Blueprint with this AI Prompt</a>: Structured blueprint for creative deliverables.</li>


<li><a href="https://flowpast.com/prompts/build-a-song-arrangement-blueprint-with-this-ai-prompt/">Build a Song Arrangement Blueprint with this AI Prompt</a>: Step-by-step outline with sequencing.</li>

<li><a href="https://flowpast.com/prompts/write-a-shakespearean-solo-monologue-with-this-ai-prompt/">Write a Shakespearean Solo Monologue with this AI Prompt</a>: Dramatic narrative for presentations and scripts.</li>

<li><a href="https://flowpast.com/prompts/create-a-five-poem-anthology-with-this-ai-prompt/">Create a Five-Poem Anthology with this AI Prompt</a>: Themed set of pieces for campaigns.</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 enterprise RBAC plan AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Software Architects</strong> use this to turn “we need RBAC” into a concrete model with roles, resources, actions, and enforcement layers that match real request flows. <strong>Security Engineers</strong> rely on it to bake in deny-by-default, least privilege, and separation of duties, plus audit events that stand up during reviews. <strong>Engineering Managers</strong> apply it when multiple teams ship services and authorization logic starts diverging, creating gaps and inconsistent behavior. <strong>Technical Product Managers</strong> use it to define role requirements, UX gating expectations, and acceptance criteria without hand-waving.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this enterprise RBAC plan AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>SaaS platforms selling to mid-market and enterprise</strong> get value because customers expect clear roles, tenant-aware access, and predictable permission checks across APIs and UI. <strong>Fintech and payments</strong> teams use it to reduce fraud and internal misuse by separating duties for high-risk actions like refunds, exports, and payout changes, then backing it with audit trails. <strong>Healthcare and health tech</strong> apply it when PHI access must be tightly scoped by role and context, and audit logging needs to be consistent across services. <strong>B2B marketplaces</strong> use it to manage access for multiple parties (buyers, sellers, operators) while preventing cross-tenant data leakage as the platform scales.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for designing an RBAC blueprint produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like “Write me an RBAC system for my app” fails because it: lacks a deny-by-default stance with explicit guard behavior, provides no concrete schema or indexing plan for performant permission checks, ignores separation of duties and admin escalation paths (where most real abuse happens), produces generic roles like “Admin/User” instead of mapping permissions to resources and actions, and misses operational pieces like tests, audits, and a clear “What This Is NOT” scope that prevents false security confidence.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this enterprise RBAC plan prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes. Even though the prompt has zero form variables, you customize it by adding your own placeholders in the required format, like [APPLICATION_TYPE], [TENANCY_MODEL], [SENSITIVE_ACTIONS], and [COMPLIANCE_REQUIREMENTS], then letting the model fill {Title Case} sections. If details are unclear, explicitly ask it to state assumptions and offer 2–3 safe options, then pick one and rerun the prompt with that decision locked. A good follow-up is: “Revise the RBAC blueprint assuming [TENANCY_MODEL]=‘single database, tenant_id on every row’ and [SENSITIVE_ACTIONS]=‘export PII, change billing, manage roles’.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this enterprise RBAC plan prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is leaving [SENSITIVE_ACTIONS] too vague — instead of “admin stuff,” try “role assignment, data export, refunds, API key creation, and impersonation.” Another common error is forgetting the tenant shape in [TENANCY_MODEL]; “multi-tenant” is not enough, but “shared DB with tenant_id and occasional cross-tenant operator access” is workable. Teams also under-specify [RESOURCES_AND_ACTIONS], which leads to fluffy roles; provide a list like “Invoices:view/refund/export” rather than “billing.” Finally, people skip [CURRENT_AUTH_GAPS]; “some endpoints are open” is weak, but “GET /reports/export has no server-side check” gives the prompt something concrete to close.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this enterprise RBAC plan prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for one-off prototypes where you will not implement server-side enforcement or tests, because the blueprint is intentionally thorough. It’s also a poor fit if you have not validated what your roles even represent (for example, no clear resources, no defined sensitive actions), since the model will be forced to make broad assumptions. If you only need a quick UI-only gating concept, use a lightweight feature-flag approach instead, then come back once you’re ready to enforce authorization in the backend.</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 enterprise RBAC plan AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Software Architects use this to turn “we need RBAC” into a concrete model with roles, resources, actions, and enforcement layers that match real request flows. Security Engineers rely on it to bake in deny-by-default, least privilege, and separation of duties, plus audit events that stand up during reviews. Engineering Managers apply it when multiple teams ship services and authorization logic starts diverging, creating gaps and inconsistent behavior. Technical Product Managers use it to define role requirements, UX gating expectations, and acceptance criteria without hand-waving."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this enterprise RBAC plan AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SaaS platforms selling to mid-market and enterprise get value because customers expect clear roles, tenant-aware access, and predictable permission checks across APIs and UI. Fintech and payments teams use it to reduce fraud and internal misuse by separating duties for high-risk actions like refunds, exports, and payout changes, then backing it with audit trails. Healthcare and health tech apply it when PHI access must be tightly scoped by role and context, and audit logging needs to be consistent across services. B2B marketplaces use it to manage access for multiple parties (buyers, sellers, operators) while preventing cross-tenant data leakage as the platform scales."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for designing an RBAC blueprint produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me an RBAC system for my app” fails because it: lacks a deny-by-default stance with explicit guard behavior, provides no concrete schema or indexing plan for performant permission checks, ignores separation of duties and admin escalation paths (where most real abuse happens), produces generic roles like “Admin/User” instead of mapping permissions to resources and actions, and misses operational pieces like tests, audits, and a clear “What This Is NOT” scope that prevents false security confidence."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this enterprise RBAC plan prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. Even though the prompt has zero form variables, you customize it by adding your own placeholders in the required format, like [APPLICATION_TYPE], [TENANCY_MODEL], [SENSITIVE_ACTIONS], and [COMPLIANCE_REQUIREMENTS], then letting the model fill {Title Case} sections. If details are unclear, explicitly ask it to state assumptions and offer 2–3 safe options, then pick one and rerun the prompt with that decision locked. A good follow-up is: “Revise the RBAC blueprint assuming [TENANCY_MODEL]=‘single database, tenant_id on every row’ and [SENSITIVE_ACTIONS]=‘export PII, change billing, manage roles’.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this enterprise RBAC plan prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving [SENSITIVE_ACTIONS] too vague — instead of “admin stuff,” try “role assignment, data export, refunds, API key creation, and impersonation.” Another common error is forgetting the tenant shape in [TENANCY_MODEL]; “multi-tenant” is not enough, but “shared DB with tenant_id and occasional cross-tenant operator access” is workable. Teams also under-specify [RESOURCES_AND_ACTIONS], which leads to fluffy roles; provide a list like “Invoices:view/refund/export” rather than “billing.” Finally, people skip [CURRENT_AUTH_GAPS]; “some endpoints are open” is weak, but “GET /reports/export has no server-side check” gives the prompt something concrete to close."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this enterprise RBAC plan prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for one-off prototypes where you will not implement server-side enforcement or tests, because the blueprint is intentionally thorough. It’s also a poor fit if you have not validated what your roles even represent (for example, no clear resources, no defined sensitive actions), since the model will be forced to make broad assumptions. If you only need a quick UI-only gating concept, use a lightweight feature-flag approach instead, then come back once you’re ready to enforce authorization in the backend."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>RBAC is easy to describe and hard to keep correct at scale. Use this prompt to get a defendable, implementation-ready access control plan you can ship, test, and audit.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5001442.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Design a Compliance Escalation System AI Prompt</title>
		<link>https://flowpast.com/prompts/design-a-compliance-escalation-system-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:50:48 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5003042</guid>

					<description><![CDATA[Incidents stay buried after hours - this AI Prompt builds a tiered legal escalation system with privilege-safe channels and board visibility. Access our full AI prompt library for every model.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: compliance escalation system -->
<div class="hook-introduction">

<p>Most compliance escalation plans look fine in a policy binder, then fall apart at 7:43pm on a Friday. People aren’t sure what “counts,” managers downplay bad news, and the first real signal reaches Legal when it’s already a regulator problem. Worse, the trail you create can accidentally waive privilege or bury the board in noise.</p>



<p>This <strong>compliance escalation system</strong> is built for <strong>in-house Legal leaders</strong> who need an audit-ready, multi-country escalation path that still works after hours, <strong>Compliance managers</strong> trying to stop “informal” suppression before it becomes a scandal, and <strong>Risk/Company Secretarial teams</strong> who must give the board meaningful visibility without flooding packs with raw allegations. The output is a tiered operating system: clear reportable-issue definitions, routing and decision rights by severity, privilege-safe channels, a “break glass” emergency path, and lightweight documentation rules that scale up only when risk is material.</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 a multi-tier escalation and governance workflow that covers “from frontline to board,” including explicit decision rights and handoffs at each tier.</li>
          <li>It defines plain-language “reportable issue” categories so non-legal staff can flag problems without needing legal jargon or perfect certainty.</li>
          <li>It builds privilege-aware paths (legal advice vs. operational fixes) to reduce the chance of accidental waiver while keeping oversight intact.</li>
          <li>It maps real escalation routes that account for shadow decision-makers, informal influence, and political blockers, not just the org chart.</li>
          <li>It adds adoption mechanics (anti-retaliation signals, anonymous intake options, manager bypasses, and feedback loops) so reporting actually happens under stress.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You’ve had near-misses, hotline reports, or internal audit findings that did not reach the right level quickly enough.</li>
          <li>There’s a multi-jurisdiction footprint and teams disagree on what gets escalated to Legal, Compliance, executives, or the board.</li>
          <li>After-hours incidents are a weak point and your current “call list” approach depends on tribal knowledge.</li>
          <li>You’re facing rising regulator expectations and need an auditable, defensible process aligned with King IV governance principles.</li>
          <li>The organization is scaling, integrating acquisitions, or operating remotely, and informal suppression is becoming harder to detect.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A 4–6 tier escalation model with severity thresholds, decision rights, and named handoff points.</li>
           <li>A reportable-issues taxonomy with examples, “if/then” triggers, and a short non-legal intake checklist.</li>
           <li>A privilege-safe communication plan, including what goes to Legal, what stays operational, and what the board sees.</li>
           <li>A “break glass” emergency pathway with a 60-minute action sequence and after-hours contact logic.</li>
           <li>Lightweight documentation rules plus a scale-up pack for material matters, with audit-ready minimum fields.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

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

<h2 class="wp-block-heading">The Full AI Prompt: Compliance Escalation &#038; Governance Operating System</h2>


<!-- Prompt file not found: /home/flowpast/htdocs/flowpast.com/wp-content/data/prompts_scraped/5003250/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 a realistic incident.</strong> Before you run the prompt, write a 6–10 line “Friday night scenario” (for example: a distributor alleges bribes in Country B, a manager wants to handle it quietly, and Finance has already paid an “expedite fee”). Then ask: “Use this scenario to stress-test your escalation tiers and show where the first notification must land.”</li>


<li><strong>Force a multi-jurisdiction constraint.</strong> The prompt is designed for complexity, so don’t keep it abstract. Add one follow-up line like: “Assume we operate in South Africa, the UK, and the UAE; local HR and Works Council considerations can slow investigations.” You will get clearer handoffs and cleaner board visibility rules.</li>


<li><strong>Ask for the “non-legal language” version.</strong> A strong escalation system fails if frontline teams can’t recognize issues fast. After the first output, prompt: “Rewrite the reportable-issue triggers as a one-page guide for store managers, using examples and ‘when in doubt, escalate’ phrasing.”</li>


<li><strong>Iterate on decision rights, not just steps.</strong> The most common gap is ambiguity around who can pause a deal, suspend someone, notify a regulator, or brief the board chair. After the draft, try: “Now tighten tiers 2–4 so every tier has a single accountable owner, a backup, and an explicit ‘stop authority’ list.”</li>


<li><strong>Combine it with an evidence-minimum checklist.</strong> To stay audit-ready without creating a documentation monster, ask for a “minimum viable record” for low-to-medium severity issues. Use a follow-up like: “Create a 12-field log template that captures date/time, channel, allegation type, decision taken, and next review date, while avoiding speculative language that could harm privilege.”</li>

</ul>

</div>

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

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



<p>Once your escalation system is defined, these prompts help you add monitoring, review cadence, and “early signal” detection around it:</p>



<p>If you also need a recurring governance rhythm to keep escalation rules alive (not forgotten after rollout), pair this with <a href="https://flowpast.com/prompts/build-a-quarterly-forecast-review-with-this-ai-prompt/">Build a Quarterly Forecast Review with this AI Prompt</a>. The structure is useful for setting quarterly risk and compliance review forums, owners, action tracking, and a consistent board-ready summary format.</p>



<p>When your challenge is spotting problems before they become “reportable,” the logic from <a href="https://flowpast.com/prompts/build-a-course-dropout-early-warning-model-ai-prompt/">Build a Course Dropout Early-Warning Model AI Prompt</a> translates surprisingly well. Use it as inspiration for early-warning indicators (complaint spikes, unusual approvals, policy exceptions) and thresholds that automatically trigger a tier review.</p>



<p>For teams doing assurance and audit work, <a href="https://flowpast.com/prompts/validate-arima-course-completion-forecasts-ai-prompt/">Validate ARIMA Course Completion Forecasts AI Prompt</a> can support your control testing mindset. It’s a good companion when you want a disciplined way to validate trends, sanity-check assumptions, and flag anomalies that should feed into your escalation governance loop.</p>


<br>


<p>Quick reference:</p>



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

<li><a href="https://flowpast.com/prompts/build-a-quarterly-forecast-review-with-this-ai-prompt/">Build a Quarterly Forecast Review with this AI Prompt</a>: Build a repeatable review cadence and outputs.</li>


<li><a href="https://flowpast.com/prompts/build-a-course-dropout-early-warning-model-ai-prompt/">Build a Course Dropout Early-Warning Model AI Prompt</a>: Create early signals and trigger thresholds.</li>


<li><a href="https://flowpast.com/prompts/validate-arima-course-completion-forecasts-ai-prompt/">Validate ARIMA Course Completion Forecasts AI Prompt</a>: Validate trends and test assumptions rigorously.</li>

<li><a href="https://flowpast.com/prompts/build-a-competitive-course-intelligence-report-ai-prompt/">Build a Competitive Course Intelligence Report AI Prompt</a>: External scanning and comparator-based risk signals.</li>

<li><a href="https://flowpast.com/prompts/build-a-course-prerequisite-roadmap-with-this-ai-prompt/">Build a Course Prerequisite Roadmap with this AI Prompt</a>: Map dependencies and handoffs across teams.</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 compliance escalation system AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>General Counsel and Heads of Legal</strong> use this to design privilege-safe routes that still let executives and the board see what they need, at the right altitude. <strong>Chief Compliance Officers</strong> rely on it to standardize “what gets escalated” across countries and business units, especially where local culture encourages keeping issues quiet. <strong>Internal Audit leaders</strong> benefit because the output is audit-ready: clear tiers, decision rights, and minimum documentation fields that can be tested. <strong>Company Secretaries and governance teams</strong> use it to formalize board reporting, committee handoffs, and King IV-aligned oversight without turning every incident into a board pack crisis.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this compliance escalation system AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Financial services</strong> teams use it to manage time-critical incidents (market conduct concerns, sanctions hits, fraud signals) while keeping escalation defensible and consistent across branches. <strong>Healthcare and life sciences</strong> apply it when adverse events, data privacy issues, or third-party conduct could trigger mandatory reporting and reputational fallout. <strong>Mining, energy, and heavy industry</strong> get value because safety incidents and community/regulatory interactions often happen after hours and need a “break glass” path with clean decision rights. <strong>Technology and SaaS companies</strong> lean on it for privacy and security escalations, where privilege boundaries and board visibility are easy to mishandle during fast-moving incidents.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for designing a compliance escalation system produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like “<em>Write me a compliance escalation policy</em>” fails because it: lacks a tiered operating model with explicit decision rights and handoffs, provides no privilege-safe routing guidance (so people document the wrong things in the wrong channels), ignores informal power structures and “shadow” decision-makers who can block escalation, produces generic boilerplate instead of audit-ready minimum documentation fields, and misses adoption tactics that address fear of retaliation and middle-management suppression. You end up with a document that looks official but doesn’t work under pressure. Frankly, that’s the dangerous part.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this compliance escalation system prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes. Even though the base prompt has no fill-in variables, you can customize it by adding a short “context header” before running it: your jurisdictions, operating hours, regulated obligations, board committee structure, and your current reporting channels (hotline, line manager, HR, security ops). You should also specify your risk appetite and what counts as “material” for board visibility, because that drives the scale-up documentation tier. A useful follow-up prompt is: “Rewrite the framework for a company with [countries], [union/works council constraints], and a board risk committee; include a RACI and a one-page escalation matrix.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this compliance escalation system prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is leaving your organizational reality too vague; instead of “global company,” specify “five-country group with shared services in Poland and a dominant sales leader who bypasses process.” Another common error is not stating which channels exist today, so the output can’t address suppression points; “we have a hotline and an incident mailbox monitored 9–5” is far better than “we have reporting.” Teams also forget to define materiality for board reporting, which leads to either overload or secrecy; give a concrete threshold like “any allegation involving bribery, data breach affecting 5,000+ records, or potential loss above $250k.” Finally, people skip after-hours realities; don’t say “24/7 support,” say “one duty officer, rotating weekly, with a 30-minute acknowledgment requirement.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this compliance escalation system prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for one-off projects where you won’t implement, train, and iterate, because the value comes from adoption mechanics and feedback loops. It’s also not the best fit if your organization has not validated its basic compliance foundations (no reporting channels, no investigation capability, no accountable owners), since the framework assumes those can be established. And if you only want a short template to “tick the box,” you will find it too operational and governance-heavy. In that case, start with a lightweight policy draft, then return to this prompt once you’re ready to make escalation work in real life.</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 compliance escalation system AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "General Counsel and Heads of Legal use this to design privilege-safe routes that still let executives and the board see what they need, at the right altitude. Chief Compliance Officers rely on it to standardize “what gets escalated” across countries and business units, especially where local culture encourages keeping issues quiet. Internal Audit leaders benefit because the output is audit-ready: clear tiers, decision rights, and minimum documentation fields that can be tested. Company Secretaries and governance teams use it to formalize board reporting, committee handoffs, and King IV-aligned oversight without turning every incident into a board pack crisis."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this compliance escalation system AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Financial services teams use it to manage time-critical incidents (market conduct concerns, sanctions hits, fraud signals) while keeping escalation defensible and consistent across branches. Healthcare and life sciences apply it when adverse events, data privacy issues, or third-party conduct could trigger mandatory reporting and reputational fallout. Mining, energy, and heavy industry get value because safety incidents and community/regulatory interactions often happen after hours and need a “break glass” path with clean decision rights. Technology and SaaS companies lean on it for privacy and security escalations, where privilege boundaries and board visibility are easy to mishandle during fast-moving incidents."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for designing a compliance escalation system produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me a compliance escalation policy” fails because it: lacks a tiered operating model with explicit decision rights and handoffs, provides no privilege-safe routing guidance (so people document the wrong things in the wrong channels), ignores informal power structures and “shadow” decision-makers who can block escalation, produces generic boilerplate instead of audit-ready minimum documentation fields, and misses adoption tactics that address fear of retaliation and middle-management suppression. You end up with a document that looks official but doesn’t work under pressure. Frankly, that’s the dangerous part."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this compliance escalation system prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. Even though the base prompt has no fill-in variables, you can customize it by adding a short “context header” before running it: your jurisdictions, operating hours, regulated obligations, board committee structure, and your current reporting channels (hotline, line manager, HR, security ops). You should also specify your risk appetite and what counts as “material” for board visibility, because that drives the scale-up documentation tier. A useful follow-up prompt is: “Rewrite the framework for a company with [countries], [union/works council constraints], and a board risk committee; include a RACI and a one-page escalation matrix.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this compliance escalation system prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving your organizational reality too vague; instead of “global company,” specify “five-country group with shared services in Poland and a dominant sales leader who bypasses process.” Another common error is not stating which channels exist today, so the output can’t address suppression points; “we have a hotline and an incident mailbox monitored 9–5” is far better than “we have reporting.” Teams also forget to define materiality for board reporting, which leads to either overload or secrecy; give a concrete threshold like “any allegation involving bribery, data breach affecting 5,000+ records, or potential loss above $250k.” Finally, people skip after-hours realities; don’t say “24/7 support,” say “one duty officer, rotating weekly, with a 30-minute acknowledgment requirement.”"
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this compliance escalation system prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for one-off projects where you won’t implement, train, and iterate, because the value comes from adoption mechanics and feedback loops. It’s also not the best fit if your organization has not validated its basic compliance foundations (no reporting channels, no investigation capability, no accountable owners), since the framework assumes those can be established. And if you only want a short template to “tick the box,” you will find it too operational and governance-heavy. In that case, start with a lightweight policy draft, then return to this prompt once you’re ready to make escalation work in real life."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>A policy doesn’t stop a crisis. A working escalation system does. Paste this prompt into your model, pressure-test it with a real scenario, and turn your next incident into a controlled process instead of a scramble.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5003042.webp" medium="image"></media:content>
            	</item>
		<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>Build ISO 9001 Background Check Templates AI Prompt</title>
		<link>https://flowpast.com/prompts/build-iso-9001-background-check-templates-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:49:39 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5003041</guid>

					<description><![CDATA[Hiring checks feel risky and inconsistent - a proven AI Prompt that builds ISO 9001 aligned background verification templates with stages and audit trails. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: ISO 9001 background check -->
<div class="hook-introduction">

<p>Background checks often break down in the same places. Notes get scattered across email, criteria change depending on who’s reviewing, and “we did our best” turns into “can we prove it” the moment there’s a dispute or audit. That’s risky. And it’s avoidable.</p>



<p>This <strong>ISO 9001 background check</strong> is built for <strong>HR Operations Managers</strong> who need a consistent, defensible process across recruiters and sites, <strong>Compliance Leads</strong> who have to show traceability without drowning teams in admin, and <strong>People Consultants</strong> who are standardizing hiring workflows for clients with mixed role sensitivity. The output is a complete template suite: staged verification checklists (roughly 3–15 stages), document control artifacts, audit trails, corrective action steps, and fairness safeguards you can adapt to industry, scale, jurisdiction, and risk tolerance.</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>Designs an ISO 9001–inspired background verification workflow that emphasizes document control, traceability, and consistent decisioning.</li>
          <li>Determines an appropriate number of verification stages (typically 3–15) based on organization scale, role sensitivity, and risk tolerance.</li>
          <li>Builds standardized templates for each stage, including data capture fields, acceptance criteria, and reviewer sign-offs.</li>
          <li>Embeds fairness safeguards by enforcing relevance-based checks, privacy minimization, and consistent criteria across candidates.</li>
          <li>Creates auditability mechanisms such as change logs, versioning, exception handling, and corrective/preventive action loops.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You’re hiring across multiple teams and realize every recruiter is “doing checks” differently.</li>
          <li>A candidate dispute, internal investigation, or client requirement forces you to show how a decision was made and documented.</li>
          <li>You are scaling into regulated work (finance, healthcare, security-sensitive roles) and need tighter controls without building everything from scratch.</li>
          <li>Leadership wants faster time-to-hire, but you can’t afford shortcuts that introduce compliance or fraud risk.</li>
          <li>You’re replacing a vendor, adding one, or moving to a hybrid approach and need process clarity before tooling.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A staged background verification process map with 3–15 stages and clear stage gates.</li>
           <li>Stage-by-stage checklists and forms with {Title Case} placeholders for consistent data capture.</li>
           <li>A document control pack including version history, approval routing, and records retention guidance (non-legal).</li>
           <li>An exception and corrective action workflow for discrepancies, including escalation triggers and investigation notes.</li>
           <li>A fairness and privacy safeguard section with consistent criteria, relevance tests, and adverse decision steps (non-jurisdictional).</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

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

<h2 class="wp-block-heading">The Full AI Prompt: ISO 9001-Aligned Background Check Template Suite</h2>


<!-- Prompt file not found: /home/flowpast/htdocs/flowpast.com/wp-content/data/prompts_scraped/5003249/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>Start by defining “role sensitivity” in plain language.</strong> Even though the prompt can scale stages dynamically, you’ll get a sharper template suite if you tell the model what “high risk” means in your org (access to money, vulnerable populations, regulated data, physical access, and so on). After the first output, ask: “Create three variants: low, medium, and high sensitivity roles, and highlight what changes per stage.”</li>


<li><strong>Force the output to include evidence types, not just steps.</strong> Many background check documents fail because they list activities but don’t define acceptable proof. Follow up with: “For each stage, add acceptable evidence examples, rejection criteria, and who can approve exceptions.”</li>


<li><strong>Ask for an audit trail that a non-HR auditor can follow.</strong> If your templates will be reviewed by internal audit, ISO auditors, or a client’s compliance team, request clarity. Try: “Rewrite the audit trail section so someone unfamiliar with HR can reconstruct the decision from the records alone.”</li>


<li><strong>Iterate on fairness safeguards with concrete scenarios.</strong> The prompt includes fairness principles, but you should pressure test them using realistic edge cases. After the first run, ask: “Now add a ‘fairness test’ checklist for inconsistent data, name changes, and international candidates, and state how we avoid irrelevant checks.”</li>


<li><strong>Turn the templates into a rollout plan.</strong> A suite can be perfect and still fail in the real world if nobody adopts it. Use: “Create a 30-day implementation plan with training steps, pilot feedback, document versioning, and a continual improvement loop,” then compare it to the structure in <a href="https://flowpast.com/prompts/build-a-30-day-marketing-action-plan-ai-prompt/">https://flowpast.com/prompts/build-a-30-day-marketing-action-plan-ai-prompt/</a> to keep the plan time-boxed and execution-friendly.</li>

</ul>

</div>

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

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



<p>Once your verification workflow is standardized, these related prompts can help you train teams, build adoption momentum, and keep improvement cycles moving.</p>



<p>If you also need to upskill recruiters or HR coordinators so they follow the same steps consistently, <a href="https://flowpast.com/prompts/build-a-skill-learning-plan-with-this-ai-prompt/">https://flowpast.com/prompts/build-a-skill-learning-plan-with-this-ai-prompt/</a> pairs well. It’s useful when the process is defined, but execution is uneven, especially across multiple locations or hiring managers.</p>



<p>When you want a structured, time-bound rollout (training, pilot, feedback, revision control), <a href="https://flowpast.com/prompts/build-a-30-day-skill-learning-plan-ai-prompt/">https://flowpast.com/prompts/build-a-30-day-skill-learning-plan-ai-prompt/</a> is a practical add-on. It helps you turn a new ISO-style template suite into a 30-day adoption sprint with clear weekly outcomes.</p>



<p>For teams doing cross-functional change management, a simple action cadence keeps things from stalling. <a href="https://flowpast.com/prompts/build-a-30-day-marketing-action-plan-ai-prompt/">https://flowpast.com/prompts/build-a-30-day-marketing-action-plan-ai-prompt/</a> isn’t HR-specific, but the framework is strong for planning communications, stakeholder alignment, and weekly execution checkpoints.</p>


<br>


<p>Quick reference:</p>



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

<li><a href="https://flowpast.com/prompts/build-a-30-day-skill-learning-plan-ai-prompt/">Build a 30-Day Skill Learning Plan AI Prompt</a>: Time-boxed upskilling plan for a team.</li>


<li><a href="https://flowpast.com/prompts/build-a-skill-learning-plan-with-this-ai-prompt/">Build a Skill Learning Plan with this AI Prompt</a>: Role-based learning plan for consistent execution.</li>


<li><a href="https://flowpast.com/prompts/build-a-30-day-marketing-action-plan-ai-prompt/">Build a 30-Day Marketing Action Plan AI Prompt</a>: 30-day rollout cadence and accountability structure.</li>


<li><a href="https://flowpast.com/prompts/build-a-30-day-student-mindfulness-program-ai-prompt/">Build a 30-Day Student Mindfulness Program AI Prompt</a>: Program-style structure with daily/weekly steps.</li>


<li><a href="https://flowpast.com/prompts/build-a-skill-mastery-roadmap-with-this-ai-prompt/">Build a Skill Mastery Roadmap with this AI Prompt</a>: Long-term capability roadmap and milestones.</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 ISO 9001 background check AI prompt?</span>

<p class="answer"><strong>HR Operations Managers</strong> use this to standardize how checks are run across recruiters, locations, and hiring teams, so decisions don’t depend on who happened to handle the case. <strong>Compliance and Risk Officers</strong> benefit because the templates are built for traceability, document control, and audit-ready records, not loose notes. <strong>Talent Acquisition Leads</strong> apply it when they need speed plus consistency, especially when hiring volume increases and “tribal knowledge” stops working. <strong>People Ops Consultants</strong> use it to deliver a defensible, repeatable verification workflow to clients without writing every form from scratch.</p>

</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this ISO 9001 background check AI prompt?</span>

<p class="answer"><strong>SaaS and technology companies</strong> use it when roles involve privileged access to customer data, admin consoles, or production systems, and they need consistent verification records for security reviews. <strong>Healthcare organizations</strong> apply it for roles that interact with patients or protected information, where privacy minimization and relevance-based checks matter as much as thoroughness. <strong>Financial services</strong> teams get value because standard stage gates and exception handling reduce fraud exposure and make it easier to demonstrate consistent decisioning. <strong>Staffing and BPO providers</strong> lean on it to create one core system that can be tailored by client, role sensitivity, and jurisdiction, while still keeping an internal audit trail.</p>

</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building background check templates produce weak results?</span>

<p class="answer">A typical prompt like “Write me a background check process for my company” fails because it: lacks document control and versioning, so nobody knows what the current template is; provides no stage gates or acceptance criteria, which leads to inconsistent approvals; ignores traceability requirements, making audits painful; produces generic steps instead of a structured template suite with forms, checklists, and records; and misses fairness safeguards like relevance testing and privacy minimization, which increases candidate risk and internal disputes.</p>

</div>

<div class="faq-item">
<span class="question">Can I customize this ISO 9001 background check prompt for my specific situation?</span>

<p class="answer">Yes, but you will get the best result by telling the AI what to tailor for, even if you add those details as a short note before you run it. In your message, specify industry, organization scale, role sensitivity, jurisdictional complexity (single country vs multi-country), and risk tolerance, then ask it to adjust the number of stages and the evidence requirements accordingly. A good follow-up request is: “Create two versions of the template suite: one for low-sensitivity roles and one for high-sensitivity roles, and show exactly what changes in stages, records, and exception handling.” If you already have a partial process, paste it in and ask the AI to map it to ISO 9001 concepts (document control, corrective actions, continual improvement) and fill the gaps.</p>

</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this ISO 9001 background check prompt?</span>

<p class="answer">The biggest mistake is not providing any real context, then expecting the “dynamic stages” to perfectly match your environment; “We’re a company hiring people” is weak, while “300-person fintech hiring customer support with access to billing tools, US and UK, medium risk tolerance” gives the AI something to shape. Another common error is failing to define role sensitivity, so the output becomes either too heavy for junior roles or too light for privileged access roles; spell out what the person can touch and what could go wrong. People also skip the fairness safeguards in implementation even if the AI includes them, which undermines the whole system; keep the relevance criteria and privacy minimization as required fields. Finally, teams forget to operationalize document control (version owner, effective date, change log), so templates drift immediately; assign ownership and bake approvals into the workflow.</p>

</div>

<div class="faq-item">
<span class="question">Who should NOT use this ISO 9001 background check prompt?</span>

<p class="answer">This prompt isn’t ideal for one-off hires where you won’t maintain a repeatable process, because the value comes from standardization and auditability over time. It’s also not a fit for teams looking for jurisdiction-specific legal instructions; it intentionally avoids giving legal advice, so you still need counsel or compliance review for local requirements. And frankly, if you haven’t validated your hiring criteria at all (what the role requires, what risks matter), you may find the output too structured too soon. In that case, start by defining role requirements and risk levels, then come back to build the template suite.</p>

</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this ISO 9001 background check AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "HR Operations Managers use this to standardize how checks are run across recruiters, locations, and hiring teams, so decisions don’t depend on who happened to handle the case. Compliance and Risk Officers benefit because the templates are built for traceability, document control, and audit-ready records, not loose notes. Talent Acquisition Leads apply it when they need speed plus consistency, especially when hiring volume increases and “tribal knowledge” stops working. People Ops Consultants use it to deliver a defensible, repeatable verification workflow to clients without writing every form from scratch."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this ISO 9001 background check AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SaaS and technology companies use it when roles involve privileged access to customer data, admin consoles, or production systems, and they need consistent verification records for security reviews. Healthcare organizations apply it for roles that interact with patients or protected information, where privacy minimization and relevance-based checks matter as much as thoroughness. Financial services teams get value because standard stage gates and exception handling reduce fraud exposure and make it easier to demonstrate consistent decisioning. Staffing and BPO providers lean on it to create one core system that can be tailored by client, role sensitivity, and jurisdiction, while still keeping an internal audit trail."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building background check templates produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me a background check process for my company” fails because it: lacks document control and versioning, so nobody knows what the current template is; provides no stage gates or acceptance criteria, which leads to inconsistent approvals; ignores traceability requirements, making audits painful; produces generic steps instead of a structured template suite with forms, checklists, and records; and misses fairness safeguards like relevance testing and privacy minimization, which increases candidate risk and internal disputes."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this ISO 9001 background check prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, but you will get the best result by telling the AI what to tailor for, even if you add those details as a short note before you run it. In your message, specify industry, organization scale, role sensitivity, jurisdictional complexity (single country vs multi-country), and risk tolerance, then ask it to adjust the number of stages and the evidence requirements accordingly. A good follow-up request is: “Create two versions of the template suite: one for low-sensitivity roles and one for high-sensitivity roles, and show exactly what changes in stages, records, and exception handling.” If you already have a partial process, paste it in and ask the AI to map it to ISO 9001 concepts (document control, corrective actions, continual improvement) and fill the gaps."
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this ISO 9001 background check prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is not providing any real context, then expecting the “dynamic stages” to perfectly match your environment; “We’re a company hiring people” is weak, while “300-person fintech hiring customer support with access to billing tools, US and UK, medium risk tolerance” gives the AI something to shape. Another common error is failing to define role sensitivity, so the output becomes either too heavy for junior roles or too light for privileged access roles; spell out what the person can touch and what could go wrong. People also skip the fairness safeguards in implementation even if the AI includes them, which undermines the whole system; keep the relevance criteria and privacy minimization as required fields. Finally, teams forget to operationalize document control (version owner, effective date, change log), so templates drift immediately; assign ownership and bake approvals into the workflow."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this ISO 9001 background check prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for one-off hires where you won’t maintain a repeatable process, because the value comes from standardization and auditability over time. It’s also not a fit for teams looking for jurisdiction-specific legal instructions; it intentionally avoids giving legal advice, so you still need counsel or compliance review for local requirements. And frankly, if you haven’t validated your hiring criteria at all (what the role requires, what risks matter), you may find the output too structured too soon. In that case, start by defining role requirements and risk levels, then come back to build the template suite."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">

<p>In hiring, consistency is a control, not bureaucracy. Use this ISO 9001 background check prompt to generate an audit-ready template suite you can actually run, then refine it in one or two iterations and put it into use.</p>

</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5003041.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build Token-Safe JWT Auth Blueprint AI Prompt</title>
		<link>https://flowpast.com/prompts/build-token-safe-jwt-auth-blueprint-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:49:32 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5001440</guid>

					<description><![CDATA[Session hijacks keep happening - the ultimate AI Prompt that designs HTTP-only cookie JWT auth with CSRF defense, rotation, monitoring, and code. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: JWT auth blueprint -->

<div class="hook-introduction">

<p>Session hijacks keep happening because many “JWT setups” quietly put tokens where attackers love them: in browser storage, exposed to XSS, and copied into headers by hand. Then refresh logic gets bolted on later, cookie flags are wrong, and you end up with random logouts or (worse) long-lived stolen sessions. It’s messy, and it’s avoidable.</p>



<p>This <strong>JWT auth blueprint</strong> is built for <strong>backend engineers</strong> who need a cookie-based JWT model with sane rotation rules, <strong>security-minded tech leads</strong> cleaning up risky token handling before an audit or incident, and <strong>startup founders</strong> who want “secure by default” auth without breaking UX. The output is a production-ready blueprint: headers, cookie settings, endpoint flows, stack-specific code snippets, tests, and an incident response plan for suspected credential compromise.</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 a cookie-based JWT session architecture where tokens are never accessible to JavaScript.</li>
          <li>It defines access and refresh lifetimes, rotation rules, and failure modes to keep logins smooth but predictable.</li>
          <li>It outputs concrete implementation details for headers, cookie flags, CORS behavior, and CSRF defenses.</li>
          <li>It produces stack-aligned code snippets based on your [BACKEND_TECHNOLOGY] and [FRONTEND_TECHNOLOGY] inputs.</li>
          <li>It adds monitoring, detection signals, and automated containment steps for suspected session theft or replay.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You currently store JWTs in localStorage or sessionStorage and want to remove that exposure without rewriting everything.</li>
          <li>Your app has “mysterious logouts” because refresh logic and cookie/CORS settings were patched together over time.</li>
          <li>You are adding a new SPA or mobile web frontend and need a consistent auth flow that won’t become a support nightmare.</li>
          <li>A security review flagged XSS risk, token theft, or missing CSRF protection in cookie-based sessions.</li>
          <li>You are scaling traffic and need monitoring and incident playbooks, not just an auth diagram in a slide deck.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A complete JWT cookie session blueprint with recommended token lifetimes and rotation policy.</li>
           <li>Endpoint-by-endpoint flow for login, silent refresh, logout, and “session invalid” handling.</li>
           <li>Stack-specific code snippets for [BACKEND_TECHNOLOGY] and [FRONTEND_TECHNOLOGY], including headers and cookie attributes.</li>
           <li>A CSRF defense package: chosen approach, configuration notes, and validation logic for protected routes.</li>
           <li>A monitoring and containment checklist with alert signals plus automated steps to quarantine suspicious sessions.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

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

<h2 class="wp-block-heading">The Full AI Prompt: Token-Safe Cookie JWT Auth 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>[BACKEND_TECHNOLOGY]</code></td>
                                <td class="var-desc">
                                    Specify the backend programming language or framework used to build the server-side of the application.                                    <div class="var-example">For example: "Node.js with Express or Python with Django"</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[BACKEND_TECHNOLOGY]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[FRONTEND_TECHNOLOGY]</code></td>
                                <td class="var-desc">
                                    Specify the frontend framework or library used for building the user interface of the application.                                    <div class="var-example">For example: "React.js or Angular"</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[FRONTEND_TECHNOLOGY]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[UPPERCASE_WITH_UNDERSCORES]</code></td>
                                <td class="var-desc">
                                    Enter a variable or input name formatted in uppercase letters with underscores separating words.                                    <div class="var-example">For example: "USER_SESSION_ID or ACCESS_TOKEN"</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[UPPERCASE_WITH_UNDERSCORES]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[APPLICATION_TYPE]</code></td>
                                <td class="var-desc">
                                    Describe the type of application being developed, including its purpose and target audience.                                    <div class="var-example">For example: "E-commerce web application for small businesses"</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[APPLICATION_TYPE]"
                                            placeholder="Enter your value here..."
                                            rows="3"></textarea>
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[CURRENT_SECURITY_LEVEL]</code></td>
                                <td class="var-desc">
                                    Provide details about the current security approach or mechanisms implemented in the application.                                    <div class="var-example">For example: "Using JWT stored in localStorage with basic CSRF protection"</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[CURRENT_SECURITY_LEVEL]"
                                            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 specific authentication or security challenge the application is facing or trying to solve.                                    <div class="var-example">For example: "Preventing session hijacking while maintaining a seamless user experience"</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>[CONTEXT]</code></td>
                                <td class="var-desc">
                                    Provide any relevant background or situational details that impact the security architecture or implementation.                                    <div class="var-example">For example: "Application operates in a high-risk environment with frequent phishing attempts targeting users"</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></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></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) Security 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 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) Cookie Implementation (HTTP-only)</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) Session Management &amp; Silent Refresh</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) Middleware Design (Validation + User Context)</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) Threat Detection &amp; Automated Response</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) Code Examples (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></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">7) Security 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></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">8) Deployment 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 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">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-ready JWT authentication blueprint that removes all client-side token storage/handling, resists XSS/token theft/session hijacking, preserves a smooth login experience, and includes concrete implementation details (code, headers, settings, tests, and incident response).

## PERSONA
Act as a seasoned application-security architect who has built and reviewed real-world auth systems under active attack. Communicate in a pragmatic, engineering-first style: precise, skeptical of “best practice” platitudes, and focused on deployable patterns with clear tradeoffs.

## CONSTRAINTS
- Prioritize designs where tokens are never accessible to JavaScript (no localStorage/sessionStorage/in-memory token juggling in the browser).
- Use HTTP-only cookies as the primary transport/storage for session credentials.
- Provide stack-specific snippets aligned to [BACKEND_TECHNOLOGY] and [FRONTEND_TECHNOLOGY].
- Prefer actionable configuration over generic advice.
- Preserve UX: silent refresh, minimal re-logins, predictable failure modes.
- Include monitoring plus automated containment steps for suspected credential compromise.
- **Variable format compliance:** user-provided items must be in **[UPPERCASE_WITH_UNDERSCORES]**; any AI-filled template fields must use **{Title Case}**.

### What This Is NOT (Scope Boundaries)
- Not a full IAM/SSO vendor selection guide.
- Not a complete pentest report or formal threat model document.
- Not a substitute for legal/compliance requirements (PCI/HIPAA/etc.).
- Not an endorsement of putting access tokens in browser storage “with extra encryption.”

## PROCESS
1. **Pre-analysis (must output first):** Briefly restate your understanding of the app context and the likely threat paths, based on the provided inputs. List any assumptions.
2. **Architecture build-out:** Propose a cookie-based JWT session model (access + refresh or equivalent) with clear lifetimes and rotation rules.
3. **Implementation details:** Provide headers, cookie attributes, CORS/CSRF posture, and server routes/handlers needed for login, refresh, logout, and revocation.
4. **Middleware &amp; request flow:** Define how each request is authenticated, how user context is attached, and how failures are handled without leaking information.
5. **Threat response:** Describe detection signals (logs/metrics), alert thresholds, and automated actions (revoke, rotate, step-up auth, lockouts).
6. **Testing plan:** Give repeatable tests (unit/integration/e2e) and a small “attack simulation” checklist.
7. **Edge cases:** If inputs are incomplete or contradictory, ask targeted questions and provide a safe default path labeled as {Assumed Default}.
8. **Finish with validation:** Provide a short verification checklist (4–5 items).

## INPUTS
- **Application type:** [APPLICATION_TYPE]
- **Backend technology/framework:** [BACKEND_TECHNOLOGY]
- **Frontend technology/framework:** [FRONTEND_TECHNOLOGY]
- **Current JWT/security approach:** [CURRENT_SECURITY_LEVEL]
- **Specific security concerns/requirements:** [CHALLENGE]
- **Environment details (domains, hosting, reverse proxy, etc.):** [CONTEXT]

## OUTPUT SPECIFICATION
Use the following sections and include stack-specific code/config wherever possible:

### 1) Security Architecture
Provide:
- {Session Model} (e.g., “short-lived access token + rotating refresh token in HTTP-only cookie”)
- {Token Contents} (claims, issuer/audience, minimal PII guidance)
- {Lifetime Policy} (access TTL, refresh TTL, idle timeout, absolute timeout)
- {Rotation &amp; Revocation Strategy} (refresh rotation, reuse detection, server-side denylist/allowlist approach)
- {UX Behavior} (what the user experiences during refresh/expiry)

### 2) Cookie Implementation (HTTP-only)
Include:
- {Cookie Names} and purposes
- Exact cookie attributes: HttpOnly, Secure, SameSite, Path, Domain, Max-Age/Expires
- Required security headers (at minimum): CSP guidance, HSTS, X-Content-Type-Options, Referrer-Policy, Permissions-Policy
- CORS settings compatible with cookie auth
- CSRF strategy compatible with SameSite policy (double-submit, origin checks, CSRF token cookie pattern, etc.)

### 3) Session Management &amp; Silent Refresh
Include:
- {Auth Endpoints} (login/refresh/logout/me)
- {Refresh Flow} described as steps (server-centric; frontend should not touch tokens)
- Concurrency handling (multiple tabs, refresh storms)
- Logout semantics (server + client cookie clearing)
- Failure handling (when to force re-auth vs retry)

### 4) Middleware Design (Validation + User Context)
Include:
- {Middleware Responsibilities}
- Signature verification, issuer/audience checks, clock skew handling
- Attaching {User Context} to request
- Authorization hooks (roles/scopes) without overloading JWT
- Performance notes (caching keys/JWKS if applicable)

### 5) Threat Detection &amp; Automated Response
Include:
- What to log (auth events, refresh reuse, IP/UA changes, anomaly signals)
- {Detection Rules} (examples with thresholds)
- {Automated Actions} (revoke session family, require re-auth, notify user, rate limit, temporarily block)
- Guidance for compromised refresh token scenarios
- Safe error messaging patterns

### 6) Code Examples (Tailored)
Provide:
- {Backend Implementation Snippets} for [BACKEND_TECHNOLOGY]
- {Frontend Integration Notes} for [FRONTEND_TECHNOLOGY] (cookie-based requests, handling 401/419, retry pattern)
- {Configuration Snippets} (proxy/load balancer, environment variables, secure defaults)
- A minimal example for each: login handler, refresh handler, auth middleware, logout handler

### 7) Security Testing Plan
Include:
- Unit tests (token validation, expiry, rotation, CSRF checks)
- Integration tests (cookie attributes, CORS behavior, refresh rotation correctness)
- E2E tests (silent refresh, multi-tab, logout)
- “Adversary checks” (XSS attempt to read tokens, replay refresh, session fixation attempt)

### 8) Deployment Checklist
A step-by-step pre-production list including:
- Cookie flags verified in prod
- TLS/HSTS enabled and tested
- CSP in report-only then enforced
- Logging/alerts wired
- Key rotation/JWKS strategy confirmed
- Incident runbook basics (revocation, forced logout, secret rotation)

## QUALITY CHECKS
At the end, output a **Quality Validation Checklist** with 4–5 bullets confirming:
- No client-side token storage/reading is required
- Cookies and headers are correctly specified for the chosen stack
- CSRF protections are compatible with cookie-based auth
- Refresh rotation + compromise handling is explicitly covered
- Tests include at least one replay/reuse scenario and one XSS-driven verification attempt            </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-ready JWT authentication blueprint that removes all client-side token storage\/handling, resists XSS\/token theft\/session hijacking, preserves a smooth login experience, and includes concrete implementation details (code, headers, settings, tests, and incident response).\r\n\r\n## PERSONA\r\nAct as a seasoned application-security architect who has built and reviewed real-world auth systems under active attack. Communicate in a pragmatic, engineering-first style: precise, skeptical of \u201cbest practice\u201d platitudes, and focused on deployable patterns with clear tradeoffs.\r\n\r\n## CONSTRAINTS\r\n- Prioritize designs where tokens are never accessible to JavaScript (no localStorage\/sessionStorage\/in-memory token juggling in the browser).\r\n- Use HTTP-only cookies as the primary transport\/storage for session credentials.\r\n- Provide stack-specific snippets aligned to [BACKEND_TECHNOLOGY] and [FRONTEND_TECHNOLOGY].\r\n- Prefer actionable configuration over generic advice.\r\n- Preserve UX: silent refresh, minimal re-logins, predictable failure modes.\r\n- Include monitoring plus automated containment steps for suspected credential compromise.\r\n- **Variable format compliance:** user-provided items must be in **[UPPERCASE_WITH_UNDERSCORES]**; any AI-filled template fields must use **{Title Case}**.\r\n\r\n### What This Is NOT (Scope Boundaries)\r\n- Not a full IAM\/SSO vendor selection guide.\r\n- Not a complete pentest report or formal threat model document.\r\n- Not a substitute for legal\/compliance requirements (PCI\/HIPAA\/etc.).\r\n- Not an endorsement of putting access tokens in browser storage \u201cwith extra encryption.\u201d\r\n\r\n## PROCESS\r\n1. **Pre-analysis (must output first):** Briefly restate your understanding of the app context and the likely threat paths, based on the provided inputs. List any assumptions.\r\n2. **Architecture build-out:** Propose a cookie-based JWT session model (access + refresh or equivalent) with clear lifetimes and rotation rules.\r\n3. **Implementation details:** Provide headers, cookie attributes, CORS\/CSRF posture, and server routes\/handlers needed for login, refresh, logout, and revocation.\r\n4. **Middleware & request flow:** Define how each request is authenticated, how user context is attached, and how failures are handled without leaking information.\r\n5. **Threat response:** Describe detection signals (logs\/metrics), alert thresholds, and automated actions (revoke, rotate, step-up auth, lockouts).\r\n6. **Testing plan:** Give repeatable tests (unit\/integration\/e2e) and a small \u201cattack simulation\u201d checklist.\r\n7. **Edge cases:** If inputs are incomplete or contradictory, ask targeted questions and provide a safe default path labeled as {Assumed Default}.\r\n8. **Finish with validation:** Provide a short verification checklist (4\u20135 items).\r\n\r\n## INPUTS\r\n- **Application type:** [APPLICATION_TYPE]\r\n- **Backend technology\/framework:** [BACKEND_TECHNOLOGY]\r\n- **Frontend technology\/framework:** [FRONTEND_TECHNOLOGY]\r\n- **Current JWT\/security approach:** [CURRENT_SECURITY_LEVEL]\r\n- **Specific security concerns\/requirements:** [CHALLENGE]\r\n- **Environment details (domains, hosting, reverse proxy, etc.):** [CONTEXT]\r\n\r\n## OUTPUT SPECIFICATION\r\nUse the following sections and include stack-specific code\/config wherever possible:\r\n\r\n### 1) Security Architecture\r\nProvide:\r\n- {Session Model} (e.g., \u201cshort-lived access token + rotating refresh token in HTTP-only cookie\u201d)\r\n- {Token Contents} (claims, issuer\/audience, minimal PII guidance)\r\n- {Lifetime Policy} (access TTL, refresh TTL, idle timeout, absolute timeout)\r\n- {Rotation & Revocation Strategy} (refresh rotation, reuse detection, server-side denylist\/allowlist approach)\r\n- {UX Behavior} (what the user experiences during refresh\/expiry)\r\n\r\n### 2) Cookie Implementation (HTTP-only)\r\nInclude:\r\n- {Cookie Names} and purposes\r\n- Exact cookie attributes: HttpOnly, Secure, SameSite, Path, Domain, Max-Age\/Expires\r\n- Required security headers (at minimum): CSP guidance, HSTS, X-Content-Type-Options, Referrer-Policy, Permissions-Policy\r\n- CORS settings compatible with cookie auth\r\n- CSRF strategy compatible with SameSite policy (double-submit, origin checks, CSRF token cookie pattern, etc.)\r\n\r\n### 3) Session Management & Silent Refresh\r\nInclude:\r\n- {Auth Endpoints} (login\/refresh\/logout\/me)\r\n- {Refresh Flow} described as steps (server-centric; frontend should not touch tokens)\r\n- Concurrency handling (multiple tabs, refresh storms)\r\n- Logout semantics (server + client cookie clearing)\r\n- Failure handling (when to force re-auth vs retry)\r\n\r\n### 4) Middleware Design (Validation + User Context)\r\nInclude:\r\n- {Middleware Responsibilities}\r\n- Signature verification, issuer\/audience checks, clock skew handling\r\n- Attaching {User Context} to request\r\n- Authorization hooks (roles\/scopes) without overloading JWT\r\n- Performance notes (caching keys\/JWKS if applicable)\r\n\r\n### 5) Threat Detection & Automated Response\r\nInclude:\r\n- What to log (auth events, refresh reuse, IP\/UA changes, anomaly signals)\r\n- {Detection Rules} (examples with thresholds)\r\n- {Automated Actions} (revoke session family, require re-auth, notify user, rate limit, temporarily block)\r\n- Guidance for compromised refresh token scenarios\r\n- Safe error messaging patterns\r\n\r\n### 6) Code Examples (Tailored)\r\nProvide:\r\n- {Backend Implementation Snippets} for [BACKEND_TECHNOLOGY]\r\n- {Frontend Integration Notes} for [FRONTEND_TECHNOLOGY] (cookie-based requests, handling 401\/419, retry pattern)\r\n- {Configuration Snippets} (proxy\/load balancer, environment variables, secure defaults)\r\n- A minimal example for each: login handler, refresh handler, auth middleware, logout handler\r\n\r\n### 7) Security Testing Plan\r\nInclude:\r\n- Unit tests (token validation, expiry, rotation, CSRF checks)\r\n- Integration tests (cookie attributes, CORS behavior, refresh rotation correctness)\r\n- E2E tests (silent refresh, multi-tab, logout)\r\n- \u201cAdversary checks\u201d (XSS attempt to read tokens, replay refresh, session fixation attempt)\r\n\r\n### 8) Deployment Checklist\r\nA step-by-step pre-production list including:\r\n- Cookie flags verified in prod\r\n- TLS\/HSTS enabled and tested\r\n- CSP in report-only then enforced\r\n- Logging\/alerts wired\r\n- Key rotation\/JWKS strategy confirmed\r\n- Incident runbook basics (revocation, forced logout, secret rotation)\r\n\r\n## QUALITY CHECKS\r\nAt the end, output a **Quality Validation Checklist** with 4\u20135 bullets confirming:\r\n- No client-side token storage\/reading is required\r\n- Cookies and headers are correctly specified for the chosen stack\r\n- CSRF protections are compatible with cookie-based auth\r\n- Refresh rotation + compromise handling is explicitly covered\r\n- Tests include at least one replay\/reuse scenario and one XSS-driven verification attempt";
    const variables = ["[BACKEND_TECHNOLOGY]","[FRONTEND_TECHNOLOGY]","[UPPERCASE_WITH_UNDERSCORES]","[APPLICATION_TYPE]","[CURRENT_SECURITY_LEVEL]","[CHALLENGE]","[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>Be painfully specific about your app shape.</strong> Tell the AI if it’s a pure SPA, SSR + API, or a hybrid with multiple subdomains, because cookie scope and CORS rules change fast. Add details like “api.example.com + app.example.com” and whether you must support cross-site requests. If you don’t, you’ll get a generic design that breaks in production.</li>


<li><strong>Fill in [BACKEND_TECHNOLOGY] and [FRONTEND_TECHNOLOGY] with versions, not labels.</strong> “Node” is vague; “Node 20 + Express 4 behind Nginx” is useful. Same for frontend: “Next.js 14 App Router” or “React + Vite served from CloudFront.” Follow-up prompt: “Now rewrite the implementation section using Next.js route handlers and Express middleware.”</li>


<li><strong>Ask it to choose one CSRF pattern and defend it.</strong> Cookie auth forces the CSRF conversation, and hand-wavy answers are how teams ship gaps. Prompt: “Pick double-submit cookie or synchronizer token for my case, and include exact cookie names, validation steps, and how it behaves with same-site requests.”</li>


<li><strong>Iterate on lifetimes using your real risk tolerance.</strong> The first pass will be a reasonable default, but you can tune it for your user behavior and threat level. After the initial output, try: “Make access tokens 5 minutes, refresh 14 days with rotation; now explain the UX impact and how you’ll avoid surprise logouts.”</li>


<li><strong>Force the incident plan to be executable.</strong> Monitoring is only helpful if it turns into actions your team will actually run at 2 a.m. Ask: “Add detection rules for refresh token replay and impossible travel; include automated responses (session revoke, step-up auth) and what to log for later forensics.” Honestly, this is where most “auth guides” fall apart.</li>

</ul>

</div>

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

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



<p>Once your authentication blueprint is solid, these prompts help you remove performance and process drag that shows up during implementation and rollout:</p>



<p>If you also need to tighten the delivery pipeline around security work (reviews, QA, release coordination), <a href="https://flowpast.com/prompts/fix-workflow-bottlenecks-and-throughput-ai-prompt/">Fix Workflow Bottlenecks and Throughput AI Prompt</a> helps you map where tickets stall and what to change first. It pairs well when your auth project keeps slipping because approvals, handoffs, and “one more change” loops are uncontrolled.</p>



<p>For teams doing repeated auth-related fixes across services, <a href="https://flowpast.com/prompts/fix-workflow-bottlenecks-and-boost-throughput-ai-prompt/">Fix Workflow Bottlenecks and Boost Throughput AI Prompt</a> is useful right after you pick the target design. Use it to standardize execution: checklists, ownership, and a pragmatic cadence so the blueprint turns into merged code, not a forgotten doc.</p>



<p>When your main pain is day-to-day friction (slow code reviews, unclear definitions of done, environment drift), <a href="https://flowpast.com/prompts/fix-daily-workflow-bottlenecks-ai-prompt/">Fix Daily Workflow Bottlenecks AI Prompt</a> complements this JWT work nicely. You’ll feel it during auth refactors, because you’re touching sensitive endpoints and tests, and small inefficiencies multiply.</p>


<br>


<p>Quick reference:</p>



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

<li><a href="https://flowpast.com/prompts/fix-workflow-bottlenecks-and-throughput-ai-prompt/">Fix Workflow Bottlenecks and Throughput AI Prompt</a>: Find handoffs slowing important projects.</li>


<li><a href="https://flowpast.com/prompts/fix-workflow-bottlenecks-and-boost-throughput-ai-prompt/">Fix Workflow Bottlenecks and Boost Throughput AI Prompt</a>: Turn plans into repeatable delivery.</li>


<li><a href="https://flowpast.com/prompts/fix-daily-workflow-bottlenecks-ai-prompt/">Fix Daily Workflow Bottlenecks AI Prompt</a>: Remove everyday blockers during refactors.</li>


<li><a href="https://flowpast.com/prompts/diagnose-runtime-bottlenecks-and-fixes-ai-prompt/">Diagnose Runtime Bottlenecks and Fixes AI Prompt</a>: Spot performance issues after changes.</li>


<li><a href="https://flowpast.com/prompts/build-a-tailored-i-o-mastery-plan-ai-prompt/">Build a Tailored I O Mastery Plan AI Prompt</a>: Train skills for better execution.</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 JWT auth blueprint AI prompt?</span>

<p class="answer"><strong>Backend Engineers</strong> use it to implement cookie-based JWT sessions with correct flags, lifetimes, and rotation so tokens never touch JavaScript. <strong>Security Engineers</strong> lean on it to validate CSRF posture, refresh-token replay defenses, and logging/monitoring signals they can alert on. <strong>Tech Leads</strong> apply it to standardize auth across services and reduce “it works on my machine” security drift. <strong>Full-Stack Developers</strong> benefit because it bridges frontend constraints (CORS, cookie behavior) with server-side enforcement in one deployable plan.</p>

</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this JWT auth blueprint AI prompt?</span>

<p class="answer"><strong>SaaS companies</strong> get value because a single stolen session can expose multiple tenants, and cookie + rotation patterns help limit blast radius. This prompt also forces clarity on lifetimes and revocation, which matters when support teams handle account takeovers. <strong>E-commerce brands</strong> use it to reduce checkout fraud and protect customer accounts without adding constant re-logins that hurt conversions. <strong>Fintech and payments-adjacent apps</strong> benefit from the monitoring and containment steps, because incident response expectations are higher and “we’ll check logs later” is not good enough. <strong>Healthcare and patient portals</strong> apply it to tighten session handling and audit-friendly logging while still keeping the experience usable for non-technical patients.</p>

</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for designing JWT authentication produce weak results?</span>

<p class="answer">A typical prompt like “Write me a JWT auth setup for my app” fails because it: lacks key context like subdomains, cross-site requests, and your actual tech stack, so cookie and CORS advice comes out wrong. It provides no enforceable structure for refresh rotation and replay detection, which is where many real attacks land. It ignores CSRF tradeoffs that appear the moment you use cookies, so you get insecure defaults or vague “enable CSRF.” It produces generic “store the token in localStorage” patterns instead of a design that keeps tokens out of JavaScript. And it usually misses monitoring plus containment steps, so you have no plan when sessions are being abused.</p>

</div>

<div class="faq-item">
<span class="question">Can I customize this JWT auth blueprint prompt for my specific situation?</span>

<p class="answer">Yes, but you need to feed it the right variables in the format it expects, especially [BACKEND_TECHNOLOGY] and [FRONTEND_TECHNOLOGY]. Add your domain model (single domain vs api/app subdomains), your login UX requirements (silent refresh, “remember me,” device limits), and any constraints like “must support third-party embedded widgets.” A good follow-up is: “Given [BACKEND_TECHNOLOGY] and [FRONTEND_TECHNOLOGY], output the exact cookie names, SameSite values, CORS settings, and the refresh endpoint pseudocode.” If you have an existing system, ask it to produce a migration plan in phases so you can ship safely.</p>

</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this JWT auth blueprint prompt?</span>

<p class="answer">The biggest mistake is leaving [BACKEND_TECHNOLOGY] too vague — instead of “Python,” try “Python 3.12 + FastAPI + Uvicorn behind Cloudflare.” Another common error is underspecifying [FRONTEND_TECHNOLOGY]; “React” is different from “Next.js with server actions,” and cookie behavior and routing matter. People also forget to describe their domain setup, which is how you end up with unusable SameSite/CORS guidance; “single origin https://app.example.com” is a good input, “we have a website” is not. Finally, teams skip UX requirements, so the model may choose lifetimes that cause constant logins; say “silent refresh required, tolerate re-login only after 14 days or password change.”</p>

</div>

<div class="faq-item">
<span class="question">Who should NOT use this JWT auth blueprint prompt?</span>

<p class="answer">This prompt isn’t ideal for teams that need a full SSO/IAM vendor decision or enterprise federation design, because it is focused on deployable cookie-based JWT patterns, not product selection. It’s also a poor fit if you want a one-page quick template without iteration, since the best results come from clarifying your stack, domain model, and threat assumptions. And if you can’t use HTTP-only cookies at all (for example, a constrained client environment that forbids them), you will need a different approach. In those cases, start with a formal architecture review or a dedicated auth framework evaluation instead.</p>

</div>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Which roles benefit most from this JWT auth blueprint AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Backend Engineers use it to implement cookie-based JWT sessions with correct flags, lifetimes, and rotation so tokens never touch JavaScript. Security Engineers lean on it to validate CSRF posture, refresh-token replay defenses, and logging/monitoring signals they can alert on. Tech Leads apply it to standardize auth across services and reduce “it works on my machine” security drift. Full-Stack Developers benefit because it bridges frontend constraints (CORS, cookie behavior) with server-side enforcement in one deployable plan."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this JWT auth blueprint AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SaaS companies get value because a single stolen session can expose multiple tenants, and cookie + rotation patterns help limit blast radius. This prompt also forces clarity on lifetimes and revocation, which matters when support teams handle account takeovers. E-commerce brands use it to reduce checkout fraud and protect customer accounts without adding constant re-logins that hurt conversions. Fintech and payments-adjacent apps benefit from the monitoring and containment steps, because incident response expectations are higher and “we’ll check logs later” is not good enough. Healthcare and patient portals apply it to tighten session handling and audit-friendly logging while still keeping the experience usable for non-technical patients."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for designing JWT authentication produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me a JWT auth setup for my app” fails because it: lacks key context like subdomains, cross-site requests, and your actual tech stack, so cookie and CORS advice comes out wrong. It provides no enforceable structure for refresh rotation and replay detection, which is where many real attacks land. It ignores CSRF tradeoffs that appear the moment you use cookies, so you get insecure defaults or vague “enable CSRF.” It produces generic “store the token in localStorage” patterns instead of a design that keeps tokens out of JavaScript. And it usually misses monitoring plus containment steps, so you have no plan when sessions are being abused."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this JWT auth blueprint prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, but you need to feed it the right variables in the format it expects, especially [BACKEND_TECHNOLOGY] and [FRONTEND_TECHNOLOGY]. Add your domain model (single domain vs api/app subdomains), your login UX requirements (silent refresh, “remember me,” device limits), and any constraints like “must support third-party embedded widgets.” A good follow-up is: “Given [BACKEND_TECHNOLOGY] and [FRONTEND_TECHNOLOGY], output the exact cookie names, SameSite values, CORS settings, and the refresh endpoint pseudocode.” If you have an existing system, ask it to produce a migration plan in phases so you can ship safely."
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this JWT auth blueprint prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving [BACKEND_TECHNOLOGY] too vague — instead of “Python,” try “Python 3.12 + FastAPI + Uvicorn behind Cloudflare.” Another common error is underspecifying [FRONTEND_TECHNOLOGY]; “React” is different from “Next.js with server actions,” and cookie behavior and routing matter. People also forget to describe their domain setup, which is how you end up with unusable SameSite/CORS guidance; “single origin https://app.example.com” is a good input, “we have a website” is not. Finally, teams skip UX requirements, so the model may choose lifetimes that cause constant logins; say “silent refresh required, tolerate re-login only after 14 days or password change.”"
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this JWT auth blueprint prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for teams that need a full SSO/IAM vendor decision or enterprise federation design, because it is focused on deployable cookie-based JWT patterns, not product selection. It’s also a poor fit if you want a one-page quick template without iteration, since the best results come from clarifying your stack, domain model, and threat assumptions. And if you can’t use HTTP-only cookies at all (for example, a constrained client environment that forbids them), you will need a different approach. In those cases, start with a formal architecture review or a dedicated auth framework evaluation instead."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">

<p>Auth is one of those systems you only notice when it fails, and attackers notice it first. Use this prompt to get a token-safe, cookie-based JWT blueprint you can actually implement, then paste it into your AI tool and start tightening the real seams.</p>

</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5001440.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Build a Regulatory Monitoring Blueprint with this AI Prompt</title>
		<link>https://flowpast.com/prompts/build-a-regulatory-monitoring-blueprint-with-this-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:48:38 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5003040</guid>

					<description><![CDATA[Regulatory changes hit without warning - this AI Prompt builds a living monitoring and response blueprint with ISO 19600 traceability. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: regulatory monitoring blueprint -->

<div class="hook-introduction">

<p>Regulations rarely change on your schedule. One week it’s a minor update, the next it’s a new obligation that touches product, security, HR, and reporting. And if you’re still tracking changes in scattered inbox alerts and ad-hoc spreadsheets, things slip. Quietly.</p>



<p>This <strong>regulatory monitoring blueprint</strong> is built for <strong>Compliance Managers</strong> who need a defensible way to track changes across jurisdictions, <strong>Operations leaders</strong> who must turn “new requirements” into owned work without slowing delivery, and <strong>Risk and Audit teams</strong> who need traceability (what changed, who decided, what evidence proves completion). The output is a living operating model: monitoring sources, automated alerting logic, triage and decision workflows, ownership mapping to business processes, and an ISO 19600-aligned evidence trail.</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>Designs a “living” regulatory monitoring system anchored to ISO 19600 principles (governance, proportionality, integration, continual improvement).</li>
          <li>Builds an automated alert workflow that risk-ranks updates by impact, urgency, and downstream dependencies.</li>
          <li>Maps regulatory requirements to real business processes, named control owners, and cross-functional collaborators.</li>
          <li>Creates a rapid triage path for emergency regulatory shifts, including temporary controls and time-boxed reviews.</li>
          <li>Defines an auditable evidence trail capturing what changed, who assessed it, decisions made, actions taken, and completion proof.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You operate across multiple states/countries and can’t reliably spot changes before they hit delivery timelines.</li>
          <li>Your “regulatory tracking” is mostly inbox forwarding, and accountability gets fuzzy the moment things get busy.</li>
          <li>Leadership is asking for a clear line from new rules to actual controls, owners, and measurable completion.</li>
          <li>An audit or investigation is on the horizon, and you need traceability without creating compliance theater.</li>
          <li>You’re scaling fast (new products, new markets, new vendors) and reactive remediation is becoming too expensive.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A complete monitoring blueprint with governance model, roles, meeting cadence, and decision rights.</li>
           <li>A risk-ranking framework (impact/urgency/dependencies) plus alert routing rules by function.</li>
           <li>A repeatable intake-to-implementation workflow, including triage steps and cross-functional handoffs.</li>
           <li>An ISO 19600-aligned traceability log template describing what changed, assessments, decisions, actions, and evidence.</li>
           <li>A continuous improvement loop with KPIs (time-to-triage, time-to-implement, missed-change rate) and review triggers.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

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

<h2 class="wp-block-heading">The Full AI Prompt: Living Regulatory Monitoring &#038; Adaptation Blueprint</h2>


<!-- Prompt file not found: /home/flowpast/htdocs/flowpast.com/wp-content/data/prompts_scraped/5003248/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>Define “regulatory change” in your context.</strong> Don’t lump everything together. Tell the model what counts (new law, revised guidance, enforcement trend, regulator speech) and what doesn’t (opinion blogs, generic news). Follow up with: “Separate changes into binding requirements vs interpretive guidance vs enforcement signals.”</li>


<li><strong>Name your real business processes, not departments.</strong> “Finance” is too vague; “order-to-cash,” “payroll processing,” “vendor onboarding,” or “incident response” gives the blueprint something concrete to map to owners and controls. After the first output, ask: “For each mapped process, list 2 example controls and what evidence would satisfy an audit.”</li>


<li><strong>Force risk-ranking to be operational.</strong> Impact and urgency are obvious; dependencies are where projects break. Add dependencies like “requires engineering release,” “requires vendor contract change,” or “requires customer communications.” Try: “Rewrite the ranking rubric so a triage analyst can score an alert in under 3 minutes.”</li>


<li><strong>Iterate the emergency-shift playbook.</strong> The first version will be generic. Push it toward your reality by prompting: “Now make the emergency pathway work for a 72-hour deadline, with temporary controls, a single accountable decision-maker, and a rollback plan if guidance changes again.”</li>


<li><strong>Combine it with a tax change cadence if that’s your pain point.</strong> If your highest volume of changes is tax-related, run the blueprint and then align sources and routing to your tax calendar. A good follow-up is: “Add a quarterly tax change review ritual and link it to evidence for filings, withholding, and penalty prevention.” Pairing it with planning prompts like https://flowpast.com/prompts/plan-quarterly-taxes-and-avoid-penalties-ai-prompt/ can tighten execution.</li>

</ul>

</div>

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

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



<p>Once you have a monitoring and response operating system, these prompts help you execute on high-frequency regulatory areas (especially tax) with fewer surprises.</p>



<p>If you also need a structured way to translate state-level tax obligations into concrete steps, the <a href="https://flowpast.com/prompts/state-income-tax-compliance-checklist-ai-prompt/">State Income Tax Compliance Checklist AI Prompt</a> pairs well. Use it when your blueprint flags a state tax change and you want a fast checklist that can be assigned, tracked, and evidenced without reinventing the wheel.</p>



<p>For teams doing payroll and contractor payments, withholding drift can become a silent risk. When monitoring identifies new withholding guidance or your income mix changes mid-year, the <a href="https://flowpast.com/prompts/optimize-tax-withholding-for-side-income-ai-prompt/">Optimize Tax Withholding for Side Income AI Prompt</a> helps translate the update into a practical adjustment plan you can document and revisit.</p>



<p>When your monitoring system surfaces signals that quarterly estimates may change (new rules, revenue shifts, enforcement trend), you’ll want an early projection loop. The <a href="https://flowpast.com/prompts/estimate-quarterly-taxes-early-ai-prompt/">Estimate Quarterly Taxes Early AI Prompt</a> is useful at that decision point because it emphasizes forecasting and preparing, not scrambling after penalties show up.</p>


<br>


<p>Quick reference:</p>



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

<li><a href="https://flowpast.com/prompts/state-income-tax-compliance-checklist-ai-prompt/">State Income Tax Compliance Checklist AI Prompt</a>: Turn state tax updates into assignable steps.</li>


<li><a href="https://flowpast.com/prompts/optimize-tax-withholding-for-side-income-ai-prompt/">Optimize Tax Withholding for Side Income AI Prompt</a>: Adjust withholding using real income changes.</li>


<li><a href="https://flowpast.com/prompts/estimate-quarterly-taxes-early-ai-prompt/">Estimate Quarterly Taxes Early AI Prompt</a>: Forecast quarterly estimates before deadlines hit.</li>

<li><a href="https://flowpast.com/prompts/plan-quarterly-taxes-and-avoid-penalties-ai-prompt/">Plan Quarterly Taxes and Avoid Penalties AI Prompt</a>: Set a cadence to pay and document.</li>

<li><a href="https://flowpast.com/prompts/build-a-zero-budget-income-plan-with-this-ai-prompt/">Build a Zero-Budget Income Plan with this AI Prompt</a>: Reconcile income plans with obligations.</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 regulatory monitoring blueprint AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Compliance Managers</strong> use this to turn “we’re monitoring regulations” into a repeatable system with owners, decision rights, and evidence trails. <strong>Legal Operations leads</strong> find it valuable for routing updates to the right stakeholders while keeping interpretations separate from operational implementation. <strong>Risk and Internal Audit leaders</strong> apply it to establish ISO 19600-aligned governance and traceability that stands up during audits or investigations. <strong>Program Managers in regulated product teams</strong> use the workflow to triage changes, manage dependencies, and prevent surprise work from derailing releases.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this regulatory monitoring blueprint AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Fintech and financial services</strong> get immediate value because regulatory updates often have tight timelines and cross-team dependencies (compliance, security, product, support). <strong>Healthcare and digital health</strong> teams use it to track guidance changes, enforcement signals, and documentation expectations while keeping a clean evidence trail for audits. <strong>E-commerce and marketplaces</strong> benefit when obligations vary by state or country and changes affect tax, disclosures, refunds, or consumer protection workflows. <strong>B2B SaaS serving regulated customers</strong> uses it to stay ahead of customer-driven requirements (SOC expectations, privacy changes, contract clauses) and to prove responsiveness without bloating process.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for building a regulatory monitoring blueprint produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like “<em>Write me a regulatory monitoring plan</em>” fails because it: lacks ISO 19600 governance and continual improvement structure, provides no mechanism for automated and risk-ranked alerts, ignores mapping requirements to real business processes and named owners, produces generic advice instead of an auditable workflow with evidence trails, and misses emergency-shift handling (rapid triage, temporary controls, time-boxed reassessments). You end up with a nice-sounding document that no one can run, audit, or improve.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this regulatory monitoring blueprint prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes. Start by adding your operating context in your chat before running the prompt: jurisdictions, regulatory domains (privacy, tax, employment, product safety), and your current monitoring sources. Then tailor the blueprint by specifying your risk-ranking thresholds (what counts as “high impact”), your evidence standards (screenshots, ticket IDs, policy diffs), and your cross-functional roster (legal, ops, IT, security, product, HR). A useful follow-up prompt is: “Adapt this blueprint for a 200-person company operating in the US and EU; assume two compliance staff, Jira for tracking, and monthly releases. Keep it proportional and remove any steps that don’t reduce risk or speed up response.”</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this regulatory monitoring blueprint prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is leaving the organization context too vague — instead of “we’re global,” try “we sell a consumer app in the US, UK, and Germany; we process payments; we market via email and push notifications.” Another common error is not naming business processes, which prevents ownership mapping; “Operations owns it” is weak, while “vendor onboarding control owner: Procurement Ops Manager” is actionable. Teams also forget dependencies, so triage can’t forecast delivery risk; “needs engineering change in Q3 release train” is the kind of detail that makes the blueprint usable. Finally, people skip evidence definitions; “document compliance” is fuzzy, but “link to ticket, code PR, updated procedure, and approval record” is auditable.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this regulatory monitoring blueprint prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for one-time projects where you will not maintain an ongoing monitoring cadence, or for teams expecting jurisdiction-specific legal interpretations rather than an operating system. It’s also a poor fit if you have no ability to assign owners or track work (no tickets, no process owners, no governance), because the blueprint depends on execution. If that’s you, consider starting with a narrow compliance checklist for a single area, then expanding into a monitoring system once ownership and tracking are in place.</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 regulatory monitoring blueprint AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Compliance Managers use this to turn “we’re monitoring regulations” into a repeatable system with owners, decision rights, and evidence trails. Legal Operations leads find it valuable for routing updates to the right stakeholders while keeping interpretations separate from operational implementation. Risk and Internal Audit leaders apply it to establish ISO 19600-aligned governance and traceability that stands up during audits or investigations. Program Managers in regulated product teams use the workflow to triage changes, manage dependencies, and prevent surprise work from derailing releases."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this regulatory monitoring blueprint AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Fintech and financial services get immediate value because regulatory updates often have tight timelines and cross-team dependencies (compliance, security, product, support). Healthcare and digital health teams use it to track guidance changes, enforcement signals, and documentation expectations while keeping a clean evidence trail for audits. E-commerce and marketplaces benefit when obligations vary by state or country and changes affect tax, disclosures, refunds, or consumer protection workflows. B2B SaaS serving regulated customers uses it to stay ahead of customer-driven requirements (SOC expectations, privacy changes, contract clauses) and to prove responsiveness without bloating process."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for building a regulatory monitoring blueprint produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like “Write me a regulatory monitoring plan” fails because it: lacks ISO 19600 governance and continual improvement structure, provides no mechanism for automated and risk-ranked alerts, ignores mapping requirements to real business processes and named owners, produces generic advice instead of an auditable workflow with evidence trails, and misses emergency-shift handling (rapid triage, temporary controls, time-boxed reassessments). You end up with a nice-sounding document that no one can run, audit, or improve."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this regulatory monitoring blueprint prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. Start by adding your operating context in your chat before running the prompt: jurisdictions, regulatory domains (privacy, tax, employment, product safety), and your current monitoring sources. Then tailor the blueprint by specifying your risk-ranking thresholds (what counts as “high impact”), your evidence standards (screenshots, ticket IDs, policy diffs), and your cross-functional roster (legal, ops, IT, security, product, HR). A useful follow-up prompt is: “Adapt this blueprint for a 200-person company operating in the US and EU; assume two compliance staff, Jira for tracking, and monthly releases. Keep it proportional and remove any steps that don’t reduce risk or speed up response.”"
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this regulatory monitoring blueprint prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving the organization context too vague — instead of “we’re global,” try “we sell a consumer app in the US, UK, and Germany; we process payments; we market via email and push notifications.” Another common error is not naming business processes, which prevents ownership mapping; “Operations owns it” is weak, while “vendor onboarding control owner: Procurement Ops Manager” is actionable. Teams also forget dependencies, so triage can’t forecast delivery risk; “needs engineering change in Q3 release train” is the kind of detail that makes the blueprint usable. Finally, people skip evidence definitions; “document compliance” is fuzzy, but “link to ticket, code PR, updated procedure, and approval record” is auditable."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this regulatory monitoring blueprint prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for one-time projects where you will not maintain an ongoing monitoring cadence, or for teams expecting jurisdiction-specific legal interpretations rather than an operating system. It’s also a poor fit if you have no ability to assign owners or track work (no tickets, no process owners, no governance), because the blueprint depends on execution. If that’s you, consider starting with a narrow compliance checklist for a single area, then expanding into a monitoring system once ownership and tracking are in place."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>Regulatory work is painful when it’s reactive and undocumented. Put a real operating system in place, keep it proportional, and make every change traceable to an owner and an action. Paste this prompt into your AI tool and start building your monitoring blueprint today.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5003040.webp" medium="image"></media:content>
            	</item>
		<item>
		<title>Design Cookie-Based JWT Auth Flow AI Prompt</title>
		<link>https://flowpast.com/prompts/design-cookie-based-jwt-auth-flow-ai-prompt/</link>
		
		<dc:creator><![CDATA[Lisa Granqvist]]></dc:creator>
		<pubDate>Fri, 23 Jan 2026 02:48:24 +0000</pubDate>
				<category><![CDATA[Prompts]]></category>
		<guid isPermaLink="false">https://flowpast.com/?p=5001439</guid>

					<description><![CDATA[Cookie sessions get hijacked - a proven AI Prompt that designs JWT auth with HTTP-only cookies, CSRF defense, rotation, middleware, and logging. Discover more AI prompts for marketing, sales, and ops.]]></description>
										<content:encoded><![CDATA[<!-- FOCUS_KEYWORD: cookie-based JWT auth -->
<div class="hook-introduction">

<p>JWT auth breaks in the boring places. Tokens end up in localStorage, XSS turns into account takeover, and refresh flows become a pile of edge cases nobody monitors. Then you ship “good enough” auth and spend the next quarter chasing weird logout bugs and suspicious replays.</p>



<p>This <strong>cookie-based JWT auth</strong> is built for <strong>product engineers</strong> who need a secure login/refresh/logout flow that won’t leak tokens to browser JavaScript, <strong>tech leads</strong> who have to standardize middleware and cookie policies across multiple services, and <strong>security-minded founders</strong> who want a practical plan before a penetration test. The output is a production-grade design doc with implementation patterns (cookies, headers, rotation rules, middleware structure) plus logging and monitoring signals you can actually wire up.</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 an end-to-end login → authenticated request → silent refresh → logout flow where the browser never reads tokens via JavaScript.</li>
          <li>It defines an access/refresh token model, including lifetimes, rotation strategy, and how to invalidate sessions server-side after theft or logout.</li>
          <li>It specifies cookie flags and header patterns (SameSite, Secure, HttpOnly, Path scoping, CSRF headers) with concrete configuration defaults.</li>
          <li>It provides middleware patterns to authenticate requests, attach user context, handle clock skew, and block tampered or replayed tokens.</li>
          <li>It adds operational guidance: what to log, which signals indicate abuse, and what alerts help you catch refresh-token reuse quickly.</li>
       </ul>
      </td>
      <td>
        <ul class="results-list">
          <li>You are migrating away from localStorage/sessionStorage tokens and need a safer approach without rewriting the whole front end.</li>
          <li>Your refresh flow is unreliable (random 401s, logout loops, “works on my machine”), and you need clear error behavior and race handling.</li>
          <li>You are about to ship an SPA + API and need CSRF defenses that match cookie-based auth rather than bearer tokens.</li>
          <li>A security review or customer questionnaire is asking how you prevent XSS token harvesting, replay after theft, and session hijacking.</li>
          <li>You are scaling to multiple services and need consistent middleware and logging conventions so incidents can be investigated fast.</li>
        </ul>
      </td>
       <td>
         <ul class="deliverables-list">
           <li>A complete auth flow blueprint with step-by-step request/response sequences for login, refresh, and logout.</li>
           <li>A token policy table that includes access/refresh TTLs, rotation rules, reuse detection, and safe clock-skew handling.</li>
           <li>Cookie and header configuration examples (HttpOnly/Secure/SameSite, CSRF header, CORS notes) ready to paste into docs.</li>
           <li>Middleware pseudocode for auth verification, user-context attachment, and consistent error responses across endpoints.</li>
           <li>A monitoring checklist with concrete log fields and alert ideas for replay attempts, refresh anomalies, and suspicious logout races.</li>
         </ul>
       </td>
    </tr>
  </tbody>
</table>

</div>

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

<h2 class="wp-block-heading">The Full AI Prompt: Production-Grade Cookie JWT Auth Flow</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 type of application you are working on, such as web, mobile, or desktop, and include any relevant details about its functionality or user interaction.                                    <div class="var-example">For example: "Single-page web application for e-commerce, built with React and interacting with REST APIs."</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 details about the frameworks, runtime environment, hosting setup, and reverse proxy configuration currently in use for the application.                                    <div class="var-example">For example: "Node.js backend using Express, hosted on AWS Lambda with an NGINX reverse proxy in front."</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>[CHALLENGE]</code></td>
                                <td class="var-desc">
                                    Outline the specific security or compliance standards the application must adhere to, such as SOC2, HIPAA, PCI, or GDPR.                                    <div class="var-example">For example: "The application must comply with GDPR for handling user data and SOC2 for operational security standards."</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">
                                    Specify the desired session length, including both idle timeout and absolute expiration duration, to help define token lifetimes.                                    <div class="var-example">For example: "Idle timeout of 15 minutes and absolute session expiration after 24 hours."</div>
                                </td>
                                <td class="var-input">
                                                                            <input
                                            type="text"
                                            class="customize-input"
                                            data-placeholder="[TIMEFRAME]"
                                            placeholder="Enter your value here..." />
                                                                    </td>
                            </tr>
                                                    <tr>
                                <td class="var-name"><code>[PRODUCT_DESCRIPTION]</code></td>
                                <td class="var-desc">
                                    Describe any observed vulnerabilities or issues with the current authentication system, such as token theft, session hijacking, or poor logout handling.                                    <div class="var-example">For example: "Tokens stored in localStorage are vulnerable to XSS attacks, and session hijacking has been observed due to missing CSRF protection."</div>
                                </td>
                                <td class="var-input">
                                                                            <textarea
                                            class="customize-input"
                                            data-placeholder="[PRODUCT_DESCRIPTION]"
                                            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></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></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">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) {Security 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">2) {Cookie Implementation}</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) {Token Refresh 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">4) {Validation Middleware}</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) {Logout Security}</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">6) {Frontend 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></div><div class="locked-section-icon">🔒</div></div><div class="prompt-header-visible subheader">7) {Security Monitoring}</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) {Implementation 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 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
Create a production-grade JWT authentication design that removes all browser-accessible token storage and closes the common exploit paths (XSS token harvesting, token replay after theft, session hijacking). The deliverable must explain exactly how to implement HTTP-only cookie auth, silent refresh, server-side validation, and secure sign-out—complete with code patterns and operational monitoring guidance.

## PERSONA
Act as an ex–security advisor focused on real-world auth failures. You think in attacker workflows first, favor defenses that are transparent to legitimate users, and you translate security intent into implementable engineering steps for modern web stacks.

## CONSTRAINTS
- Prioritize architectures where tokens are never read or stored by client JavaScript.
- Use HTTP-only cookies as the primary transport for session credentials.
- Include CSRF defenses appropriate for cookie-based auth.
- Provide specific configuration values/patterns (cookie flags, headers, rotation rules, middleware structure), not vague best practices.
- Keep the front end free of token logic; the server owns issuance, refresh, and invalidation.
- Include explicit handling for expiration, tampering, reuse, clock skew, and logout races.
- Add practical logging/monitoring signals for auth abuse detection.
- If inputs are missing or unclear, ask targeted questions and provide safe default assumptions labeled as such.

## PROCESS
1. **Pre-Analysis Step (required):** Briefly restate the scenario in your own words and list any assumptions you’ll use.
2. Propose the end-to-end auth flow (login → authenticated requests → refresh → logout).
3. Define token model: access vs refresh token responsibilities, lifetimes, rotation, and server-side invalidation strategy.
4. Specify cookie settings and security headers for the given stack/environment.
5. Provide middleware patterns for request authentication and user-context attachment.
6. Detail error behavior (what the client sees vs what gets logged) for each failure mode.
7. Add monitoring guidance (events, metrics, alerts) tuned for token abuse.
8. Finish with an implementation checklist that engineers can follow and verify.

### What This Is NOT (scope boundaries)
- Not a generic “JWT overview” or cryptography primer.
- Not a recommendation to store tokens in localStorage/sessionStorage.
- Not a substitute for a full penetration test or legal compliance review.
- Not a one-size-fits-all SSO/OAuth redesign unless explicitly requested.

## INPUTS
- **Application type:** [FORMAT]
- **Current tech stack (frameworks, runtime, hosting, reverse proxy):** [CONTEXT]
- **Security/compliance requirements (e.g., SOC2, HIPAA, PCI, GDPR):** [CHALLENGE]
- **Desired session length (idle + absolute):** [TIMEFRAME]
- **Existing authentication issues/vulnerabilities observed:** [PRODUCT_DESCRIPTION]

## OUTPUT SPECIFICATION
Use the following sections and include implementation-ready detail in each:

### 1) {Security Architecture}
- Threat model summary: {Primary Threats} and {Excluded Threats}
- Recommended JWT layout: {Token Types}, {Claims}, {Signing Algorithm}, {Key Management}
- Session strategy: {Access Lifetime}, {Refresh Lifetime}, {Rotation Policy}, {Revocation Approach}
- Request flow diagram (text): {Flow Steps}

### 2) {Cookie Implementation}
- Cookie set(s) required: {Cookie Names} and purposes
- Exact cookie attributes with rationale:
  - {HttpOnly}, {Secure}, {SameSite}, {Domain}, {Path}, {MaxAge}
- Required headers &amp; platform controls:
  - {CSP Guidance}, {HSTS}, {X-Content-Type-Options}, {Referrer-Policy}
- CSRF protections for cookie auth:
  - {CSRF Pattern} (e.g., double-submit or synchronizer token) and when to enforce it

### 3) {Token Refresh System}
- Refresh endpoint design: {Route}, {Expected Cookies}, {Response Behavior}
- Rotation &amp; reuse detection: {How You Detect Replay}, {What You Invalidate}
- Concurrency handling: {Multiple Tabs Strategy} and {Race Resolution}
- Example server pseudo/code: {Refresh Handler Example}

### 4) {Validation Middleware}
- Middleware responsibilities: {Verification Steps} (signature, exp/nbf, issuer/audience, jti, user status)
- User context attachment: {User Context Shape}
- Authorization hooks: {RBAC/ABAC Extension Points}
- Example middleware pseudo/code: {Middleware Example}

### 5) {Logout Security}
- Logout types: {Client-Initiated Logout} and {Server-Forced Logout}
- Invalidation design: {Blacklist/Allowlist/Session Store} and retention window
- Cookie clearing strategy: {Clear Cookie Rules} (path/domain alignment)
- Example endpoint pseudo/code: {Logout Handler Example}

### 6) {Frontend Integration}
- Frontend request rules: {Fetch/XHR Settings} (credentials mode, CORS interaction)
- UI auth state approach: {Session Check Endpoint} and caching guidance
- No-token guarantee: explicitly state what the frontend must never do

### 7) {Security Monitoring}
- Error taxonomy: {Client-Facing Errors} vs {Server Logs}
- Log events to capture: {Auth Event List} (failed verification, refresh reuse, abnormal IP/UA shifts)
- Metrics &amp; alerts: {Alert Conditions} and {Suggested Thresholds}
- Incident response notes: {Triage Steps} for suspected token theft

### 8) {Implementation Checklist}
Provide a step-by-step list where each step includes:
- {Step}
- {How To Implement}
- {How To Verify}
- {Failure Modes To Test}

## QUALITY CHECKS
At the end, include a verification list confirming:
- Tokens are never accessible to client JavaScript (no localStorage/sessionStorage, no JS-readable cookies).
- Cookies use appropriate flags and CSRF protections are enforced where needed.
- Refresh rotation + reuse detection is defined and implementable server-side.
- Middleware validates all critical claims and handles clock skew/tampering safely.
- Logout reliably invalidates sessions and clears cookies without path/domain mismatches.            </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 JWT authentication design that removes all browser-accessible token storage and closes the common exploit paths (XSS token harvesting, token replay after theft, session hijacking). The deliverable must explain exactly how to implement HTTP-only cookie auth, silent refresh, server-side validation, and secure sign-out\u2014complete with code patterns and operational monitoring guidance.\r\n\r\n## PERSONA\r\nAct as an ex\u2013security advisor focused on real-world auth failures. You think in attacker workflows first, favor defenses that are transparent to legitimate users, and you translate security intent into implementable engineering steps for modern web stacks.\r\n\r\n## CONSTRAINTS\r\n- Prioritize architectures where tokens are never read or stored by client JavaScript.\r\n- Use HTTP-only cookies as the primary transport for session credentials.\r\n- Include CSRF defenses appropriate for cookie-based auth.\r\n- Provide specific configuration values\/patterns (cookie flags, headers, rotation rules, middleware structure), not vague best practices.\r\n- Keep the front end free of token logic; the server owns issuance, refresh, and invalidation.\r\n- Include explicit handling for expiration, tampering, reuse, clock skew, and logout races.\r\n- Add practical logging\/monitoring signals for auth abuse detection.\r\n- If inputs are missing or unclear, ask targeted questions and provide safe default assumptions labeled as such.\r\n\r\n## PROCESS\r\n1. **Pre-Analysis Step (required):** Briefly restate the scenario in your own words and list any assumptions you\u2019ll use.\r\n2. Propose the end-to-end auth flow (login \u2192 authenticated requests \u2192 refresh \u2192 logout).\r\n3. Define token model: access vs refresh token responsibilities, lifetimes, rotation, and server-side invalidation strategy.\r\n4. Specify cookie settings and security headers for the given stack\/environment.\r\n5. Provide middleware patterns for request authentication and user-context attachment.\r\n6. Detail error behavior (what the client sees vs what gets logged) for each failure mode.\r\n7. Add monitoring guidance (events, metrics, alerts) tuned for token abuse.\r\n8. Finish with an implementation checklist that engineers can follow and verify.\r\n\r\n### What This Is NOT (scope boundaries)\r\n- Not a generic \u201cJWT overview\u201d or cryptography primer.\r\n- Not a recommendation to store tokens in localStorage\/sessionStorage.\r\n- Not a substitute for a full penetration test or legal compliance review.\r\n- Not a one-size-fits-all SSO\/OAuth redesign unless explicitly requested.\r\n\r\n## INPUTS\r\n- **Application type:** [FORMAT]\r\n- **Current tech stack (frameworks, runtime, hosting, reverse proxy):** [CONTEXT]\r\n- **Security\/compliance requirements (e.g., SOC2, HIPAA, PCI, GDPR):** [CHALLENGE]\r\n- **Desired session length (idle + absolute):** [TIMEFRAME]\r\n- **Existing authentication issues\/vulnerabilities observed:** [PRODUCT_DESCRIPTION]\r\n\r\n## OUTPUT SPECIFICATION\r\nUse the following sections and include implementation-ready detail in each:\r\n\r\n### 1) {Security Architecture}\r\n- Threat model summary: {Primary Threats} and {Excluded Threats}\r\n- Recommended JWT layout: {Token Types}, {Claims}, {Signing Algorithm}, {Key Management}\r\n- Session strategy: {Access Lifetime}, {Refresh Lifetime}, {Rotation Policy}, {Revocation Approach}\r\n- Request flow diagram (text): {Flow Steps}\r\n\r\n### 2) {Cookie Implementation}\r\n- Cookie set(s) required: {Cookie Names} and purposes\r\n- Exact cookie attributes with rationale:\r\n  - {HttpOnly}, {Secure}, {SameSite}, {Domain}, {Path}, {MaxAge}\r\n- Required headers & platform controls:\r\n  - {CSP Guidance}, {HSTS}, {X-Content-Type-Options}, {Referrer-Policy}\r\n- CSRF protections for cookie auth:\r\n  - {CSRF Pattern} (e.g., double-submit or synchronizer token) and when to enforce it\r\n\r\n### 3) {Token Refresh System}\r\n- Refresh endpoint design: {Route}, {Expected Cookies}, {Response Behavior}\r\n- Rotation & reuse detection: {How You Detect Replay}, {What You Invalidate}\r\n- Concurrency handling: {Multiple Tabs Strategy} and {Race Resolution}\r\n- Example server pseudo\/code: {Refresh Handler Example}\r\n\r\n### 4) {Validation Middleware}\r\n- Middleware responsibilities: {Verification Steps} (signature, exp\/nbf, issuer\/audience, jti, user status)\r\n- User context attachment: {User Context Shape}\r\n- Authorization hooks: {RBAC\/ABAC Extension Points}\r\n- Example middleware pseudo\/code: {Middleware Example}\r\n\r\n### 5) {Logout Security}\r\n- Logout types: {Client-Initiated Logout} and {Server-Forced Logout}\r\n- Invalidation design: {Blacklist\/Allowlist\/Session Store} and retention window\r\n- Cookie clearing strategy: {Clear Cookie Rules} (path\/domain alignment)\r\n- Example endpoint pseudo\/code: {Logout Handler Example}\r\n\r\n### 6) {Frontend Integration}\r\n- Frontend request rules: {Fetch\/XHR Settings} (credentials mode, CORS interaction)\r\n- UI auth state approach: {Session Check Endpoint} and caching guidance\r\n- No-token guarantee: explicitly state what the frontend must never do\r\n\r\n### 7) {Security Monitoring}\r\n- Error taxonomy: {Client-Facing Errors} vs {Server Logs}\r\n- Log events to capture: {Auth Event List} (failed verification, refresh reuse, abnormal IP\/UA shifts)\r\n- Metrics & alerts: {Alert Conditions} and {Suggested Thresholds}\r\n- Incident response notes: {Triage Steps} for suspected token theft\r\n\r\n### 8) {Implementation Checklist}\r\nProvide a step-by-step list where each step includes:\r\n- {Step}\r\n- {How To Implement}\r\n- {How To Verify}\r\n- {Failure Modes To Test}\r\n\r\n## QUALITY CHECKS\r\nAt the end, include a verification list confirming:\r\n- Tokens are never accessible to client JavaScript (no localStorage\/sessionStorage, no JS-readable cookies).\r\n- Cookies use appropriate flags and CSRF protections are enforced where needed.\r\n- Refresh rotation + reuse detection is defined and implementable server-side.\r\n- Middleware validates all critical claims and handles clock skew\/tampering safely.\r\n- Logout reliably invalidates sessions and clears cookies without path\/domain mismatches.";
    const variables = ["[FORMAT]","[CONTEXT]","[CHALLENGE]","[TIMEFRAME]","[PRODUCT_DESCRIPTION]"];
    // 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>State your client type and API topology.</strong> Tell the prompt if you have an SPA hitting a separate API domain, a monolith, or a BFF (backend-for-frontend). Add one line like: “Frontend: Next.js on app.example.com, API: api.example.com behind ALB” so cookie domain/path and CORS/CSRF details come out correctly.</li>


<li><strong>Ask for a concrete cookie matrix.</strong> After the first output, follow up with: “Give me the exact cookie names, flags, domain/path scope, and max-age for access, refresh, and CSRF cookies.” This forces specific values instead of generalities and makes implementation reviews easier.</li>


<li><strong>Force reuse-detection and logout race handling.</strong> Many designs skip this, and frankly it’s where real incidents live. Prompt: “Include refresh token rotation with reuse detection, and explain what happens when a stolen refresh is used after the legit client already rotated.”</li>


<li><strong>Iterate on error behavior, not just security.</strong> Once you get the secure flow, ask: “Now rewrite the client-visible errors and retry rules to avoid infinite refresh loops; include examples for 401 vs 403 vs 419 (CSRF) responses.” The goal is secure and calm UX.</li>


<li><strong>Make it operational by requesting log schemas.</strong> Add: “Provide a JSON log example for login, refresh, refresh-deny (replay), and logout, including fields like user_id, session_id, token_family_id, ip_hash, user_agent_hash, and reason codes.” That turns a design into something your SIEM can use.</li>

</ul>

</div>

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

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



<p>Once your auth flow is designed, you’ll usually need check-in systems and onboarding workflows to roll it out safely across teams and customers.</p>



<p>If you also need a structured way to keep users engaged after launch (and catch issues early), <a href="https://flowpast.com/prompts/build-a-customer-check-in-system-with-this-ai-prompt/">Build a Customer Check-In System with this AI Prompt</a> helps you design a repeatable cadence, questions, and follow-ups. It pairs well with security changes because cookie/auth migrations often create subtle friction, and proactive check-ins surface it before churn does.</p>



<p>For teams doing internal rollouts, <a href="https://flowpast.com/prompts/build-a-first-week-onboarding-checklist-with-this-ai-prompt/">Build a First-Week Onboarding Checklist with this AI Prompt</a> can turn your new auth requirements into a clear first-week plan for engineers and support. Use it when you’re standardizing cookie flags, CSRF expectations, or logging fields across repos and want fewer “but I didn’t know” surprises.</p>



<p>Security work can be intense, and burn-out makes mistakes more likely. When you want to spot process strain while you’re pushing important changes, <a href="https://flowpast.com/prompts/workplace-well-being-diagnosis-and-action-plan-ai-prompt/">Workplace Well-Being Diagnosis and Action Plan AI Prompt</a> gives you a practical way to diagnose team bottlenecks, on-call pain, and workflow gaps that often show up during auth or infrastructure migrations.</p>


<br>


<p>Quick reference:</p>



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

<li><a href="https://flowpast.com/prompts/build-a-customer-check-in-system-with-this-ai-prompt/">Build a Customer Check-In System with this AI Prompt</a>: Create cadence, questions, and follow-up workflow.</li>


<li><a href="https://flowpast.com/prompts/build-a-first-week-onboarding-checklist-with-this-ai-prompt/">Build a First-Week Onboarding Checklist with this AI Prompt</a>: Turn changes into clear week-one tasks.</li>

<li><a href="https://flowpast.com/prompts/workplace-well-being-diagnosis-and-action-plan-ai-prompt/">Workplace Well-Being Diagnosis and Action Plan AI Prompt</a>: Identify bottlenecks and reduce rollout stress.</li>


<li><a href="https://flowpast.com/prompts/build-a-recurring-life-check-in-worksheet-ai-prompt/">Build a Recurring Life Check-In Worksheet AI Prompt</a>: Build a repeatable self-review structure.</li>


<li><a href="https://flowpast.com/prompts/build-a-shame-free-spending-check-in-with-this-ai-prompt/">Build a Shame-Free Spending Check-In with this AI Prompt</a>: Create a clear spending review routine.</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 cookie-based JWT auth AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>Backend engineers</strong> use this to turn “use HttpOnly cookies” into an actual flow with middleware, rotation, and server-side invalidation. <strong>Frontend leads</strong> benefit because the design keeps the UI free of token storage and refresh logic, reducing fragile client code and weird edge cases. <strong>Security engineers</strong> apply it to threat-model common exploit paths (XSS harvesting, replay, session fixation) and verify controls like CSRF defense and reuse detection. <strong>Engineering managers</strong> use the deliverable as a rollout reference so multiple services implement the same cookie flags, error behavior, and logging fields.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Which industries get the most value from this cookie-based JWT auth AI prompt?</span>
<!-- wp:paragraph -->
<p class="answer"><strong>SaaS companies</strong> get value because multi-tenant apps often face strict security questionnaires, and a documented cookie-based JWT approach with rotation and monitoring answers them cleanly. <strong>E-commerce brands</strong> benefit when checkout and account areas are frequent XSS targets; keeping tokens out of JavaScript reduces the blast radius of a front-end bug. <strong>Fintech and regulated products</strong> use this to align session handling with compliance expectations like strong logout behavior, session invalidation, and audit-friendly logs. <strong>Agencies building web platforms for clients</strong> can standardize an auth baseline across projects, which makes delivery faster and reduces “custom auth” liability.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Why do basic AI prompts for designing cookie-based JWT auth flows produce weak results?</span>
<!-- wp:paragraph -->
<p class="answer">A typical prompt like &#8220;<em>Write me a secure JWT auth system using cookies</em>&#8221; fails because it: lacks concrete rotation and reuse-detection rules, provides no middleware structure for verification and user-context attachment, ignores CSRF mechanics that are mandatory for cookie credentials, produces vague “set HttpOnly and Secure” advice instead of exact cookie/header patterns, and misses operational guidance like logging fields and alertable signals. You end up with something that sounds secure but falls apart under replay, logout races, and real attacker workflows.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Can I customize this cookie-based JWT auth prompt for my specific situation?</span>
<!-- wp:paragraph -->
<p class="answer">Yes. The fastest way is to prepend your environment details (SPA vs server-rendered, single domain vs subdomains, mobile clients, and whether you have a gateway/proxy that terminates TLS). Then ask for stack-specific output, for example: “Assume Node/Express + Next.js behind Cloudflare; give cookie Domain/Path, SameSite choice, CSRF header pattern, and middleware pseudocode.” If you have unusual constraints (cross-site embeds, third-party IdP, multiple APIs), say so up front and request “safe defaults” plus alternative options with tradeoffs.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">What are the most common mistakes when using this cookie-based JWT auth prompt?</span>
<!-- wp:paragraph -->
<p class="answer">The biggest mistake is leaving the deployment topology vague—instead of “a web app,” say “SPA on app.example.com calling api.example.com with credentials included.” Another common error is not asking for explicit CSRF handling; “we use cookies” is not enough, so request a specific double-submit or origin/CSRF-header pattern and when to enforce it. Teams also forget to demand refresh rotation details, which leads to replayable refresh tokens; ask for “rotation plus server-side reuse detection” and what happens on reuse. Finally, people skip monitoring outputs; insist on a list of log fields and sample events so you can detect refresh storms, invalid signature spikes, and suspicious geo/IP changes.</p>
<!-- /wp:paragraph -->
</div>

<div class="faq-item">
<span class="question">Who should NOT use this cookie-based JWT auth prompt?</span>
<!-- wp:paragraph -->
<p class="answer">This prompt isn’t ideal for teams that need a minimal, one-endpoint demo and won’t implement rotation, invalidation, and monitoring. It’s also a poor fit if your product is strictly non-browser (for example, machine-to-machine APIs) where cookies and CSRF simply aren’t the right tools. And if you have not validated basic requirements like session duration, device trust rules, or logout expectations, the design may feel too “heavy” too early. In those cases, start by documenting requirements and threat model scope, then come back to this prompt for the production-ready version.</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 cookie-based JWT auth AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Backend engineers use this to turn “use HttpOnly cookies” into an actual flow with middleware, rotation, and server-side invalidation. Frontend leads benefit because the design keeps the UI free of token storage and refresh logic, reducing fragile client code and weird edge cases. Security engineers apply it to threat-model common exploit paths (XSS harvesting, replay, session fixation) and verify controls like CSRF defense and reuse detection. Engineering managers use the deliverable as a rollout reference so multiple services implement the same cookie flags, error behavior, and logging fields."
      }
    },
    {
      "@type": "Question",
      "name": "Which industries get the most value from this cookie-based JWT auth AI prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "SaaS companies get value because multi-tenant apps often face strict security questionnaires, and a documented cookie-based JWT approach with rotation and monitoring answers them cleanly. E-commerce brands benefit when checkout and account areas are frequent XSS targets; keeping tokens out of JavaScript reduces the blast radius of a front-end bug. Fintech and regulated products use this to align session handling with compliance expectations like strong logout behavior, session invalidation, and audit-friendly logs. Agencies building web platforms for clients can standardize an auth baseline across projects, which makes delivery faster and reduces “custom auth” liability."
      }
    },
    {
      "@type": "Question",
      "name": "Why do basic AI prompts for designing cookie-based JWT auth flows produce weak results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "A typical prompt like \"Write me a secure JWT auth system using cookies\" fails because it: lacks concrete rotation and reuse-detection rules, provides no middleware structure for verification and user-context attachment, ignores CSRF mechanics that are mandatory for cookie credentials, produces vague “set HttpOnly and Secure” advice instead of exact cookie/header patterns, and misses operational guidance like logging fields and alertable signals. You end up with something that sounds secure but falls apart under replay, logout races, and real attacker workflows."
      }
    },
    {
      "@type": "Question",
      "name": "Can I customize this cookie-based JWT auth prompt for my specific situation?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes. The fastest way is to prepend your environment details (SPA vs server-rendered, single domain vs subdomains, mobile clients, and whether you have a gateway/proxy that terminates TLS). Then ask for stack-specific output, for example: “Assume Node/Express + Next.js behind Cloudflare; give cookie Domain/Path, SameSite choice, CSRF header pattern, and middleware pseudocode.” If you have unusual constraints (cross-site embeds, third-party IdP, multiple APIs), say so up front and request “safe defaults” plus alternative options with tradeoffs."
      }
    },
    {
      "@type": "Question",
      "name": "What are the most common mistakes when using this cookie-based JWT auth prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The biggest mistake is leaving the deployment topology vague—instead of “a web app,” say “SPA on app.example.com calling api.example.com with credentials included.” Another common error is not asking for explicit CSRF handling; “we use cookies” is not enough, so request a specific double-submit or origin/CSRF-header pattern and when to enforce it. Teams also forget to demand refresh rotation details, which leads to replayable refresh tokens; ask for “rotation plus server-side reuse detection” and what happens on reuse. Finally, people skip monitoring outputs; insist on a list of log fields and sample events so you can detect refresh storms, invalid signature spikes, and suspicious geo/IP changes."
      }
    },
    {
      "@type": "Question",
      "name": "Who should NOT use this cookie-based JWT auth prompt?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "This prompt isn’t ideal for teams that need a minimal, one-endpoint demo and won’t implement rotation, invalidation, and monitoring. It’s also a poor fit if your product is strictly non-browser (for example, machine-to-machine APIs) where cookies and CSRF simply aren’t the right tools. And if you have not validated basic requirements like session duration, device trust rules, or logout expectations, the design may feel too “heavy” too early. In those cases, start by documenting requirements and threat model scope, then come back to this prompt for the production-ready version."
      }
    }
  ]
}
</script>
</div>

<div class="closing-section">
<!-- wp:paragraph -->
<p>Auth is either calm or chaotic. This prompt helps you design the calm version, with cookies, CSRF defense, rotation, and monitoring spelled out so you can implement it with confidence.</p>
<!-- /wp:paragraph -->
</div>]]></content:encoded>
					
		
		
		<media:content url="https://flowpast.s3.eu-north-1.amazonaws.com/featured_blog_images/5001439.webp" medium="image"></media:content>
            	</item>
	</channel>
</rss>
