{"owner":"goadesign","repo":"goa","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md",".cursorrules"],"files":{"AGENTS.md":"# Repository Guidelines\n\n## Common Rules\n\n### Agent Behavior\n\n- **Plan before acting**: For ≤2 files, state a brief plan then implement. For ≥3 files, write a step-by-step plan first.\n- **Read before editing**: Always read files before modifying. Search over guessing.\n- **Fix root causes**: Do not produce local workarounds—fix the real issue.\n- **Be concise**: Give short status updates during multi-step work. Present a short summary when done.\n\n### Go Code Style\n\n- **Go 1.25+**. Format with `go fmt ./...`.\n- **Imports**: Group stdlib separate from external. Let gofmt manage ordering.\n- **Files**: Use `lower_snake_case.go`. Keep ≤1000 lines; split proactively.\n- **Naming**: Packages are lowercase and short. Exported identifiers need GoDoc. Avoid stutter.\n- **Types**: Use `any` over `interface{}`. Prefer concrete types over `interface{}`.\n- **Errors**: Wrap with `%w`. Use `errors.Is/As`. **Never ignore errors or use `_ = call()`**.\n- **Signatures**: Keep on one line when ≤100 columns. Only wrap genuinely long signatures.\n- **Slice/map nil**: Do not check nil before `len`. `len(nil)` returns 0. Use `len(x) == 0` directly.\n\n### Code Blocks and Literals\n\n- Always place a newline after `{` and before `}` for `if`, `for`, `switch`, `func`, `type`.\n- No single-line blocks: `if cond { do() }` → use multiple lines.\n- Short struct literals are fine inline: `&T{A: 1}`. Break long literals to one field per line with trailing commas.\n\n### File Organization\n\nOrder declarations as:\n1. Types (public, then private) in a single `type (...)` block when practical\n2. Constants (public, then private)\n3. Variables (public, then private)\n4. Public functions\n5. Public methods\n6. Private functions\n7. Private methods\n\nNo commented-out code—delete dead code.\n\n### Error Handling & Contracts\n\n- **Always check errors**. Never discard with `_`.\n- **Strong contracts**: Goa validates payloads at boundaries. Do not re-validate inside service code.\n- **No defensive programming**: Do not add nil/empty guards for values guaranteed by construction, Goa, or prior validation.\n- **Validate only at boundaries**: HTTP/gRPC handlers, event consumers, DB results, third-party APIs, `ctx.Value()`, type assertions, required map lookups.\n- **Fail fast**: Unexpected states are bugs. Return precise errors or panic—do not silently recover or skip.\n\n### Goa DSL Rules\n\n- **Never edit `gen/`**: Always regenerate.\n- **DSL validation**: Put validations (lengths, enums, formats) in the design. Do not re-validate in code.\n- **Avoid `Any`**: Use concrete types to enable gRPC generation.\n\n### Codegen Implementation\n\n- **Use NameScope helpers** for type references: `GoTypeRef`, `GoFullTypeRef`, `GoTypeName`. Never concatenate strings for types.\n- Let Goa decide pointer/value semantics. Do not force `pointer=true` except in transport validation.\n- **Keep helper visibility minimal**: If logic is shared only inside one codegen area, keep it package-private or move it under an `internal` package. Do not export helpers from a parent package just to share them across sibling generators.\n- **Avoid pass-through wrappers**: When two helper functions differ only by forwarding arguments or hard-coding `nil`, collapse them into a single implementation instead of adding an extra layer.\n\n### Documentation\n\n- Every exported type, function, method, and field must have a GoDoc comment explaining its contract—like Go stdlib documentation.\n\n### Safety & Forbidden Operations\n\n| Action | Policy |\n|--------|--------|\n| `git clean/stash/reset/checkout` | **FORBIDDEN** |\n| `go clean -cache` | **FORBIDDEN** during normal work |\n| Edit `gen/` directly | **FORBIDDEN** |\n| Changes ≥3 files | Describe plan first |\n| New dependencies | Explain why first |\n\n### Testing\n\n- Write table-driven tests in `*_test.go`.\n- Name tests `TestXxx`. Keep fast and deterministic.\n- Use `testify/require` for assertions.\n- Prefer `t.Errorf` over `t.Fatalf` so tests report multiple failures.\n\n---\n\n## Goa-Specific Rules\n\n### Project Structure\n\n- `dsl/`: Public DSL definitions (dot imports allowed per `.golangci.yml`)\n- `expr/`: Internal AST and validation\n- `codegen/`: Generators for transports, types, docs\n- `http/`, `grpc/`, `jsonrpc/`: Transport-specific codegen\n- `middleware/`: Built-in interceptors\n- `pkg/`: Core runtime\n- `cmd/goa/`: CLI source\n\n### Build & Test\n\n```bash\nmake lint          # Run linters\nmake test          # Run tests\ncd cmd/goa && go install .  # Install CLI locally\n```\n\n### Releases\n\n- For every Goa release or version bump, follow\n  [`.cursor/skills/goa-release/SKILL.md`](.cursor/skills/goa-release/SKILL.md).\n- Do not edit `pkg/version.go` or the README version badge by hand during the standard release\n  workflow; `make release` owns those changes.\n\n### Code Generation Behavior\n\n- After modifying goa source, `goa gen` and `goa example` automatically compile and use your changes—no manual rebuild needed.\n- `goa gen` deletes and recreates the entire `gen/` directory.\n- `goa example` only creates new files; it does not overwrite existing `cmd/` files.\n\n### Repro Protocol\n\nTo reproduce a codegen issue:\n1. Create `~/src/repros/<issue>/design/design.go`\n2. `go mod init <issue>` in the issue directory\n3. `goa gen <issue>/design`\n4. `go mod tidy`\n5. `go mod edit -replace goa.design/goa/v3=$HOME/src/goa`\n6. `goa gen <issue>/design` again with local goa\n7. Optional: `goa example <issue>/design`\n\n### Slices/Maps and Required Fields\n\nDo not rely on nil vs empty to encode presence. Goa uses `omitempty`—both nil and empty serialize as \"missing\". If empty is valid, do not mark the field as required.\n",".cursorrules":"# Goa repository rules for Cursor\n\n- Never edit generated code. Fix the generator/templates instead.\n- Prefer any over interface{} in new code.\n- Transports: HTTP, gRPC, and JSON-RPC 2.0 (HTTP, SSE, WebSocket). JSON-RPC supports batch and notifications; streaming over WS/SSE.\n- Testing:\n  - Run unit tests with `make test`.\n  - JSON-RPC integration tests live in `jsonrpc/integration_tests`; run with `make integration-test` (skips on Windows).\n  - Golden tests use testify; update with `go test -update` or `-u`.\n- Code style:\n  - Small, focused files; one main construct per file when possible.\n  - Public types first, then private types, public constants, private constants, public vars, private vars, public functions/methods, then private.\n  - Use `maps.Copy`/`slices.Contains`, `http.NoBody`, avoid shadowing builtins.\n- Architecture quick map:\n  - `dsl/` (design DSL), `expr/` (expressions), `codegen/` (generation engine & templates), `cmd/goa/` (CLI), `http/`, `grpc/`, `jsonrpc/` (transports), `pkg/`, `middleware/`, `security/`, `eval/`.\n- For deeper guidance, see `CLAUDE.md`.\n"}}