Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
4.5 KiB
4.5 KiB
AGENTS.md
Scope
This file applies to services/tuttid/*.
tuttid is the primary daemon/product business core of the repository.
Daemon-specific domain decisions, durable state, and local persistence usually
land here. Extracted cross-consumer cores keep their own owner; Agent
session/Turn/Goal/runtime-operation lifecycle belongs to packages/agent/host.
Setup commands
- Check daemon-side prerequisites from the repository root:
pnpm setup:dev - Check only the pinned Go lint tool version from the repository root:
pnpm check:golangci-version - Install pinned
golangci-lintlocally before running daemon lint commands:pnpm install:golangci-lint - Generate builtin workspace apps before bare daemon Go commands:
pnpm generate:builtin-apps - Run daemon tests from the repository root:
pnpm test:go - Build daemon from the repository root:
pnpm build:go
Current top-level shape
Keep the current top-level structure unless there is a clear reason to change it:
main.go
wiring.go
app/
api/
biz/
data/
integration/
server/
service/
types/
Layering rules
main.go: process bootstrap onlywiring.go: hand-written dependency injection and composition rootapp/: process lifecycle around the HTTP serverserver/: HTTP server assemblyapi/: transport-facing handlers and DTOsservice/: use-case orchestrationbiz/: small domain-local models shared across layersdata/: persistence adaptersintegration/: daemon-wide black-box and process-level teststypes/: cross-domain helpers only
Platform adapter rules
- read Windows Platform Support before changing Microsoft Windows behavior
- keep use cases dependent on capability interfaces; select the platform implementation in the owning composition root or a small build-tagged factory
- use shared Go behavior when its semantics are already portable; add an adapter only for a proven OS difference such as PTY, process-tree, shell, or filesystem behavior
- keep related platform behavior cohesive instead of splitting every helper into separate per-platform files
- do not hardcode drive letters, home directories, executable locations, or a dependency on Git for Windows or WSL
Agent CLI ownership
tuttidowns agent provider availability, AgentGUI launch intent publication, HTTP/query/composer/product policy, and Host adapters.packages/agent/hostowns agent session/Turn/Goal/runtime-operation lifecycle workflows.apps/climust remain a thin daemon client fortutti agent; it should parse terminal shape and render daemon output, not call desktopd, renderer-private APIs, or agent runtimes directly.- AgentGUI launch requests from CLI or other local integrations should enter
tuttidfirst and be published as business events on/v1/events/ws. - Keep provider availability naming separate from session status naming. CLI launch surfaces use
agent listand exact agent ids; provider availability is derived diagnostic metadata on each catalog entry, not the launch identity.
Complexity guidance
- prefer the narrowest structure that keeps responsibility clear
- do not split small logic into several thin files unless the split creates a clearer boundary
- do not create a full domain slice until that domain has enough real behavior to justify it
- do not introduce a DI framework unless the dependency graph becomes meaningfully harder to manage
Persistence and state rules
- daemon-owned local state defaults to
~/.tuttiin production and~/.tutti-devin development - prefer deriving new daemon-owned file paths from
TUTTI_STATE_DIRhelpers instead of writing directly under$HOME - keep daemon-owned persistence adapters inside
data/*; Agent canonical transactions belong topackages/agent/store-sqlite
Testing defaults
- Run
pnpm lint:go - Run
pnpm test:go && pnpm build:gobefore finishing daemon changes - Add or update tests when changing handlers, service logic, or persistence behavior
- Keep near-layer tests beside the package they exercise; place real-process or cross-layer daemon tests under
integration/