Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
PluginAn toànQuy trình & bộ nhớ agentCần cài đặt chút

smart-ralph

tzachbon · tzachbon/smart-ralph

Hướng dẫn Claude Code thông qua phát triển theo đặc tả bằng cách tạo các tệp nghiên cứu, yêu cầu, thiết kế và tác vụ có cấu trúc, sau đó thực thi chúng một cách lặp đi lặp lại.

Spec-driven development with smart compaction. Claude Code plugin combining Ralph Wiggum loop with structured specification workflow.

555 sao50Giấy phép: MITCập nhật tháng trước0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Tạo một đặc tả chi tiết cho một tính năng mới trước khi viết bất kỳ mã nào, bao gồm nghiên cứu, yêu cầu và thiết kế.
  • Tự động tiếp tục phát triển một tính năng từ phiên làm việc trước đó, tiếp tục chính xác từ nơi đã dừng lại dựa trên các tác vụ có cấu trúc.
  • Tạo nguyên mẫu một khái niệm thiết kế để kiểm tra tính khả thi mà không cần cam kết mã tạm thời vào mã nguồn chính.

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

Smart Ralph

"Me fail specs? That's unpossible!"

Spec-driven development for Claude Code and Codex.

Smart Ralph turns a feature request into a structured spec, then executes it one task at a time with fresh context. The execution loop is self-contained and has no external plugin dependencies.

How it works | Installation | Quick start | Commands | Troubleshooting


How it works

Smart Ralph creates research, requirements, design, and task files before implementation. Large goals can start with triage, which splits the work into dependency-aware specs.

The spec files stay in the project, so you can review or edit each phase before execution. Smart Ralph records progress between tasks and can resume after a stopped session.

An optional prototype can test one focused design question without turning disposable source into production code.

flowchart TD
    A["I want a feature!"] --> B{"/start detects scope"}
    B -->|Single spec| C[Research]
    B -->|"Too big for one spec"| T["/triage"]

    C -->|Analyzes codebase, searches web| D[Requirements]
    D -->|User stories, acceptance criteria| E[Design]
    E -->|Architecture, patterns, decisions| F[Tasks]
    F -->|POC-first task breakdown| G[Execution]
    G -->|Task-by-task with fresh context| H["I did it!"]

    T -->|Explore| T1[Exploration Research]
    T1 -->|Brainstorm| T2[Triage Analyst]
    T2 -->|Validate| T3[Validation Research]
    T3 -->|Finalize| T4["Epic Plan"]
    T4 -->|"Spec 1, Spec 2, ..."| C

Installation

Claude Code

/plugin marketplace add tzachbon/smart-ralph
/plugin install ralph-specum@smart-ralph

Restart Claude Code after installation.

Codex

codex plugin marketplace add tzachbon/smart-ralph \
  --sparse .agents/plugins \
  --sparse plugins/ralph-specum-codex
codex plugin add ralph-specum@smart-ralph

Start a new Codex task after installation. Run /hooks, review the bundled Stop hook, and trust it if you want automatic task execution. Until then, run $ralph-specum-implement once per task.

The Codex installation guide covers updates, local development with codex plugin marketplace add ., and migration from the old platforms/codex/ skills.

For local Claude Code development, clone this repository and run claude --plugin-dir ./plugins/ralph-specum.

Quick start

Codex

$ralph-specum-start user-auth "Add JWT authentication"

Use $ralph-specum when you want Smart Ralph to choose the next action. Codex asks for approval after each spec artifact unless the command includes the exact --quick flag. Start with $ralph-specum-triage when a goal spans several features or systems.

Claude Code

/ralph-specum:start user-auth "Add JWT authentication"

Add --quick to generate the spec and start execution without stopping between phases. Run /ralph-specum:start without arguments to resume the active spec.

Commands

Claude Code uses /ralph-specum:<name>. Codex uses $ralph-specum-<name> and folds new into $ralph-specum-start.

CommandWhat it does
/ralph-specum:start [name] [goal]Resume a spec or create one
/ralph-specum:start [goal] --quickGenerate all spec phases and execute
/ralph-specum:new <name> [goal]Create a spec and wait for approval before research
/ralph-specum:triage [name] [goal]Split a large goal into an epic
/ralph-specum:researchRun or repeat research
/ralph-specum:requirementsGenerate requirements from research
/ralph-specum:prototypeRun or resume an optional prototype
/ralph-specum:designGenerate the technical design
/ralph-specum:tasksBreak the design into executable tasks
/ralph-specum:implementExecute tasks one at a time
/ralph-specum:indexGenerate searchable codebase specs
/ralph-specum:refactorUpdate requirements, design, or tasks
/ralph-specum:statusShow specs and progress
/ralph-specum:switch <name>Change the active spec
/ralph-specum:cancelCancel execution and remove loop state
/ralph-specum:feedback [message]Submit feedback or report an issue
/ralph-specum:helpShow command and workflow help

Execution model

Smart Ralph gives each phase to a focused agent.

PhaseAgentResponsibility
Triagetriage-analystSplit features and map dependencies
Researchresearch-analystInspect the codebase and check feasibility
Requirementsproduct-managerWrite user stories and acceptance criteria
Prototypeprototype-builderTest one design question with disposable evidence
Designarchitect-reviewerDefine architecture and trade-offs
Taskstask-plannerCreate a POC-first task sequence
Executionspec-executorImplement tasks and run quality gates

Tasks follow four phases:

  1. Make it work: validate the approach with a POC.
  2. Refactoring: clean up the working implementation.
  3. Testing: add unit, integration, and end-to-end coverage.
  4. Quality gates: run lint, type, and CI checks.

Planning controls include:

  • --tasks-size fine|coarse for task granularity
  • [P] for low-conflict parallel tasks
  • [VERIFY] and VE tasks for explicit verification
  • approval checkpoints between spec phases outside quick mode

Optional prototypes

  • In normal mode, Smart Ralph may suggest a prototype after research or requirements. You can also run /ralph-specum:prototype or $ralph-specum-prototype at a safe phase boundary.
  • In quick mode, Smart Ralph asks no prototype questions, owns the decisions, and always continues to design after the prototype outcome.
  • Prototype source stays in a sibling worktree or eligible scratch directory. Quick mode transfers no source
Xem mã nguồn trên GitHub