sparc-implement
Skill này làm gì
Skill này bao gồm các giai đoạn thiết kế của phương pháp SPARC: viết pseudocode cho từng yêu cầu và đặt ra kiến trúc. Skill dành cho lập trình viên muốn có thiết kế rõ ràng trước khi triển khai.
Khi nào nên dùng
- ✓Khi yêu cầu của một tính năng đã được thống nhất và bạn cần thiết kế trước khi viết mã.
- ✓Khi bạn muốn lập kế hoạch các trường hợp biên và đường lỗi trước khi viết mã.
- ✓Khi bạn cần xác định ranh giới module và các giao diện cho một tính năng.
Liên kết skill
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-sparc/skills/sparc-implement/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy thiết kế pseudocode và ranh giới module cho tính năng thông báo mới, dựa trên các yêu cầu đã thống nhất.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill tải đặc tả đã lưu, viết pseudocode không phụ thuộc ngôn ngữ cho từng tiêu chí, kể cả các đường lỗi, rồi định nghĩa kiến trúc và giao diện. Skill lưu thiết kế để các giai đoạn sau có thể dùng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
SPARC Architecture + Implementation
Run Phases 2 and 3 of the SPARC methodology: design algorithms with pseudocode, then establish architecture with module boundaries and API contracts.
When to use
After the Specification phase is complete and its gate has been passed. This skill covers both the Pseudocode and Architecture phases as they are tightly coupled — algorithm design informs module boundaries and vice versa.
Steps
Retrieve specification — call
mcp__plugin_ruflo-core_ruflo__memory_searchwith namespacesparc-phasesand query for the feature's spec. Extract requirements, acceptance criteria, constraints, and edge cases.Retrieve phase state — call
mcp__plugin_ruflo-core_ruflo__memory_retrievewith namespacesparc-stateand exact keycurrent-phase-{feature-slug}to confirm we are in Phase 2 or 3.Search for architectural patterns — call
mcp__plugin_ruflo-core_ruflo__neural_predictwith the feature description to find relevant architectural decisions from past projectsPhase 2 — Pseudocode Design: a. For each acceptance criterion, write language-agnostic pseudocode that satisfies it b. Define core data structures with type annotations c. Map control flow including:
- Happy path
- Error/exception paths for each edge case
- Concurrent access handling if applicable d. Annotate algorithmic complexity (time and space) for critical paths e. Store pseudocode artifact:
- Call
mcp__plugin_ruflo-core_ruflo__memory_storewith namespacesparc-phases, keypseudo-{feature-slug} - Value:
{ status: "complete", algorithms: [...], dataStructures: [...], controlFlow: [...], complexity: {...} }
Phase 3 — Architecture Design: a. Define bounded contexts and aggregate roots following DDD patterns:
- Identify entity boundaries and value objects
- Define aggregate invariants
- Map domain events b. Design API contracts:
- Request/response schemas with TypeScript interfaces
- Error response codes and formats
- Versioning strategy if applicable c. Plan module boundaries:
- Directory structure
- Dependency direction rules (no circular dependencies)
- Public vs internal interfaces d. Specify infrastructure concerns:
- Persistence strategy (database, cache, file)
- Messaging patterns (sync, async, event-driven)
- Configuration and environment requirements e. Store architecture artifact:
- Call
mcp__plugin_ruflo-core_ruflo__memory_storewith namespacesparc-phases, keyarch-{feature-slug} - Value:
{ status: "complete", boundedContexts: [...], apiContracts: [...], moduleBoundaries: {...}, infrastructure: {...} }
Update phase state — call
mcp__plugin_ruflo-core_ruflo__memory_storewith namespacesparc-state, exact keycurrent-phase-{feature-slug}; preserve existing state fields, update current phase to 3 (Architecture) with both artifacts recorded, and setupdatedAtto the current ISO timestampRecord trajectory step — call
mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-stepwith architecture summaryBegin implementation — if the user confirms, proceed to write production code: a. Create files following the defined module boundaries b. Implement interfaces and types first c. Implement core logic following the pseudocode d. Write unit tests alongside implementation (TDD when possible) e. Run tests to verify acceptance criteria
Present architecture — display the architecture decision record and suggest running
/ruflo-sparc:ruflo-sparc advanceto pass the Phase 3 gate
Output format
# Pseudocode: {Feature Name}
## Core Algorithms
### Algorithm 1: {name}
```pseudocode
FUNCTION processRequest(input):
VALIDATE input against schema
IF invalid THEN THROW ValidationError
result <- TRANSFORM input
STORE result
RETURN result
Complexity: O(n) time, O(1) space
Data Structures
- {StructName}: { field1: type, field2: type }
Architecture: {Feature Name}
Bounded Contexts
- {ContextName}: {description}
- Aggregates: {list}
- Events: {list}
API Contracts
POST /api/{resource}
- Request: { field1: string, field2: number }
- Response: { id: string, ...fields }
- Errors: 400 (validation), 409 (conflict), 500 (internal)
Module Structure
src/{feature}/
{feature}.types.ts # Interfaces and types
{feature}
Câu hỏi thường gặp
Cần có gì trước khi dùng skill?
Một giai đoạn đặc tả đã hoàn thành, với các yêu cầu và tiêu chí chấp nhận đã được lưu.
Skill có viết mã cuối cùng không?
Skill chuyển sang triển khai sau khi thiết kế xong, theo kế hoạch đã lưu.
Giai đoạn được theo dõi ở đâu?
Trạng thái giai đoạn được lưu trong không gian bộ nhớ sparc-state.
Chi tiết
Mô tả gốc của tác giả
Run the SPARC Pseudocode and Architecture phases (2 and 3) — write algorithm pseudocode, design module boundaries and API contracts, then implement
repo: ruvnet/ruflo
Độ phổ biến
- Sao GitHub
- 81k
- Vị trí xếp hạng
- #1695
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-adaptive-coordinator
81kGiúp agent của bạn chia và cân bằng lại một nhóm agent AI khi khối lượng công việc thay đổi, chọn bố cục phù hợp với tác vụ.
agent-agent
81kDạy agent của bạn biến một mục tiêu lớn thành kế hoạch hành động có thứ tự, và lập lại kế hoạch khi điều kiện thay đổi.
agent-agentic-payments
81kGiúp agent của bạn quản lý ủy quyền chi tiêu cho mua sắm bằng AI, với hạn mức chi, khung thời gian, quy tắc người bán và phê duyệt có chữ ký.
agent-analyze-code-quality
81kGiúp agent của bạn rà soát chất lượng mã, tìm code smell, nợ kỹ thuật và gợi ý tái cấu trúc mà không thay đổi các file.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.