Cursor rule
.cursor/rules/project-rules.mdcCursor rules
Quality
90/100
Scores the file, not the repository.Length
579 words
12 headings · 0 code blocksRepository
5
— · pushed 14 days agoLast changed
3 days ago
First indexed 3 days ago.1# Hermes Project Rules for AI Agents23## Project Purpose & Architecture45- **Hermes** is a Go CLI tool to import/export data from sources (Goodreads, IMDb, Letterboxd, Steam) into Markdown, JSON, or SQLite/Datasette formats. See [docs/01_overview.md](../docs/01_overview.md) and [docs/03_architecture.md](../docs/03_architecture.md).6- **Architecture:**7 - `cmd/` – Each data source importer is a subdir/package (e.g., `cmd/goodreads/`).8 - `internal/` – Shared utilities: `cmdutil/`, `config/`, `datastore/`, `errors/`, `fileutil/`, `humanlog/`.9 - `cache/` – API response cache, organized by importer.10 - `json/`, `markdown/` – Output directories, with subdirs per importer.11 - `Taskfile.yml` – Build/test/lint automation.12 - `main.go` – Entry point, runs `cmd.Execute()`.1314## Developer Workflows1516- **Build:** `task build` (runs tests, lint, then builds to `build/hermes`)17- **Test:** `task test` (with coverage report in `coverage/`)18- **Lint:** `task lint` (uses `golangci-lint`)19- **Upgrade deps:** `task upgrade-deps`20- **Clean:** `task clean`21- **Run CLI:** `./hermes --help` or `go run . import goodreads -f file.csv`22- **CI:** Use `task build-ci` for CI builds/tests.2324## Code Structure & Patterns2526- **Importers:** Each under `cmd/{source}/` with:27 - `cmd.go` (command setup), `parser.go` (input parsing), `types.go` (models), `{api}.go` (API integration), `cache.go`, `json.go`, `markdown.go`, `testdata/`.28- **Shared logic:** Use/extend `internal/` packages. Contribute reusable code back.29- **Datastore:** Use `internal/datastore/` for SQLite (local) or Datasette (remote) output. See [docs/datasette_integration.md](../docs/datasette_integration.md).30- **Output:** Use `internal/fileutil` for Markdown/JSON writing. Follow frontmatter and file naming conventions ([docs/05_output_formats.md](../docs/05_output_formats.md)).31- **Caching:** Implemented per-importer in `cache.go`, stores JSON in `cache/{importer}/`. Always check cache before API calls.3233## Configuration & Flags3435- **Config:** YAML file (`config.yaml`), loaded via Viper. CLI flags > env vars > config file > defaults. See [docs/04_configuration.md](../docs/04_configuration.md).36- **Global settings:** Output dirs, overwrite flag, loglevel.37- **Importer settings:** Namespaced under importer key (e.g., `goodreads.csvfile`).38- **Datasette:** Enable with config or flags for SQLite/remote export.3940## Logging & Error Handling4142- **Logging:** Use Go's `log/slog` with custom handler (`http://github.com/lepinkainen/humanlog`). Levels: Debug, Info, Warn, Error. Log progress, context, and errors. See [docs/07_logging_error_handling.md](../docs/07_logging_error_handling.md).43- **Errors:** Return errors up the stack, wrap with context (`fmt.Errorf("context: %w", err)`). Use custom types (e.g., `RateLimitError` in `internal/errors/`).44- **Recoverable errors:** Log and continue (e.g., skip item, warn on API miss).4546## Output Conventions4748- **Markdown:** YAML frontmatter with all metadata, Obsidian-compatible. Use `MarkdownBuilder` from `internal/fileutil/markdown.go`.49- **JSON:** One file per item or array per importer. See examples in [docs/05_output_formats.md](../docs/05_output_formats.md).50- **File naming:** Sanitize titles/IDs, use underscores/hyphens, add `.md`/`.json`.5152## Caching5354- **Location:** `cache/{importer}/` (e.g., `cache/goodreads/`).55- **Format:** JSON, filename = cache key (e.g., ISBN, IMDb ID).56- **Control:** Can disable/clear via flags. TTL and per-importer settings supported.5758## Testing5960- **Unit tests:** Place in `_test.go` in same package. Use `testdata/` for fixtures. Table-driven tests preferred.61- **Run:** `task test` or `go test ./...`6263## Project Conventions6465- **Language:** Go only. Use idiomatic Go style. Run `gofmt -w .`.66- **CLI:** Use Cobra/Kong for commands, Viper for config.67- **Dependencies:** Prefer stdlib, justify new deps. Use `modernc.org/sqlite` for SQLite.68- **Docs:** Update `docs/` and Go doc comments for all exported symbols. Keep CLI help up to date.6970## Integration Points7172- **APIs:** OMDB (IMDb/Letterboxd), OpenLibrary (Goodreads), Steam API. Respect rate limits, cache responses, handle errors.73- **Datasette:** Local (SQLite) or remote (API). Use `internal/datastore/` abstraction.7475## References7677- [docs/01_overview.md](../docs/01_overview.md) – Project overview78- [docs/03_architecture.md](../docs/03_architecture.md) – Architecture79- [docs/04_configuration.md](../docs/04_configuration.md) – Configuration80- [docs/05_output_formats.md](../docs/05_output_formats.md) – Output formats81- [docs/06_caching.md](../docs/06_caching.md) – Caching82- [docs/07_logging_error_handling.md](../docs/07_logging_error_handling.md) – Logging & error handling83- [llm-shared/project_tech_stack.md](../../llm-shared/project_tech_stack.md) – Tech stack8485- Maintain consistent Go style and idiomatic patterns86- Follow the existing architectural patterns87- Each data source processor should be implemented as a separate command88
Also in lepinkainen/hermes
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| lepinkainen/hermes.cursor/rules/rules.mdc · 5 | Cursor rules | stylearchdo-notagent-behaviour | 51/100 | 3 days ago | |
| lepinkainen/hermes.clinerules/project-rules.md · 5 | Cline rules | testarchapido-not+1 | 71/100 | 3 days ago | |
| lepinkainen/hermes.cursor/rules/mdc.mdc · 5 | Cursor rules | stylearchdo-notagent-behaviour | 69/100 | 3 days ago | |
| lepinkainen/hermesAGENTS.md · 5 | AGENTS.md | buildtestlint-formatstyle+3 | 96/100 | 3 days ago | |
| lepinkainen/hermesCLAUDE.md · 5 | CLAUDE.md | testlint-formatstylearch+1 | 89/100 | 3 days ago | |
| lepinkainen/hermesGEMINI.md · 5 | GEMINI.md | stylearchagent-behaviour | 76/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago | |
| skillrecordings/egghead-next.cursor/rules/gh-task-plan.mdc · 1.4k | Cursor rules | teststylearchtypes+2 | 96/100 | 3 days ago | |
| skillrecordings/egghead-next.cursor/rules/project-update-rules.mdc · 1.4k | Cursor rules | buildtestlint-formatstyle+7 | 96/100 | 3 days ago | |
| skillrecordings/egghead-next.cursor/rules/project-update-user-rules.mdc · 1.4k | Cursor rules | buildtestlint-formatstyle+7 | 96/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/proto.mdc · 126 | Cursor rules | buildlint-formatstylearch+3 | 96/100 | 3 days ago |
