update agent-ops domain rules
This commit is contained in:
parent
711dbb9f0c
commit
66c7bb739d
7 changed files with 39 additions and 19 deletions
|
|
@ -1,19 +1,20 @@
|
|||
---
|
||||
domain: api
|
||||
last_rule_review_commit: no-commit-yet
|
||||
last_rule_updated_at: 2026-05-24
|
||||
last_rule_review_commit: 711dbb9f0c8287d2b52a034684e8e31d38eb6228
|
||||
last_rule_updated_at: 2026-05-28
|
||||
---
|
||||
|
||||
# api
|
||||
|
||||
## 목적 / 책임
|
||||
|
||||
클라이언트-facing socket API endpoint를 제공한다. proto-socket server lifecycle, connection setup, heartbeat timing, and API configuration을 이 경계에서 관리한다.
|
||||
클라이언트-facing socket API endpoint를 제공한다. proto-socket server lifecycle, connection setup, heartbeat timing, ALT protobuf parser registration, and API configuration을 이 경계에서 관리한다.
|
||||
|
||||
## 포함 경로
|
||||
|
||||
- `services/api/cmd/alt-api/` - API service entrypoint
|
||||
- `services/api/internal/config/` - API environment configuration
|
||||
- `services/api/internal/contracts/` - API-local ALT protobuf parser map
|
||||
- `services/api/internal/socket/` - proto-socket server construction
|
||||
- `services/api/go.mod` - API module dependencies
|
||||
|
||||
|
|
@ -28,6 +29,7 @@ last_rule_updated_at: 2026-05-24
|
|||
|
||||
- `config.Config` - host, port, socket path, heartbeat interval, heartbeat wait
|
||||
- `config.Load` - environment variable parsing with local fallback defaults
|
||||
- `contracts.ParserMap` - parser registration for generated ALT protobuf messages
|
||||
- `socket.NewServer` - proto-socket `WsServer` construction
|
||||
- `cmd/alt-api/main.go` - signal handling and service lifecycle
|
||||
|
||||
|
|
@ -35,11 +37,12 @@ last_rule_updated_at: 2026-05-24
|
|||
|
||||
- Read configuration from environment variables with explicit local defaults.
|
||||
- Keep process lifecycle in `cmd/alt-api`; keep reusable socket construction under `internal/socket`.
|
||||
- Treat proto-socket as the transport abstraction; ALT payload parsing should be introduced deliberately from contracts.
|
||||
- Keep ALT protobuf parser registration under `internal/contracts` and inject it into proto-socket server construction.
|
||||
- Treat proto-socket as the transport abstraction; ALT payload parsing should be derived from contracts.
|
||||
|
||||
## 다른 도메인과의 경계
|
||||
|
||||
- **contracts**: API routes and parses messages according to contracts, but contract source stays in `packages/contracts`.
|
||||
- **contracts**: API imports generated contract packages and owns API-local parser registration, but contract source stays in `packages/contracts`.
|
||||
- **worker**: API may enqueue or observe worker jobs, but should not run long backtest/import work inline.
|
||||
- **client**: API serves client sessions; client UI state and navigation stay in Flutter.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
domain: client
|
||||
last_rule_review_commit: no-commit-yet
|
||||
last_rule_updated_at: 2026-05-24
|
||||
last_rule_review_commit: 711dbb9f0c8287d2b52a034684e8e31d38eb6228
|
||||
last_rule_updated_at: 2026-05-28
|
||||
---
|
||||
|
||||
# client
|
||||
|
|
@ -14,7 +14,10 @@ ALT의 Flutter client surface를 담당한다. web/mobile/desktop targets, appli
|
|||
|
||||
- `apps/client/lib/main.dart` - Flutter app bootstrap
|
||||
- `apps/client/lib/src/app/` - app shell, theme, router
|
||||
- `apps/client/lib/src/contracts/` - client-side contract parser helpers
|
||||
- `apps/client/lib/src/features/` - feature presentation code
|
||||
- `apps/client/lib/src/generated/` - generated Dart protobuf outputs consumed by the client
|
||||
- `apps/client/lib/src/integrations/` - client-side external integration adapters
|
||||
- `apps/client/test/` - Flutter widget/unit tests
|
||||
- `apps/client/pubspec.yaml` - Flutter package dependencies
|
||||
|
||||
|
|
@ -29,22 +32,29 @@ ALT의 Flutter client surface를 담당한다. web/mobile/desktop targets, appli
|
|||
- `AltClientApp` - Material app shell using Riverpod
|
||||
- `appRouterProvider` - `go_router` configuration
|
||||
- `DashboardScreen` - initial responsive dashboard surface
|
||||
- `altParserMap` - generated ALT protobuf message parser registration for Dart clients
|
||||
- `AltSocketClient` - proto-socket client wrapper for ALT request/response flows
|
||||
- `AltSocketEndpoint` - local/default socket endpoint value object
|
||||
- `SocketConnectionController` - Riverpod connection state controller for socket lifecycle
|
||||
|
||||
## 유지할 패턴
|
||||
|
||||
- Keep app-level shell and router under `lib/src/app`.
|
||||
- Put user-facing screens under the `lib/src/features/feature-name/presentation` pattern.
|
||||
- Put socket and other external adapters under `lib/src/integrations`.
|
||||
- Treat files under `lib/src/generated` as generated outputs; update them through codegen.
|
||||
- Use Material 3 components and responsive navigation patterns.
|
||||
- Test user-visible app shell behavior through Flutter tests.
|
||||
|
||||
## 다른 도메인과의 경계
|
||||
|
||||
- **api**: client connects to API; server lifecycle and socket parsing stay in `services/api`.
|
||||
- **contracts**: client consumes generated/mapped contracts; protobuf source stays in `packages/contracts`.
|
||||
- **api**: client connects to API through integration adapters; server lifecycle and server-side socket parsing stay in `services/api`.
|
||||
- **contracts**: client consumes generated/mapped contracts and owns Dart parser helpers; protobuf source stays in `packages/contracts`.
|
||||
- **operations**: `bin/test`, `bin/lint`, and `bin/build` run client checks from the workspace root.
|
||||
|
||||
## 금지 사항
|
||||
|
||||
- Do not place backend service code or Go module files under `apps/client`.
|
||||
- Do not hand-edit platform generated files unless the Flutter platform integration explicitly requires it.
|
||||
- Do not hand-edit generated protobuf Dart outputs.
|
||||
- Do not hard-code production endpoint assumptions in presentation widgets.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
domain: contracts
|
||||
last_rule_review_commit: no-commit-yet
|
||||
last_rule_updated_at: 2026-05-24
|
||||
last_rule_review_commit: 711dbb9f0c8287d2b52a034684e8e31d38eb6228
|
||||
last_rule_updated_at: 2026-05-28
|
||||
---
|
||||
|
||||
# contracts
|
||||
|
|
@ -13,6 +13,7 @@ ALT 애플리케이션 레벨 protobuf 계약을 정의한다. proto-socket은
|
|||
## 포함 경로
|
||||
|
||||
- `packages/contracts/README.md` - contract direction and compatibility notes
|
||||
- `packages/contracts/gen/go/` - generated Go protobuf module for ALT contracts
|
||||
- `packages/contracts/proto/alt/v1/` - versioned protobuf schema source
|
||||
|
||||
## 제외 경로
|
||||
|
|
@ -26,17 +27,19 @@ ALT 애플리케이션 레벨 protobuf 계약을 정의한다. proto-socket은
|
|||
- `common.proto` - shared enums, decimal, handshake, and error messages
|
||||
- `market.proto` - instrument, price, quantity, bar, and market query messages
|
||||
- `backtest.proto` - backtest run spec, lifecycle, requests, responses, and result messages
|
||||
- `gen/go/alt/v1/*.pb.go` - generated Go message types consumed by Go services
|
||||
|
||||
## 유지할 패턴
|
||||
|
||||
- Prefer additive protobuf changes and reserve removal/renaming for explicit compatibility work.
|
||||
- Keep schema package under `alt.v1` until a deliberate version bump is planned.
|
||||
- Keep `option go_package` aligned with the generated Go package path.
|
||||
- Keep generated Go module path aligned with `git.toki-labs.com/toki/alt/packages/contracts/gen/go`.
|
||||
- Use explicit version/handshake messages because proto-socket protocol `0.1` does not carry an ALT application version field.
|
||||
|
||||
## 다른 도메인과의 경계
|
||||
|
||||
- **api**: contracts define payload shape; API decides transport/session behavior.
|
||||
- **api**: contracts define payload shape and generated Go message types; API decides transport/session behavior and owns API-local parser registration.
|
||||
- **domain-model**: contracts are wire format; domain-model is internal business vocabulary.
|
||||
- **client**: client consumes generated or mapped contracts; schema source remains here.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
domain: domain-model
|
||||
last_rule_review_commit: no-commit-yet
|
||||
last_rule_updated_at: 2026-05-24
|
||||
last_rule_review_commit: 711dbb9f0c8287d2b52a034684e8e31d38eb6228
|
||||
last_rule_updated_at: 2026-05-28
|
||||
---
|
||||
|
||||
# domain-model
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
domain: operations
|
||||
last_rule_review_commit: no-commit-yet
|
||||
last_rule_updated_at: 2026-05-24
|
||||
last_rule_review_commit: 711dbb9f0c8287d2b52a034684e8e31d38eb6228
|
||||
last_rule_updated_at: 2026-05-28
|
||||
---
|
||||
|
||||
# operations
|
||||
|
|
@ -14,6 +14,7 @@ last_rule_updated_at: 2026-05-24
|
|||
|
||||
- `bin/` - workspace helper scripts
|
||||
- `go.work` - Go workspace module membership
|
||||
- `go.work.sum` - Go workspace dependency checksum
|
||||
- `apps/cli/` - Go operator CLI for local/admin workflows
|
||||
- `deployments/local/` - local Docker Compose infrastructure
|
||||
- `.gitignore` - repository-level ignore policy
|
||||
|
|
@ -31,6 +32,8 @@ last_rule_updated_at: 2026-05-24
|
|||
- `bin/test` - runs Go tests and Flutter tests
|
||||
- `bin/lint` - runs Go vet and Flutter analyze
|
||||
- `bin/build` - builds Go binaries and Flutter web
|
||||
- `bin/contracts-gen` - regenerates contract outputs
|
||||
- `bin/contracts-check` - checks generated contract outputs are current
|
||||
- `deployments/local/docker-compose.yml` - PostgreSQL and Redis local stack
|
||||
- `apps/cli/cmd/alt/main.go` - operator CLI scaffold
|
||||
|
||||
|
|
@ -38,6 +41,7 @@ last_rule_updated_at: 2026-05-24
|
|||
|
||||
- Keep root helper scripts executable, idempotent where practical, and `set -euo pipefail`.
|
||||
- Prefer root `bin/*` commands for whole-workspace workflows.
|
||||
- Keep contract codegen/check scripts under `bin/` and route schema ownership back to `packages/contracts`.
|
||||
- Keep local infrastructure defaults aligned with worker/API environment fallback values.
|
||||
- Add new Go modules to `go.work` when they are part of local development.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
domain: worker
|
||||
last_rule_review_commit: no-commit-yet
|
||||
last_rule_updated_at: 2026-05-24
|
||||
last_rule_review_commit: 711dbb9f0c8287d2b52a034684e8e31d38eb6228
|
||||
last_rule_updated_at: 2026-05-28
|
||||
---
|
||||
|
||||
# worker
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ ALT는 개인 quant system workspace다. Go 서비스와 도구는 루트 `go.wo
|
|||
| `services/api/**` | api | `agent-ops/rules/project/domain/api/rules.md` |
|
||||
| `services/worker/**` | worker | `agent-ops/rules/project/domain/worker/rules.md` |
|
||||
| `apps/client/**` | client | `agent-ops/rules/project/domain/client/rules.md` |
|
||||
| `apps/cli/**`, `bin/**`, `deployments/local/**`, `go.work` | operations | `agent-ops/rules/project/domain/operations/rules.md` |
|
||||
| `apps/cli/**`, `bin/**`, `deployments/local/**`, `go.work`, `go.work.sum`, `.gitignore` | operations | `agent-ops/rules/project/domain/operations/rules.md` |
|
||||
|
||||
## 검증 명령
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue