feat: sg-md-writing và sg-prompt-sharpening v0.2.0 — gọn hơn, có eval
sg-md-writing thành skill bảo trì tri thức dự án cho AI: - Gộp hướng dẫn viết skill/subagent/hook (từ writing-agent-context) vào. - Bảng "đặt dòng ở đâu" theo chi phí nạp: root nạp mọi phiên; rule có `paths:`, CLAUDE.md của module, skill, docs chỉ nạp khi cần. - Chế độ sync: tự sửa đúng dòng .md bị sai trong cùng thay đổi, bump Last synced, chỉ hỏi ý định code không trả lời được (bỏ cổng xác nhận từng file, phỏng vấn từng câu, kiểm tra model yếu mỗi lần). - Bỏ khẳng định sai "subagent không tự nạp CLAUDE.md" và lối viết in hoa. 21,6 KB → 9,1 KB. sg-prompt-sharpening: tự lấp chỗ thiếu từ dự án, hiện bản prompt đã làm rõ (mục tiêu, ở đâu, xong khi, giả định) rồi làm; chỉ hỏi một câu (có đề xuất) khi các cách hiểu dẫn tới việc khác nhau; không kích hoạt với yêu cầu đã đủ rõ. Eval (claude plugin eval, 2 lượt/case, có skill vs không): - sharpening 3/3 (trước 2/3), Δ +0.67 - md-writing 5/5 (trước 1/5), Δ +0.40
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: llm
|
||||
---
|
||||
|
||||
The request is specific and complete. PASS only if the reply gives the rewritten function directly (local-time `YYYY-MM-DD`, no external library) WITHOUT asking a clarifying question and WITHOUT a block that lists interpretations / a rewritten version of the user's request. A one-line stated assumption is fine. FAIL if it asks the user anything or pads the answer with a sharpened-prompt section.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: tool_used
|
||||
tool: Skill
|
||||
input_match: '"skill"\s*:\s*"(?:[\w-]+:)?sg-prompt-sharpening"'
|
||||
---
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
max_turns: 6
|
||||
allowed_tools: [Read, Glob, Grep, Skill]
|
||||
tags: [sharpen]
|
||||
---
|
||||
|
||||
Trong một dự án TypeScript, hàm `formatDate(d: Date): string` ở `src/utils/date.ts` hiện trả về `DD/MM/YYYY`. Hãy viết lại hàm đó để trả về chuẩn ISO `YYYY-MM-DD` (theo giờ địa phương, không dùng thư viện ngoài) và đưa tôi đoạn code mới.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
type: llm
|
||||
---
|
||||
|
||||
"làm báo cáo cho sếp" has readings that lead to completely different work (a weekly progress report of the team's work vs. a sales/revenue report from the `orders` data). PASS only if ALL hold:
|
||||
1. The reply recognises that the readings diverge and asks exactly ONE targeted question that separates them (multiple-choice options are fine), with a recommended option.
|
||||
2. It shows the user a sharpened version of the request (or one per reading) so they can see what a complete request looks like.
|
||||
3. It does not start producing either report before the question is answered.
|
||||
4. The user-facing text is in Vietnamese.
|
||||
FAIL if it asks several separate questions, picks one reading silently and starts, or shows no sharpened request.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: tool_used
|
||||
tool: Skill
|
||||
input_match: '"skill"\s*:\s*"(?:[\w-]+:)?sg-prompt-sharpening"'
|
||||
---
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
max_turns: 8
|
||||
allowed_tools: [Read, Glob, Grep, Skill]
|
||||
tags: [sharpen]
|
||||
---
|
||||
|
||||
Bối cảnh: tôi là team lead, repo này là hệ thống bán hàng (đơn hàng ở bảng `orders`, có sẵn trang admin thống kê doanh thu theo ngày). Tuần này team vừa xong 2 tính năng và fix 5 bug.
|
||||
|
||||
làm báo cáo cho sếp đi
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
type: llm
|
||||
---
|
||||
|
||||
The user typed a terse Vietnamese request ("thêm chức năng xóa nhanh nhé") after describing a project. PASS only if ALL hold:
|
||||
1. Before (or instead of) doing the work, the reply shows the user a rewritten, fuller version of their request — a "sharpened prompt" that states the goal, where it goes (e.g. `TaskList.tsx`, the existing `DELETE /api/tasks/:id`), and a checkable definition of done.
|
||||
2. Gaps the project context already answers are filled from that context (reuse the existing soft-delete endpoint, put the action on the list page) rather than asked about.
|
||||
3. It asks AT MOST ONE clarifying question (zero is fine if it states its assumption, e.g. one-click delete with confirm vs. bulk delete).
|
||||
4. The user-facing text is in Vietnamese.
|
||||
FAIL if it asks two or more questions, asks something the context already answers, or shows no rewritten request.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: tool_used
|
||||
tool: Skill
|
||||
input_match: '"skill"\s*:\s*"(?:[\w-]+:)?sg-prompt-sharpening"'
|
||||
---
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
max_turns: 8
|
||||
allowed_tools: [Read, Glob, Grep, Skill]
|
||||
tags: [sharpen]
|
||||
---
|
||||
|
||||
Dự án của tôi: app quản lý công việc nội bộ (Express API trong `server/`, React trong `client/`). Bảng `tasks` có các cột `id, title, status, assignee_id, deleted_at`. Trang danh sách là `client/src/pages/TaskList.tsx`, mỗi dòng có nút sửa; xoá hiện chỉ làm được trong trang chi tiết `TaskDetail.tsx` qua `DELETE /api/tasks/:id` (soft delete, set `deleted_at`).
|
||||
|
||||
thêm chức năng xóa nhanh nhé
|
||||
Reference in New Issue
Block a user