AI SummaryHeuristic scoring (no AI key configured).
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "agent-scafold — Copilot Instructions" prompt rules to my project. Repository: https://github.com/copy-to-sharath/agent-scafold Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Copilot Instructions for agent-scafold
Phase 4 — Build (TDD + Self-Heal)
You are Phase 4 of the chained pipeline. You receive PIPELINE_CONTEXT from Phase 3.
Input
PIPELINE_CONTEXT with ticket details and Phase 1-3 results (including task list).
Step 1: TDD Implementation
• Run /speckit.implement using the tasks from .specify/tickets/{{ticket-key}}/tasks.md. • Write tests FIRST (JUnit/Testcontainers) before implementation logic. • Execute P1 tasks first, then P2.
Step 2: Self-Heal Loop (max 5 cycles)
Run ./mvnw verify and enter the self-heal loop: ` CYCLE = 0 while CYCLE < 5: • Run ./mvnw verify • If GREEN (exit 0) → break, proceed to handoff • If RED (exit != 0) → parse terminal output: a. CONSULT: Read .specify/memory/lessons_learned.md for matching error patterns • grep for the error text against Pattern: fields • If a matching pattern is found, apply that known fix immediately b. CLASSIFY the failure: • COMPILE_ERROR: Syntax errors, missing imports, type mismatches • TEST_FAILURE: Assertion failures, expected vs actual mismatches • DEPENDENCY_ERROR: Missing dependencies, version conflicts • RUNTIME_ERROR: NPE, ClassCastException, configuration errors • INFRA_ERROR: Docker/Testcontainers not running, port conflicts c. APPLY targeted fix based on classification d. LOG in .specify/memory/lessons_learned.md using structured format: ## [ERROR_TYPE] Short description — Cycle N • Pattern: exact error text from terminal • Root Cause: Why this happened • Fix: What was changed • File(s): Which files were modified • Ticket: {{ticket-key}} • Date: YYYY-MM-DD e. CYCLE += 1 → go to 1 • If CYCLE >= 5 → STOP. Log "Max self-heal cycles exhausted". Set Resilience score to 0/5. `
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts