Skip to content

Commit c37cdba

Browse files
authored
Add AGENTS.md (#46)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 177405e commit c37cdba

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# AGENTS.md
2+
3+
This file provides guidance to coding agents (e.g. Claude Code, claude.ai/code) when working with code in this repository.
4+
5+
## Repository purpose
6+
7+
Go module `go.bytebuilders.dev/cli` — the **ACE (AppsCode Container Engine)** command-line. Produced binary is `ace`. Used by operators to drive ACE installs and clusters from the host shell.
8+
9+
Subcommands (from `pkg/cmds/root.go`):
10+
- `config` — manage local ACE config.
11+
- `cluster` — cluster-side operations (list/select/etc.).
12+
- `auth` — login / token management.
13+
- `cloud-swap` — switch cloud accounts.
14+
- `installer` — install ACE components.
15+
- `debug` — debug introspection.
16+
- `expose` — expose ACE services.
17+
18+
Plus `version` and `completion`.
19+
20+
## Architecture
21+
22+
- `cmd/ace/` — entry point.
23+
- `pkg/cmds/` — one subdirectory per subcommand (`config`, `cluster`, `auth`, `cloud_swap`, `installer`, `debug`, `expose`).
24+
- `pkg/config/` — local config file plumbing.
25+
- `pkg/printer/` — output formatting.
26+
- `license-debug-info/` — helper for surfacing license state in `ace debug`.
27+
- `Dockerfile.in` (PROD, distroless), `Dockerfile.dbg` (debian), `Dockerfile.ubi` (Red Hat certified).
28+
- `hack/`, `Makefile` — AppsCode build harness.
29+
- `vendor/` — checked-in deps.
30+
31+
## Common commands
32+
33+
- `make ci` — full CI pipeline.
34+
- `make build` / `make all-build` — host or all-platform build.
35+
- `make fmt`, `make lint`, `make unit-tests` / `make test` — standard.
36+
- `make verify` — codegen + module-tidy verification.
37+
- `make container` / `make push` / `make release` — image build/publish flow.
38+
39+
## Conventions
40+
41+
- Module path is `go.bytebuilders.dev/cli` (vanity URL); imports must use that. Binary name is `ace`.
42+
- License: `LICENSE.md`. Sign off commits (`git commit -s`); contributions follow the DCO (`DCO`, `CONTRIBUTING.md`).
43+
- Vendor directory is checked in; keep `go mod tidy && go mod vendor` clean.
44+
- New subcommand: drop a `pkg/cmds/<name>/` package implementing `New*` constructor and register in `pkg/cmds/root.go`.
45+
- Output formatting goes through `pkg/printer/` — don't print directly from subcommand handlers.
46+
- Three Dockerfiles, one binary — keep `Dockerfile.in`, `Dockerfile.dbg`, and `Dockerfile.ubi` in sync.

0 commit comments

Comments
 (0)