Files
LinkPort/AGENTS.md
T
2026-09-19 23:25:20 +08:00

2.3 KiB

serviceport collaboration

Work ownership

  • Agree on file ownership before concurrent edits. Shared files include web/src/App.vue, internal/api/server.go, internal/model/proxy.go, go.mod, and go.sum.
  • Assign independent features by directory or module. Protocol implementations belong in internal/protocol/<protocol>, outbound transports in internal/outbound, persistence in internal/store, and HTTP endpoints in internal/api.
  • Keep endpoint behavior in domain files (targets.go, proxies.go, commands.go, events.go). Keep server.go focused on server state, middleware, and routing.
  • Put independent frontend state in web/src/composables and reusable views in separate Vue components. App.vue owns navigation and coordinates shared state.
  • Announce shared-file handoffs. Read the current file before editing; preserve changes made by other agents. Do not restore entire files or stage unrelated work.
  • Keep behavior-preserving moves separate from feature changes where possible. Update imports and run the affected package checks after each move.

Validation

  • Document every behavior change with its reason, resulting behavior, affected scope, compatibility or migration impact, and actual validation. Keep the relevant feature document and docs/change-rationale.md current in the same commit; do not leave the rationale only in chat or commit messages.

  • Use Go 1.25.0 (GOTOOLCHAIN=go1.25.0); newer installed toolchains may not compile the pinned Vitess dependency.

  • Backend: go test ./... -count=1 -timeout=120s and go vet ./....

  • Frontend: npm.cmd --prefix web run build. Run the Playwright suite in web against a freshly built executable using SERVICEPORT_E2E_BINARY.

  • Do not build embedded Go assets while Vite is replacing web/dist. Restore tracked web/dist/.gitkeep after a frontend build if needed.

  • Describe whether protocol tests used a real server or a fixture; do not present fixture coverage as live-server validation.

Local data

  • Preserve data/serviceport.sqlite, data/audit, TLS material, and data/master-key.dpapi.
  • Stop the owned local service and back up the complete data directory before deploying a migration. Do not modify real target data for smoke tests.
  • Use isolated test databases and ports. Do not start subagents unless the user has enabled them for the active work.