{"owner":"evilmartians","repo":"lefthook","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md","CLAUDE.md"],"skills":{"AGENTS.md":"# AGENTS.md\n\nLefthook is a CLI-first Git hooks manager. Contributions must be predictable,\nbackwards-compatible, and dependency-light.\n\n## Requirements\n\n- Go 1.26+ (respect `go.mod` toolchain)\n- Git, Make\n```\nmake build            # compile\nmake test             # unit tests\nmake test-integration # integration tests\nmake lint             # golangci-lint\nmake jsonschema       # regenerate schema.json after config changes\n```\n\n## Codebase map\n\n| Path | Purpose |\n|---|---|\n| `cmd/` | CLI commands |\n| `internal/config/` | Config parsing, validation, JSON schema |\n| `internal/run/` | Hook runner, parallelism |\n| `internal/command/` | Top-level orchestrator |\n| `internal/git/` | Git utilities |\n| `docs/` | documentation source → lefthook.dev |\n| `tests/` | Integration/fixture tests |\n\n## Rules\n\n**Errors** — always wrap with context; never silently ignore; no panic in production paths.\n\n**Concurrency** — no goroutine leaks; use `context.Context`; deterministic output when order matters.\n\n**CLI** — preserve exit codes, flag names, and output format. Update docs and tests for any behavior change.\n\n**Config** — edit structs in `internal/config/`, then run `make jsonschema`. Both `schema.json` and `internal/config/jsonschema.json` must be committed.\n\n**Security** — treat user input as untrusted; no unsafe shell concatenation; sanitize paths.\n\n## Testing\n\nPrefer table-driven unit tests. Integration tests should validate CLI behavior and real git interaction — not internal implementation details.\n\n## PR checklist\n\n- [ ] `make lint` passes\n- [ ] `make test` passes\n- [ ] Docs updated if behavior changed or new config option added\n\nWhen in doubt, follow existing patterns. Consistency over cleverness.\n","CLAUDE.md":"# CLAUDE.md\n\nSee [AGENTS.md](AGENTS.md) for build commands, directory map, and contribution rules.\n\n## Patterns\n\n**Tests** — table-driven with `map[string]struct{ ... }` keyed by description string; use `testify/assert`.\n\n**Errors** — wrap with `fmt.Errorf(\"context: %w\", err)`; use typed errors (structs implementing `error`) when callers need `errors.As`.\n\n**Config structs** — every field needs all four tags: `json:\"...\" yaml:\"...\" toml:\"...\" mapstructure:\"...\"`. Add `jsonschema` tags for documented options. Run `make jsonschema` after any struct change.\n\n**CLI commands** — return `*cli.Command` from a factory function; action signature is `func(ctx context.Context, cmd *cli.Command) error` (urfave/cli/v3).\n\n**Filesystem** — use `afero.Fs` (never `os` directly) so tests can swap in a MemMapFs.\n\n**Key libs** — `koanf` (config loading/merging), `afero` (FS), `lipgloss`/`spinner` (output), `doublestar` (glob).\n"},"files":{"AGENTS.md":"# AGENTS.md\n\nLefthook is a CLI-first Git hooks manager. Contributions must be predictable,\nbackwards-compatible, and dependency-light.\n\n## Requirements\n\n- Go 1.26+ (respect `go.mod` toolchain)\n- Git, Make\n```\nmake build            # compile\nmake test             # unit tests\nmake test-integration # integration tests\nmake lint             # golangci-lint\nmake jsonschema       # regenerate schema.json after config changes\n```\n\n## Codebase map\n\n| Path | Purpose |\n|---|---|\n| `cmd/` | CLI commands |\n| `internal/config/` | Config parsing, validation, JSON schema |\n| `internal/run/` | Hook runner, parallelism |\n| `internal/command/` | Top-level orchestrator |\n| `internal/git/` | Git utilities |\n| `docs/` | documentation source → lefthook.dev |\n| `tests/` | Integration/fixture tests |\n\n## Rules\n\n**Errors** — always wrap with context; never silently ignore; no panic in production paths.\n\n**Concurrency** — no goroutine leaks; use `context.Context`; deterministic output when order matters.\n\n**CLI** — preserve exit codes, flag names, and output format. Update docs and tests for any behavior change.\n\n**Config** — edit structs in `internal/config/`, then run `make jsonschema`. Both `schema.json` and `internal/config/jsonschema.json` must be committed.\n\n**Security** — treat user input as untrusted; no unsafe shell concatenation; sanitize paths.\n\n## Testing\n\nPrefer table-driven unit tests. Integration tests should validate CLI behavior and real git interaction — not internal implementation details.\n\n## PR checklist\n\n- [ ] `make lint` passes\n- [ ] `make test` passes\n- [ ] Docs updated if behavior changed or new config option added\n\nWhen in doubt, follow existing patterns. Consistency over cleverness.\n","CLAUDE.md":"# CLAUDE.md\n\nSee [AGENTS.md](AGENTS.md) for build commands, directory map, and contribution rules.\n\n## Patterns\n\n**Tests** — table-driven with `map[string]struct{ ... }` keyed by description string; use `testify/assert`.\n\n**Errors** — wrap with `fmt.Errorf(\"context: %w\", err)`; use typed errors (structs implementing `error`) when callers need `errors.As`.\n\n**Config structs** — every field needs all four tags: `json:\"...\" yaml:\"...\" toml:\"...\" mapstructure:\"...\"`. Add `jsonschema` tags for documented options. Run `make jsonschema` after any struct change.\n\n**CLI commands** — return `*cli.Command` from a factory function; action signature is `func(ctx context.Context, cmd *cli.Command) error` (urfave/cli/v3).\n\n**Filesystem** — use `afero.Fs` (never `os` directly) so tests can swap in a MemMapFs.\n\n**Key libs** — `koanf` (config loading/merging), `afero` (FS), `lipgloss`/`spinner` (output), `doublestar` (glob).\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# AGENTS.md\n\nLefthook is a CLI-first Git hooks manager. Contributions must be predictable,\nbackwards-compatible, and dependency-light.\n\n## Requirements\n\n- Go 1.26+ (respect `go.mod` toolchain)\n- Git, Make\n```\nmake build            # compile\nmake test             # unit tests\nmake test-integration # integration tests\nmake lint             # golangci-lint\nmake jsonschema       # regenerate schema.json after config changes\n```\n\n## Codebase map\n\n| Path | Purpose |\n|---|---|\n| `cmd/` | CLI commands |\n| `internal/config/` | Config parsing, validation, JSON schema |\n| `internal/run/` | Hook runner, parallelism |\n| `internal/command/` | Top-level orchestrator |\n| `internal/git/` | Git utilities |\n| `docs/` | documentation source → lefthook.dev |\n| `tests/` | Integration/fixture tests |\n\n## Rules\n\n**Errors** — always wrap with context; never silently ignore; no panic in production paths.\n\n**Concurrency** — no goroutine leaks; use `context.Context`; deterministic output when order matters.\n\n**CLI** — preserve exit codes, flag names, and output format. Update docs and tests for any behavior change.\n\n**Config** — edit structs in `internal/config/`, then run `make jsonschema`. Both `schema.json` and `internal/config/jsonschema.json` must be committed.\n\n**Security** — treat user input as untrusted; no unsafe shell concatenation; sanitize paths.\n\n## Testing\n\nPrefer table-driven unit tests. Integration tests should validate CLI behavior and real git interaction — not internal implementation details.\n\n## PR checklist\n\n- [ ] `make lint` passes\n- [ ] `make test` passes\n- [ ] Docs updated if behavior changed or new config option added\n\nWhen in doubt, follow existing patterns. Consistency over cleverness.\n","category":"root","tokens":429},{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# CLAUDE.md\n\nSee [AGENTS.md](AGENTS.md) for build commands, directory map, and contribution rules.\n\n## Patterns\n\n**Tests** — table-driven with `map[string]struct{ ... }` keyed by description string; use `testify/assert`.\n\n**Errors** — wrap with `fmt.Errorf(\"context: %w\", err)`; use typed errors (structs implementing `error`) when callers need `errors.As`.\n\n**Config structs** — every field needs all four tags: `json:\"...\" yaml:\"...\" toml:\"...\" mapstructure:\"...\"`. Add `jsonschema` tags for documented options. Run `make jsonschema` after any struct change.\n\n**CLI commands** — return `*cli.Command` from a factory function; action signature is `func(ctx context.Context, cmd *cli.Command) error` (urfave/cli/v3).\n\n**Filesystem** — use `afero.Fs` (never `os` directly) so tests can swap in a MemMapFs.\n\n**Key libs** — `koanf` (config loading/merging), `afero` (FS), `lipgloss`/`spinner` (output), `doublestar` (glob).\n","category":"root","tokens":231}]}