{"id":286,"date":"2025-08-09T08:41:48","date_gmt":"2025-08-09T08:41:48","guid":{"rendered":"https:\/\/paultrowler.com\/wordpress\/?page_id=286"},"modified":"2026-01-03T06:59:55","modified_gmt":"2026-01-03T06:59:55","slug":"research-proposal-developer-finalised-2","status":"publish","type":"page","link":"https:\/\/paultrowler.com\/wordpress\/index.php\/research-proposal-developer-finalised-2\/","title":{"rendered":"Chapter 2: Research Proposal Developer"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\" \/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" \/>\n    <title>Research Proposal Developer<\/title>\n    <!-- Tailwind CSS -->\n    <script src=\"https:\/\/cdn.tailwindcss.com\"><\/script>\n    <!-- Google Fonts: Inter -->\n    <link rel=\"preconnect\" href=\"https:\/\/fonts.googleapis.com\" \/>\n    <link rel=\"preconnect\" href=\"https:\/\/fonts.gstatic.com\" crossorigin \/>\n    <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Inter:wght@400;500;600;700&#038;display=swap\" rel=\"stylesheet\" \/>\n    <style>\n        body { font-family: 'Inter', sans-serif; }\n        .stage-card { display: none; }\n        .stage-card.active { display: block; }\n        .prompt-segment { border-left: 4px solid #3b82f6; padding-left: 1rem; margin: 1rem 0; }\n        .prompt-segment h4 { font-weight: 600; color: #1e40af; }\n        .prompt-segment-content { color: #4b5563; font-style: italic; }\n        .prompt-gap { background-color: #fef9c3; color: #92400e; padding: 1px 5px; border-radius: 4px; font-weight: 600; font-family: monospace; transition: all 0.3s ease; }\n        .prompt-gap-filled { background-color: #dcfce7; color: #166534; }\n        .sr-only:not(:focus):not(:active) { \n          position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; \n          overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; \n        }\n        .crumb { display:flex; align-items:center; gap:.5rem; cursor:pointer; }\n        .crumb .dot{ width:1.75rem; height:1.75rem; border-radius:9999px; display:flex; align-items:center; justify-content:center; font-weight:600;}\n        .crumb.active .dot{ background:#1d4ed8; color:white; }\n        .crumb.done .dot{ background:#bfdbfe; color:#1e3a8a; }\n        .crumb.pending .dot{ background:#e5e7eb; color:#374151; }\n        .crumb .label{ font-weight:600; color:#1e40af; font-size:.95rem;}\n        .crumb .sub{ font-size:.8rem; color:#475569; }\n    <\/style>\n<\/head>\n<body class=\"bg-blue-50 text-slate-800\">\n<a href=\"#main\" class=\"sr-only bg-white text-blue-800 px-3 py-2 rounded shadow\">Skip to main content<\/a>\n\n<div class=\"container mx-auto max-w-7xl px-4 py-6 sm:py-8\" id=\"main\" role=\"main\" aria-labelledby=\"page-title\">\n\n    <!-- Header -->\n    <div class=\"mb-6 bg-white p-6 rounded-xl shadow-md border border-blue-200\">\n        <h1 id=\"page-title\" class=\"text-2xl font-bold text-blue-800 mb-2\">Research Proposal Developer<\/h1>\n        <p class=\"text-sm text-slate-700\">\n          This tool will guide you through four stages to develop a research proposal, from a broad idea to a structured plan. The four stages are:\n          The Spark (refining your idea), The Problem (defining your research questions), The Approach (outlining your methodology), and The Plan (structuring your proposal).\n          At each stage, you will provide input which will build a cumulative prompt for an AI.\n          Tip: You can step through the stages after completing the input boxes or, if you wish, click on one of the four boxes below to visit that stage.\n        <\/p>\n\n        <!-- Breadcrumb \/ Stepper -->\n        <nav aria-label=\"Progress\" class=\"mt-4\">\n          <ol class=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3\" id=\"pt-breadcrumb\">\n            <li class=\"crumb pending\" data-stage=\"1\">\n              <div class=\"bg-blue-50\/60 rounded-xl border border-blue-100 p-3 flex items-center gap-3\">\n                <div class=\"dot\" aria-hidden=\"true\">1<\/div>\n                <div>\n                  <div class=\"label\">The Spark<\/div>\n                  <div class=\"sub\">Refine idea<\/div>\n                <\/div>\n              <\/div>\n            <\/li>\n            <li class=\"crumb pending\" data-stage=\"2\">\n              <div class=\"bg-blue-50\/60 rounded-xl border border-blue-100 p-3 flex items-center gap-3\">\n                <div class=\"dot\" aria-hidden=\"true\">2<\/div>\n                <div>\n                  <div class=\"label\">The Problem<\/div>\n                  <div class=\"sub\">Define questions<\/div>\n                <\/div>\n              <\/div>\n            <\/li>\n            <li class=\"crumb pending\" data-stage=\"3\">\n              <div class=\"bg-blue-50\/60 rounded-xl border border-blue-100 p-3 flex items-center gap-3\">\n                <div class=\"dot\" aria-hidden=\"true\">3<\/div>\n                <div>\n                  <div class=\"label\">The Approach<\/div>\n                  <div class=\"sub\">Methodology<\/div>\n                <\/div>\n              <\/div>\n            <\/li>\n            <li class=\"crumb pending\" data-stage=\"4\">\n              <div class=\"bg-blue-50\/60 rounded-xl border border-blue-100 p-3 flex items-center gap-3\">\n                <div class=\"dot\" aria-hidden=\"true\">4<\/div>\n                <div>\n                  <div class=\"label\">The Plan<\/div>\n                  <div class=\"sub\">Structure<\/div>\n                <\/div>\n              <\/div>\n            <\/li>\n          <\/ol>\n        <\/nav>\n    <\/div>\n\n    <!-- Main Content Grid -->\n    <div class=\"grid grid-cols-1 lg:grid-cols-2 gap-6\" aria-describedby=\"flow-desc\">\n        <!-- Left Pane: Input Fields -->\n        <div class=\"bg-white p-6 rounded-xl shadow-md border border-blue-200\">\n            \n            <!-- Stage 1 Card -->\n            <div id=\"stage-1-card\" class=\"stage-card active\" aria-labelledby=\"stage-1-heading\">\n                <h2 id=\"stage-1-heading\" class=\"text-xl font-bold mb-1 text-blue-800\" tabindex=\"-1\">Stage 1: The Spark &#8211; Refining Your Idea<\/h2>\n                \n                <section id=\"pt-project-summary-block\" class=\"relative isolate mt-3 mb-4\" aria-labelledby=\"project-summary-title\">\n                  <div class=\"rounded-2xl border border-blue-200 bg-white shadow-sm\">\n                    <div class=\"border-b border-blue-100 bg-blue-50\/60 rounded-t-2xl px-4 sm:px-6 py-3 flex items-center gap-3\">\n                      <div class=\"h-8 w-8 flex items-center justify-center rounded-full bg-blue-100 text-blue-800 font-semibold\" aria-hidden=\"true\">1<\/div>\n                      <h3 id=\"project-summary-title\" class=\"m-0 text-base sm:text-lg font-semibold text-blue-900\">Copy, write or speak your initial idea here<\/h3>\n                    <\/div>\n                    <div class=\"p-4 sm:p-6 space-y-3\">\n                      <p id=\"flow-desc\" class=\"text-sm text-blue-900\/80 leading-relaxed\">\n                        Paste the short summary you created in \n                        <a href=\"https:\/\/paultrowler.com\/wordpress\/index.php\/helping-ai-to-understand-your-research-project\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"underline text-blue-700 hover:text-blue-900\">\n                          Chapter 1 \u2014 Helping AI Understand Your Research Project\n                        <\/a>. \n                        Make any updates you need to. Tools on this page will tailor their feedback using this summary. \n\nAlternatively you can write here your initial ideas for your research proposal &#8211; or use the microphone to speak them. Try to be as comprehensive as you can about the problem you are addressing, the context you want to investigate, the research methods you think you may use and the reason why you think this topic is important. The more detail you give, the better will be the subsequent dialogue with AI.\n                      <\/p>\n                      <div>\n                        <label for=\"pt-project-summary\" class=\"block text-sm font-medium text-blue-900 mb-2\">Your project summary<\/label>\n                        <textarea id=\"pt-project-summary\" class=\"w-full min-h-[13rem] rounded-xl border border-blue-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-200\/70 px-3 py-2 text-[15px] leading-relaxed\" placeholder=\"\" aria-describedby=\"project-summary-title flow-desc\"><\/textarea>\n                        <div class=\"mt-3 flex flex-wrap items-center gap-2 text-xs text-blue-900\/70\">\n                          <button type=\"button\" id=\"pt-clear-summary\" class=\"inline-flex items-center gap-1 rounded-full border border-blue-200 px-3 py-1 hover:bg-blue-50 active:bg-blue-100\">Clear<\/button>\n                        <\/div>\n                      <\/div>\n\n                      <div class=\"mt-4 space-y-3\">\n                        <button type=\"button\" class=\"copy-open-btn w-full flex items-center justify-center py-2 px-4 border border-blue-300 rounded-md shadow-sm text-sm font-medium text-white bg-blue-700 hover:bg-blue-800 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\">\n                          <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" class=\"h-4 w-4 mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\n                            <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\"><\/path>\n                          <\/svg>\n                          <span>Copy prompt &#038; open ChatGPT in a new tab<\/span>\n                        <\/button>\n\n                        <p class=\"text-[11px] leading-snug text-slate-600\">\n                          For security reasons, the browser can only copy the text to your clipboard. You still need to paste it manually into ChatGPT after the new tab opens.\n                        <\/p>\n                      <\/div>\n                    <\/div>\n                  <\/div>\n                <\/section>\n            <\/div>\n\n            <!-- Stage 2 Card -->\n            <div id=\"stage-2-card\" class=\"stage-card\" aria-labelledby=\"stage-2-heading\">\n                <h2 id=\"stage-2-heading\" class=\"text-xl font-bold mb-1 text-blue-800\" tabindex=\"-1\">Stage 2: The Problem &#8211; Defining Your Research Questions<\/h2>\n                <p class=\"text-sm text-slate-600 mb-4\">Now, let&#8217;s refine your idea into a clear research problem and specific questions.<\/p>\n                <label for=\"stage-2-input\" class=\"block text-xs font-medium text-slate-700 mb-1\">Based on the AI&#8217;s feedback from Stage 1, describe a more focused research problem. What specific questions do you want to answer?<\/label>\n                <textarea id=\"stage-2-input\" class=\"w-full px-3 py-2 text-sm bg-blue-50 border border-blue-200 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500\" placeholder=\"\" rows=\"12\"><\/textarea>\n\n                <div class=\"mt-4 space-y-6\">\n                  <button type=\"button\" class=\"copy-open-btn w-full flex items-center justify-center py-2 px-4 border border-blue-300 rounded-md shadow-sm text-sm font-medium text-white bg-blue-700 hover:bg-blue-800 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\">\n                    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" class=\"h-4 w-4 mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\n                      <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\"><\/path>\n                    <\/svg>\n                    <span>Copy prompt &#038; open ChatGPT in a new tab<\/span>\n                  <\/button>\n\n                  <p class=\"text-[11px] leading-snug text-slate-600\">\n                    For security reasons, the browser can only copy the text to your clipboard. You still need to paste it manually into ChatGPT after the new tab opens.\n                  <\/p>\n\n                  <button type=\"button\" class=\"w-full flex justify-center py-2 px-4 border border-blue-300 rounded-md shadow-sm text-sm font-medium text-blue-700 bg-white hover:bg-blue-50\" aria-controls=\"stage-1-card\" data-go-stage=\"1\">&larr; Back to Stage 1<\/button>\n                <\/div>\n            <\/div>\n\n            <!-- Stage 3 Card -->\n            <div id=\"stage-3-card\" class=\"stage-card\" aria-labelledby=\"stage-3-heading\">\n                <h2 id=\"stage-3-heading\" class=\"text-xl font-bold mb-1 text-blue-800\" tabindex=\"-1\">Stage 3: The Approach &#8211; Outlining Your Methodology<\/h2>\n                <p class=\"text-sm text-slate-600 mb-4\">With clear questions, let&#8217;s think about methodology. How will you answer your questions?<\/p>\n                <label for=\"stage-3-input\" class=\"block text-xs font-medium text-slate-700 mb-1\">Based on the AI&#8217;s feedback from Stage 2, describe your proposed methodology. Consider your philosophical stance, context, sample, and data collection methods.<\/label>\n                <textarea id=\"stage-3-input\" class=\"w-full px-3 py-2 text-sm bg-blue-50 border border-blue-200 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500\" placeholder=\"\" rows=\"12\"><\/textarea>\n\n                <div class=\"mt-4 space-y-6\">\n                  <button type=\"button\" class=\"copy-open-btn w-full flex items-center justify-center py-2 px-4 border border-blue-300 rounded-md shadow-sm text-sm font-medium text-white bg-blue-700 hover:bg-blue-800 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\">\n                    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" class=\"h-4 w-4 mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\n                      <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\"><\/path>\n                    <\/svg>\n                    <span>Copy prompt &#038; open ChatGPT in a new tab<\/span>\n                  <\/button>\n\n                  <p class=\"text-[11px] leading-snug text-slate-600\">\n                    For security reasons, the browser can only copy the text to your clipboard. You still need to paste it manually into ChatGPT after the new tab opens.\n                  <\/p>\n\n                  <button type=\"button\" class=\"w-full flex justify-center py-2 px-4 border border-blue-300 rounded-md shadow-sm text-sm font-medium text-blue-700 bg-white hover:bg-blue-50\" aria-controls=\"stage-2-card\" data-go-stage=\"2\">&larr; Back to Stage 2<\/button>\n                <\/div>\n            <\/div>\n\n            <!-- Stage 4 Card -->\n            <div id=\"stage-4-card\" class=\"stage-card\" aria-labelledby=\"stage-4-heading\">\n                <h2 id=\"stage-4-heading\" class=\"text-xl font-bold mb-1 text-blue-800\" tabindex=\"-1\">Stage 4: The Plan &#8211; Structuring Your Proposal<\/h2>\n                <p class=\"text-sm text-slate-600 mb-4\">Let&#8217;s bring it all together into a proposal structure. Add any final details.<\/p>\n                <label for=\"stage-4-input\" class=\"block text-xs font-medium text-slate-700 mb-1\">Based on the AI&#8217;s feedback from Stage 3, add any further details needed to complete your proposal outline. Think about literature, timeline, or ethical considerations.<\/label>\n                <textarea id=\"stage-4-input\" class=\"w-full px-3 py-2 text-sm bg-blue-50 border border-blue-200 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500\" placeholder=\"\" rows=\"12\"><\/textarea>\n\n                <div class=\"mt-4 space-y-6\">\n                  <button type=\"button\" class=\"copy-open-btn w-full flex items-center justify-center py-2 px-4 border border-blue-300 rounded-md shadow-sm text-sm font-medium text-white bg-blue-700 hover:bg-blue-800 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\">\n                    <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" class=\"h-4 w-4 mr-2\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" aria-hidden=\"true\">\n                      <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z\"><\/path>\n                    <\/svg>\n                    <span>Copy prompt &#038; open ChatGPT in a new tab<\/span>\n                  <\/button>\n\n                  <p class=\"text-[11px] leading-snug text-slate-600\">\n                    For security reasons, the browser can only copy the text to your clipboard. You still need to paste it manually into ChatGPT after the new tab opens.\n                  <\/p>\n\n                  <button type=\"button\" class=\"w-full flex justify-center py-2 px-4 border border-blue-300 rounded-md shadow-sm text-sm font-medium text-blue-700 bg-white hover:bg-blue-50\" aria-controls=\"stage-3-card\" data-go-stage=\"3\">&larr; Back to Stage 3<\/button>\n                <\/div>\n            <\/div>\n        <\/div>\n\n        <!-- Right Pane: Prompt Preview -->\n        <div class=\"bg-white p-6 rounded-xl shadow-md border border-blue-200 flex flex-col\" role=\"region\" aria-labelledby=\"prompt-preview-heading\">\n            <h2 id=\"prompt-preview-heading\" class=\"text-xl font-bold mb-1 text-blue-800\">Prompt to AI <span class=\"text-slate-500 text-sm font-medium\">(Visible excerpt)<\/span><\/h2>\n            <div id=\"prompt-output-container\" class=\"text-slate-700 leading-relaxed text-base bg-blue-50 p-4 rounded-lg min-h-[180px] flex-grow border border-blue-200 overflow-y-auto\" aria-live=\"polite\" aria-atomic=\"false\" aria-busy=\"false\">\n                <p class=\"text-slate-500 italic text-sm\">Your structured prompt will appear here and update as you type on the left.<\/p>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <!-- Progression Box -->\n    <div id=\"progression-box\" class=\"mt-6 bg-blue-100 p-6 rounded-xl shadow-md border border-blue-200\" role=\"region\" aria-labelledby=\"next-steps-heading\">\n        <h2 id=\"next-steps-heading\" class=\"text-lg font-bold text-blue-800 mb-2\">Next Steps<\/h2>\n        <p id=\"progression-text\" class=\"text-sm text-blue-800 mb-4\">Instructions for the next step will appear here.<\/p>\n        <button id=\"next-stage-button\" type=\"button\" class=\"w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500\" aria-controls=\"stage-2-card\">\n            Proceed\n        <\/button>\n    <\/div>\n\n<\/div>\n\n<noscript>\n  <p class=\"max-w-7xl mx-auto mt-4 bg-yellow-50 text-yellow-900 p-4 rounded\">\n    This tool needs JavaScript enabled for stage progression and copying prompts.\n  <\/p>\n<\/noscript>\n\n<script>\n(function() {\n    \/\/ --- State Management ---\n    const STORAGE_KEY = 'pt-research-proposal-developer:v1';\n\n    \/\/ always start viewed in Stage 1\n    let currentStage = 1;\n\n    const researchData = { 1: '', 2: '', 3: '', 4: '' };\n\n    \/\/ --- Element References ---\n    const stageCards = {\n        1: document.getElementById('stage-1-card'),\n        2: document.getElementById('stage-2-card'),\n        3: document.getElementById('stage-3-card'),\n        4: document.getElementById('stage-4-card')\n    };\n    const stageHeadings = {\n        1: document.getElementById('stage-1-heading'),\n        2: document.getElementById('stage-2-heading'),\n        3: document.getElementById('stage-3-heading'),\n        4: document.getElementById('stage-4-heading')\n    };\n    const stageInputs = {\n        1: document.getElementById('pt-project-summary'),\n        2: document.getElementById('stage-2-input'),\n        3: document.getElementById('stage-3-input'),\n        4: document.getElementById('stage-4-input')\n    };\n    const promptOutputContainer = document.getElementById('prompt-output-container');\n    const progressionText = document.getElementById('progression-text');\n    const nextStageButton = document.getElementById('next-stage-button');\n\n    \/\/ --- Utilities ---\n    function sanitize(text) {\n        return text.replace(\/<\/g, \"&lt;\").replace(\/>\/g, \"&gt;\");\n    }\n\n    \/\/ This block defines ONLY the four stages we want, and tells the AI to respond ONLY to whichever stage the user is currently asking about.\n    function getStealthDirectives(){\n        return [\n            \"You are an academic research tutor helping with a doctoral research proposal.\",\n            \"There are exactly four stages: (1) The Spark (refining the idea), (2) The Problem (formulating the research problem and questions), (3) The Approach (methodology), (4) The Plan (proposal structure). Do not invent any other stages, sub-stages, phases, checkpoints, workplans, roadmaps, timelines of future sessions, or next-phase processes beyond these four.\",\n            \"When responding, act ONLY on the material shown for the relevant stage(s) below. Do not jump ahead to later stages unless their text is explicitly provided.\",\n            \"When you make suggestions at ANY stage, you must explicitly ask the user to accept, reject, or modify each suggestion so they actively shape the direction.\",\n            \"Keep tone supportive, doctoral-level, and specific. Avoid generic study skills advice.\",\n            \"If you cannot access external sources, rely on these fallback principles: be specific about scope\/boundaries; move from descriptive to analytical questions; ensure questions are answerable\/operationalisable; align questions with feasible methods; state practical\/theoretical significance.\"\n        ].join(\"\\n\");\n    }\n\n    function getCombinedPromptText(){\n        const visible = promptOutputContainer.innerText.trim();\n        return getStealthDirectives() + \"\\n\\n\" + visible;\n    }\n\n    \/\/ --- Persistence helpers ---\n    function persistState(){\n        try{\n            const payload = {\n                currentStage,\n                researchData,\n                inputs: {\n                    1: stageInputs[1]?.value || '',\n                    2: stageInputs[2]?.value || '',\n                    3: stageInputs[3]?.value || '',\n                    4: stageInputs[4]?.value || ''\n                }\n            };\n            localStorage.setItem(STORAGE_KEY, JSON.stringify(payload));\n        } catch(e){ \/* ignore storage errors *\/ }\n    }\n\n    function restoreState(){\n        \/\/ restore any saved text, but always start visually in Stage 1\n        try{\n            const raw = localStorage.getItem(STORAGE_KEY);\n            if (raw) {\n                const saved = JSON.parse(raw);\n                if (saved && saved.inputs) {\n                    Object.entries(saved.inputs).forEach(([k,v]) => {\n                        if (stageInputs[k]) stageInputs[k].value = v || '';\n                        researchData[k] = v || '';\n                    });\n                }\n            }\n        } catch(e){ \/* ignore parse errors *\/ }\n\n        currentStage = 1;\n        Object.values(stageCards).forEach(card => card.classList.remove('active'));\n        stageCards[1].classList.add('active');\n\n        const newHash = '#stage-1';\n        if (location.hash !== newHash) {\n            history.replaceState(null, '', newHash);\n        }\n    }\n\n    \/\/ --- Core render steps ---\n    function generatePrompt() {\n        \/\/ sync current stage input into researchData\n        if (stageInputs[currentStage]) {\n            researchData[currentStage] = stageInputs[currentStage].value || '';\n        }\n\n        let promptHTML = '';\n        const referenceDoc = 'https:\/\/paultrowler.com\/wordpress\/wp-content\/uploads\/2025\/08\/ResearchProposals_Trowler.pdf';\n\n        \/\/ Stage 1 (The Spark)\n        const masterPrompt1 = `Stage 1 \u2014 The Spark.\nYour role in this stage is to help me sharpen and clarify my initial research idea.\n\nOutput format for your response:\n1) Give 3\u20135 concrete, constructive suggestions to strengthen or focus the idea. After EACH suggestion, ask me: \"Would you keep this, change it, or drop it \u2014 and why?\"\n2) Ask exactly 2 high-leverage questions that will unlock clarity.\n3) End with a short section titled \"Improved Project Summary (\u2264120 words)\" that I can paste forward.\n\nUse principles from Paul Trowler\u2019s guidance on developing research ideas in the document at ${referenceDoc}, the fallback principles and any other reliable literature on research project proposals. Stay within Stage 1 only. Do not propose additional stages or long-term plans.`;\n        const v1 = (researchData[1] || '').trim();\n        const content1 = v1\n          ? `<div class=\"prompt-segment-content prompt-gap-filled\">${sanitize(v1).replace(\/\\n\/g, '<br>')}<\/div>`\n          : `<div class=\"prompt-segment-content prompt-gap\">User has not provided input for this stage yet.<\/div>`;\n        promptHTML += `<p>${masterPrompt1}<\/p><div class=\"prompt-segment\"><h4>Stage 1: My Initial Idea<\/h4>${content1}<\/div>`;\n\n        \/\/ Stage 2 (The Problem)\n        if (currentStage >= 2 || (researchData[2] || '').trim() !== '') {\n            const masterPrompt2 = `Stage 2 \u2014 The Problem.\nYour role in this stage is to help define the research problem and formulate clear, answerable research questions.\n\nWhat you must do:\n\u2022 Help me express the core problem or gap.\n\u2022 Draft possible research questions.\n\u2022 For EACH proposed problem framing or question, ask: \"Does this reflect what you actually care about, or should we rewrite it?\"\n\nAsk me to consider why this matters (\"so what?\").\nBase your guidance on Paul Trowler\u2019s principles for formulating research questions in ${referenceDoc}, or fall back on clarity, scope, feasibility, and significance. Stay within Stage 2. Do not move ahead to methodology or planning.`;\n            const v2 = (researchData[2] || '').trim();\n            const content2 = v2\n              ? `<div class=\"prompt-segment-content prompt-gap-filled\">${sanitize(v2).replace(\/\\n\/g, '<br>')}<\/div>`\n              : `<div class=\"prompt-segment-content prompt-gap\">User has not provided input for this stage yet.<\/div>`;\n            promptHTML += `<hr class=\"border-blue-200 my-4\"><p>${masterPrompt2}<\/p><div class=\"prompt-segment\"><h4>Stage 2: My Research Problem & Questions<\/h4>${content2}<\/div>`;\n        }\n\n        \/\/ Stage 3 (The Approach)\n        if (currentStage >= 3 || (researchData[3] || '').trim() !== '') {\n            const masterPrompt3 = `Stage 3 \u2014 The Approach.\nYour role in this stage is to link the research questions to an appropriate methodological approach.\n\nWhat you must do:\n\u2022 Suggest viable approaches (qualitative, quantitative, mixed, case study, etc.).\n\u2022 Consider philosophical stance, context, sample, data collection, and analysis.\n\u2022 After EACH suggested approach or design element, ask me: \"Is this realistic and comfortable for you, or do we need to adapt it?\"\n\nUse principles of research design aligned with ${referenceDoc} when possible, or otherwise focus on feasibility and coherence. Stay within Stage 3. Do not write a full proposal or table of contents yet.`;\n            const v3 = (researchData[3] || '').trim();\n            const content3 = v3\n              ? `<div class=\"prompt-segment-content prompt-gap-filled\">${sanitize(v3).replace(\/\\n\/g, '<br>')}<\/div>`\n              : `<div class=\"prompt-segment-content prompt-gap\">User has not provided input for this stage yet.<\/div>`;\n            promptHTML += `<hr class=\"border-blue-200 my-4\"><p>${masterPrompt3}<\/p><div class=\"prompt-segment\"><h4>Stage 3: My Methodological Approach<\/h4>${content3}<\/div>`;\n        }\n\n        \/\/ Stage 4 (The Plan)\n        if (currentStage >= 4 || (researchData[4] || '').trim() !== '') {\n            const masterPrompt4 = `Stage 4 \u2014 The Plan.\nYour role in this stage is to help me assemble a coherent proposal outline.\n\nWhat you must do:\n\u2022 Suggest a draft structure (sections\/headings).\n\u2022 Identify any missing pieces I still need to supply (key literature, ethics, timeline).\n\u2022 After EACH element you suggest, ask: \"Should this stay as written, or what would you change?\"\n\nStay within Stage 4. Do not invent new future stages, milestones, or action plans beyond these four stages.`;\n            const v4 = (researchData[4] || '').trim();\n            const content4 = v4\n              ? `<div class=\"prompt-segment-content prompt-gap-filled\">${sanitize(v4).replace(\/\\n\/g, '<br>')}<\/div>`\n              : `<div class=\"prompt-segment-content prompt-gap\">User has not provided input for this stage yet.<\/div>`;\n            promptHTML += `<hr class=\"border-blue-200 my-4\"><p>${masterPrompt4}<\/p><div class=\"prompt-segment\"><h4>Stage 4: My Final Plan Details<\/h4>${content4}<\/div>`;\n        }\n\n        promptOutputContainer.innerHTML = promptHTML;\n        persistState();\n    }\n\n    function updateBreadcrumbs(){\n        document.querySelectorAll('#pt-breadcrumb .crumb').forEach(li => {\n            const stage = Number(li.getAttribute('data-stage'));\n            li.classList.remove('active','done','pending');\n            if (stage === currentStage) li.classList.add('active');\n            else if (stage < currentStage) li.classList.add('done');\n            else li.classList.add('pending');\n        });\n    }\n\n    function updateProgressionBox() {\n        nextStageButton.style.display = 'block';\n        nextStageButton.setAttribute('aria-expanded', 'true');\n        switch(currentStage) {\n            case 1:\n                progressionText.textContent = \"First, copy the prompt and engage in a dialogue with the AI for The Spark. Once you have refined your initial idea, you can move to the next stage.\";\n                nextStageButton.textContent = \"Proceed to Stage 2: The Problem \u2192\";\n                nextStageButton.setAttribute('aria-controls', 'stage-2-card');\n                break;\n            case 2:\n                progressionText.textContent = \"Now, use the updated prompt for The Problem. Once you have developed clear research questions, move to the next stage.\";\n                nextStageButton.textContent = \"Proceed to Stage 3: The Approach \u2192\";\n                nextStageButton.setAttribute('aria-controls', 'stage-3-card');\n                break;\n            case 3:\n                progressionText.textContent = \"Use the prompt for The Approach to discuss methodology. After that dialogue, proceed to the final stage.\";\n                nextStageButton.textContent = \"Proceed to Stage 4: The Plan \u2192\";\n                nextStageButton.setAttribute('aria-controls', 'stage-4-card');\n                break;\n            case 4:\n                progressionText.textContent = \"You have reached The Plan. Use the complete prompt to get feedback on your full proposal outline.\";\n                nextStageButton.style.display = 'none';\n                nextStageButton.setAttribute('aria-expanded', 'false');\n                break;\n        }\n        updateBreadcrumbs();\n        persistState();\n    }\n\n    \/\/ --- Navigation \/ actions ---\n    function moveToStage(stageNumber) {\n        \/\/ store text for the stage we're leaving\n        if (stageInputs[currentStage]) {\n            researchData[currentStage] = stageInputs[currentStage].value || '';\n        }\n\n        \/\/ clamp\n        currentStage = Math.max(1, Math.min(4, Number(stageNumber)));\n\n        \/\/ toggle visible card\n        Object.values(stageCards).forEach(card => card.classList.remove('active'));\n        stageCards[currentStage].classList.add('active');\n\n        \/\/ focus heading (accessibility)\n        const head = stageHeadings[currentStage];\n        if (head) { head.focus(); }\n\n        \/\/ reflect in hash\n        const newHash = `#stage-${currentStage}`;\n        if (location.hash !== newHash) {\n            history.replaceState(null, '', newHash);\n        }\n\n        generatePrompt();\n        updateProgressionBox();\n        updateBreadcrumbs();\n    }\n\n    function handleCopyAndOpen(btnEl){\n        \/\/ open ChatGPT immediately (user gesture -> fewer popup blocks)\n        const newWin = window.open('https:\/\/chatgpt.com', '_blank', 'noopener');\n\n        \/\/ build combined prompt & copy it\n        const combined = getCombinedPromptText();\n\n        const span = btnEl.querySelector('span');\n        const original = span.textContent;\n\n        function feedback(ok) {\n            span.textContent = ok ? 'Copied!' : 'Copy failed';\n            btnEl.classList.toggle('bg-green-700', ok);\n            btnEl.classList.toggle('hover:bg-green-800', ok);\n            setTimeout(() => {\n                span.textContent = original;\n                btnEl.classList.remove('bg-green-700','hover:bg-green-800');\n            }, 1200);\n        }\n\n        if (navigator.clipboard && window.isSecureContext) {\n            navigator.clipboard.writeText(combined)\n              .then(() => feedback(true))\n              .catch(() => feedback(false));\n        } else {\n            try {\n                const tempTA = document.createElement('textarea');\n                tempTA.value = combined;\n                document.body.appendChild(tempTA);\n                tempTA.select();\n                tempTA.setSelectionRange(0, 99999);\n                const ok = document.execCommand('copy');\n                document.body.removeChild(tempTA);\n                feedback(ok);\n            } catch(err){\n                feedback(false);\n            }\n        }\n\n        if (!newWin) {\n            console.warn('Popup was blocked. Please open chatgpt.com manually and paste the copied text.');\n        }\n    }\n\n    \/\/ --- Event listeners setup ---\n    function attachEventListeners(){\n        \/\/ Clear\n        const clearBtn = document.getElementById('pt-clear-summary');\n        if (clearBtn) {\n            clearBtn.addEventListener('click', () => {\n                stageInputs[1].value = '';\n                stageInputs[1].focus();\n                generatePrompt();\n                persistState();\n            });\n        }\n\n        \/\/ Delegated clicks\n        document.addEventListener('click', (e) => {\n            \/\/ copy & open\n            const copyBtn = e.target.closest('.copy-open-btn');\n            if (copyBtn) {\n                handleCopyAndOpen(copyBtn);\n                return;\n            }\n\n            \/\/ breadcrumb nav\n            const crumb = e.target.closest('#pt-breadcrumb .crumb');\n            if (crumb) {\n                const stage = Number(crumb.getAttribute('data-stage'));\n                moveToStage(stage);\n                return;\n            }\n\n            \/\/ back buttons that have data-go-stage\n            const backBtn = e.target.closest('[data-go-stage]');\n            if (backBtn) {\n                const stage = Number(backBtn.getAttribute('data-go-stage'));\n                moveToStage(stage);\n                return;\n            }\n        });\n\n        \/\/ next stage button\n        nextStageButton.addEventListener('click', () => {\n            if (currentStage < 4) moveToStage(currentStage + 1);\n        });\n\n        \/\/ live preview while typing\n        Object.values(stageInputs).forEach(input => { \n            if (input) { \n                input.addEventListener('keyup', generatePrompt);\n                input.addEventListener('change', generatePrompt);\n            }\n        });\n\n        \/\/ hash change (manual navigation)\n        window.addEventListener('hashchange', () => {\n            const m = \/^#stage-(\\d)$\/.exec(location.hash || '');\n            if (m) moveToStage(Number(m[1]));\n        });\n\n        \/\/ persist on unload\n        window.addEventListener('beforeunload', persistState);\n    }\n\n    \/\/ --- Initial boot sequence ---\n    restoreState();          \/\/ load saved text and show Stage 1\n    generatePrompt();        \/\/ populate Visible excerpt immediately\n    updateProgressionBox();  \/\/ \"Next Steps\"\n    updateBreadcrumbs();     \/\/ breadcrumb highlight\n    attachEventListeners();  \/\/ wire up UI\n})();\n<\/script>\n<!-- Copyright 2025 Professor Paul Trowler. All rights reserved. For personal use only for educational purposes; no part of this code to be copied, reused, or sold. -->\n<\/body>\n<\/html>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Copyright 2025 Prof. Paul Trowler<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Research Proposal Developer Skip to main content Research Proposal Developer This tool will guide you through four stages to develop a research proposal, from a broad idea to a structured plan. The four stages are: The Spark (refining your idea), The Problem (defining your research questions), The Approach (outlining your methodology), and The Plan (structuring [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-286","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/paultrowler.com\/wordpress\/index.php\/wp-json\/wp\/v2\/pages\/286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paultrowler.com\/wordpress\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/paultrowler.com\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/paultrowler.com\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paultrowler.com\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=286"}],"version-history":[{"count":24,"href":"https:\/\/paultrowler.com\/wordpress\/index.php\/wp-json\/wp\/v2\/pages\/286\/revisions"}],"predecessor-version":[{"id":1075,"href":"https:\/\/paultrowler.com\/wordpress\/index.php\/wp-json\/wp\/v2\/pages\/286\/revisions\/1075"}],"wp:attachment":[{"href":"https:\/\/paultrowler.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}