Logo Ralph Loop Kiro Specs

Ralph Loop Kiro Specs

Cộng đồng
fabricioctelles
ralph-loop-kiro-specs

Trình chạy tác nhân AI lặp tự động để phát triển dựa trên đặc tả trong Kiro. Bọc kiro-cli trong vòng lặp bash tự sửa lỗi, lấy tác vụ từ đặc tả Kiro, lần lượt triển khai từng tác vụ, xác minh theo tiêu chí hoàn thành và tích lũy các lần chỉnh sửa cùng quy luật của codebase qua mỗi lượt. Dùng kỹ năng này khi người dùng nhắc đến “ralph loop”, “ralph”, “vòng lặp đặc tả”, “trình chạy đặc tả lặp”, “tự động chạy các tác vụ trong đặc tả”, “tự động hóa đặc tả Kiro”, “vòng lặp tác nhân AI tự sửa lỗi”, “triển khai tác vụ đặc tả theo vòng lặp”, “chạy kiro-cli theo vòng lặp”, “tự động triển khai tác vụ” hoặc muốn hoàn tất đặc tả Kiro qua nhiều lượt tác nhân AI lặp lại. Cũng dùng khi người dùng muốn thiết lập, cấu hình, khắc phục sự cố hoặc tìm hiểu quy trình Ralph Loop — bao gồm theo dõi tiến độ, các lần chỉnh sửa, quy luật của codebase, nhật ký thời gian và bảng điều khiển tóm tắt.

Tổng quan

Nhà phát hànhfabricioctelles
Kho mãskills
Tên kỹ năngralph-loop-kiro-specs
Sao
87
Bản fork
7
Tệp đi kèm
2
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được fabricioctelles công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Ralph Loop Kiro Specs trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/fabricioctelles/skills/tree/main/skills/ralph-loop-kiro-specs
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fabricioctelles/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/ralph-loop-kiro-specs .claude/skills/ralph-loop-kiro-specs
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Ralph Loop Kiro Specs trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Ralph Loop Kiro Specs ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Ralph Loop Kiro Specs với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Ralph Loop for Kiro Specs

An automated, iterative agent runner that drives spec-based development in Kiro. It wraps kiro-cli in a bash loop, feeding it a carefully engineered prompt that turns Kiro into a disciplined, self-correcting implementation agent — one that picks up tasks from a spec, implements them, verifies its own work, and learns from its mistakes across iterations.

Attribution: Based on ralph-loop-kiro-specs by mreferre, licensed under Apache License 2.0.

When to Use

  • Automate implementation of Kiro spec tasks through repeated agent iterations
  • Drive a spec from start to finish without manual prompt-by-prompt interaction
  • Set up the Ralph Loop in a new project
  • Troubleshoot a stuck or failed Ralph Loop run
  • Understand how progress tracking, corrections, and codebase patterns work
  • Generate or interpret the summary dashboard after completion

Prerequisites

RequirementDetails
Kiro CLIkiro-cli must be installed and on PATH (kiro.dev/cli)
Kiro IDEkiro.dev installed
BashStandard bash shell
Kiro SpecsA project with specs under .kiro/specs/<specs_name>/ containing at least requirements.md, design.md, and tasks.md

How It Works

Ralph runs a loop where each iteration sends a prompt to kiro-cli. The prompt instructs the agent to follow a strict six-phase cycle:

The Six Phases

  1. Load Context — Read steering files (product.md, structure.md, tech.md) and the target spec (requirements.md, design.md, tasks.md, progress.md). Take stock of available tools.
  2. Pick ONE Task — Find the lowest-numbered incomplete top-level task. Record start time. Never pick more than one task per iteration.
  3. Understand Before Implementing — Read relevant source files, study existing patterns, re-read the Corrections and Codebase Patterns sections from progress.md, and apply every relevant correction proactively.
  4. Implement — Implement the task and all subtasks in order. Run typechecks and tests. If something fails: fix it, write a correction immediately if a future iteration could hit the same problem, and move on. After 5 failed attempts, mark the task [F] and log an unresolved blocker.
  5. Verify Exit Criteria — Re-read exit criteria from requirements.md and design constraints from design.md. Confirm each is satisfied before marking complete.
  6. Update Tracking — Mark the task [X] in tasks.md, append a progress entry to progress.md, add new codebase patterns, do a final correction sweep, and record timing to specs_time.md.

The Self-Correction System

The Corrections section at the top of progress.md is a flat lookup table of mistakes and their fixes. Every iteration reads it before doing any work and must never repeat a listed mistake. Corrections are written immediately when errors happen — not at the end of the task.

Format:

- ❌ `python manage.py migrate` → ✅ `python3 manage.py migrate` (system has no `python` alias)
- ❌ Running tests with `npm test` → ✅ `npm run test:unit` (project uses separate test scripts)
- ❌ UNRESOLVED: [description of issue that couldn't be fixed after 5 attempts]

Codebase Patterns

Ralph accumulates conventions discovered during implementation — file naming, import patterns, error handling, testing commands, etc. Only patterns actually encountered are recorded, not speculative ones.

Completion and Summary Dashboard

When all tasks are marked [X], Ralph generates a self-contained summary.html in the spec directory with:

  • Top pane: spec name, status indicator (green/red), total elapsed time, task count, date range
  • Left pane: collapsible task tree with hover tooltips showing progress details
  • Right pane: timing table with per-task start/end times and durations

Project Structure

The user's project should look like this before running Ralph:

your-project/
├── ralph-loop-kiro-specs-prompt.md    # The Ralph agent prompt template
├── ralph-loop-kiro-specs-script.sh    # The loop runner script
└── .kiro/
    ├── steering/
    │   ├── product.md                 # What the product is
    │   ├── structure.md               # Project structure conventions
    │   └── tech.md                    # Tech stack and tooling
    └── specs/
        └── <specs_name>/
            ├── requirements.md        # Requirements and exit criteria
            ├── design.md              # Architecture and design decisions
            ├── tasks.md               # Task checklist
            ├── progress.md            # Auto-created: corrections, patterns, progress log
            ├── specs_time.md          # Auto-created: per-task timing
            └── summary.html           # Auto-generated on completion: visual dashboard

Setup Instructions

To set up Ralph Loop in a project:

  1. Copy the script and prompt template to the project root:
    • ralph-loop-kiro-specs-script.sh — the loop runner (bundled in this skill under scripts/)
    • ralph-loop-kiro-specs-prompt.md — the agent prompt template (bundled under references/)
  2. Make the script executable: chmod +x ralph-loop-kiro-specs-script.sh
  3. Ensure the project has Kiro specs set up under .kiro/specs/<specs_name>/ with at least requirements.md, design.md, and tasks.md
  4. Ensure steering files exist under .kiro/steering/ (product.md, structure.md, tech.md) — these significantly improve output quality

Usage

bash
./ralph-loop-kiro-specs-script.sh <max_iterations> <specs_name>
ArgumentDescription
max_iterationsMaximum number of loop iterations (positive integer). Each iteration implements one task. Set to at least the number of tasks plus a buffer for retries.
specs_nameName of the spec directory under .kiro/specs/. Must already exist with the required files.

Example

bash
# Run up to 15 iterations on the "auth-feature" spec
./ralph-loop-kiro-specs-script.sh 15 auth-feature

Iteration Modes

The script asks at startup whether to run automatically or manually:

  • Automatic — Tasks run back-to-back without pausing. Good for well-defined specs.
  • Manual — Pauses after each iteration for review. Good for new or unfamiliar specs.

Troubleshooting

Ralph gets stuck on a task (marked [F])

Fix the issue manually, update tasks.md to unmark the task, and re-run. The corrections from the failed attempt will still be in progress.md for the next iteration to learn from.

Max iterations reached without completion

Increase max_iterations and re-run. Ralph will pick up where it left off since it reads tasks.md to find the next incomplete task.

Agent implements more than one task per iteration

This violates the core constraint. Check that you're using the unmodified prompt template. The prompt has a critical constraint section at the top that enforces one-task-per-iteration.

Steering files are missing

Ralph works without them but produces better results with context. Create .kiro/steering/product.md, structure.md, and tech.md with descriptions of your product, project structure, and tech stack.

Quality Checklist

Before running Ralph Loop, verify:

  • kiro-cli is installed and available on PATH
  • Spec directory exists under .kiro/specs/<specs_name>/
  • requirements.md has numbered requirements with exit criteria
  • design.md has architecture and design decisions
  • tasks.md has a numbered task checklist with subtasks
  • Steering files exist under .kiro/steering/ (recommended)
  • max_iterations is set to at least the number of tasks + buffer
  • The prompt template (ralph-loop-kiro-specs-prompt.md) is in the project root
  • The script (ralph-loop-kiro-specs-script.sh) is executable

Bundled Resources

ResourcePathDescription
Runner scriptscripts/ralph-loop-kiro-specs-script.shThe bash loop that drives iterations. Copy to project root.
Prompt templatereferences/ralph-loop-kiro-specs-prompt.mdThe agent prompt template. Copy to project root.

Read the prompt template when you need to understand the detailed phase instructions, correction format, codebase pattern categories, or the summary dashboard specification.

License

This skill is based on ralph-loop-kiro-specs by mreferre, licensed under the Apache License 2.0.

Copyright [mreferre]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Ralph Loop Kiro Specs làm được gì?

Trình chạy tác nhân AI lặp tự động để phát triển dựa trên đặc tả trong Kiro. Bọc kiro-cli trong vòng lặp bash tự sửa lỗi, lấy tác vụ từ đặc tả Kiro, lần lượt triển khai từng tác vụ, xác minh theo tiêu chí hoàn thành và tích lũy các lần chỉnh sửa cùng quy luật của codebase qua mỗi lượt. Dùng kỹ năng này khi người dùng nhắc đến “ralph loop”, “ralph”, “vòng lặp đặc tả”, “trình chạy đặc tả lặp”, “tự động chạy các tác vụ trong đặc tả”, “tự động hóa đặc tả Kiro”, “vòng lặp tác nhân AI tự sửa lỗi”, “triển khai tác vụ đặc tả theo vòng lặp”, “chạy kiro-cli theo vòng lặp”, “tự động triển khai tác vụ”...

Vì sao nên dùng Ralph Loop Kiro Specs trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Ralph Loop Kiro Specs là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Ralph Loop Kiro Specs trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/fabricioctelles/skills/tree/main/skills/ralph-loop-kiro-specs. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Ralph Loop Kiro Specs?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Ralph Loop Kiro Specs với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Ralph Loop Kiro Specs với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Ralph Loop Kiro Specs có miễn phí không?

Có. Kỹ năng này được fabricioctelles phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇