Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# AGENTS.md

Development guide for agents working on this codebase.

## Validating Changes

```bash
cargo fmt && make fast # Quick validation: lint + unit tests
make check # Full CI (slow): lint + deny + attributions + unit tests + integration tests
```

Do NOT:
- Run cargo commands directly (use make targets)
- Skip `make fast` before committing

## Project Structure

### Main CLI
- `twoliter/` - Main CLI entry point. Orchestrates builds, embeds tool binaries, manages project configuration and SDK interactions.

### Core Tools (`tools/`)
- `buildsys/` - Build system for packages and variants. Handles cargo/rpm build orchestration.
- `pubsys/` - Publishing system. Publishes AMIs, TUF repos, SSM parameters, Kits, etc.
- `pipesys/` - Efficiently share content with docker builds via UDS

### Configuration Crates (`tools/*-config`)
- `buildsys-config/` - Build system configuration types
- `pubsys-config/` - Publishing system configuration

### Utilities (`tools/`)
- `amispec/` - AMI properties specification system
- `bottlerocket-variant/` - Variant type/model definitions
- `error-utils/` - AWS SDK error handling helpers
- `oci-cli-wrapper/` - OCI CLI abstraction layer for container registry operations
- `parse-datetime/` - DateTime parsing utilities
- `serde-templated/` - Supports deserializing structures where each field may be a template to render
- `unplug/` - Used to disable network access during build
- `update-metadata/` - Update metadata serialization (needed for pubsys)

### Embedded Tool Wrappers (`twoliter/embedded/twoliter-tool-*`)
Compressed binaries embedded in the twoliter CLI

### Tests
- `tests/integration-tests/` - Integration test suite (slow, run via `make integ`)

## Code Style

### Commits
Use conventional commits with 52/72 line lengths:
```
feat(buildsys): add new build target support

This commit adds support for building custom targets by extending
the build configuration options.
```

### Design Documentation
See `docs/design/README.md` for architecture details.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,26 @@ deny:

.PHONY: clippy
clippy:
cargo clippy --locked -- -D warnings --no-deps
cargo clippy --quiet --locked -- -D warnings --no-deps

.PHONY: fast
fast: fmt clippy test

.PHONY: fmt
fmt:
cargo fmt --check
cargo fmt --quiet --check

.PHONY: test
test:
cargo test --release --locked
cargo test --quiet --release --locked

.PHONY: integ
integ:
cargo test --manifest-path tests/integration-tests/Cargo.toml -- --include-ignored
cargo test --quiet --manifest-path tests/integration-tests/Cargo.toml -- --include-ignored

.PHONY: check
check: fmt clippy deny attributions test integ

.PHONY: build
build: check
cargo build --release --locked
cargo build --quiet --release --locked
Loading