{"owner":"nektos","repo":"act","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"files":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Project Overview\n\nAct is a tool to run GitHub Actions locally. It reads `.github/workflows/` files, builds an execution plan, and uses Docker to run containers for each action. Written in Go 1.24+.\n\n## Common Commands\n\n- `make build` — build binary to `dist/local/act`\n- `make test` — run `go test ./...` and the act CLI\n- `make lint-go` — run `golangci-lint run`\n- `make format` — run `go fmt ./...`\n- `make tidy` — run `go mod tidy`\n- `make pr` — full PR checklist: tidy, format-all, lint, test\n- `go test ./pkg/runner/...` — run tests for a single package\n- `go test ./pkg/runner/ -run TestRunEvent` — run a single test\n\n## Architecture\n\n### Execution Flow\n\n1. **CLI** (`cmd/root.go`) — Cobra-based CLI parses flags into an `Input` struct\n2. **Planner** (`pkg/model/planner.go`) — parses workflow YAML into a `Plan` containing `Stage`s (serial) with `Run`s (parallel jobs)\n3. **Runner** (`pkg/runner/runner.go`) — converts the Plan into composable `Executor` chains\n4. **RunContext** (`pkg/runner/run_context.go`) — holds all state for a job execution (env vars, matrix, containers, expressions)\n5. **Steps** (`pkg/runner/step.go`) — each step type (action, docker, script) implements the `step` interface\n\n### Core Abstraction: Executor Pattern\n\nThe `Executor` type (`pkg/common/executor.go`) is a `func(ctx context.Context) error` used throughout the codebase. Executors compose via:\n\n- `.Then()`, `.Finally()`, `.OnError()` — chaining\n- `NewPipelineExecutor()` — serial execution\n- `NewParallelExecutor()` — parallel execution\n- `.If()`, `.IfNot()` — conditional execution\n\n### Key Packages\n\n- **`pkg/model/`** — workflow YAML parsing, plan creation, action definitions\n- **`pkg/runner/`** — core execution engine, expression evaluation, step types (local/remote/docker/composite actions, reusable workflows)\n- **`pkg/container/`** — Docker API wrapper, container and host execution environments\n- **`pkg/common/`** — Executor pattern, context utilities, logging\n- **`pkg/exprparser/`** — GitHub Actions `${{ }}` expression language interpreter\n- **`pkg/artifacts/`** and **`pkg/artifactcache/`** — artifact upload/download and caching server\n\n## Linting Rules\n\nConfigured in `.golangci.yml`:\n\n- Use `errors` from stdlib, not `github.com/pkg/errors`\n- Use `github.com/sirupsen/logrus` (aliased as `log`), not stdlib `log`\n- Use `github.com/stretchr/testify` for tests, not `gotest.tools/v3`\n- Max cyclomatic complexity: 20\n- Import aliases enforced: `logrus` → `log`, `testify/assert` → `assert`\n\n## Testing\n\n- Tests use `testify/assert` and `testify/mock`\n- Table-driven tests are common in `pkg/model/` and `pkg/exprparser/`\n- Test fixtures live in `testdata/` directories alongside their packages\n- `pkg/runner/testdata/` contains extensive sample GitHub Actions workflows used as integration test fixtures\n"}}