From 1db698ad61cf48f20f3fe7deaaea645a727b6032 Mon Sep 17 00:00:00 2001 From: toki Date: Sun, 12 Apr 2026 08:32:52 +0900 Subject: [PATCH] Rename add-crosstest-language to add-toki-socket-crosstest-language - Rename skills/add-crosstest-language to skills/add-toki-socket-crosstest-language - Add new skill agents for code-review and plan - Update skill documentation --- .../add-crosstest-language/agents/openai.yaml | 4 ---- .../SKILL.md | 17 +++++++++++-- .../agents/openai.yaml | 4 ++++ skills/code-review/SKILL.md | 24 +++++++++++-------- skills/code-review/agents/openai.yaml | 4 ++++ skills/plan/SKILL.md | 15 ++++++++---- skills/plan/agents/openai.yaml | 4 ++++ 7 files changed, 51 insertions(+), 21 deletions(-) delete mode 100644 skills/add-crosstest-language/agents/openai.yaml rename skills/{add-crosstest-language => add-toki-socket-crosstest-language}/SKILL.md (85%) create mode 100644 skills/add-toki-socket-crosstest-language/agents/openai.yaml create mode 100644 skills/code-review/agents/openai.yaml create mode 100644 skills/plan/agents/openai.yaml diff --git a/skills/add-crosstest-language/agents/openai.yaml b/skills/add-crosstest-language/agents/openai.yaml deleted file mode 100644 index be83d6c..0000000 --- a/skills/add-crosstest-language/agents/openai.yaml +++ /dev/null @@ -1,4 +0,0 @@ -interface: - display_name: "Add Crosstest Language" - short_description: "Add language crosstests consistently" - default_prompt: "Use $add-crosstest-language to add cross-language integration tests for a new toki_socket implementation." diff --git a/skills/add-crosstest-language/SKILL.md b/skills/add-toki-socket-crosstest-language/SKILL.md similarity index 85% rename from skills/add-crosstest-language/SKILL.md rename to skills/add-toki-socket-crosstest-language/SKILL.md index 7437ec7..ed481c6 100644 --- a/skills/add-crosstest-language/SKILL.md +++ b/skills/add-toki-socket-crosstest-language/SKILL.md @@ -1,9 +1,9 @@ --- -name: add-crosstest-language +name: add-toki-socket-crosstest-language description: Create or extend toki_socket cross-language integration tests for a new language implementation. Use when adding folders, orchestrators, subprocess clients, or review notes for Dart/Go/other language protocol compatibility tests, especially tests that must verify TCP and WebSocket send, push, request-response, concurrent request nonce mapping, and protobuf typeName compatibility without cluttering the repository root. --- -# Add Crosstest Language +# Add Toki Socket Crosstest Language ## Overview @@ -69,6 +69,19 @@ Run these scenarios for both TCP and WebSocket: Split each protocol into separate `send-push` and `requests` phases when the language implementation forbids registering a normal listener and request listener for the same protobuf type at the same time. This is required for the current Dart and Go communicators. +## Secure Transport Scenarios + +When the new language implementation supports secure transports, add the same coverage for TLS+TCP and WSS, or document why the runtime cannot support them yet. + +At minimum, secure scenarios must verify: + +- A TLS+TCP client can connect to a TLS+TCP server and exchange `TestData`. +- A WSS client can connect to a WSS server and exchange `TestData`. +- Certificate/test trust setup stays inside test fixtures and does not depend on machine-global trust stores. +- Secure test commands are included in the review note with any environment-specific caveats. + +If secure transport support is intentionally deferred, record it as a review note and make sure the language implementation README does not claim TLS/WSS availability. + ## Protocol Details Use the generated `TestData` protobuf from each language package. The current proto has no `package` declaration, so both sides must use the simple type name: diff --git a/skills/add-toki-socket-crosstest-language/agents/openai.yaml b/skills/add-toki-socket-crosstest-language/agents/openai.yaml new file mode 100644 index 0000000..09183f3 --- /dev/null +++ b/skills/add-toki-socket-crosstest-language/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "Add Toki Socket Crosstest Language" + short_description: "Add Toki Socket crosstests" + default_prompt: "Use $add-toki-socket-crosstest-language to add cross-language integration tests for a new toki_socket implementation." diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md index e208cec..98910ba 100644 --- a/skills/code-review/SKILL.md +++ b/skills/code-review/SKILL.md @@ -1,6 +1,6 @@ --- name: code-review -description: Review completed implementation work for toki_socket. Reads PLAN.md and CODE_REVIEW.md from the active task, reviews the actual changed source files, appends a verdict to CODE_REVIEW.md, then archives both files as .log. If any issues are found (WARN or FAIL), writes a new PLAN.md and CODE_REVIEW.md stub so the loop continues immediately. +description: Review completed implementation work in the current repository. Reads PLAN.md and CODE_REVIEW.md from the active task, reviews the actual changed source files, appends a verdict to CODE_REVIEW.md, then archives both files as .log. If Required or Suggested issues are found (FAIL or WARN), writes a new PLAN.md and CODE_REVIEW.md stub so the loop continues immediately. Nit-only findings may still PASS. --- # Code Review @@ -24,6 +24,10 @@ plan skill → implementing agent → code-review skill (this) Note: `PLAN.md` and `CODE_REVIEW.md` are always present together. The implementing agent does not rename or delete either file — archiving is this skill's responsibility. +## Workflow Contract + +This skill expects active work to live at `tasks/{task_name}/PLAN.md` and `tasks/{task_name}/CODE_REVIEW.md`. These paths are the state protocol shared with the plan skill. Do not adapt them per repository unless the whole loop contract is intentionally changed in both skills. + --- ## Step 1 — Find the Active Task @@ -90,7 +94,7 @@ Complete every item before writing the verdict. - [ ] Compare actual source files against the plan's "수정 파일 및 체크리스트" — are all planned changes present in the code? - [ ] For every symbol renamed or removed: Grep on the current working tree to confirm no stale references remain. - [ ] For every new test listed in the plan: confirm it exists, name matches, assertion is non-trivial. -- [ ] Cross-check the claimed `dart analyze` / `go test` output in CODE_REVIEW.md against the actual code. +- [ ] Cross-check the claimed verification output in CODE_REVIEW.md against the actual code and project commands. **Follow-up review only** (count ≥ 1, diff available): - [ ] Compare `git diff` + `git diff --cached` against the plan's checklist — are there unplanned changes or missing changes? @@ -133,8 +137,8 @@ Append the following section to the existing `CODE_REVIEW.md`. Every field is re ### 다음 단계 -**[PASS]** 추가 작업 불필요. 아카이브 완료. -**[WARN]** Suggested/Nit N건. 새 PLAN.md 작성 완료. 구현 에이전트는 PLAN.md를 읽고 작업 시작. +**[PASS]** Required/Suggested 없음. Nit만 있으면 별도 계획 없이 아카이브 완료. +**[WARN]** Suggested N건. 새 PLAN.md 작성 완료. 구현 에이전트는 PLAN.md를 읽고 작업 시작. **[FAIL]** Required N건. 새 PLAN.md 작성 완료. 구현 에이전트는 PLAN.md를 읽고 작업 시작. ``` @@ -158,16 +162,16 @@ After this step neither `PLAN.md` nor `CODE_REVIEW.md` exists. ## Step 6 — Post-Review Actions -### If verdict is PASS (zero issues) +### If verdict is PASS (zero Required/Suggested) -No further files needed. Report to the user: +No further files needed. Nit-only findings may be listed in the verdict and still PASS. Report to the user: - Verdict: PASS - Archives: `code_review_N.log`, `plan_M.log` - Task status: complete (only `.log` files remain in `tasks/{task_name}/`) ### If verdict is WARN or FAIL -WARN = Suggested/Nit issues only, zero Required. FAIL = one or more Required issues. Both unconditionally write new PLAN.md and CODE_REVIEW.md stub. +WARN = one or more Suggested issues, zero Required. FAIL = one or more Required issues. Nit-only findings do not force WARN and may PASS. WARN and FAIL unconditionally write new PLAN.md and CODE_REVIEW.md stub. Write new files for the fix round: @@ -181,7 +185,7 @@ Write new files for the fix round: - **수정 파일 및 체크리스트**: exhaustive checkbox list. - **테스트 작성**: decision + justification. - **중간 검증**: runnable command. -- If verdict is WARN (Suggested/Nit issues, no Required): group all Suggested and Nit issues into one plan item. Include it in the plan — it is not optional. +- If verdict is WARN (Suggested issues, no Required): group all Suggested issues, plus any related Nit issues, into one plan item. Include it in the plan — it is not optional. - Include 수정 파일 요약 table. - Include 최종 검증 section. @@ -191,7 +195,7 @@ Write new files for the fix round: - Empty sections: 계획 대비 변경 사항, 주요 설계 결정, 리뷰어 체크포인트, 검증 결과. Report to the user: -- Verdict: FAIL → Required N건 / WARN → Suggested/Nit N건 +- Verdict: FAIL → Required N건 / WARN → Suggested N건 - Archives: `code_review_N.log`, `plan_M.log` - New plan: `tasks/{task_name}/PLAN.md` ready for implementing agent @@ -232,5 +236,5 @@ Report to the user: 2. `plan_M.log` exists (was PLAN.md). 3. Neither `CODE_REVIEW.md` nor `PLAN.md` exists as `.md` in the task directory. 4. If PASS: only `.log` files remain in `tasks/{task_name}/`. -5. If WARN or FAIL: new `PLAN.md` exists, header `plan=N` matches count of `plan_*.log` after archiving. FAIL: every Required issue has its own plan item with full sub-sections. WARN: grouped Suggested/Nit plan item exists with full sub-sections. +5. If WARN or FAIL: new `PLAN.md` exists, header `plan=N` matches count of `plan_*.log` after archiving. FAIL: every Required issue has its own plan item with full sub-sections. WARN: grouped Suggested plan item exists with full sub-sections. 6. If WARN or FAIL: new `CODE_REVIEW.md` stub exists, header `plan=N` matches new PLAN.md, completion table lists every item. diff --git a/skills/code-review/agents/openai.yaml b/skills/code-review/agents/openai.yaml new file mode 100644 index 0000000..d45d468 --- /dev/null +++ b/skills/code-review/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "Code Review" + short_description: "Review task implementation" + default_prompt: "Use $code-review to review the active repository task and archive or continue the loop." diff --git a/skills/plan/SKILL.md b/skills/plan/SKILL.md index 19ddd58..849c4c3 100644 --- a/skills/plan/SKILL.md +++ b/skills/plan/SKILL.md @@ -1,6 +1,6 @@ --- name: plan -description: Analyze the codebase and write a detailed PLAN.md for toki_socket improvements. Also writes the CODE_REVIEW.md stub that the implementing agent will fill in after coding. Use for any new feature, refactor, bug fix, or follow-up fix. A separate agent reads PLAN.md and does the actual coding. The code-review skill archives both files after review. +description: Analyze the current repository and write a detailed PLAN.md for implementation work. Also writes the CODE_REVIEW.md stub that the implementing agent will fill in after coding. Use for any feature, refactor, bug fix, or follow-up fix that should enter the plan-code-review loop. A separate agent reads PLAN.md and does the actual coding. The code-review skill archives both files after review. --- # Plan @@ -26,6 +26,10 @@ All files live under `tasks/{task_name}/`. Directory state at any point: | `PLAN.md` + `CODE_REVIEW.md` (filled) | Ready for code-review skill | | Only `*.log` files | Task complete | +## Workflow Contract + +This skill intentionally uses `tasks/{task_name}/PLAN.md` and `tasks/{task_name}/CODE_REVIEW.md` as the state protocol between planning, implementation, and review. Do not change these paths or filenames unless the paired plan and code-review skills are updated together. This convention is not project-specific; it is the workflow contract for this skill loop. + --- ## Step 1 — Determine Task @@ -37,10 +41,11 @@ Otherwise, glob `tasks/*/PLAN.md` and branch: | Result | Action | |--------|--------| | Exactly one found | Continuing task — use that directory. `task_name` = directory name. | -| None found | New task — derive `task_name` from the user request (short snake_case, e.g. `dart_api_refactor`). Create `tasks/{task_name}/`. | +| None found | New task — derive `task_name` from the user request (short snake_case, e.g. `api_refactor`). Create `tasks/{task_name}/`. | | Multiple found | Cannot auto-detect — list the found paths and ask the user which task to work on. Stop. | > PLAN.md is the entry point of the loop. Without it the loop has not started. +> No `PLAN.md` should normally occur only before the first plan for a new task. Do not create a plan just because none exists; create one only when the user is starting a new feature/refactor/fix/follow-up that belongs in this workflow. For casual analysis, status, or review requests, answer without creating task files unless the user explicitly asks for a plan. --- @@ -52,7 +57,7 @@ Complete every item before writing a single line. Do not skip. - [ ] Read every test file that exercises the changed code. - [ ] For each changed behavior, check whether an existing test covers it. Note uncovered gaps. - [ ] Grep for every symbol that will be renamed or removed — find all call sites and import chains. -- [ ] Check `pubspec.yaml` / `go.mod` for existing dependencies before adding new ones. +- [ ] Check the repository's package manifests and dependency files before adding new dependencies. - [ ] Anticipate compile errors: missing `@override`, type mismatches, broken imports. - [ ] Confirm the final verification command works in this project layout. @@ -237,8 +242,8 @@ task={task_name}, plan=N, tag=TAG | Tag | Use for | |-----|---------| -| `DART_API` | Dart public API changes | -| `GO_REFACTOR` | Go internal refactoring | +| `API` | Public API changes | +| `REFACTOR` | Internal refactoring | | `TEST` | Test additions or fixes | | `REVIEW_` | Follow-up fixes after a code review | diff --git a/skills/plan/agents/openai.yaml b/skills/plan/agents/openai.yaml new file mode 100644 index 0000000..751c35e --- /dev/null +++ b/skills/plan/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "Plan" + short_description: "Write implementation plans" + default_prompt: "Use $plan to create a task PLAN.md and CODE_REVIEW.md stub for this repository change."