Skip to content

feat(prompts): add YAML prompt templates for 5 remaining agents#81

Merged
DsThakurRawat merged 1 commit intomainfrom
feat/agent-prompt-templates
Apr 20, 2026
Merged

feat(prompts): add YAML prompt templates for 5 remaining agents#81
DsThakurRawat merged 1 commit intomainfrom
feat/agent-prompt-templates

Conversation

@DsThakurRawat
Copy link
Copy Markdown
Owner

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→refine chain-of-thought pattern.

- 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.
@DsThakurRawat DsThakurRawat merged commit 0b2ed7e into main Apr 20, 2026
1 check passed
@DsThakurRawat DsThakurRawat deleted the feat/agent-prompt-templates branch April 20, 2026 05:31
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Warning

Rate limit exceeded

@DsThakurRawat has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 18 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7d451780-ffa5-4a00-ae58-b96ae4fc05af

📥 Commits

Reviewing files that changed from the base of the PR and between 790b30a and c5966f2.

📒 Files selected for processing (5)
  • agents/prompts/backend_codegen.yaml
  • agents/prompts/devops_infra.yaml
  • agents/prompts/finance_analysis.yaml
  • agents/prompts/frontend_codegen.yaml
  • agents/prompts/qa_test_gen.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/agent-prompt-templates

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Comment on lines +56 to +57
- If budget < $50: db.t3.micro, 256 CPU Fargate, no NAT gateway
- If budget < $200: db.t3.small, 512 CPU Fargate, single NAT
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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%"}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example alert severity WARNING for 82% utilization contradicts the ALERT RULES defined on line 58, which state that utilization > 80% should be marked as CRITICAL.

        {{"severity": "CRITICAL", "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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line specifies multi-AZ for the high-budget tier, which contradicts the principle on line 11 stating single-AZ for compute (cost savings). Please clarify if the multi-AZ requirement at this budget level is intended to override the general principle for compute resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant