feat(prompts): add YAML prompt templates for 5 remaining agents#81
feat(prompts): add YAML prompt templates for 5 remaining agents#81DsThakurRawat merged 1 commit intomainfrom
Conversation
- backend_codegen.yaml: FastAPI code gen with security critique - frontend_codegen.yaml: Next.js/React with accessibility critique - qa_test_gen.yaml: pytest generation with coverage gap analysis - devops_infra.yaml: Terraform/AWS with cost-tier rules - finance_analysis.yaml: AWS cost analysis with alert thresholds All templates follow the analyze→generate→critique→refine pattern.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 59 minutes and 18 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive set of prompt templates for Backend, DevOps, Finance, Frontend, and QA agents, utilizing a chain-of-thought structure for code generation and infrastructure provisioning. The review identified several critical inconsistencies: the frontend authentication strategy (httpOnly cookies) contradicts the backend's header-based approach and the use of API interceptors; the DevOps prompt contains overlapping budget logic and conflicting availability zone principles; and the finance prompt includes contradictory alert thresholds and a requirement for real-time pricing data that the model cannot currently fulfill without external tools.
| - Server components by default (Next.js 14 App Router) | ||
| - Never hardcode API URLs (use env NEXT_PUBLIC_API_URL) | ||
| - Loading and error states for every data-fetching component | ||
| - JWT stored in httpOnly cookies, NOT localStorage |
There was a problem hiding this comment.
The instruction to use httpOnly cookies contradicts the requirement for frontend/lib/api.ts to use interceptors for token handling (line 48). In a standard SPA setup, httpOnly cookies are managed by the browser and are not accessible to JavaScript, making manual token injection in interceptors unnecessary. Additionally, this conflicts with the backend_codegen.yaml prompt which specifies OAuth2PasswordBearer (line 85), a utility designed for header-based authentication. Please align the authentication strategy across both agent prompts.
| - If budget < $50: db.t3.micro, 256 CPU Fargate, no NAT gateway | ||
| - If budget < $200: db.t3.small, 512 CPU Fargate, single NAT |
There was a problem hiding this comment.
The budget conditions are overlapping. A budget value such as $40 satisfies both the < $50 and < $200 conditions, which may lead to inconsistent behavior from the LLM. It is better to define mutually exclusive ranges.
- If budget < $50: db.t3.micro, 256 CPU Fargate, no NAT gateway
- If budget >= $50 and < $200: db.t3.small, 512 CPU Fargate, single NAT| {{"category": "Compute", "recommendation": "...", "estimated_savings_usd": N}} | ||
| ], | ||
| "alerts": [ | ||
| {{"severity": "WARNING", "message": "Budget utilization at 82%"}} |
| - Alert at 80% budget utilization, halt non-critical at 95% | ||
|
|
||
| You produce clear, actionable financial reports with specific dollar amounts. | ||
| All projections must be based on actual AWS pricing, not estimates. |
There was a problem hiding this comment.
Requiring projections to be based on "actual AWS pricing, not estimates" is likely to cause LLM hallucinations. Since the agent does not have access to a real-time pricing API tool, it cannot fulfill this requirement accurately. Consider softening this to "realistic estimates based on general AWS pricing knowledge" or providing a pricing tool.
| COST RULES: | ||
| - If budget < $50: db.t3.micro, 256 CPU Fargate, no NAT gateway | ||
| - If budget < $200: db.t3.small, 512 CPU Fargate, single NAT | ||
| - If budget >= $200: db.t3.medium, 1024 CPU Fargate, multi-AZ |
There was a problem hiding this comment.
What
Created structured YAML prompt templates for Backend, Frontend, QA, DevOps, and Finance agents.
All 8/8 agents now have externalized YAML-based prompts following the
analyze→generate→critique→refinechain-of-thought pattern.