Chuyển đến nội dung
Skillpedia
Lập trình chung81k · #1696

sparc-refine

Skill này làm gì

Skill này bao gồm hai bước cuối của phương pháp SPARC: tinh chỉnh mã qua rà soát và kiểm thử, rồi hoàn thiện tài liệu và kiểm tra sẵn sàng. Skill dành cho lập trình viên đưa một tính năng đạt chất lượng production.

Khi nào nên dùng

  • ✓Khi một tính năng đã xây xong và cần rà soát kỹ theo đặc tả.
  • ✓Khi độ phủ test cần được cải thiện trước khi phát hành.
  • ✓Khi một tính năng cần tài liệu cuối cùng và kiểm tra sẵn sàng.

Liên kết skill

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-sparc/skills/sparc-refine/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-sparc/skills/sparc-refine/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy rà soát tính năng thông báo theo đặc tả, cải thiện độ phủ test và chuẩn bị nó để phát hành.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill tải các sản phẩm thiết kế trước đó, kiểm tra mã theo từng yêu cầu, mẫu và quy tắc chất lượng, rồi cải thiện các test. Skill kết thúc bằng kiểm tra xác nhận, tài liệu và bản ghi sẵn sàng, và bỏ qua những việc đã được đánh dấu hoàn thành.

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 Refinement + Completion

Run Phases 4 and 5 of the SPARC methodology: iteratively improve through code review and testing, then finalize with validation, documentation, and deployment readiness.

When to use

After the Architecture phase is complete and its gate has been passed. This skill covers the final two phases that bring a feature from implemented to production-ready.

Steps

Phase 4 — Refinement

  1. Retrieve all prior artifacts — call mcp__plugin_ruflo-core_ruflo__memory_search with namespace sparc-phases and query for the feature slug. Load spec (acceptance criteria), pseudocode, and architecture.

  2. Retrieve phase state — call mcp__plugin_ruflo-core_ruflo__memory_retrieve with namespace sparc-state and exact key current-phase-{feature-slug} to confirm we are in Phase 4 (or Phase 5 when resuming completion). If status === "complete", report the existing completion and do not write again; stop on missing/malformed state.

  3. Code review — review the implementation against: a. Specification compliance: does every acceptance criterion have a corresponding code path? b. Architecture adherence: do modules follow the defined boundaries and dependency rules? c. Pseudocode fidelity: does the implementation match the designed algorithms? d. Code quality: naming conventions, single responsibility, error handling, no dead code e. Document findings as review comments

  4. Test coverage analysis: a. Run existing tests and measure coverage b. Identify uncovered acceptance criteria c. Write missing tests:

    • Unit tests for each public function
    • Integration tests for cross-module interactions
    • Edge case tests for each identified edge case from the spec d. Target coverage >= 80% on new code
  5. Performance validation — if the spec includes performance constraints: a. Profile critical paths identified in the pseudocode b. Compare measured performance against constraint thresholds c. Optimize if thresholds are not met

  6. Iterate — repeat steps 3-5 until:

    • All acceptance criteria have passing tests
    • Code review has no critical or high-severity issues
    • Coverage meets the threshold
    • Performance constraints are satisfied
  7. Store refinement artifact — call mcp__plugin_ruflo-core_ruflo__memory_store with namespace sparc-phases, key refine-{feature-slug}, value: { status: "complete", reviewFindings: [...], coveragePercent: N, performanceResults: {...}, iterations: N }

    Before moving to Phase 5, evaluate the Phase 4 gate (passing acceptance tests, approved review, coverage >= 80%) and store its evidence in sparc-gates. On failure preserve phase, increment gateAttempts, refresh updatedAt with the current ISO timestamp at the exact current-phase key, report blockers and stop. On pass preserve existing state fields, set phase 5, phaseName "Completion", status "active", and updatedAt to the current ISO timestamp at the same key in sparc-state. When resuming Phase 5, do not repeat the Phase 4 transition.

  8. Record trajectory step — call mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step with refinement summary

Phase 5 — Completion

  1. Full regression — run the complete test suite to verify no regressions from refinement changes

  2. Traceability matrix — build a matrix mapping every acceptance criterion to:

    • The test(s) that verify it
    • The code file(s) that implement it
    • The current pass/fail status
  3. Documentation: a. Generate API documentation from code comments and type definitions b. Write usage examples for key public interfaces c. Update any existing documentation affected by the changes

  4. Deployment readiness checklist:

    • All tests passing
    • Documentation complete
    • Database migrations prepared (if applicable)
    • Configuration changes documented
    • Feature flags configured (if applicable)
    • Rollback plan defined
    • Security review complete (no secrets, inputs validated)
  5. Evaluate the final Phase 5 gate — completion is allowed only when final gate evidence for every criterion passes: full regression actually ran and passed, documentation is complete, deployment checklist is verified, and traceability links every acceptance criterion to passing tests. Store the actual pass/fail evidence at gate-5-{feature-slug}-{timestamp} in `sparc-ga

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

Nếu tính năng đã được đánh dấu hoàn thành thì sao?

Skill báo cáo việc hoàn thành đã có và không ghi lại nó lần nữa.

Rà soát kiểm tra những gì?

Mỗi tiêu chí chấp nhận có mã hay không, ranh giới module có được giữ hay không, và các quy tắc chất lượng mã có được đáp ứng hay không.

Skill có triển khai tính năng không?

Skill chuẩn bị sẵn sàng triển khai. Việc triển khai là một quyết định riêng.

Chi tiết

Mô tả gốc của tác giả

Run the SPARC Refinement and Completion phases — review code, improve test coverage, validate against specification, and generate documentation

repo: ruvnet/ruflo

Độ phổ biến

Sao GitHub
81k
Vị trí xếp hạng
#1696
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự