diff --git a/.changeset/cute-emus-rule.md b/.changeset/cute-emus-rule.md new file mode 100644 index 0000000..e649e18 --- /dev/null +++ b/.changeset/cute-emus-rule.md @@ -0,0 +1,5 @@ +--- +"@cephalization/math": patch +--- + +feat: Include more guidelines in template prompts diff --git a/src/plan.ts b/src/plan.ts index 0bf97cb..7d07aeb 100644 --- a/src/plan.ts +++ b/src/plan.ts @@ -46,6 +46,13 @@ FIRST, examine the project to understand its technology stack: - Identify the linter/formatter (e.g., eslint, prettier, rustfmt, black) - Note any existing scripts or commands defined in the project +NOTE: +- Distinguish between frontend and backend tooling. +- For frontend tooling, check if 'agent-browser' cli is installed. If so, it should be used for validating visual changes. +- Distinguish between unit tests and integration tests. +- Prefer code generation tools over manual coding when there are scripts to generate code (e.g. relay, openapi-codegen, etc). +- If typed languages are used, prefer concrete, safe types (e.g. unknown instead of any in TypeScript) + ## Step 2: Plan the Tasks Break the user's goal into discrete, implementable tasks using this format: diff --git a/src/templates.ts b/src/templates.ts index fab3580..e70f36a 100644 --- a/src/templates.ts +++ b/src/templates.ts @@ -10,7 +10,7 @@ Implement ONE task from TASKS.md, test it, commit it, log your learnings, then E 1. **Read TASKS.md** - Find the first task with \`status: pending\` where ALL dependencies have \`status: complete\` 2. **Mark in_progress** - Update the task's status to \`in_progress\` in TASKS.md -3. **Implement** - Write the code following the project's patterns +3. **Implement** - Write the code following the project's patterns. Use prior learnings to your advantage. 4. **Write tests** - For behavioral code changes, create unit tests in the appropriate directory. Skip for documentation-only tasks. 5. **Run tests** - Execute tests from the package directory (ensures existing tests still pass) 6. **Fix failures** - If tests fail, debug and fix. DO NOT PROCEED WITH FAILING TESTS.