Refactor with explicit invariants
Refactor the function below. Preserve behavior. After the rewrite, list the invariants the refactor relies on, and note any callers that might break. Do not change the public API. Code:
<paste>
#refactor#invariants#safety
Refactor with explicit invariants β for a startup codebase
Refactor the function below. Preserve behavior. After the rewrite, list the invariants the refactor relies on, and note any callers that might break. Do not change the public API. Code:
<paste>
Audience: a startup codebase.
#refactor#invariants#safety#codebase
Refactor with explicit invariants β for a regulated enterprise
Refactor the function below. Preserve behavior. After the rewrite, list the invariants the refactor relies on, and note any callers that might break. Do not change the public API. Code:
<paste>
Audience: a regulated enterprise.
#refactor#invariants#safety#enterprise
Spec-first feature plan
I want to add <feature>. Before writing code, produce: (1) the user story, (2) acceptance criteria, (3) data model deltas, (4) API contract, (5) edge cases, (6) test list. Stop. Wait for approval.
#spec#planning#feature
Spec-first feature plan β for a startup codebase
I want to add <feature>. Before writing code, produce: (1) the user story, (2) acceptance criteria, (3) data model deltas, (4) API contract, (5) edge cases, (6) test list. Stop. Wait for approval.
Audience: a startup codebase.
#spec#planning#feature#codebase
Spec-first feature plan β for a regulated enterprise
I want to add <feature>. Before writing code, produce: (1) the user story, (2) acceptance criteria, (3) data model deltas, (4) API contract, (5) edge cases, (6) test list. Stop. Wait for approval.
Audience: a regulated enterprise.
#spec#planning#feature#enterprise
Find and fix the actual bug
I am seeing <symptom> in <env>. Stack trace and repro below. Identify the root cause, propose the minimal fix, and explain why simpler hypotheses are wrong. Do not paper over the issue. Trace:
<paste>
#debug#root-cause#fix
Find and fix the actual bug β for a startup codebase
I am seeing <symptom> in <env>. Stack trace and repro below. Identify the root cause, propose the minimal fix, and explain why simpler hypotheses are wrong. Do not paper over the issue. Trace:
<paste>
Audience: a startup codebase.
#debug#root-cause#fix#codebase
Find and fix the actual bug β for a regulated enterprise
I am seeing <symptom> in <env>. Stack trace and repro below. Identify the root cause, propose the minimal fix, and explain why simpler hypotheses are wrong. Do not paper over the issue. Trace:
<paste>
Audience: a regulated enterprise.
#debug#root-cause#fix#enterprise
Write tests first, then code
Write tests first for <feature> using <test framework>. Cover happy path, two failure modes, and an edge case. Then implement the smallest code that passes them. Show tests and code separately.
#tdd#tests#feature
Write tests first, then code β for a startup codebase
Write tests first for <feature> using <test framework>. Cover happy path, two failure modes, and an edge case. Then implement the smallest code that passes them. Show tests and code separately.
Audience: a startup codebase.
#tdd#tests#feature#codebase
Write tests first, then code β for a regulated enterprise
Write tests first for <feature> using <test framework>. Cover happy path, two failure modes, and an edge case. Then implement the smallest code that passes them. Show tests and code separately.
Audience: a regulated enterprise.
#tdd#tests#feature#enterprise
Code review with prioritized notes
Review the diff below as a senior engineer. Output 3 sections: blockers, must-fix, nits. Be specific, cite line numbers, and propose a concrete change for every blocker. Diff:
<paste>
#review#pr#feedback
Code review with prioritized notes β for a startup codebase
Review the diff below as a senior engineer. Output 3 sections: blockers, must-fix, nits. Be specific, cite line numbers, and propose a concrete change for every blocker. Diff:
<paste>
Audience: a startup codebase.
#review#pr#feedback#codebase
Code review with prioritized notes β for a regulated enterprise
Review the diff below as a senior engineer. Output 3 sections: blockers, must-fix, nits. Be specific, cite line numbers, and propose a concrete change for every blocker. Diff:
<paste>
Audience: a regulated enterprise.
#review#pr#feedback#enterprise
Migrate from legacy library
Migrate the file from <legacy lib> to <new lib>. Preserve behavior, update types, replace deprecated calls, and add a brief migration note at the top. Flag anything that has no clean equivalent.
#migration#libraries#modernize
Migrate from legacy library β for a startup codebase
Migrate the file from <legacy lib> to <new lib>. Preserve behavior, update types, replace deprecated calls, and add a brief migration note at the top. Flag anything that has no clean equivalent.
Audience: a startup codebase.
#migration#libraries#modernize#codebase
Migrate from legacy library β for a regulated enterprise
Migrate the file from <legacy lib> to <new lib>. Preserve behavior, update types, replace deprecated calls, and add a brief migration note at the top. Flag anything that has no clean equivalent.
Audience: a regulated enterprise.
#migration#libraries#modernize#enterprise
Explain unfamiliar code
Explain what the code below does. Give: (1) a one-paragraph summary, (2) a function-by-function map, (3) the data flow, (4) two non-obvious gotchas a new contributor would miss. Code:
<paste>
#explain#onboarding#reading
Explain unfamiliar code β for a startup codebase
Explain what the code below does. Give: (1) a one-paragraph summary, (2) a function-by-function map, (3) the data flow, (4) two non-obvious gotchas a new contributor would miss. Code:
<paste>
Audience: a startup codebase.
#explain#onboarding#reading#codebase
Explain unfamiliar code β for a regulated enterprise
Explain what the code below does. Give: (1) a one-paragraph summary, (2) a function-by-function map, (3) the data flow, (4) two non-obvious gotchas a new contributor would miss. Code:
<paste>
Audience: a regulated enterprise.
#explain#onboarding#reading#enterprise
Generate API client with retries
Generate a typed API client for <openapi spec / endpoints>. Include: typed responses, request validation, exponential backoff with jitter, idempotency keys for POSTs, structured logging, and a mock server for tests.
#api#client#reliability
Generate API client with retries β for a startup codebase
Generate a typed API client for <openapi spec / endpoints>. Include: typed responses, request validation, exponential backoff with jitter, idempotency keys for POSTs, structured logging, and a mock server for tests.
Audience: a startup codebase.
#api#client#reliability#codebase
Generate API client with retries β for a regulated enterprise
Generate a typed API client for <openapi spec / endpoints>. Include: typed responses, request validation, exponential backoff with jitter, idempotency keys for POSTs, structured logging, and a mock server for tests.
Audience: a regulated enterprise.
#api#client#reliability#enterprise
Performance triage
Profile the function below. List the top three suspected hot paths, what data would confirm each, and the smallest change for each. Do not micro-optimize without evidence. Code:
<paste>
#performance#profiling#triage
Performance triage β for a startup codebase
Profile the function below. List the top three suspected hot paths, what data would confirm each, and the smallest change for each. Do not micro-optimize without evidence. Code:
<paste>
Audience: a startup codebase.
#performance#profiling#triage#codebase
Performance triage β for a regulated enterprise
Profile the function below. List the top three suspected hot paths, what data would confirm each, and the smallest change for each. Do not micro-optimize without evidence. Code:
<paste>
Audience: a regulated enterprise.
#performance#profiling#triage#enterprise
Security review of a handler
Audit the handler below for OWASP top-10 risks. For each finding: severity, exploit scenario in two sentences, and a concrete remediation. Do not invent vulnerabilities. Handler:
<paste>
#security#owasp#audit
Security review of a handler β for a startup codebase
Audit the handler below for OWASP top-10 risks. For each finding: severity, exploit scenario in two sentences, and a concrete remediation. Do not invent vulnerabilities. Handler:
<paste>
Audience: a startup codebase.
#security#owasp#audit#codebase
Security review of a handler β for a regulated enterprise
Audit the handler below for OWASP top-10 risks. For each finding: severity, exploit scenario in two sentences, and a concrete remediation. Do not invent vulnerabilities. Handler:
<paste>
Audience: a regulated enterprise.
#security#owasp#audit#enterprise