|
1 | | -# Agent Guidelines |
| 1 | +# Yutu |
2 | 2 |
|
3 | | -## OVERVIEW |
| 3 | +Go CLI + MCP server + Agent for YouTube. |
4 | 4 |
|
5 | | -Go CLI + MCP server for YouTube. |
| 5 | +## Quick Reference |
6 | 6 |
|
7 | | -## STRUCTURE |
8 | | - |
9 | | -```text |
10 | | -. |
11 | | -├── assets/ # Static assets (logos, etc.) |
12 | | -├── cmd/ # CLI command definitions (Cobra) |
13 | | -├── dist/ # Build artifacts |
14 | | -├── internal/ # Internal tools and private packages |
15 | | -├── pkg/ # Core domain logic and infrastructure |
16 | | -└── scripts/ # Utility scripts and smoke tests |
17 | | -``` |
18 | | - |
19 | | -## WHERE TO LOOK |
20 | | - |
21 | | -- **CLI Entry**: `main.go` -> `cmd/` |
22 | | -- **Domain Logic**: `pkg/<resource>/` (e.g., `pkg/video/`) |
23 | | -- **Infrastructure**: `pkg/auth`, `pkg/utils` |
24 | | -- **Tests**: Co-located `*_test.go` files within `pkg/` |
| 7 | +- **Build**: `go build -o yutu .` or `bazel build //...` |
| 8 | +- **Test**: `go test ./...` or `bazel test //...` |
| 9 | +- **Smoke Tests**: `./scripts/command-test.sh` |
| 10 | +- **Entry Point**: `main.go` |
25 | 11 |
|
26 | | -## CODE MAP |
| 12 | +## Directory Index |
27 | 13 |
|
28 | | -- `main.go`: Application entry point. |
29 | | -- `cmd/root.go`: Cobra root command and global flag definitions. |
30 | | -- `pkg/video/video.go`: Example of domain logic implementation. |
| 14 | +| Directory | Description | |
| 15 | +|-----------|-------------| |
| 16 | +| [cmd/](cmd/AGENTS.md) | CLI command definitions and MCP tool bindings | |
| 17 | +| [pkg/](pkg/AGENTS.md) | Core domain logic and shared infrastructure | |
| 18 | +| [internal/](internal/AGENTS.md) | Internal tools (docgen, skillgen) | |
| 19 | +| [scripts/](scripts/AGENTS.md) | Utility scripts and smoke tests | |
| 20 | +| [docs/](docs/) | Project documentation | |
31 | 21 |
|
32 | | -## CONVENTIONS |
| 22 | +## Documentation |
33 | 23 |
|
34 | | -- **Build System**: Bazel is used for build/test, though standard Go tools (`go build`, `go test`) also work. |
35 | | -- **Testing**: Table-driven tests are preferred for consistency and coverage. |
36 | | -- **Secrets**: `client_secret.json` and `youtube.token.json` are typically stored in the root directory (standard for |
37 | | - this project). |
| 24 | +- [docs/FEATURES.md](docs/FEATURES.md) — Feature overview |
| 25 | +- [docs/HOW_TO_TEST.md](docs/HOW_TO_TEST.md) — Testing guide |
| 26 | +- [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) — Contribution guidelines |
| 27 | +- [docs/CODE_OF_CONDUCT.md](docs/CODE_OF_CONDUCT.md) — Code of conduct |
38 | 28 |
|
39 | | -## COMMANDS |
| 29 | +## Conventions |
40 | 30 |
|
41 | | -- **Build**: `go build -o yutu .` or `bazel build //...` |
42 | | -- **Test**: `go test ./...` or `bazel test //...` |
43 | | -- **Smoke Tests**: `./scripts/command-test.sh` |
| 31 | +- **Secrets**: `client_secret.json` and `youtube.token.json` in root (standard for this project). |
| 32 | +- **Build System**: Bazel is primary, standard Go tools also work. |
| 33 | +- **BUILD.bazel files are auto-generated** — do NOT create or edit them manually. Run `bazel run //:gazelle` to regenerate. |
| 34 | +- After changing dependencies: `bazel run @rules_go//go -- mod tidy -v && bazel mod tidy`. |
| 35 | +- See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for the full list of useful build/test/release commands. |
0 commit comments