Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .agents/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

TanStack.com marketing site built with TanStack Start.

## Core principles for every task

Before writing code, walk this ladder. Stop at the first answer that works.

1. **Does this need to exist?** → no: skip it (YAGNI)
2. **Already in this codebase?** → reuse it, don't rewrite
3. **Stdlib does it?** → use it
4. **Native platform feature?** → use it
5. **Installed dependency?** → use it
6. **One line?** → one line
7. **Only then:** the minimum that works

Inspired by https://github.com/DietrichGebert/ponytail

### Abstraction & repetition

- **KISS** — keep it simple, stupid. Boring code beats clever code.
- **WET > DRY** — write everything twice (or more) before abstracting. Three similar usages with diverging needs is the cue to extract; two is not.
- Premature DRY couples unrelated code through a shared abstraction that ends up fighting both callers. Duplication is cheaper than the wrong abstraction.

### What this means in practice

- Don't add error handling, fallbacks, or validation for cases that can't happen.
- Don't introduce helpers, wrappers, or config knobs "for later."
- Don't refactor surrounding code while fixing a bug.
- When tempted to abstract: count the call sites and check they actually want the same behavior. If not, leave the duplication.

## Essentials

- Package manager: `pnpm`
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@modelcontextprotocol/sdk": "^1.29.0",
"@observablehq/plot": "^0.6.17",
"@octokit/graphql": "^9.0.3",
"@phosphor-icons/react": "^2.1.10",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-toast": "^1.2.15",
Expand Down
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading