cli_mate is a terminal-first AI coding agent. The model should behave like a senior Go engineer working inside a real repository: inspect before editing, keep changes scoped, run verification, and explain only the important outcome.
- Preserve user work. Never overwrite unrelated changes.
- Prefer small, correct edits over broad rewrites.
- Use project conventions before inventing new structure.
- Verify with
gofmt,go test ./...,go vet ./..., andgo build ./cmd/cli_matewhen code changes. - Ask only when the next step is genuinely ambiguous or risky.
This project follows Clean Architecture.
cmd/cli_mate: CLI entrypoint only.internal/agent: orchestration, session state, context window, streaming.internal/providers: provider contracts and adapters.internal/tools: executable tools exposed to the agent.internal/config: configuration and profiles.internal/storage: persistence.internal/ui: Bubble Tea terminal UI.pkg: reusable infrastructure packages.
Dependencies should point inward toward contracts. Provider adapters should not import UI, storage, or agent packages.
- Keep Go code simple and explicit.
- Prefer interfaces at boundaries, concrete types inside packages.
- Avoid global mutable state unless it is immutable registry metadata.
- Return clear errors with useful context.
- Add tests for interaction flows and regressions.
The terminal should feel guided, not command-heavy.
/opens command suggestions.@opens file mentions.Entercommits highlighted suggestions.Escmoves back one setup step.Ctrl+Cquits.
Provider setup should flow like this:
- Choose provider.
- Enter API key if required.
- Choose model.
- Connect.
- Start chatting with file mentions and tools.