Update documentation and rules

This commit is contained in:
toki 2026-04-12 17:50:57 +09:00
parent 8a8636762d
commit 518803e762
9 changed files with 39 additions and 16 deletions

View file

@ -22,11 +22,11 @@
## 새 언어 추가 절차
1. 새 언어 디렉터리를 만들기 전에 `templates/language/`의 문서를 복사해 패키지 README와 체크리스트 초안으로 사용한다.
1. 새 언어 디렉터리를 만들기 전에 `agent-ops/skills/project/add-toki-socket-crosstest-language/templates/`의 문서를 복사해 패키지 README와 체크리스트 초안으로 사용한다.
2. `PROTOCOL.md``VERSIONING.md`의 현재 protocol version을 기준으로 지원 범위를 정한다.
3. canonical proto인 `dart/lib/src/packets/message_common.proto`에서 언어별 protobuf binding을 생성한다. Go처럼 generator 전용 option이 필요하면 언어 패키지 안에 copy를 둘 수 있지만, message schema는 `tools/check_proto_sync.sh`로 검증 가능해야 한다.
4. `Transport``Communicator`를 먼저 구현하고, 그 위에 TCP/TLS+TCP/WS/WSS client/server를 올린다.
5. 같은 언어 단위 테스트를 작성한 뒤 `skills/add-crosstest-language/SKILL.md`의 runner 배치 규칙에 맞춰 양방향 crosstest를 추가한다.
5. 같은 언어 단위 테스트를 작성한 뒤 `agent-ops/skills/project/add-toki-socket-crosstest-language/SKILL.md`의 runner 배치 규칙에 맞춰 양방향 crosstest를 추가한다.
6. README의 Implementations 표를 `Available`로 바꾸기 전에 formatter/linter, 단위 테스트, cross-language tests를 모두 통과시킨다.
템플릿은 시작점과 완료 조건만 고정한다. 실제 소스 구조, 패키지 매니저, async runtime은 각 언어의 관용적 선택을 따른다.

View file

@ -42,7 +42,7 @@ Protocol compatibility is tracked separately from language package versions. See
| Python | Planned | `python/` | Server, tooling, scripting |
| Rust | Planned | `rust/` | High-performance server, embedded |
New language implementations should start from [PORTING_GUIDE.md](PORTING_GUIDE.md) and the templates in [templates/language/](templates/language/). Mark an implementation available only after its same-language tests and cross-language tests pass.
New language implementations should start from [PORTING_GUIDE.md](PORTING_GUIDE.md) and the templates in [agent-ops/skills/project/add-toki-socket-crosstest-language/templates/](agent-ops/skills/project/add-toki-socket-crosstest-language/templates/). Mark an implementation available only after its same-language tests and cross-language tests pass.
---

View file

@ -8,7 +8,7 @@ Toki Socket의 Dart/Flutter 구현체를 담당한다. ProtobufClient, ProtobufS
- `dart/lib/` — 공개 API 및 구현
- `dart/test/` — 동일 언어 단위/통합 테스트
- `dart/crosstest/` — 크로스 언어 테스트 (Go, Kotlin과 연동)
- `dart/crosstest/` — 크로스 언어 테스트 (Go, Kotlin과 연동). 오케스트레이터 또는 클라이언트 헬퍼
- `dart/pubspec.yaml` — 패키지 의존성
## 제외 경로

View file

@ -8,7 +8,7 @@ Toki Socket의 Go 구현체를 담당한다. TCP/WebSocket 서버·클라이언
- `go/*.go` — 핵심 구현 (packets/ 제외)
- `go/test/` — 동일 언어 테스트
- `go/crosstest/` — 크로스 언어 테스트
- `go/crosstest/` — 크로스 언어 테스트 (Dart, Kotlin과 연동). 오케스트레이터 또는 클라이언트 헬퍼
- `go/go.mod`, `go/go.sum` — 모듈 의존성
- `go/examples/` — 사용 예제

View file

@ -7,7 +7,7 @@ Toki Socket의 Kotlin/Android 구현체를 담당한다. Android 및 JVM 환경
## 포함 경로
- `kotlin/src/` — 구현 소스
- `kotlin/crosstest/` — 크로스 언어 테스트
- `kotlin/crosstest/` — 크로스 언어 테스트 (Dart, Go와 연동). 오케스트레이터 또는 클라이언트 헬퍼
- `kotlin/build.gradle.kts`, `kotlin/settings.gradle.kts` — Gradle 빌드 설정
## 제외 경로

View file

@ -2,15 +2,16 @@
## 목적 / 책임
Proto 생성·동기화 스크립트와 크로스 언어 테스트 인프라를 담당한다. 모든 언어 구현체가 공통으로 사용하는 빌드 도구를 관리한다.
Proto 생성·동기화 스크립트를 담당한다. 모든 언어 구현체가 공통으로 사용하는 빌드 도구를 관리한다.
## 포함 경로
- `tools/` — proto 생성/검증 스크립트
- `*/crosstest/` — 각 언어의 크로스 언어 테스트 진입점
- `PORTING_GUIDE.md` — 새 언어 구현 절차 가이드
## 제외 경로
- `*/crosstest/` — 각 언어 구현체 도메인에 속함 (dart/go/kotlin)
- `dart/lib/`, `go/*.go`, `kotlin/src/` — 각 언어 구현체 도메인
## 주요 구성 요소
@ -21,14 +22,12 @@ Proto 생성·동기화 스크립트와 크로스 언어 테스트 인프라를
## 유지할 패턴
- proto 변경 후 항상 generate → check_sync 순서로 실행
- crosstest는 상대 서버가 먼저 시작된 상태에서 클라이언트 측 실행
## 다른 도메인과의 경계
- **protocol**: 스크립트가 proto 파일을 읽지만, proto 파일 자체는 protocol 도메인
- **dart/go/kotlin**: crosstest 코드는 각 언어 도메인 경로에 있지만 tools 도메인으로 분류
- **dart/go/kotlin**: crosstest 코드는 각 언어 도메인에 속함. tools 도메인은 `tools/` 스크립트만 담당
## 금지 사항
- `check_proto_sync.sh` 실패를 무시하고 다음 단계로 진행하지 않는다
- crosstest를 단일 언어 unit test로 대체하지 않는다

View file

@ -45,16 +45,27 @@ VERSIONING.md — 프로토콜/패키지 버전 정책
## 도메인 매핑
더 구체적인 경로가 우선한다. 여러 도메인에 걸친 변경이면 가장 구체적인 도메인 규칙을 먼저 읽고, 실제로 함께 수정하는 관련 도메인 규칙도 읽는다.
| 경로 패턴 | 도메인 | rules.md |
|----------|--------|----------|
| `dart/lib/src/packets/**` | protocol | `agent-ops/rules/project/domain/protocol/rules.md` |
| `go/packets/**` | protocol | `agent-ops/rules/project/domain/protocol/rules.md` |
| `kotlin/src/**/packets/**` | protocol | `agent-ops/rules/project/domain/protocol/rules.md` |
| `PROTOCOL.md` | protocol | `agent-ops/rules/project/domain/protocol/rules.md` |
| `VERSIONING.md` | protocol | `agent-ops/rules/project/domain/protocol/rules.md` |
| `tools/**` | tools | `agent-ops/rules/project/domain/tools/rules.md` |
| `PORTING_GUIDE.md` | tools | `agent-ops/rules/project/domain/tools/rules.md` |
| `dart/**` | dart | `agent-ops/rules/project/domain/dart/rules.md` |
| `go/**` | go | `agent-ops/rules/project/domain/go/rules.md` |
| `kotlin/**` | kotlin | `agent-ops/rules/project/domain/kotlin/rules.md` |
| `dart/lib/src/packets/`, `go/packets/`, `kotlin/src/**/packets/` | protocol | `agent-ops/rules/project/domain/protocol/rules.md` |
| `tools/**`, `*/crosstest/**` | tools | `agent-ops/rules/project/domain/tools/rules.md` |
## 기타 경로
- `agent-task/<task-name>/` — 에이전트 작업 로그 (plan, code_review 등). 소스 코드 아님. 수정하지 않는다.
## 스킬 라우팅
| 요청 키워드 | SKILL.md |
|------------|----------|
| 크로스 언어 테스트 추가, 새 언어 crosstest | `agent-ops/skills/project/add-toki-socket-crosstest-language/SKILL.md` |
| 새 언어 구현, 언어 포팅, language scaffold, 템플릿, 크로스 언어 테스트 추가, 새 언어 crosstest | `agent-ops/skills/project/add-toki-socket-crosstest-language/SKILL.md` |

View file

@ -5,6 +5,8 @@
| agent-ops 세팅해줘, scaffold 만들어줘, 초기화해줘 | `agent-ops/skills/common/init-agent-ops/SKILL.md` |
| domain rule 만들어줘, rules.md 생성, 새 도메인 규칙 | `agent-ops/skills/common/create-domain-rule/SKILL.md` |
| skill 만들어줘, SKILL.md 생성, 새 스킬 추가 | `agent-ops/skills/common/create-skill/SKILL.md` |
| 계획 세워줘, 구현 계획, PLAN.md, plan | `agent-ops/skills/common/plan/SKILL.md` |
| 코드 리뷰해줘, code review, CODE_REVIEW.md, 리뷰 루프 | `agent-ops/skills/common/code-review/SKILL.md` |
| 커밋해줘, 푸시해줘, commit, push, 반영해줘 | `agent-ops/skills/common/commit-push/SKILL.md` |
| 버전 올려줘, 버전 변경 | `agent-ops/skills/common/version-bump/SKILL.md` |
| agent-ops 업데이트해줘, 진입 파일 재적용해줘 | `agent-ops/skills/common/sync-agent-ops/SKILL.md` |

View file

@ -1,13 +1,24 @@
---
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.
version: 1.0.0
description: Create new-language implementation scaffolding and extend toki_socket cross-language integration tests. Use when adding language package README/checklist templates, crosstest 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 Toki Socket Crosstest Language
## Purpose
Add Toki Socket cross-language compatibility tests for a new language implementation. Keep crosstest code inside each language package, preserve the repository root for shared docs, and match the Dart/Go baseline behavior.
Create the package-local scaffold for a new Toki Socket language implementation and add its cross-language compatibility tests. Keep implementation checklists and crosstest code inside the relevant language package or this skill's templates, preserve the repository root for shared docs, and match the Dart/Go baseline behavior.
## Language Scaffold
When starting a new language implementation, copy the relevant files from:
```text
agent-ops/skills/project/add-toki-socket-crosstest-language/templates/
```
Use the README and checklists as package-local starting points. Fill in language-specific commands, supported transports, proto generation, same-language tests, and crosstest commands before marking the implementation available.
## Folder Rules