Skip to main content
Writing clear, actionable prompts is key to getting great results from Tembo. Following these guidelines will help ensure successful outcomes.

When to Tag @tembo

Tag required:
  • Pull Request comments - Request changes or provide feedback
  • GitHub Issues - Start work on features or fixes
  • Slack messages - Trigger tasks in channels or DMs
No tag needed:
  • Tembo Dashboard tasks
  • Linear/Jira issues assigned to Tembo
  • Initial task creation in any context
Tagging ensures Tembo responds to your feedback while ignoring internal team discussions.

Anatomy of a Great Prompt

A well-structured prompt includes: clear objective (what needs to be done), context (why it matters), acceptance criteria (when it’s complete), and technical details (requirements/constraints).

Examples

Bug Fix

Title: Fix memory leak in background job processor

Description:
The background job processor in workers/job-processor.ts accumulates memory
and crashes after ~6 hours. Heap grows from 512MB to 4GB before crash.

Acceptance Criteria:
- Memory stable over 24+ hours
- No queued jobs lost
- Add memory monitoring

Technical Details:
See Sentry #12345. Issue likely in cleanup logic around line 156.
Why it works: Specific file location, reproduction context, measurable criteria, linked error tracking, and technical hypothesis.

Feature Implementation

Title: Add email validation to user registration form

Requirements:
- RFC 5322 compliant format checking
- Block disposable email domains
- Real-time UI validation with specific error messages
- Client and server-side validation
- Unit tests for edge cases

Technical Notes:
Frontend: components/auth/RegistrationForm.tsx
Backend: services/user-service.ts
Use zod for validation. Blocklist: github.com/disposable/disposable-email-domains
Why it works: Clear requirements, file locations, existing patterns referenced, external dependencies identified.

Refactoring

Title: Refactor authentication middleware to async/await

Description:
Modernize middleware/auth.js from callback-based patterns to async/await.

Scope:
- Convert callbacks to async/await
- Add try/catch error handling
- Add TypeScript types
- Maintain backward compatibility

Acceptance Criteria:
- All tests pass without modification
- No breaking changes to API consumers

Context: Part of Node.js modernization (TEM-1234).
Why it works: Clear scope, backward compatibility requirements, links to related work.

API Endpoint

Title: Add pagination to GET /api/users endpoint

Requirements:
- Cursor-based pagination (not offset-based)
- Default 50 users, max 200 per request
- Backward compatible for existing clients

Response Format:
{
  "data": [...],
  "pagination": {
    "next_cursor": "abc123",
    "has_more": true,
    "total_count": 1500
  }
}

Technical Details:
Endpoint: routes/api/users.ts
Use utils/pagination.ts. Add index on users.created_at.
Update openapi.yml.
Why it works: Specific approach, example response format, backward compatibility addressed.

Less Effective Prompts

Too Vague:
Title: Fix the bug
Description: The app is broken, please fix it.
No specific issue, no context, no verification criteria. Missing Context:
Title: Improve performance
Description: Make the dashboard load faster.
No metrics, no target, no scope defined. Overly Broad:
Title: Update the app
Description: Modernize the codebase and add new features.
Multiple unrelated tasks, no priorities—break into smaller issues.

Tips by Issue Type

Bug Reports: Steps to reproduce, expected vs actual behavior, error messages, environment details, links to error tracking. Feature Requests: User story/use case, mockups if visual, success metrics, edge cases, dependencies. Refactoring: Current state problems, desired end state, constraints (backward compatibility), specific files, related tech debt. Documentation: What to document and why, target audience, existing docs to reference, examples to include, format preferences.

Working with Jira and Linear

Labels: Use type labels (bug, feature, refactor), priority labels, and scope labels (frontend, backend). Link Related Issues: Set parent/child relationships, mark blocking dependencies, connect issues in same epic. Attachments: Screenshots, recordings, error logs, design files, external documentation. Metadata: Priority, story points, component/team, sprint/milestone, due dates.

Common Patterns

Multi-Repository Tasks

Title: Add user authentication to frontend and backend

Frontend (webapp repo):
- Login/signup forms with JWT storage
- Auth context provider
- Protected route wrapper

Backend (api repo):
- /auth/login and /auth/signup endpoints
- JWT generation and validation middleware
- Refresh token rotation

Note: Requires changes to both repositories. Ensure implementations are compatible.

Database Migrations

Title: Add indexes to improve orders table performance

Indexes:
- (user_id, created_at) for order history
- (status, updated_at) for admin filtering
- (store_id, created_at) for store dashboards

Acceptance Criteria:
- Migration with up/down scripts
- Test in staging first
- Measure with EXPLAIN (target: <500ms)
- Document in MIGRATIONS.md

Context: Dashboard queries taking 3-5s on 2M+ rows.

Getting the Best Results

Be specific with file paths, line numbers, and function names. Explain the why, not just the what. Define measurable success criteria. Include example inputs/outputs. Link to relevant resources. Break large tasks into focused issues. Iterate based on results.

Questions?

Start with three questions: What needs to change? Why? How will we know it’s done? Then add technical details and context as needed.