ตัวรันลูปการเขียนโค้ดแบบเอเจนต์

กรอกพรอมต์นี้

รันลูปการเขียนโค้ดแบบเอเจนต์ โดยเลือกงาน วิธีตรวจสอบ และเกณฑ์เสร็จสมบูรณ์แยกจากกัน แล้ววนซ้ำจนกว่าการตรวจภายนอกจะผ่าน

เทมเพลตพรอมต์

Execute the following task as an agentic loop. Do not ask for confirmation between iterations.

### TASK
Perform this action: {{Action: # Implement, Implement a new feature, Implement a missing function body, Write unit tests for existing code, # Fix, *Fix a failing test or bug, Fix all compiler warnings, Resolve linter violations, # Improve, Refactor without changing behavior, Optimize a slow code path, Migrate code to a newer API or framework version, Add missing error handling}}

### CONTEXT
{{Project Context: if used in an AI agent use the current project}}

### LOOP STRUCTURE
Repeat the following cycle:
1. ACT: Apply the smallest meaningful change toward the task.
2. VERIFY: Check the result using this method: {{Verification: # Automated, *Run the test suite, Compile or build the project, Run the linter and static analysis, Execute the script or program and inspect the output, Validate output against a schema or contract, # Manual proxy, Run a single reproduction case, Compare behavior before and after the change, Measure performance with a benchmark, Diff the output against a known-good reference}}
3. FEED BACK: If verification fails, take the raw error output (stack trace, test report, compiler message) unmodified into the next iteration. Do not summarize or interpret it before acting on it.

### COMPLETION CRITERION
Stop the loop only when this condition is met: {{Done When: *All tests pass with zero failures, Build succeeds with zero warnings, Linter reports zero violations, Program runs without exceptions on the given input, Output validates against the schema, Benchmark meets the target threshold, Reproduction case no longer fails, Behavior is identical before and after refactoring, All new code paths are covered by tests}}

### SAFEGUARDS
- Maximum {{Max Iterations:5}} iterations. If the limit is reached without success, stop and report the last error, what was attempted, and a hypothesis for the root cause.
- If the same error occurs in two consecutive iterations, stop immediately and report the stall instead of retrying.
- Touch only files required by the task.

### ADDITIONAL INFORMATION:
{{ Additional Information: none }}

After completion, summarize in 3 short bullet points: what was changed, how it was verified, and how many iterations were needed.

คู่มือพรอมต์

เหมาะสำหรับ

  • เริ่มจากพรอมต์ที่มีโครงสร้างและใช้ซ้ำได้ แทนที่จะเป็นแชทเปล่า
  • ปรับพรอมต์ให้เข้ากับข้อมูลของคุณ โดยยังคงเจตนาเดิมไว้
  • เวิร์กโฟลว์ที่เกี่ยวข้องกับ Software Development, Debug & Testing

วิธีใช้งาน

  1. คัดลอกเทมเพลตพรอมต์ฉบับเต็ม
  2. แทนที่ตัวแปรแต่ละตัวด้วยบริบทของคุณ หรือเลือกจากตัวเลือกที่แนะนำ
  3. วางพรอมต์ที่กรอกเสร็จลงใน ChatGPT, Claude, Gemini หรือผู้ช่วย AI อื่น ๆ

ตัวแปรในพรอมต์นี้

Action

# Implement, Implement a new feature, Implement a missing function body, Write unit tests for existing code, # Fix, Fix a failing test or bug, Fix all compiler warnings, Resolve linter violations

Project Context

if used in an AI agent use the current project

Verification

# Automated, Run the test suite, Compile or build the project, Run the linter and static analysis, Execute the script or program and inspect the output, Validate output against a schema or contract, # Manual proxy, Run a single reproduction case

Done When

All tests pass with zero failures, Build succeeds with zero warnings, Linter reports zero violations, Program runs without exceptions on the given input, Output validates against the schema, Benchmark meets the target threshold, Reproduction case no longer fails, Behavior is identical before and after refactoring

Max Iterations

5

Additional Information

none

ตัวอย่างจุดเริ่มต้น

Execute the following task as an agentic loop. Do not ask for confirmation between iterations.

### TASK
Perform this action: # Implement

### CONTEXT
if used in an AI agent use the current project

### LOOP STRUCTURE
Repeat the following cycle:
1. ACT: Apply the smallest meaningful change toward the task.
2. VERIFY: Check the result using this method: # Automated
3. FEED BACK: If verification fails, take the raw error output (stack trace, test report, compiler message) unmodified into the next iteration. Do not summarize or interpret it before acting on it.

### COMPLETION CRITERION
Stop the loop only when this condition is met: All tests pass with zero failures

### SAFEGUARDS
- Maximum 5 iterations. If the limit is reached without success, stop and report the last error, what was attempted, and a hypothesis for the root cause.
- If the same error occurs in two consecutive iterations...

ตัวแปรทำงานอย่างไร

ไวยากรณ์ตัวแปร

ตัวแปรจะอยู่ภายใน {{ และ }} และเป็นไปตามรูปแบบนี้:

{{variable name: option1, option2, option3 }}

ตัวแปรที่กำหนดไว้ล่วงหน้า

ตัวเลือกสามารถอ้างอิงรายการตัวแปรที่กำหนดไว้ล่วงหน้าโดยใช้วงเล็บเหลี่ยม ตัวเลือกเหล่านี้จะแสดงเป็น[สีส้ม]และให้ค่าที่ใช้บ่อย เช่น สี โทน หรือภาษา

{{Tone: [tones] }}

รายการตัวเลือกที่กำหนดเอง

คุณยังสามารถระบุรายการตัวเลือกแบบอินไลน์ โดยคั่นด้วยเครื่องหมายจุลภาคได้

{{Format: bullet points, paragraphs, numbered list }}
💡

เคล็ดลับ: คุณไม่จำเป็นต้องใช้แอป PUCO เพื่อใช้พรอมต์เหล่านี้! เพียงคัดลอกเทมเพลตและแทนที่แต่ละส่วน {{…}} ด้วยข้อความของคุณเองโดยตรงใน ChatGPT, Claude, Gemini หรือผู้ช่วย AI อื่น ๆ

ใช้พรอมต์นี้ได้ในไม่กี่วินาที ไม่ใช่เป็นนาที

ติดตั้ง PUCO สำหรับ Mac: กดคีย์ลัดในแอปใดก็ได้ กรอกฟอร์มอัจฉริยะ แล้ววางลงใน ChatGPT, Claude หรือ Gemini ทุกตัวแปรจะกลายเป็นเมนูแบบเลื่อนลงที่คัดสรรมาแล้ว และระบบจะจดจำค่าล่าสุดของคุณ

ดาวน์โหลดบน Mac App Store