- Apply rules in this order when instructions conflict:
- Safety and data integrity
- Security
- User intent
- Workflow/process rules
- Style preferences
- Before any destructive operation (delete, overwrite, force push, reset, drop table), state exactly what will happen and wait for confirmation.
- If work goes sideways or new evidence invalidates the current approach, stop and re-plan before continuing.
- For non-trivial work (3+ steps, cross-file changes, architectural decisions), plan first with clear, checkable steps.
- Use plan/reasoning mode for verification strategy too, not only implementation.
- If stuck or blocked after 2 attempts, stop and report findings; do not attempt a third approach silently.
- Blocked report must include: what was tried, concrete evidence, current hypothesis, exact blocker, and recommended next step.
- When something is ambiguous, ask one focused question, not a list.
- Do not add TODO comments in code without also opening a GitHub issue.
- After user corrections, capture a concise lesson in
tasks/lessons.mdif that file exists in the repo.
- Default to
buildmode first; let auto-routing handle normal implementation tasks. - Use explicit
@subagentmentions when routing is ambiguous, specialist scope is required, or strict output format matters. - Prefer explicit
@gh-operatorfor GitHub operations. - Use
@product-reviewerfor ambiguous product ideas before@architect/@planner; skip it when PRD already exists (/prd) or for bugfix/refactor/purely technical tasks. - Use
@testerfor new/changed behavior validation; use@debuggerwhen tests are already failing. - Use
pre-commit-gatefor your own blocker gate before commit/PR; use@pr-reviewerfor teammate PR review. - Avoid subagents for trivial one-step tasks.
- If auto-routing fails once, switch to explicit
@subagenton the next prompt.
- Simplicity first: choose the smallest correct change with minimal blast radius.
- No lazy fixes: resolve root causes, not symptoms, unless the user explicitly asks for a temporary workaround.
- Minimal impact: do not refactor unrelated areas while fixing a targeted bug.
- For non-trivial changes, do a brief elegance check: if a solution is hacky, prefer a cleaner design that remains low risk.
- Skip over-engineering for obvious/simple fixes.
- Prefer explicit over clever; optimize for the next reader.
- No abbreviations in variable/function names unless universally understood (i, e, err, ctx, req, res).
- Always handle errors; never silently swallow, ignore, or log-and-continue without intent.
- Prefer flat structure over deeply nested conditionals (guard clauses, early returns).
- No dead code left in files; remove it instead of commenting it out.
- Never mark work complete without evidence it works.
- Before claiming fixed/done, provide:
- commands run
- key results (tests/logs/output)
- what was verified vs not verified
- residual risk or limitations
- For behavior-changing work, compare expected behavior before/after when relevant.
- Use a staff-level bar: would a strict reviewer approve based on evidence?
- Never commit
.envfiles, secrets, API keys, or tokens. - Run a pre-commit secret check on staged files (names and patterns such as
.env,*.pem,*.key, credential-like JSON). - Never use
eval(),exec()with unsanitized input, or dynamic SQL string concatenation. - If a hardcoded secret is found, flag it immediately before continuing.
- Use feature branches; never push directly to
main/master. - Commits must follow
type(scope): descriptionunder 72 chars. - PRs should do one thing; if a change touches more than 3 unrelated concerns, flag and propose splitting.
- PR body must reference the issue it closes (
closes #N).
- For multi-step work, keep a checkable task list and maintain one active step at a time.
- Mark progress as you complete steps.
- For significant tasks, include a short completion record: outcome, changed files, verification, follow-ups.
- Be concise; skip preamble.
- Use monospace for commands, file paths, and code references.
- Lead with outcome, then key supporting detail.
- Do not rewrite working code unless explicitly asked to refactor.