Update AGENTS guide for Makefile workflows and generated artifacts
This commit is contained in:
33
AGENTS.md
33
AGENTS.md
@@ -2,14 +2,22 @@
|
|||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
- Build CLI: `make build` (or `go build -o awesome-docker ./cmd/awesome-docker`)
|
- Build CLI: `make build` (or `go build -o awesome-docker ./cmd/awesome-docker`)
|
||||||
|
- Rebuild from scratch: `make rebuild`
|
||||||
|
- Show local workflows: `make help`
|
||||||
|
- Format Go code: `make fmt`
|
||||||
- Run tests: `make test` (runs `go test ./internal/... -v`)
|
- Run tests: `make test` (runs `go test ./internal/... -v`)
|
||||||
|
- Race tests: `make test-race`
|
||||||
- Lint README rules: `make lint` (runs `./awesome-docker lint`)
|
- Lint README rules: `make lint` (runs `./awesome-docker lint`)
|
||||||
- Auto-fix lint issues: `./awesome-docker lint --fix`
|
- Auto-fix lint issues: `make lint-fix`
|
||||||
- Check links: `make check` (runs `./awesome-docker check`; `GITHUB_TOKEN` enables GitHub repo checks)
|
- Check links: `make check` (runs `./awesome-docker check`; `GITHUB_TOKEN` enables GitHub repo checks)
|
||||||
- PR validation: `./awesome-docker validate` (lint + external link checks in PR mode)
|
- PR-safe link checks: `make check-pr`
|
||||||
- Build website: `./awesome-docker build` (generates `website/index.html` from `README.md`)
|
- PR validation: `make validate` (lint + external link checks in PR mode)
|
||||||
- Health scoring: `make health` (requires `GITHUB_TOKEN`, updates `config/health_cache.yaml`)
|
- Build website: `make website` (generates `website/index.html` from `README.md`)
|
||||||
- Generate health report: `make report`
|
- Health scoring: `make health` (requires `GITHUB_TOKEN`, refreshes `config/health_cache.yaml`)
|
||||||
|
- Print health report (Markdown): `make report`
|
||||||
|
- Print health report (JSON): `make report-json` or `./awesome-docker report --json`
|
||||||
|
- Generate report files: `make report-file` (`HEALTH_REPORT.md`) and `make report-json-file` (`HEALTH_REPORT.json`)
|
||||||
|
- Maintenance shortcut: `make workflow-maint` (health + JSON report file)
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
- **Main content**: `README.md` (curated Docker/container resources)
|
- **Main content**: `README.md` (curated Docker/container resources)
|
||||||
@@ -25,7 +33,11 @@
|
|||||||
- `config/exclude.yaml` - known link-check exclusions
|
- `config/exclude.yaml` - known link-check exclusions
|
||||||
- `config/website.tmpl.html` - HTML template for site generation
|
- `config/website.tmpl.html` - HTML template for site generation
|
||||||
- `config/health_cache.yaml` - persisted health scoring cache
|
- `config/health_cache.yaml` - persisted health scoring cache
|
||||||
- **Website output**: `website/index.html`
|
- **Generated outputs**:
|
||||||
|
- `awesome-docker` - compiled CLI binary
|
||||||
|
- `website/index.html` - generated website
|
||||||
|
- `HEALTH_REPORT.md` - generated markdown report
|
||||||
|
- `HEALTH_REPORT.json` - generated JSON report
|
||||||
|
|
||||||
## Code Style
|
## Code Style
|
||||||
- **Language**: Go
|
- **Language**: Go
|
||||||
@@ -47,6 +59,15 @@
|
|||||||
- **GitHub Pages deploy**: `.github/workflows/deploy-pages.yml`
|
- **GitHub Pages deploy**: `.github/workflows/deploy-pages.yml`
|
||||||
- On push to `master`, builds CLI, runs `./awesome-docker build`, deploys `website/`
|
- On push to `master`, builds CLI, runs `./awesome-docker build`, deploys `website/`
|
||||||
|
|
||||||
|
## Makefile Workflow
|
||||||
|
- The `Makefile` models file dependencies for generated artifacts (`awesome-docker`, `website/index.html`, `config/health_cache.yaml`, `HEALTH_REPORT.md`, `HEALTH_REPORT.json`).
|
||||||
|
- Prefer `make` targets over ad-hoc command sequences so dependency and regeneration behavior stays consistent.
|
||||||
|
- Use:
|
||||||
|
- `make workflow-dev` for local iteration
|
||||||
|
- `make workflow-pr` before opening/updating a PR
|
||||||
|
- `make workflow-maint` for health/report maintenance
|
||||||
|
- `make workflow-ci` for CI-equivalent local checks
|
||||||
|
|
||||||
## Content Guidelines (from CONTRIBUTING.md)
|
## Content Guidelines (from CONTRIBUTING.md)
|
||||||
- Use one link per entry
|
- Use one link per entry
|
||||||
- Prefer project/repository URLs over marketing pages
|
- Prefer project/repository URLs over marketing pages
|
||||||
|
|||||||
Reference in New Issue
Block a user