Skip to content

Instantly share code, notes, and snippets.

@decagondev
Created January 10, 2026 00:01
Show Gist options
  • Select an option

  • Save decagondev/89ff79f9daea76d35bbd106844968bee to your computer and use it in GitHub Desktop.

Select an option

Save decagondev/89ff79f9daea76d35bbd106844968bee to your computer and use it in GitHub Desktop.

Epic 1: Core Input and Generation Flow Task List

This task list breaks down Epic 1 for ReplyNow into sequential, actionable steps. Each task includes dependencies (if any), estimated effort (low/medium/high based on complexity in vanilla HTML/CSS/JS), and success criteria. Tasks are grouped by feature for clarity but can be tackled in order. Assume a basic project setup (e.g., index.html, styles.css, app.js with module files) is already in place. Use Git for version control—commit after each major task.

Feature 1.1: Email Input Handling

  1. Create the HTML textarea element

    • Description: Add a <textarea> to index.html for users to paste the incoming email.
    • Details: ID="email-input", rows=5, cols=50, placeholder="Paste the incoming email here...". Wrap in a for structure.
    • Dependencies: None.
    • Effort: Low.
    • Success Criteria: Textarea renders on page load; users can type/paste text.
    • Commit Message: "Add email input textarea to HTML form"
  2. Style the textarea with CSS

    • Description: Apply basic styling in styles.css to make it visually appealing and responsive.
    • Details: Use width: 100%; max-width: 600px; padding: 10px; border: 1px solid #ccc; font-family: Arial. Add media query for mobile (e.g., @media (max-width: 768px) { textarea { font-size: 16px; } }).
    • Dependencies: Task 1.
    • Effort: Low.
    • Success Criteria: Textarea resizes properly on desktop/mobile; maintains professional look.
    • Commit Message: "Style email input textarea for responsiveness"
  3. Add JS event listener for input changes

    • Description: In input.js (InputModule), create a function to capture the textarea value on input/change events.
    • Details: Use document.getElementById('email-input').addEventListener('input', (e) => { this.emailText = e.target.value; }); Store in a class property.
    • Dependencies: Task 1.
    • Effort: Low.
    • Success Criteria: Console.log the value on change to verify capture.
    • Commit Message: "Implement input event listener for email textarea"
  4. Implement validation for empty input

    • Description: In InputModule, add a validate() method that checks if emailText is empty or just whitespace.
    • Details: If invalid, create and show a Please paste an email. below the textarea (hidden by default via CSS display: none;). Toggle visibility on generate attempt.
    • Dependencies: Tasks 1, 3.
    • Effort: Medium.
    • Success Criteria: Error shows/hides correctly when textarea is empty/filled.
    • Commit Message: "Add validation and error display for email input"

Feature 1.2: Intent and Tone Selection

  1. Create HTML select elements for intent and tone

    • Description: Add two dropdowns to the form in index.html. Details: For intent (id="intent-select"): Select Intent, then options for "Accept", "Decline", "Ask for clarification", "Follow up". For tone (id="tone-select"): similar, with "Friendly", "Professional", "Firm". Place below textarea with labels (Reply Intent:). Dependencies: Task 1 (form exists). Effort: Low. Success Criteria: Dropdowns render with options; selections persist. Commit Message: "Add intent and tone select dropdowns to HTML" Style the selects with CSS Description: Style dropdowns in styles.css for consistency. Details: width: 100%; max-width: 300px; margin-top: 10px; padding: 5px. Add flexbox for layout if needed (e.g., .form-group { display: flex; flex-direction: column; }). Dependencies: Task 5. Effort: Low. Success Criteria: Dropdowns look professional and align well on mobile. Commit Message: "Style intent and tone selects" Add JS event listeners for select changes Description: In InputModule, capture selected values. Details: Similar to Task 3: addEventListener('change') for each select, storing this.intent and this.tone. Dependencies: Tasks 3, 5. Effort: Low. Success Criteria: Console.log selected values on change. Commit Message: "Implement change listeners for intent and tone selects" Implement validation for unselected options Description: Extend validate() in InputModule to check if intent and tone are selected (not empty string). Details: Show separate error spans (id="intent-error", "tone-error") like "Please select an intent." Use same CSS class for errors. Dependencies: Tasks 4, 7. Effort: Medium. Success Criteria: Errors appear if dropdowns are default; clear on selection. Commit Message: "Add validation for intent and tone selections" Feature 1.3: Reply Generation Add the Generate Reply button Description: Add a Generate Reply to the form in index.html. Details: Place below selects; make it prominent (e.g., class="cta"). Dependencies: Task 5. Effort: Low. Success Criteria: Button renders and is clickable. Commit Message: "Add generate reply button to form" Style the generate button Description: In styles.css, make it stand out. Details: background-color: #007bff; color: white; padding: 10px 20px; border: none; cursor: pointer. Hover effect: opacity: 0.9. Center with margin: auto. Dependencies: Task 9. Effort: Low. Success Criteria: Button is visually hierarchical and responsive. Commit Message: "Style generate reply CTA button" Wire up generate button click event Description: In input.js, add click listener to button that triggers validation and generation. Details: event.preventDefault(); if (this.validate()) { const reply = ReplyGenerator.generate(this.intent, this.tone, this.emailText); OutputModule.renderReply(reply); } Dependencies: Tasks 4, 8, 9 (and upcoming ReplyGenerator). Effort: Medium. Success Criteria: Button click logs "Generating..." if valid; shows errors if not. Commit Message: "Connect generate button to validation and generation flow" Define reply templates in ReplyGenerator Description: In replyGenerator.js, create a templates object with 12 combinations (4 intents x 3 tones). Details: E.g., templates['Accept-Friendly'] = "Thank you for your message. I'd be happy to accept your proposal regarding {context}. Let's proceed!"; Use placeholders like {context} for email summary. Dependencies: None. Effort: Medium. Success Criteria: Object has all keys; strings are concise (3-6 sentences). Commit Message: "Define static reply templates for all intent-tone combos" Implement basic email context parsing Description: In replyGenerator.js, add a parseContext(emailText) function. Details: Use simple string methods or regex, e.g., extract first sentence or keywords: const context = emailText.split('.')[0].trim() + '...'; Handle if empty. Dependencies: Task 12. Effort: Medium. Success Criteria: Function returns a short summary string from input text. Commit Message: "Add simple context parsing from email text" Implement generate method Description: In ReplyGenerator, create generate(intent, tone, emailText) that selects template and replaces placeholders. Details: const key = ${intent}-${tone}; let reply = templates[key] || 'Default reply'; reply = reply.replace('{context}', parseContext(emailText)); Ensure 3-6 sentences. Dependencies: Tasks 12, 13. Effort: Medium. Success Criteria: Returns polished string based on inputs; test with console.log. Commit Message: "Implement reply generation logic with template mapping" Post-Feature Integration and Testing Integrate modules in main.js Description: In a main.js file, import InputModule, ReplyGenerator, OutputModule and initialize (e.g., const input = new InputModule();). Dependencies: All above. Effort: Low. Success Criteria: App flows from input to generation without errors. Commit Message: "Wire up modules in main entry point" End-to-End Testing for Epic 1 Description: Manually test the flow: Paste email, select options, generate; check for errors and output. Details: Test on desktop and mobile (use browser dev tools). Time the process (<30s). Fix any bugs. Dependencies: All above. Effort: High. Success Criteria: Full input-to-generation works; no console errors. Commit Message: "Epic 1 E2E testing and bug fixes" Once this task list is complete, Epic 1 will deliver a functional core flow. Proceed to Epic 2 next if ready. Let me know if you need code snippets or adjustments!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment