agentleFS
oniharnantyooniharnantyo/go-ai-ready-boilerplate/.cursor/rules/01-project-overview.mdc

go-ai-ready-boilerplate / rules

Cursor rule1 starsChanged 4 months agoMITView on GitHub

Project identity, stack, and what AI-ready means in this repo

The file

We split this 01-project-overview.mdc into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every new feature copies the shape of the task slice (domain -> driver/driven ports -> use cases -> adapters -> tests).

    line 37

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
01-project-overview.mdc
---
description: "Project identity, stack, and what AI-ready means in this repo"
globs:
alwaysApply: true
---
# Rule: Project Overview

## What this project is
- A **Go boilerplate** using **hexagonal architecture** (ports & adapters).
- The repository is **AI-ready**: built to be developed *with* AI agents (Claude Code, Cursor, Codex, Antigravity, Kiro, ...).
- It is **NOT** an AI/LLM application. Keep it that way: no AI plumbing unless explicitly requested by the human.

## Stack (change only with the human's explicit approval)
- Go 1.26+
- **urfave/cli/v3** (`urfave/cli/v3`) for CLI commands and subcommands
- **Echo v4** (`labstack/echo`) for the HTTP driver adapter
- `log/slog` for structured logging
- `jackc/pgx/v5` + `huandu/go-sqlbuilder` for PostgreSQL (repository adapter; in-memory is the default)
- `gopkg.in/yaml.v3` for YAML configuration (`config.yaml`)
- `golangci-lint` + `go-arch-lint` for machine-checked code quality and architecture
- Minimal dependencies on purpose (see 05-coding-standards.md)

## Layout at a glance
| Path | Responsibility |
|---|---|
| `main.go` | entry point, CLI commands (urfave/cli/v3), manual dependency wiring (DI) |
| `config/` | configuration loader (`config.yaml` + env overrides) |
| `internal/domain/` | business entities - one file per aggregate - pure, zero deps |
| `internal/application/ports/driver/usecases/` | **driver ports**: capabilities the outside world may call (usecases) |
| `internal/application/ports/driven/repositories/` | **driven ports**: what the core needs from the outside world (repositories) |
| `internal/application/usecases/` | use case implementations grouped per domain (`task/`, `audit/`) |
| `internal/adapters/http/` | **HTTP adapter**: REST API endpoints, middleware, error mapping (Echo) |
| `internal/adapters/repositories/` | **storage repositories**: implementations of persistence driven ports (memory, postgres) |
| `pkg/` | genuinely small shared utilities (logger, id) |

## The canonical pattern
Every new feature copies the shape of **the task slice** (domain -> driver/driven ports -> use cases -> adapters -> tests). When a new slice lands, extend `docs/architecture.md` so the next agent can copy *that* slice.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.