general

general is a cursor rule for Cursor from theimaginaryfoundation/what-iff. It costs 2,726 tokens per session, scanned A, original, Apache-2.0.

Project guidelines for a Go personal-assistant agent that can research, write content, and connect to outside services through MCP, a standard way for AI tools to use external integrations.

In plain words
What is it for?
Use them when changing the assistant, its API server, database access, or shared Go code.
Why use it?
They give the agent consistent code structure and development rules, reducing guesswork when adding features or integrations.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them when changing the assistant, its API server, database access, or shared Go code.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/theimaginaryfoundation/what-iff/general
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/theimaginaryfoundation/what-iff

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for general

README.md
[![agentmods](https://agentmods.dev/badge/rules/theimaginaryfoundation/what-iff/general/github.svg)](https://agentmods.dev/rules/theimaginaryfoundation/what-iff/general)
Your own site
<a href="https://agentmods.dev/rules/theimaginaryfoundation/what-iff/general"><img src="https://agentmods.dev/badge/rules/theimaginaryfoundation/what-iff/general/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for general

Your own site · 80×15
<a href="https://agentmods.dev/rules/theimaginaryfoundation/what-iff/general"><img src="https://agentmods.dev/badge/rules/theimaginaryfoundation/what-iff/general.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,726 This file is loaded in full into every session.
When invoked 2,726 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02726 $0.02726
Opus 5 $0.01363 $0.01363
Sonnet 5 $0.00545 $0.00545
Haiku 4.5 $0.00273 $0.00273

Measured yesterday against content hash 4611f0f9bb17, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

general scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/general.mdc · 367 lines

How it starts

The opening of the file, as written. The whole thing — 367 lines — stays where its author put it; the contents beside it link to each section on GitHub.

General Project Guidelines

Project Overview

This project is a personal assistant AI agent. It's designed to conduct research, help write emails, documents, and other content. It's also designed to be extensible via MCP to support integrations with external services to enable additional agent capabilities.

Project Structure

The project follows standard Go project layout conventions:

  • cmd/ - Main applications for this project
    • api-server/ - Backend API server for the personal assistant
  • internal/ - Library code that can be used by other applications
    • datastore/ - Database access layer using Ent ORM
    • models/ - Data structures shared across the application
    • server/ - Main startup logic for API server
    • handlers/ - API endpoint handlers for API server
    • database/ - Database connection and configuration utilities
  • ent/ - Auto-generated Ent ORM code for database entities

Development Best Practices

Go Coding Standards

  1. Idiomatic Go: Follow the Go proverbs and standard conventions

    • Use proper error handling (no panics in production code)
    • Embrace interfaces for dependency inversion
    • Prefer composition over inheritance
    • Use meaningful variable names (i for indexes, err for errors)
  2. Code Organization:

    • Keep functions small and focused on a single responsibility
    • Group related functions in packages with clear boundaries
    • Use interfaces to define behavior at package boundaries
    • Extract complex logic into well-named helper functions immediately
    • Avoid deeply nested loops and conditionals (aim for cyclomatic complexity < 10)
    • Use early returns to reduce nesting levels
  3. Error Handling:

    • Always check errors, never use _ to ignore errors without justification
    • Return errors rather than using panic
    • Use custom error types or error wrapping for context
    • Use fmt.Errorf() with %w for wrapping errors
  4. Concurrency:

    • Use channels and goroutines appropriately
    • Always ensure proper goroutine termination
    • Use context for cancellation and timeouts
    • Use sync primitives (Mutex, WaitGroup) when appropriate

Read the full file on GitHub · 367 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 367 lines · 2,726 tokens per session scan A 4611f0f9bb17

Subscribe to this mod's changes

general is a cursor rule published in the GitHub repository theimaginaryfoundation/what-iff (15 stars, last pushed today), licensed Apache-2.0. It adds 2,726 tokens to every session, about $0.0136 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-09.