The community prompt library
Discover, save and upvote the best AI prompts for coding, writing, image generation and more.
- 39
- prompts
- 2
- members
- 12
- upvotes
39 prompts
You are an expert in principles-first thinking, skilled at analyzing situations through a foundational lens. Your task is to help me approach a problem or decision by first establishing clear principles, applying them to the specific context, and then deriving a solution or recommendation. ## Principles [List the core principles relevant to the problem, decision, or domain here. Be specific and clear. Examples: "Prioritize user experience," "Maximize long-term value," "Simplicity over complexity."] ## Context [Describe the specific situation, problem, or decision you need help with. Provide all necessary details, background, and constraints.] ## Desired Output Format [Specify how you want the AI's response to be structured. Examples: - "A reasoned recommendation, followed by a bulleted list of principles applied and how they inform the recommendation." - "A detailed plan, with each step justified by a specific principle." - "A decision analysis comparing options against principles, concluding with a chosen path."] --- Based on the provided principles and context, generate a response that adheres to the desired output format, ensuring the application of principles is evident in your reasoning.
I have a bug I cannot figure out. Help me debug it systematically. **The bug:** [describe what's happening] **Expected behavior:** [what should happen] **Steps to reproduce:** [numbered list] **Error message (if any):** [paste exact error] **Code snippet:** [paste relevant code] **Environment:** [language, framework, versions, OS] **What I've already tried:** [list attempts] Work through this like a detective: first hypothesize the most likely causes (ranked by probability), then walk me through how to test each hypothesis. Don't jump to a solution — help me understand WHY the bug exists so I can fix it and prevent it from happening again.
Design a complete REST API for the following feature: **Feature:** [describe what the API needs to do] **Tech stack:** [language, framework, database] **Auth:** [e.g., JWT, API keys, OAuth] **Scale expectations:** [e.g., 100 req/s, 10k users] Provide: 1. Full endpoint list with HTTP method, path, and one-line purpose 2. Request/response schemas (JSON) for each endpoint 3. Error response format and status codes used 4. Authentication/authorization strategy 5. Rate limiting and pagination approach 6. Any non-obvious design decisions and why you made them Be opinionated. If there's a clearly better pattern, recommend it and explain the tradeoff.
Refactor the following code. My goals, in priority order: 1. [e.g., Improve readability] 2. [e.g., Reduce cognitive complexity] 3. [e.g., Make it easier to test] **Code:** [PASTE CODE] Rules: - Preserve all existing behavior (no logic changes unless it's clearly a bug) - Use idiomatic patterns for [language/framework] - Add a comment only where the "why" isn't obvious - Show me the before and after side by side - After the refactored code, explain the 2–3 most significant changes you made and why
Write a comprehensive test suite for the following function/component: [PASTE CODE] Testing framework: [e.g., Vitest, Jest, Pytest, RSpec] Cover: 1. **Happy path** — expected inputs producing correct outputs 2. **Edge cases** — empty inputs, max values, null/undefined, special characters 3. **Error cases** — invalid inputs, out-of-range values, type mismatches 4. **Integration points** — if it calls external services, mock them properly For each test, add a one-line comment explaining what property or behavior it's verifying. Organize tests in describe/it blocks that read like documentation. Aim for 90%+ coverage without writing redundant tests.
Explain how [TECHNOLOGY/CONCEPT] works from the ground up. Assume I'm a competent developer who has never used this specific thing. Structure your explanation as: 1. **The problem it solves** — what was painful before this existed? 2. **The core mental model** — the single most important concept I need to internalize 3. **How it works under the hood** — just enough internals to reason about behavior 4. **The 20% that covers 80% of use cases** — practical patterns I'll actually use 5. **Common mistakes** — what trips people up, and how to avoid it 6. **A minimal working example** — the smallest code that shows the concept in action Use analogies where they clarify. Call out where the docs are misleading or where the abstraction leaks.
I need you to write in my voice. Here are 3 samples of my writing: **Sample 1:** [paste] **Sample 2:** [paste] **Sample 3:** [paste] Analyze my writing style across these dimensions: - Sentence length and rhythm patterns - Vocabulary level and word choices I favor - How I use punctuation (dashes, semicolons, fragments) - My tone (formal/casual, warm/direct, etc.) - Structural patterns (how I open and close paragraphs) - Any signature phrases or rhetorical moves Then write the following in my voice: [DESCRIBE WHAT YOU NEED WRITTEN] After writing it, note 2–3 specific choices you made to match my style.
Edit the following essay for maximum impact. Don't rewrite it — sharpen what's already there. **Essay:** [PASTE ESSAY] **Target audience:** [who will read this] **Goal of the piece:** [inform / persuade / inspire / entertain] **One thing I'm proud of that should stay intact:** [optional] Fix: 1. **Opening** — does it earn attention in the first sentence? 2. **Argument flow** — does each paragraph earn its place and transition logically? 3. **Sentence-level clarity** — passive voice, filler words, overly complex structures 4. **Closing** — does it land with weight or just trail off? Give me the edited version, then a brief editor's note explaining your most significant cuts or changes.
Write a high-performing LinkedIn post about: **Topic:** [your topic] **Key insight or story:** [what you want to share] **Your role/context:** [so the post sounds credible] **Call to action:** [what you want readers to do or think] Rules for the post: - Hook in the first line — no warm-up, no "I'm excited to share" - Use white space aggressively (short paragraphs, line breaks) - Concrete > abstract — specific numbers, names, or moments beat vague claims - One clear idea — don't try to say three things - End with a question or provocation that invites real responses - Target length: 150–300 words Give me 2 versions: one that leads with a story and one that leads with the insight.
Write a cold email for the following situation: **I am:** [your role/context] **I'm reaching out to:** [recipient's role and company type] **My goal:** [what I want from this email — a call, a response, a referral] **The value I'm offering:** [why they should care] **Any relevant context:** [mutual connections, recent news about them, etc.] Email constraints: - Subject line: specific enough to be intriguing, not clickbait - Opening: reference something specific about them (not generic flattery) - Body: one problem I help solve, stated in terms of their world not mine - CTA: low-commitment ask (10-min call, a yes/no question) - Total length: under 120 words Write 2 subject line options and 1 email. Then explain what makes the CTA appropriate for this situation.
Turn the following rough idea into a detailed article outline: **Rough idea:** [your idea in 1–3 sentences] **Target publication/audience:** [e.g., technical blog for startup founders] **Angle I want to take:** [e.g., contrarian, practical how-to, narrative-driven] **Length target:** [e.g., 1,500 words] The outline should include: 1. Working title (and 2 alternates) 2. Lede — the opening hook in 1–2 sentences 3. The core argument or thesis 4. Section-by-section breakdown with: - Each section's heading - What it argues or covers (2–3 sentences) - Key evidence, example, or anecdote to use 5. The conclusion's payoff — what should the reader walk away believing or doing? Flag any gaps in my argument that need research or examples to fill.
I'm stuck on a first draft and need to break through. Here's the situation: **What I'm writing:** [type of piece and topic] **Who it's for:** [audience] **What I have so far:** [paste what you've written, or describe the block] **Where I'm stuck:** [e.g., opening, transition, conclusion, tone] **My fear about this piece:** [what you're worried it'll come across as] Don't write it for me. Instead: 1. Diagnose what's actually blocking me (it's often not what I think it is) 2. Give me 3 different opening sentences to pick from — each with a different entry point 3. Suggest one structural change that might unlock the rest 4. Ask me one question that would help me figure out what I'm actually trying to say Then let me write.
[SUBJECT DESCRIPTION]. Cinematic photography, shot on ARRI ALEXA 35, anamorphic lens, [TIME OF DAY] lighting, [MOOD] atmosphere. The composition follows the rule of thirds with [SUBJECT] in [LEFT/CENTER/RIGHT] frame. Shallow depth of field, subtle lens flare, natural film grain. Color grade: [e.g., warm golden tones / cool desaturated blues / high contrast noir]. Ultra-detailed, photorealistic, 8K resolution, professional color grading, no text, no watermarks. Example fill-in: "A lone astronaut standing at the edge of a Martian canyon at golden hour, cinematic photography, warm amber and rust color grade, sense of scale and solitude."
Create a brand identity mockup for a [TYPE OF COMPANY] called "[BRAND NAME]". The brand values are [VALUE 1], [VALUE 2], and [VALUE 3]. Target audience: [DESCRIBE AUDIENCE]. Visual style: [e.g., minimal and modern / bold and playful / luxury and editorial] Primary color palette: [describe or specify hex codes] Typography feel: [e.g., geometric sans-serif / elegant serif / hand-lettered] Show the logo on a [WHITE/DARK/COLORED] background, displayed on: - A business card - A phone mockup screen - A tote bag or branded item Flat lay composition, professional product photography lighting, clean background, commercial quality.
Create concept art for: [DESCRIBE SCENE OR SUBJECT] Art direction: - Style: [e.g., painterly, graphic novel, anime, hyper-realistic, impressionist] - Artist reference: in the style of [e.g., Simon Stålenhag / Moebius / Craig Mullins] - Mood: [e.g., melancholic, epic, serene, dystopian] - Lighting: [e.g., dramatic chiaroscuro / soft diffused / neon-lit night scene] - Color story: [describe palette — warm/cool, saturated/muted, 2–3 dominant hues] - Camera/view: [e.g., wide establishing shot / close-up portrait / worm's eye view] Technical: digital art, highly detailed, environment concept art, trending on ArtStation, volumetric lighting, 4K.
Professional product photography of [DESCRIBE PRODUCT]. Setup: [HERO/FLAT LAY/LIFESTYLE] shot Background: [e.g., pure white studio / textured marble / moody dark surface / outdoor natural setting] Lighting: [e.g., soft diffused studio light / dramatic single-source / golden hour natural light] Props/styling: [describe any supporting elements or keep it minimal] Brand feel: [e.g., premium minimal, approachable and warm, bold and high-energy] Shot on Canon 5D Mark IV, 85mm macro lens. Ultra-sharp product focus, perfect exposure, commercial advertising quality, no text or watermarks.
Portrait of [DESCRIBE PERSON — age range, features, expression]. Emotional quality: [e.g., quiet introspection / fierce determination / warm joy] Setting/background: [describe or say "shallow-focus neutral"] Lighting: [e.g., Rembrandt lighting / soft window light / dramatic backlit silhouette] Style: [e.g., editorial magazine portrait / environmental documentary / fine art] Color treatment: [e.g., desaturated film look / warm analog tones / clean bright and airy] Shot on 85mm f/1.4, bokeh background, ultra-detailed skin texture, photorealistic, professional retouching, no watermarks.
Abstract artwork representing the concept of "[CONCEPT OR EMOTION]". Visual metaphor: [describe how you'd translate the concept visually — e.g., "isolation as a figure in a vast empty geometric space"] Medium feel: [e.g., oil painting texture / digital generative art / watercolor and ink] Color palette: [3–4 specific colors and what they represent emotionally] Composition: [e.g., centered / diagonal tension / negative space dominant] Texture: [e.g., rough impasto strokes / smooth digital gradients / layered collage] Abstract, non-representational, museum-quality art, high resolution, no text, no faces.
Build a detailed Ideal Customer Profile (ICP) for a [DESCRIBE YOUR PRODUCT/SERVICE]. Go beyond demographics. Give me: **Who they are** - Job title(s), company size, industry - Day-to-day responsibilities - How they measure success **The problem they have** - What triggers them to search for a solution like mine? - What have they already tried that didn't work? - What does the problem cost them (time, money, reputation)? **Their decision-making process** - Are they the buyer, influencer, or user? - What objections do they raise? - What does their research process look like? **Language they use** - How do they describe their problem in their own words? - What words do they NOT use (jargon to avoid)? **Where to reach them** - Channels, communities, content they consume Give me 2 distinct customer archetypes that both fit this ICP.
Write a 5-email launch sequence for [PRODUCT/FEATURE/OFFER]. **Product:** [describe what it is] **Audience:** [who it's for] **Core benefit:** [the single most important outcome it delivers] **Launch window:** [e.g., 7-day open cart] **Price:** [if relevant] Write each email with: - Subject line (+ one alternative) - Preview text - Full email body Email arc: 1. Day 1 — The problem: empathy + stakes, no pitch yet 2. Day 3 — The solution: introduce the product with proof 3. Day 5 — Social proof: stories/testimonials + objection handling 4. Day 6 — Urgency: scarcity or deadline reminder 5. Day 7 — Last call: close with clarity and confidence Tone: [e.g., conversational and warm / direct and professional / bold and energetic]
Help me develop a sharp positioning statement for my product. **Product:** [describe what it does] **Current customers:** [who's using it today] **Top competitors:** [name 2–3 alternatives customers consider] **What we do better than anyone:** [your honest differentiator] **What we're NOT trying to be:** [important — what do you want to avoid being associated with?] Give me: 1. A classic positioning statement: "For [target customer] who [problem], [product] is a [category] that [key benefit]. Unlike [competitors], we [differentiator]." 2. A one-sentence "elevator" version 3. A bold 3–5 word tagline 4. A 140-character Twitter/X bio version For each, explain the strategic choice you made. Flag if any of my assumptions seem off-market.
Write ad copy for the following campaign: **Product/offer:** [describe it] **Target audience:** [who you're targeting and what they care about] **Platform:** [Facebook/Instagram, Google Search, LinkedIn, TikTok, etc.] **Campaign goal:** [awareness / clicks / signups / purchases] **Key benefit:** [the outcome the customer gets] **Proof point:** [a stat, customer result, or credential that builds trust] Write: - 3 headlines (under 30 chars each) - 3 primary text variations — each leading with a different angle: - Angle 1: Pain-led (agitate the problem) - Angle 2: Outcome-led (paint the transformation) - Angle 3: Social proof-led (let results speak) - 2 CTAs for each variation Flag which combination you'd A/B test first and why.
Write a customer case study using the following information: **Customer:** [company name, size, industry] **Their situation before:** [what was the problem or challenge] **What they used our product/service for:** [specific use case] **Results:** [specific, measurable outcomes — numbers preferred] **Customer quote (if available):** [paste quote or note if you don't have one] Structure it as: 1. **Headline** — lead with the result, not the company name 2. **The Challenge** (2–3 sentences) 3. **The Solution** (how they used your product — specific, not generic) 4. **The Results** (lead with numbers, then the qualitative win) 5. **What's Next** (optional — keeps the story going) Tone: [e.g., B2B professional / warm and narrative / data-driven and precise] Length: 300–500 words, optimized for a sales enablement page.
Build a 90-day content strategy for [BRAND/PERSON] on [PLATFORM(S)]. **About the brand:** [what you do, who you serve] **Business goal for this quarter:** [e.g., grow email list, drive demo signups, establish authority] **Current content situation:** [posting frequency, what's working, what's not] **Audience's biggest questions/pain points:** [list 3–5] **Topics I want to be known for:** [list 3–5] Deliver: 1. **3–4 content pillars** with a rationale for each 2. **Content types mix** (% education / entertainment / promotion / community) 3. **10 specific post ideas** per pillar (40 total) with format suggestions 4. **2 "cornerstone" pieces** to create first that everything else links back to 5. **Repurposing map** — how to turn one piece of content into 5+ Flag which idea you'd start with and why.
Run me through a structured weekly review. Ask me questions one section at a time and wait for my answers before proceeding. **Section 1: Last Week Audit** - What did I accomplish that I'm proud of? - What didn't get done, and why? - What drained my energy vs. what gave me energy? - What's one thing I'd do differently? **Section 2: Capture & Clear** - What's still on my mind that isn't written down anywhere? - Any open loops I've been avoiding? **Section 3: Next Week Design** - What are my top 3 non-negotiable priorities? - What's the one outcome that would make next week a win? - What do I need to schedule, delegate, or delete? - What recurring tasks need to be batched? After I answer all sections, give me a summary of my commitments and flag any pattern you notice across my answers.
I'm stuck on a decision and need help thinking it through clearly. **The decision:** [describe what you need to decide] **Options I'm considering:** [list them] **My deadline:** [when does this need to be decided?] **What I've already ruled out and why:** [optional] **What's making this hard:** [the specific tension or uncertainty] Help me: 1. Clarify what type of decision this actually is (reversible vs. irreversible, high stakes vs. low stakes) 2. Surface assumptions I'm making that I should test 3. Identify what information, if I had it, would make this obvious 4. Apply one useful decision-making framework for this specific situation 5. Recommend which option I should take — and commit to a recommendation, don't hedge I want a decision, not more options.
Convert the following meeting notes into a clean action plan. **Meeting notes:** [PASTE RAW NOTES] **Meeting date:** [date] **Attendees:** [names/roles] **Meeting goal:** [what it was supposed to accomplish] Extract and organize: 1. **Decisions Made** — final decisions that were agreed upon 2. **Action Items** — each item with: - Task (clear, specific, starts with a verb) - Owner (who's responsible) - Deadline (or "next meeting" if unspecified) 3. **Open Questions** — things discussed but not resolved 4. **Parking Lot** — items raised but deferred Flag any contradictions in the notes or decisions that seemed unclear. Output in a format I can paste directly into Notion.
Design a deep work schedule for me based on the following constraints: **My work type:** [knowledge work, creative work, technical, etc.] **My chronotype:** [morning person / night owl / afternoon peak] **Current schedule constraints:** [e.g., team standup at 10am, client calls usually afternoons] **My #1 project right now:** [what needs protected focus time most] **Biggest focus killers:** [Slack, email, meetings, etc.] **Target deep work hours per day:** [e.g., 3–4 hours] Give me: 1. A specific daily time block schedule (with buffers and transitions) 2. A pre-work ritual (10–15 min) that triggers focus mode 3. Rules for protecting these blocks (what gets a yes vs. a no) 4. How to handle interruptions when they inevitably happen 5. A weekly rhythm (which days for deep work vs. collaboration) Make this realistic, not aspirational.
Help me define a project clearly before I start working on it. **Project name:** [name] **One-sentence description:** [what it is] **Why this, why now:** [the motivation] **Success looks like:** [what done means — be specific] **The biggest risk:** [what's most likely to make this fail] **Resources available:** [time, budget, people, tools] **Hard deadline:** [if any] Help me build: 1. A clear **project goal statement** (measurable outcome, not activity) 2. A **scope definition** — what's explicitly IN and explicitly OUT 3. The **3 most important milestones** with target dates 4. **Key dependencies** — what needs to happen or exist before I can proceed 5. The **first 3 actions** I should take in the next 48 hours Push back if my scope sounds too ambitious for the timeline.
I want to think through something out loud. Your job is NOT to give me answers — it's to ask me better questions. **Topic I'm thinking about:** [describe it] **What I currently believe:** [your current position or understanding] **What I'm uncertain about:** [where you feel fuzzy or conflicted] **What would be useful:** [e.g., challenge my assumptions / help me see blind spots / stress-test my reasoning] Ask me one question at a time. Make each question: - Specific, not generic - Pointed enough to make me think, not comfortable enough to answer reflexively - Building on what I've said, not predetermined Don't offer your opinion unless I ask. Your job is to help me think better, not to think for me.
Take the following commonly accepted belief and steelman the strongest possible counterargument: **The conventional wisdom:** [state the belief] **Context:** [field, industry, or domain where this belief is held] I want the most compelling, intellectually honest challenge to this idea — not a strawman, not snark, but the best version of "what if we're wrong about this?" Structure your response as: 1. **What the conventional view gets right** (acknowledge its strongest points) 2. **The crack in the foundation** (the core assumption that might be flawed) 3. **The contrarian thesis** (stated clearly and boldly) 4. **Evidence for the contrarian view** (real examples, data, or logic) 5. **The strongest objection to this contrarian view** (be honest) 6. **Net verdict** — is this a full reversal, a nuance, or a "depends on context"? Don't soften this. I want the sharpest version of the challenge.
I want to learn [TOPIC/SKILL] faster than the typical path. **My current level:** [beginner / know the basics / some experience] **My goal:** [what I want to be able to do with this knowledge] **Time available:** [hours per week] **How I learn best:** [reading, video, doing, teaching, etc.] **Deadline (if any):** [target date] Give me: 1. The **minimum viable knowledge** — what's the 20% that gives 80% of the results? 2. The **correct sequence** — what must be understood before what? 3. **3 concrete projects** I should build/do to cement the learning 4. The **single best resource** for each phase (book, course, person, community) 5. **Common beginner traps** — what mistakes to skip entirely 6. A **week-by-week study plan** for my available time Optimize for actual competence, not the feeling of learning.
Help me prepare for an upcoming negotiation. **What I'm negotiating:** [e.g., salary, contract terms, price of X] **My position:** [what I want] **Their likely position:** [what I think they want] **My BATNA (best alternative if this falls through):** [what happens if no deal] **What I think their BATNA is:** [their next best option] **Relationship importance:** [one-time transaction vs. ongoing relationship] **My constraints:** [what I can't budge on] **Where I have flexibility:** [what I could concede] Give me: 1. **Opening move** — where to anchor and why 2. **Key concession strategy** — what to give up, in what order, and what to ask for in return 3. **Likely objections** — and how to respond to each 4. **Red lines** — when to walk away 5. **Power dynamics** — who has more leverage here, honestly? 6. **The one thing I shouldn't say** in this negotiation Be direct. I want a real game plan, not platitudes about "win-win."
I received some feedback and I'm not sure how to interpret it or respond to it. **The feedback I received:** [paste the exact feedback] **Context:** [who gave it, what for, the relationship] **My gut reaction:** [how it landed for you emotionally] **What I think they actually meant:** [your interpretation] **What I'm unsure about:** [what's unclear or confusing] Help me: 1. **Separate signal from noise** — what's the core message, stripped of tone? 2. **Assess validity** — which parts are likely accurate, which might be off-base? 3. **Identify blind spots** — am I getting defensive about something I should hear? 4. **Formulate a response** — how should I reply in a way that's professional, genuine, and non-defensive? 5. **Decide on action** — what, if anything, should I change? Don't just validate me. Tell me where the feedback probably has merit.
I'm planning to [DESCRIBE YOUR PLAN OR DECISION]. Help me stress-test it before I commit. **The plan:** [describe in detail] **Assumptions baked in:** [list what you're assuming will be true] **Timeline:** [when this plays out] **Resources committed:** [time, money, people] **What success looks like:** [measurable outcome] Run the following analysis: 1. **Pre-mortem**: Assume it's 12 months from now and this failed. What went wrong? (List top 5 failure modes) 2. **Assumption audit**: Which of my assumptions is most likely to be wrong? 3. **Second-order effects**: What happens after the plan succeeds that I haven't thought about? 4. **The skeptic's case**: What would a smart critic say about this plan? 5. **Blind spots**: What am I not seeing that an outsider would notice immediately? 6. **Verdict**: Should I proceed, modify, or abandon? Be direct.
Help me develop a compelling story about [TOPIC/EXPERIENCE]. **The raw material:** [describe the event, experience, or idea] **Who this is for:** [audience and context — presentation, blog, conversation, etc.] **What I want them to feel or think after hearing it:** [the emotional or intellectual payoff] **Current version (if any):** [optional — paste what you have] Help me find: 1. **The real story** — what's this actually about, beneath the surface? 2. **The opening hook** — the first sentence or moment that earns attention 3. **The narrative structure** — the arc (what changes from beginning to end?) 4. **The specific details** that make it real vs. generic 5. **The moment of tension** — every good story has friction; what's yours? 6. **The landing** — what's the last thing they hear, and why does it stick? Ask me questions if you need more detail to do this well.
You are a senior software engineer conducting a thorough code review. Review the following code and provide feedback in this exact structure: **Critical Issues** (bugs, security vulnerabilities, data loss risks) **Performance Concerns** (inefficiencies, N+1 queries, unnecessary re-renders) **Code Quality** (readability, naming, complexity, DRY violations) **Best Practices** (patterns, conventions, error handling) **Suggested Improvements** (with rewritten code snippets) Be specific. Reference line numbers or function names. Prioritize ruthlessly — not every finding needs equal weight. After your review, give the code an overall score from 1–10 and one sentence on the single highest-leverage change. Code to review: [PASTE CODE HERE] Language/framework context: [e.g., "React 18, TypeScript, Next.js App Router"]
You are an expert copyeditor, proofreader, and line editor with decades of experience refining text for clarity, flow, and flawless mechanics. ### Your Task Your objective is to thoroughly review the text provided by the user and correct all errors related to: * **Grammar & Syntax:** Fix subject-verb agreement, improper tense shifts, misplaced modifiers, and awkward sentence structures. * **Punctuation & Mechanics:** Correct missing or misplaced commas, semicolons, apostrophes, quotation marks, and capitalization errors. * **Spelling & Typos:** Fix all spelling mistakes and obvious typos. * **Clarity & Flow:** Smooth out jarring transitions or confusing phrasing without rewriting the core message. ### Strict Constraints 1. **Preserve the Voice:** Do NOT rewrite the text in your own style. Retain the user's original tone (e.g., casual, academic, professional, poetic) and vocabulary as much as possible. Only change words if they are grammatically incorrect or severely obscure meaning. 2. **No Hallucinations:** Do not add new information, facts, or arguments that were not present in the original text. 3. **American vs. British English:** Default to American English unless the input text clearly uses British spelling conventions (like "colour" or "realise"), in which case, maintain British English consistently. ### Output Format Please present your response in three distinct sections: #### 1. Corrected Version [Provide the fully polished, clean version of the text here. No commentary, no brackets—just the finalized text ready to be copied and pasted.] --- #### 2. Summary of Key Corrections [Provide a bulleted list highlighting the most significant changes you made. Group them by category if necessary, such as: * **Punctuation:** (e.g., "Added missing commas in compound sentences") * **Grammar:** (e.g., "Fixed a subject-verb agreement error in paragraph 2") * **Clarity:** (e.g., "Smoothed out a run-on sentence for better readability")] --- #### 3. (Optional) Suggestions for Flow [If applicable, offer 1–2 brief suggestions on how the user could further improve the writing style, word choice, or impact, keeping it strictly separate from the definitive grammar fixes.] ### Input Text: [PASTE YOUR TEXT HERE]
You are a Principal Software Engineer and a highly meticulous code reviewer. Your objective is to ensure the codebase remains scalable, maintainable, performant, and secure. You will review the provided code diff or repository snippet with the goal of building good team habits—not gatekeeping. ### Core Directives: 1. FOCUS ON THE 'WHY': Assess if the code is supportable and understandable, even for junior developers. Avoid nitpicking purely personal stylistic preferences. 2. EVIDENCE REQUIREMENT: Ground your feedback. Cite specific lines, diff hunks, or call sites. Do not offer speculative advice. 3. SUGGEST CONCRETE FIXES: For every issue identified, explain exactly why it matters and provide a refactored code snippet to resolve it. ### Please evaluate the provided code against these 8 pillars: 1. LOGIC & EDGE CASES: Identify logic mistakes, unhandled exceptions, and missing edge cases. (For frontend/UI: account for loading/error states and failed network requests). 2. ARCHITECTURE & READABILITY: Evaluate for Single Responsibility. Flag over-engineering, unnecessary abstractions, and confusing naming conventions. 3. PERFORMANCE: Identify potential performance bottlenecks (e.g., $O(N)$ operations in loops, missing caching, or heavy computations). 4. SECURITY & ROBUSTNESS: Scan for vulnerabilities, missing data validations, and unsafe dependency usage. 5. TESTING STRATEGY: Verify what is being tested. Ensure unit tests are meaningful and don't just blindly cover code paths. 6. DOCUMENTATION: Point out ambiguous or complex blocks that require inline documentation or JSDoc/Docstrings. 7. TECH DEBT & DEBUGGING: Identify lingering TODOs, commented-out debugging code, or logs that should be removed before production. 8. GIT & PR ETIQUETTE: (If evaluating a PR) Check if the PR title/description and commit messages are clear, self-explanatory, and track back to a ticket/issue. ### Output Format: Provide your review in a highly scannable Markdown format: - **Summary**: 2-3 sentences summarizing the overall health of the PR and the biggest architectural risk. - **Blockers / Critical Issues**: Severe bugs, security vulnerabilities, or architecture-breaking flaws. - **Maintainability & Readability**: Structuring, naming, and documentation improvements. - **Performance & Edge Cases**: Optimizations and missed scenarios. - **Approved Changes**: What was implemented correctly. Code Provided: [Insert your Code / Diff here]