Skip to content

feat(skills): hệ skill v1 — ngăn Skill, registry, chạy qua runner (B5) - #120

Merged
phanlemanh merged 31 commits into
mainfrom
feat/skill-system-v1
Sep 17, 2026
Merged

phanlemanh merged 31 commits into
mainfrom
feat/skill-system-v1

Conversation

@phanlemanh

Copy link
Copy Markdown
Owner

Tóm tắt

Roadmap B5 ★ · dossier skill-system-v1 · T3 (chạm src/app/api) · Cổng 2 ký 17/09 (Mạnh), phán quyết PASS. Pre-merge của chính hồ sơ: sạch.

Người dùng bấm nút Skill ở thanh trái, chọn một việc làm sẵn, đưa video vào và nhận kết quả mà không phải tự dựng đồ thị. Khi muốn, họ mở đúng đồ thị vừa chạy lên canvas để sửa. Bản này có hai skill: Cắt cảnh videoTách tiếng khỏi video.

Kiến trúc (ADR-0002)

  • Skill = template ExecutableWorkflow dựng bằng exporter thật + manifest tham số. Engine không đổi.
  • instantiate ghi tham số vào cả bản thực thi lẫn originalFlow; test tương đương với exporter.
  • Một lượt skill là một hàng tasks với feature: "skill". Runner dựng lại bản thực thi lúc dispatch, từ chối khi phiên bản skill đổi hoặc thiếu plugin.
  • Route mới: GET /api/skills, POST /api/skills/[id]/run, GET /api/skills/runs/[taskId], GET /api/skills/runs/[taskId]/plan.
  • Kiểm toàn vẹn registry: id khớp thư mục, semver, slot khớp template, đích tham số tồn tại và không phải trường nối bằng cạnh, đầu ra trỏ node có thật, template khớp exporter.
  • UI: ngăn Skill (danh sách, biểu mẫu, tiến trình, kết quả, xác nhận thay canvas), i18n đủ năm locale.

Bằng chứng

  • 13 AC, eval E1–E17b. Mọi eval máy xanh ở lượt S4 thứ 3 (lượt cuối), cộng một lần chạy lại vì hạ tầng cho E14 và pnpm test (1041 đạt). Hai lệnh này chỉ đỏ khi chạy cùng làn giao diện.
  • E8 chạy đầu-cuối thật với plugin ffmpeg cục bộ. Chiều đỏ là mẫu không tiếng, cho failed ở bước a1.
  • E17 (chữ trong ngăn nói bằng lời sản phẩm): ba người chấm máy đề xuất Đạt, owner chấm Đạt.
  • Hồ sơ đầy đủ: _acceptance/skill-system-v1/ (contract, evals, evidence-report, evidence-page.html, decisions.jsonl).

Hạn chế đã biết (ký nhận ở Cổng 2)

17 mục ngoài hợp đồng, liệt kê trong contract.md › Notes. Nặng nhất: đóng rồi mở lại ngăn Skill khi lượt đang chạy làm lượt đó chạy lại, vì luồng chờ mở lại không kèm reconnect=true.

Ghim lại kèm theo

cache-l3-tier-bconformance-l0 bị nhánh này làm cũ (runner.ts, src/app/api/skills/*). Đã ghim lại bằng làn eval, run_id repin-20260917T000600Z-94801, xanh 30/30 eval + 9 suite. Làn chạy với UV_PYTHON=">=3.10": làn đầu đỏ ở cache-l3-tier-b/E11 chỉ vì uv chọn Python 3.9 hệ thống.

Còn chặn merge (có sẵn trên main, ngoài PR này)

pre-merge-check.sh --base main còn 3 vi phạm: chong-doc-sai-em-ru, local-cpu-plugins, normalize-text-vi được ghim bằng làn suite-only, thiếu evals_exit. Cần ghim lại bằng làn eval trước khi merge.

Lưu ý môi trường

Hơn trăm lệnh SDK trong _acceptance/config.yaml gọi uv run không ghim bản Python. Máy mặc định Python 3.9 sẽ đỏ giả.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

phanlemanh and others added 27 commits September 17, 2026 07:57
…-run 8/10, gap-probe, ban bam duoc

Ho so B5 truoc Cong Pham vi: design doc (dac ta UX), contract (Vat truoc vong,
Tien de TD-1..TD-10 kem ket qua dry-run), 22 eval, 11 dong so quyet dinh,
gap-probe 1 P0 + 4 P1 da sua, design-pass 33 khung, ba hinh quyet dinh, the Cong 1.
Component ngan skill (trinh bay, chua noi du lieu) + route proto.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…y check

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Real routes over a temp SQLite: closed-set param refusals, missing plugin,
unknown skill, the 3-run ceiling with its suppression half, a business-only
prompt, per-node steps with the failed node from the engine's envelope, the
instance graph for view/edit plan, and missing slots read by the real scanner.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ine delegate

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Stateful panel over the S1-D presentational components: list from the real
registry, manifest-generated form with upload, per-step progress from the
task's node events, outputs and failure copy by error code, rerun with the
same params, and view/edit plan with a replace confirmation. Tests drive the
real routes, runner and engine delegate over a temp DB.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… registry entry

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The first real end-to-end run produced both files but an empty result screen:
the engine persists results keyed by node id, while the reader (and E7's
hand-typed fixture) assumed WorkflowOutput names. Manifest outputs now address
{nodeId, field}, the run view reads the engine's real shape, and E7 uses the
result recorded from that run. E16's no-special half no longer scans the
skill's own dir (glob pathspec), and its teeth now include a realistic manifest.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…E15 not-run executed), E14 red

Run log, evidence report and review findings from the first verify round, the
E12 frames moved into the dossier's evidence dir (the capture agent saved them
at the repo root), and the first «thước:» edit of the round.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
S4 round 1 in-contract finding: the integrity check accepted a config target
on an existing node with a field its slot does not declare, and E1 only broke
input targets. E1 now covers all three target cases plus a real-field control.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…hird «thước:» edit

In-contract: config targets on handle-bound fields pass the integrity check and
the new control locks that in. E14 red again under S4 load; sdk_pytest red
because uv resolves the system Python 3.9. Fixing the in-contract finding needs
a third measurement edit this round, which the owner's experiment turns into a
stop-and-report.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…Python; E14 wait ceiling

Owner decision 16/09 after the S4-r2 stop: change the measurement (third
«thước:» edit) — E1 reads the field kind from the template binding, controls
on threshold, and refuses a config target on an edge-fed field by name. The
shared sdk_pytest key now asks uv for Python >=3.10 as the SDK declares, and
the a11y guard waits up to 300s for its server under full S4 load.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rastructure only

No in-contract findings; every contract eval green except E14, whose own
server did not come up within 300s under full S4 load. pnpm test red on one
out-of-scope test (SDK wheel build racing in sdk/build). Stops at the
Evidence Gate as the owner decided.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… signable: BLOCKED)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… both green

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ing Evidence Gate signoff

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ouched runner.ts and api/skills

Lane run_id repin-20260917T000600Z-94801, run with UV_PYTHON=">=3.10": the
first lane went red on cache-l3-tier-b/E11 only because uv picked the system
Python 3.9 (PEP 604 annotations in the test file); no measurement file changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
run_id repin-20260917T001713Z-38026, 12/12 machine evals + 9 suites green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…tem-v1): re-pin after rebase onto main with #121

run_id repin-20260917T010205Z-49608, 59 machine evals + 9 suites green at ea7f898.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
uv picked the system Python 3.9 for every `uv run --no-project` executor in
_acceptance/config.yaml, and the SDK tests use 3.10 syntax, so eval lanes went
red on infrastructure. uv discovers .python-version from the working directory's
parents even with --no-project, so one file covers every SDK key without
editing them. CI already sets up Python 3.10 and is unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
phanlemanh and others added 3 commits September 17, 2026 08:04
Owner decision 17/09. The plugin's source repository has not existed publicly
since 26/08, so E14b, E17a and E17b can never go green again. The dossier is not
re-signed and the evals are not declared not-run. Kit 2.14.0 has no retired
status, so status stays signed-off and the dossier keeps blocking pre-merge as
recorded debt that the owner bypasses on merge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…tem-v1): re-pin after adding .python-version

run_id repin-20260917T010826Z-59027, 59 machine evals + 9 suites green at
fcdc6df, run without UV_PYTHON so the lane itself proves the pin file suffices.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@phanlemanh

Copy link
Copy Markdown
Owner Author

Acceptance Gate còn đỏ vì đúng một nợ đã ghi — owner bỏ qua có ghi nhận khi merge

CI trên 8f48c16: Lint, Type Check, Build, Unit Tests (vitest), SDK Tests (Python) đều xanh. Acceptance Gate đỏ với một vi phạm:

VIOLATION [normalize-text-vi]: evidence is stale — code changed after verify (verified_commit 673e700dbdfd2127ecae409108f1fa6a5346d42a); re-run verify before merge.
pre-merge-check: 1 violation(s) — merge blocked

Trước khi PR này chạm hồ sơ, cùng hồ sơ đó bị báo bằng dòng «re-pin lane … recorded no evals_exit» (pin suite-only đời cũ, có sẵn trên main). Nay lưới báo «stale» vì PR ghi mục nghỉ hẳn vào hợp đồng của nó. Gốc chung: hồ sơ không ghim lại được.

Vì sao không ghim lại được

  • Plugin oneflow-api-normalize-text-vi đã rút khỏi danh sách chính thức ngày 26/08: kho nguồn github.com/phanlemanh/oneflow-api-normalize-text-vi không tồn tại công khai.
  • Làn eval chạy 17/09 đỏ ở E14b (không có cây plugin để đối chiếu pin), E17a và E17b (FAIL: could not clone …). Ba ô này không bao giờ xanh lại.
  • Owner quyết 17/09: hồ sơ nghỉ hẳn, không ký lại, không khai ba ô là không-chạy. Ghi ở _acceptance/normalize-text-vi/contract.md › «Nghỉ hẳn» và một dòng descope trong decisions.jsonl.
  • Kit acceptance-gate 2.14.0 không có trạng thái «nghỉ». Đổi status hay verdict để lưới im là nói dối, nên hồ sơ giữ signed-off và tiếp tục chặn lưới.

Các hồ sơ khác đã sạch

Hồ sơ Việc đã làm run_id
skill-system-v1 Ký Cổng 2 17/09, ghim lại trên cây sau rebase repin-20260917T010826Z-59027
cache-l3-tier-b Ghim lại (nhánh chạm runner.ts) repin-20260917T010826Z-59027
conformance-l0 Ghim lại (nhánh chạm src/app/api/skills) repin-20260917T010826Z-59027
chong-doc-sai-em-ru Thay pin suite-only bằng làn eval repin-20260917T010826Z-59027
local-cpu-plugins Ghim lại bằng làn eval trong #121 (E4 xanh thật) trong main

Làn cuối chạy 59 eval máy + 9 suite, xanh, không đặt UV_PYTHON: tệp .python-version (>=3.10) ở gốc repo tự đủ để uv không rơi về Python 3.9 hệ thống.

Merge PR này là việc của owner, với bỏ-qua-có-ghi-nhận cho đúng vi phạm normalize-text-vi ở trên.

@phanlemanh
phanlemanh merged commit 53e4ab6 into main Sep 17, 2026
5 of 6 checks passed
@phanlemanh
phanlemanh deleted the feat/skill-system-v1 branch September 17, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant