@apmantza/greedysearch-pi 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/coding-task.mjs +2 -0
- package/package.json +1 -1
package/coding-task.mjs
CHANGED
|
@@ -25,6 +25,7 @@ const MODE_PROMPTS = {
|
|
|
25
25
|
code: null, // no preamble — default behaviour
|
|
26
26
|
review: `You are a senior software engineer doing a thorough code review. Analyse the code below for: correctness and edge cases, security issues, performance problems, readability and naming, missing error handling, and anything that would not survive a production incident. Be specific — cite line-level issues where relevant. Suggest concrete fixes, not vague advice.`,
|
|
27
27
|
plan: `You are a senior software architect. The user will describe something they want to build and their current plan. Your job is to: (1) identify risks, gaps, and hidden assumptions in the plan, (2) flag anything that will cause pain later (scaling, ops, security, maintainability), (3) suggest better alternatives where the plan is suboptimal, (4) call out what's missing entirely. Be direct and opinionated — the goal is to find problems before they're built.`,
|
|
28
|
+
test: `You are a senior engineer writing tests for code written by someone else. Your goal is to find what they missed. Write a comprehensive test suite that covers: edge cases the author likely didn't think of, boundary conditions (empty input, nulls, max values, type coercion), error paths and exception handling, concurrency or ordering issues if relevant, and any behaviour that differs from what the function name implies. Use the same language and testing framework as the code if apparent, otherwise default to the most common one for that language. Output runnable test code — not a list of what to test.`,
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
const STREAM_POLL_INTERVAL = 800;
|
|
@@ -274,6 +275,7 @@ async function main() {
|
|
|
274
275
|
' code (default) — write or modify code',
|
|
275
276
|
' review — senior engineer code review: correctness, security, performance',
|
|
276
277
|
' plan — architect review: risks, gaps, alternatives for a build plan',
|
|
278
|
+
' test — write tests an author would miss: edge cases, error paths, boundary conditions',
|
|
277
279
|
'',
|
|
278
280
|
'Examples:',
|
|
279
281
|
' node coding-task.mjs "write a debounce function in JS" --engine gemini',
|
package/package.json
CHANGED