Skip to main content
Glama
README.md
<!-- Generated by scripts/documents.js from the document locale sources. -->

<div lang="en" dir="ltr">

<div align="center">
<img src="assets/brand/logo.svg" width="104" height="104" alt="SeniorMode">
<h1>SeniorMode</h1>
<p dir="ltr"><strong lang="en" dir="ltr">English</strong>&nbsp;· <a href="docs/i18n/tr/README.md" lang="tr" dir="ltr">Türkçe</a>&nbsp;· <a href="docs/i18n/de/README.md" lang="de" dir="ltr">Deutsch</a>&nbsp;· <a href="docs/i18n/es/README.md" lang="es" dir="ltr">Español</a>&nbsp;· <a href="docs/i18n/fr/README.md" lang="fr" dir="ltr">Français</a>&nbsp;· <a href="docs/i18n/ja/README.md" lang="ja" dir="ltr">日本語</a>&nbsp;· <a href="docs/i18n/pt-BR/README.md" lang="pt-BR" dir="ltr">Português&nbsp;(Brasil)</a>&nbsp;· <a href="docs/i18n/zh-CN/README.md" lang="zh-CN" dir="ltr">简体中文</a>&nbsp;· <a href="docs/i18n/ar/README.md" lang="ar" dir="rtl">العربية</a>&nbsp;· <a href="docs/i18n/az/README.md" lang="az" dir="ltr">Azərbaycanca</a>&nbsp;· <a href="docs/i18n/fa/README.md" lang="fa" dir="rtl">فارسی</a>&nbsp;· <a href="docs/i18n/hi/README.md" lang="hi" dir="ltr">हिन्दी</a>&nbsp;· <a href="docs/i18n/id/README.md" lang="id" dir="ltr">Bahasa&nbsp;Indonesia</a>&nbsp;· <a href="docs/i18n/it/README.md" lang="it" dir="ltr">Italiano</a>&nbsp;· <a href="docs/i18n/kk/README.md" lang="kk" dir="ltr">Қазақша</a>&nbsp;· <a href="docs/i18n/ko/README.md" lang="ko" dir="ltr">한국어</a>&nbsp;· <a href="docs/i18n/ky/README.md" lang="ky" dir="ltr">Кыргызча</a>&nbsp;· <a href="docs/i18n/ru/README.md" lang="ru" dir="ltr">Русский</a>&nbsp;· <a href="docs/i18n/th/README.md" lang="th" dir="ltr">ไทย</a>&nbsp;· <a href="docs/i18n/tk/README.md" lang="tk" dir="ltr">Türkmençe</a>&nbsp;· <a href="docs/i18n/tt/README.md" lang="tt" dir="ltr">Татарча</a>&nbsp;· <a href="docs/i18n/ug/README.md" lang="ug" dir="rtl">ئۇيغۇرچە</a>&nbsp;· <a href="docs/i18n/uk/README.md" lang="uk" dir="ltr">Українська</a>&nbsp;· <a href="docs/i18n/uz/README.md" lang="uz" dir="ltr">Oʻzbekcha</a>&nbsp;· <a href="docs/i18n/vi/README.md" lang="vi" dir="ltr">Tiếng&nbsp;Việt</a>&nbsp;· <a href="docs/i18n/zh-Hant/README.md" lang="zh-Hant" dir="ltr">繁體中文</a>&nbsp;· <a href=".github/CONTRIBUTING.md#add-a-language" lang="en" dir="ltr">+&nbsp;Add&nbsp;your&nbsp;language</a></p>
<p><strong>Your AI can code. Now make it engineer.</strong><br>Real-world engineering knowledge for AI coding agents.</p>
<p><a href="https://github.com/EnesKeremAYDIN/SeniorMode/releases/latest"><img alt="Latest release" src="https://img.shields.io/github/v/release/EnesKeremAYDIN/SeniorMode?style=flat&amp;logo=github"></a> <a href="https://github.com/EnesKeremAYDIN/SeniorMode/stargazers"><img alt="GitHub stars" src="https://img.shields.io/github/stars/EnesKeremAYDIN/SeniorMode?style=flat"></a> <a href="https://github.com/EnesKeremAYDIN/SeniorMode/forks"><img alt="GitHub forks" src="https://img.shields.io/github/forks/EnesKeremAYDIN/SeniorMode?style=flat"></a> <a href="https://github.com/EnesKeremAYDIN/SeniorMode/actions/workflows/ci.yml"><img alt="GitHub Actions CI status" src="https://github.com/EnesKeremAYDIN/SeniorMode/actions/workflows/ci.yml/badge.svg?branch=main"></a><br><a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/MIT-26734d?style=flat"></a> <a href="LICENSE-CONTENT.md"><img alt="CC BY 4.0" src="https://img.shields.io/badge/CC%20BY%204.0-26734d?style=flat"></a> <a href="skills/seniormode/SKILL.md"><img alt="Agent Skill" src="https://img.shields.io/badge/Agent%20Skill-38577a?style=flat"></a> <a href="#cli-mcp"><img alt="MCP" src="https://img.shields.io/badge/MCP-38577a?style=flat"></a> <a href="#faq"><img alt="Local first" src="https://img.shields.io/badge/Local%20first-26734d?style=flat"></a></p>
<p><a href="#install"><img src="assets/docs-icons/material/download.svg" width="16" height="16" alt="">&nbsp;Install</a> · <a href="#usage"><img src="assets/docs-icons/material/route.svg" width="16" height="16" alt="">&nbsp;Usage</a> · <a href="#examples"><img src="assets/docs-icons/material/code.svg" width="16" height="16" alt="">&nbsp;Examples</a> · <a href="#skill-directory"><img src="assets/docs-icons/material/menu_book.svg" width="16" height="16" alt="">&nbsp;Skill Directory</a> · <a href="#faq"><img src="assets/docs-icons/material/help.svg" width="16" height="16" alt="">&nbsp;FAQ</a> · <a href="https://github.com/EnesKeremAYDIN/SeniorMode/releases">Releases</a> · <a href=".github/CONTRIBUTING.md#en"><img src="assets/docs-icons/material/fork_right.svg" width="16" height="16" alt="">&nbsp;Contributing</a></p>
<p>Made in Türkiye 🇹🇷</p>
</div>

**Working code is not enough.** SeniorMode gives your coding agent a library of engineering decisions and a workflow for applying them. It helps the agent spot risks, choose an approach that fits your project, and test the result.

Start with the result you want. SeniorMode helps your agent turn an ordinary request into decisions that fit your project, protect what matters, and can be verified. The knowledge stays available locally for you and your agent to inspect.

**103** Engineering Decisions · **13** Categories · **16** Engineering standards · **5** Supported agents

## Why does shuffle feel broken?

> Add shuffle to my music app.

| Method | Artist order | Adjacent repeats |
|---|---|---:|
| Random sort | **Eminem** → **Eminem** → **The Weeknd** → **The Weeknd** → **Drake** → **Drake** | 3 |
| Fisher–Yates | The Weeknd → Eminem → **Drake** → **Drake** → The Weeknd → Eminem | 1 |
| Artist-aware | The Weeknd → Eminem → Drake → The Weeknd → Eminem → Drake | 0 |

Three shuffles of the same six songs show why random playback can still feel repetitive. Every song stays in the queue, and tracks by the same artist are spaced out when the playlist allows. [Music shuffle](#example-music-shuffle)

<a href="https://eneskeremaydin.github.io/SeniorMode/shuffle/"><img src="assets/docs-icons/material/play_circle.svg" width="16" height="16" alt="">&nbsp;Try the live demo</a>

## Install

### Install with AI

Give this prompt to your coding agent, or choose your agent below for the terminal command.

```text
Install SeniorMode from https://github.com/EnesKeremAYDIN/SeniorMode. Follow the installation instructions for my coding agent and current project. Check the target directory before writing, preserve my settings and any existing skill edits, and verify that the skill is available. Ask before overwriting an existing copy. Leave MCP setup for a separate request.
```

### Supported agents

Install SeniorMode in any of these five agents. You can also use MCP from a compatible client. [MCP](#cli-mcp)

From your project root, run the command for your agent. The Vercel installer requires **Node.js 22.20+**.

Check the target folder and review any local edits before running an installer.

Vercel skills and the SeniorMode CLI each track the copies they install. Update or remove a copy with the tool that installed it. For manual copies, review local edits before replacing or removing the folder.

<a href="#install-codex"><img src="assets/docs-icons/material/terminal.svg" width="16" height="16" alt="">&nbsp;Codex</a> · <a href="#install-claude-code"><img src="assets/docs-icons/material/terminal.svg" width="16" height="16" alt="">&nbsp;Claude Code</a> · <a href="#install-cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/docs-icons/brands/cursor-on-dark.svg"><img src="assets/docs-icons/brands/cursor-on-light.svg" width="18" height="18" alt=""></picture>&nbsp;Cursor</a> · <a href="#install-gemini-cli"><img src="assets/docs-icons/brands/gemini-cli.svg" width="18" height="18" alt="">&nbsp;Gemini CLI</a> · <a href="#install-opencode"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/docs-icons/brands/opencode-on-dark.svg"><img src="assets/docs-icons/brands/opencode-on-light.svg" width="18" height="18" alt=""></picture>&nbsp;OpenCode</a>

<a id="install-codex"></a>

<details>
<summary>Codex</summary>

```sh
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent codex --copy -y
```

</details>

<a id="install-claude-code"></a>

<details>
<summary>Claude Code</summary>

```sh
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent claude-code --copy -y
```

</details>

<a id="install-cursor"></a>

<details>
<summary>Cursor</summary>

```sh
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent cursor --copy -y
```

</details>

<a id="install-gemini-cli"></a>

<details>
<summary>Gemini CLI</summary>

```sh
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent gemini-cli --copy -y
```

</details>

<a id="install-opencode"></a>

<details>
<summary>OpenCode</summary>

```sh
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent opencode --copy -y
```

</details>

Restart the agent session and ask for the change in your own words. Mention SeniorMode if the host does not select the skill. In Codex, $seniormode is the explicit skill reference. Bundled records work without an MCP server.

<details>
<summary>Project and global scope</summary>

The recommended installer uses project scope by default. Its optional global flag changes the home-level location. The managed SeniorMode CLI writes into an existing project only. Append seniormode to each skills path below. Tilde means your home directory. [skills 1.9.0](https://github.com/vercel-labs/skills/blob/v1.9.0/docs/commands.md)

| Agent | Manual / SeniorMode project path | Vercel skills project path | Vercel skills global path |
|---|---|---|---|
| Codex | `.agents/skills` | `.agents/skills` | `~/.agents/skills` |
| Claude Code | `.claude/skills` | `.claude/skills` | `~/.claude/skills or CLAUDE_CONFIG_DIR/skills` |
| Cursor | `.agents/skills` | `.agents/skills` | `~/.agents/skills` |
| Gemini CLI | `.gemini/skills` | `.agents/skills` | `~/.agents/skills` |
| OpenCode | `.agents/skills` | `.agents/skills` | `~/.agents/skills` |

Vercel skills records project installations in skills-lock.json and global installations in .skill-lock.json. Use --project for project updates and --global for global operations. The installer can change the selected skill folder and lock file.

```sh
npx skills@1.9.0 list --agent codex
npx skills@1.9.0 check
npx skills@1.9.0 update seniormode --project
npx skills@1.9.0 remove seniormode --agent codex
```

```sh
npx skills@1.9.0 add EnesKeremAYDIN/SeniorMode --skill seniormode --agent codex --global --copy -y
```

</details>

### Manual installation

Copy the entire skills/seniormode directory from a trusted checkout into the host’s skills directory. Retain SKILL.md, references, and licenses together. To refresh or remove your manual copy, replace or delete only that folder after reviewing any local edits.

<a id="cli-managed-installation"></a>

<details>
<summary>CLI-managed installation</summary>

With dependencies installed in a SeniorMode checkout, run these actions individually against an existing project. The runtime requires **Node.js 22.13.0+**.

```sh
npm ci
node bin/seniormode.js install --agent codex --project "/path/to/project"
node bin/seniormode.js status --agent codex --project "/path/to/project"
node bin/seniormode.js update --agent codex --project "/path/to/project"
node bin/seniormode.js uninstall --agent codex --project "/path/to/project"
```

The managed CLI checks that it owns the installed files and that they are unmodified before updating or removing them. It limits changes to the managed skill and its installation records. Configure MCP in your agent if you need it.

</details>

<a id="cli-mcp"></a>

### CLI & MCP

The optional CLI searches local records. MCP also gives your agent access to the standards and workflows. SeniorMode runs locally without an API key. Your agent may require its own account.

<details>
<summary>Agent Skill</summary>

- [Codex](https://learn.chatgpt.com/docs/build-skills) · Select `$seniormode` in the prompt.
- [Claude Code](https://code.claude.com/docs/en/skills) · Select `/seniormode` or name SeniorMode in the request.
- [Cursor](https://cursor.com/docs/skills) · Select the skill with `/` in Agent chat. Cursor also finds project skills under `.cursor/skills`.
- [Gemini CLI](https://geminicli.com/docs/cli/skills/) · Use `/skills list` to check discovery, then request SeniorMode by name.
- [OpenCode](https://opencode.ai/docs/skills/) · Request `seniormode` by name. Use `opencode debug skill` when your OpenCode version provides it.

</details>

<details>
<summary>CLI</summary>

In the source checkout, install dependencies with `npm ci`. The CLI can search or open a record. Run `node bin/seniormode.js --help` for the full command list.

```sh
node bin/seniormode.js search "same payment charged twice"
node bin/seniormode.js show payment-idempotency
```

</details>

<details>
<summary>MCP</summary>

Configure your agent to run Node with the absolute path to the CLI and the `mcp` argument. JSON paths on Windows can use forward slashes. The server provides seven read-only tools over stdio. It shares records, standards and workflows with the installed Skill.

| Tool | Input | Result |
|---|---|---|
| `search_patterns` | `query`, `category?`, `limit?` | Ranked matching records |
| `get_pattern` | `id` | Record, options, checks and sources |
| `compare_approaches` | `id` | Decision rules and trade-offs |
| `get_checklist` | `id` | Verification checklist |
| `list_standards` | — | Standard IDs and when to use them |
| `get_standard` | `id` | One complete standard |
| `get_workflow` | `build`, `audit`, `principles` | Build, Audit or operating principles |

#### Codex

```sh
codex mcp add seniormode -- node "/absolute/path/to/SeniorMode/bin/seniormode.js" mcp
```

Restart Codex. Remove the registration with `codex mcp remove seniormode`. [Codex MCP](https://developers.openai.com/codex/mcp)

#### Claude Code

```sh
claude mcp add --transport stdio --scope local seniormode -- node "/absolute/path/to/SeniorMode/bin/seniormode.js" mcp
```

Check the registration with `claude mcp list`. Running Node directly works with this Windows setup. [Claude Code MCP](https://code.claude.com/docs/en/mcp)

#### Cursor · Gemini CLI

Merge this entry into `mcpServers`. Cursor uses `.cursor/mcp.json` and Gemini CLI uses `.gemini/settings.json` at project scope.

```json
{
  "mcpServers": {
    "seniormode": {
      "command": "node",
      "args": [
        "/absolute/path/to/SeniorMode/bin/seniormode.js",
        "mcp"
      ]
    }
  }
}
```

[Cursor MCP](https://cursor.com/docs/context/mcp) · [Gemini CLI MCP](https://geminicli.com/docs/tools/mcp-server/)

#### OpenCode

Merge the local server into `mcp` in your OpenCode configuration.

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "seniormode": {
      "type": "local",
      "command": [
        "node",
        "/absolute/path/to/SeniorMode/bin/seniormode.js",
        "mcp"
      ],
      "enabled": true
    }
  }
}
```

[OpenCode MCP](https://opencode.ai/docs/mcp-servers/)

</details>

### Troubleshooting

Check the project root, installation path, and Node.js version. Restart the session, then invoke SeniorMode by name if the agent has yet to discover it. For managed CLI errors, see the runtime guide. [FAQ](#faq) · [CLI & MCP](#cli-mcp)

<a id="usage"></a>

## How to use

### New project

> Use SeniorMode to build a music streaming app.

Describe what you want to build. Your agent picks a starting design, builds the first useful version, and checks how it works.

[Last-room reservations](#example-reservation-concurrency)

### Existing project

> Use SeniorMode to add shuffle to my music app.

Describe the change or the problem in your project. Your agent reads the existing code first. When you ask for an audit, it reports findings without editing files.

[Music shuffle](#example-music-shuffle) · [Payment retry](#example-payment-idempotency)

### Audit an existing project

> Use SeniorMode to find out why posts appear twice in my feed.

[Repeated posts in a feed](#example-cursor-pagination)

### How it works

SeniorMode starts with your request and examines the project. It spots decisions you may not have known to ask about, checks which guidance fits, and explains how the result was verified.

1. **Request.** “Checkout sometimes charges me twice when my connection drops.”
2. **Investigate.** The payment can succeed before the reply reaches the customer.
3. **Choose a fix.** Retrying with the same purchase ID lets the system recognize the original payment.
4. **Verify.** The local example drops the first reply. The retry returns HTTP `200` and the database contains **1 charge**.

The Agent Skill routes work to Build, Audit and the relevant standards. The CLI and MCP use the same English records and in-memory SQLite search for English and Turkish queries. Managed installations copy the Skill into a chosen project. The catalog and README generators organize this material for agents and readers.

[Payment retry](#example-payment-idempotency) · [Skill Directory](#skill-directory)

## Examples

<a href="#example-music-shuffle"><img src="assets/docs-icons/material/shuffle.svg" width="16" height="16" alt="">&nbsp;Music shuffle</a> · <a href="#example-reservation-concurrency"><img src="assets/docs-icons/material/event_available.svg" width="16" height="16" alt="">&nbsp;Last-room reservations</a> · <a href="#example-payment-idempotency"><img src="assets/docs-icons/material/credit_card.svg" width="16" height="16" alt="">&nbsp;Payment retry</a> · <a href="#example-cursor-pagination"><img src="assets/docs-icons/material/view_list.svg" width="16" height="16" alt="">&nbsp;Repeated posts in a feed</a>

<a id="example-music-shuffle"></a>

### Music shuffle

> Add shuffle to my music app.

Every song stays in the queue, and tracks by the same artist are spaced out when the playlist allows. Run this example to see the song titles and the complete order for each method.

[Engineering decision](skills/seniormode/references/knowledge/product/music-shuffle.md)

<details>
<summary>Code and verification</summary>

The runnable example shows all song titles. Sorting with random comparisons does not give each order equal odds. The tests check all six permutations of a three-item list, track preservation, and playlists where a dominant artist makes some repeats unavoidable.

[shuffle.mjs](examples/shuffle.mjs)

```sh
node examples/shuffle.mjs
node --test test/shuffle.test.js
```

</details>

<a id="example-reservation-concurrency"></a>

### Last-room reservations

> Build a reservation system for my small hotel.

Only one guest can book the last room, even when requests arrive together. The test sends two requests at the same time. One books the room. The other finds it taken.

[Engineering decision](skills/seniormode/references/knowledge/concurrency/reservation-concurrency.md)

<details>
<summary>Code and verification</summary>

Two database connections compete for the same room and night. One request returns `201`, the other `409`, and one booking is stored. This example covers immediate confirmation for one night.

[reservation.mjs](examples/reservation.mjs)

```sh
node --test test/reservation.test.js
```

</details>

<a id="example-payment-idempotency"></a>

### Payment retry

> Build a checkout with payments.

Customers can retry after a lost response without getting charged twice. The test drops the first reply, retries the request, and confirms only one charge was recorded.

[Engineering decision](skills/seniormode/references/knowledge/concurrency/payment-idempotency.md)

<details>
<summary>Code and verification</summary>

The test drops the first reply and retries from a separate connection. It checks one stored charge and a conflict when the same purchase ID is reused with a different amount. With a real provider, reconcile an unknown result according to its contract.

[payment-retry.mjs](examples/payment-retry.mjs)

```sh
node --test test/payment-retry.test.js
```

</details>

<a id="example-cursor-pagination"></a>

### Repeated posts in a feed

> Some posts in this feed show up twice. Find out why.

New posts can arrive without making earlier posts show up twice in the feed. The example inserts a post between requests and shows two ways to continue the feed, including one that avoids repeating a post.

[Engineering decision](skills/seniormode/references/knowledge/backend/cursor-pagination.md)

<details>
<summary>Code and verification</summary>

A new post arrives between page requests. Offset returns IDs `8, 6` and repeats item `8`. The cursor continues from `(9, 8)` with `6, 99`. The test covers this insertion and preserves the existing offset route.

[pagination.mjs](examples/pagination.mjs)

```sh
node --test test/pagination.test.js
```

</details>

## Skill Directory

Find the problem you’re facing below. Each entry links to an English guide with options, trade-offs, and ways to check the result.

**103** Engineering Decisions · **13** Categories · **16** Engineering standards

<a href="#category-algorithms"><img src="assets/docs-icons/material/account_tree.svg" width="16" height="16" alt="">&nbsp;Algorithms and data structures (8)</a> · <a href="#category-architecture"><img src="assets/docs-icons/material/architecture.svg" width="16" height="16" alt="">&nbsp;Architecture (8)</a> · <a href="#category-backend"><img src="assets/docs-icons/material/dns.svg" width="16" height="16" alt="">&nbsp;Backend and APIs (8)</a> · <a href="#category-concurrency"><img src="assets/docs-icons/material/sync_alt.svg" width="16" height="16" alt="">&nbsp;Concurrency (9)</a> · <a href="#category-data"><img src="assets/docs-icons/material/database.svg" width="16" height="16" alt="">&nbsp;Data and storage (12)</a> · <a href="#category-frontend"><img src="assets/docs-icons/material/web.svg" width="16" height="16" alt="">&nbsp;Frontend (7)</a> · <a href="#category-geospatial"><img src="assets/docs-icons/material/map.svg" width="16" height="16" alt="">&nbsp;Geospatial (5)</a> · <a href="#category-networking"><img src="assets/docs-icons/material/lan.svg" width="16" height="16" alt="">&nbsp;Networking (7)</a> · <a href="#category-performance"><img src="assets/docs-icons/material/speed.svg" width="16" height="16" alt="">&nbsp;Performance (6)</a> · <a href="#category-product"><img src="assets/docs-icons/material/tune.svg" width="16" height="16" alt="">&nbsp;Product behavior (6)</a> · <a href="#category-reliability"><img src="assets/docs-icons/material/verified.svg" width="16" height="16" alt="">&nbsp;Reliability (12)</a> · <a href="#category-security"><img src="assets/docs-icons/material/shield.svg" width="16" height="16" alt="">&nbsp;Security (8)</a> · <a href="#category-testing"><img src="assets/docs-icons/material/science.svg" width="16" height="16" alt="">&nbsp;Testing (7)</a> · <a href="#engineering-standards"><img src="assets/docs-icons/material/fact_check.svg" width="16" height="16" alt="">&nbsp;Engineering standards (16)</a>

<a id="category-algorithms"></a>

<details>
<summary>Algorithms and data structures (8)</summary>

- [Binary search](skills/seniormode/references/knowledge/algorithms/binary-search.md) — How do you find a value or the right insertion point in an ordered list, even when values repeat?
- [Bloom filters](skills/seniormode/references/knowledge/algorithms/bloom-filter.md) — How can you quickly rule out missing items before making an expensive lookup?
- [Approximate event counts](skills/seniormode/references/knowledge/algorithms/count-min-sketch.md) — How can you track the most frequent events with a fixed amount of memory?
- [Choosing items under a limit](skills/seniormode/references/knowledge/algorithms/knapsack-dp.md) — Which combination gives the best result when each item uses part of a fixed budget?
- [Friend recommendations](skills/seniormode/references/knowledge/algorithms/mutual-friend-ranking.md) — How do you rank people by how many friends they actually share?
- [Sliding-window distance](skills/seniormode/references/knowledge/algorithms/sliding-window-distance.md) — How do you find the best stretch of a fixed distance or within a fixed limit?
- [Dependency ordering](skills/seniormode/references/knowledge/algorithms/topological-sort.md) — How do you order dependent tasks and explain when their dependencies form a loop?
- [Autocomplete](skills/seniormode/references/knowledge/algorithms/trie-autocomplete.md) — How can you suggest completions without searching every word after each keystroke?

</details>

<a id="category-architecture"></a>

<details>
<summary>Architecture (8)</summary>

- [Batch or live processing](skills/seniormode/references/knowledge/architecture/batch-versus-streaming.md) — How soon does new data need to appear, and how will processing recover after a failure?
- [Consistent hashing](skills/seniormode/references/knowledge/architecture/consistent-hashing.md) — How do you distribute work while moving as little data as possible when servers change?
- [Testable business decisions](skills/seniormode/references/knowledge/architecture/dependency-injection-seam.md) — How do you test a rule without relying on the current time, a database, or an external service?
- [Personalized feeds](skills/seniormode/references/knowledge/architecture/feed-fanout.md) — How do you keep feeds fast when some people have many more followers than others?
- [Modular monolith or separate services](skills/seniormode/references/knowledge/architecture/modular-monolith.md) — When is a single deployable app enough, and when does a part need to run independently?
- [Module boundaries](skills/seniormode/references/knowledge/architecture/module-boundaries.md) — Where should business rules live so they are clear to change and test?
- [Offline edit conflicts](skills/seniormode/references/knowledge/architecture/offline-sync-conflicts.md) — How should changes sync when people edit the same data while offline?
- [Transactional outbox](skills/seniormode/references/knowledge/architecture/transactional-outbox.md) — How do you make sure a saved change also generates an event after a crash?

</details>

<a id="category-backend"></a>

<details>
<summary>Backend and APIs (8)</summary>

- [API versioning](skills/seniormode/references/knowledge/backend/api-versioning.md) — How do you evolve a public API while keeping existing clients working?
- [Cursor pagination](skills/seniormode/references/knowledge/backend/cursor-pagination.md) — How do you prevent skipped or repeated items when new results arrive between pages?
- [Reliable scheduled jobs](skills/seniormode/references/knowledge/backend/durable-job-scheduling.md) — What happens to scheduled work when the service goes offline and comes back?
- [Duplicate event delivery](skills/seniormode/references/knowledge/backend/idempotent-consumer.md) — How do you prevent a repeated event from applying the same change twice?
- [Message acknowledgments](skills/seniormode/references/knowledge/backend/message-acknowledgment.md) — How do you tell which messages got through after a disconnect or lost acknowledgment?
- [Resumable uploads](skills/seniormode/references/knowledge/backend/resumable-uploads.md) — How do you resume an interrupted upload and verify that the completed file is intact?
- [Input validation](skills/seniormode/references/knowledge/backend/schema-validation.md) — How do you catch invalid data before it changes state or reaches another system?
- [Short links](skills/seniormode/references/knowledge/backend/short-url-identifiers.md) — How do you make short links unique and decide whether they can be guessable?

</details>

<a id="category-concurrency"></a>

<details>
<summary>Concurrency (9)</summary>

- [Safe file replacement](skills/seniormode/references/knowledge/concurrency/atomic-file-replacement.md) — How can readers always see a complete file even if a write fails or overlaps another write?
- [Concurrency limits](skills/seniormode/references/knowledge/concurrency/bounded-concurrency.md) — How do you stop fast producers from overwhelming a slower service?
- [Event ordering](skills/seniormode/references/knowledge/concurrency/event-ordering.md) — Which events must stay in order, and which can be processed in parallel?
- [Expired worker leases](skills/seniormode/references/knowledge/concurrency/lease-fencing.md) — How do you stop a worker from writing after it loses its claim on the work?
- [Collaborative text editing](skills/seniormode/references/knowledge/concurrency/operational-transformation.md) — How do two people edit the same text without silently overwriting each other?
- [Conflicting saves](skills/seniormode/references/knowledge/concurrency/optimistic-concurrency.md) — How do you detect that someone changed a record before a second edit is saved?
- [Duplicate charges](skills/seniormode/references/knowledge/concurrency/payment-idempotency.md) — How do you make sure retrying a payment never charges the customer twice?
- [Double bookings](skills/seniormode/references/knowledge/concurrency/reservation-concurrency.md) — How do you keep a slot available to one customer while payment or confirmation is pending?
- [High-traffic counters](skills/seniormode/references/knowledge/concurrency/sharded-counter.md) — How do you count many updates without everyone writing to the same place?

</details>

<a id="category-data"></a>

<details>
<summary>Data and storage (12)</summary>

- [Cache freshness](skills/seniormode/references/knowledge/data/cache-invalidation.md) — When can you safely serve cached data, and how soon must changes appear?
- [Indexes for actual queries](skills/seniormode/references/knowledge/data/composite-indexes.md) — Which columns should an index include for the filters and sorting people use?
- [Data retention and deletion](skills/seniormode/references/knowledge/data/data-retention.md) — How do you delete a person's data from the main store and its other copies?
- [Exact money amounts](skills/seniormode/references/knowledge/data/decimal-money.md) — How do you store and round money without accumulating calculation errors?
- [SQLite or database server](skills/seniormode/references/knowledge/data/embedded-database-choice.md) — When is a local database enough, and when do writers need a separate database service?
- [Search index freshness](skills/seniormode/references/knowledge/data/index-freshness.md) — How do you monitor delayed search updates and rebuild the index when necessary?
- [Full-text search](skills/seniormode/references/knowledge/data/inverted-index.md) — How do you find documents by words without rereading every document for each search?
- [Cache eviction](skills/seniormode/references/knowledge/data/lru-cache.md) — Which entries should you keep when the cache runs out of space?
- [Stored file lifecycle](skills/seniormode/references/knowledge/data/object-storage-lifecycle.md) — How long should file versions stay recoverable before they are permanently removed?
- [Seeing your own changes](skills/seniormode/references/knowledge/data/read-your-writes.md) — How do you show someone a change they just saved when database copies are behind?
- [Transaction isolation](skills/seniormode/references/knowledge/data/transaction-isolation.md) — How do you keep a rule across multiple records true when operations run at the same time?
- [Database changes without downtime](skills/seniormode/references/knowledge/data/zero-downtime-migrations.md) — How do you update your database while old and new app versions are both running?

</details>

<a id="category-frontend"></a>

<details>
<summary>Frontend (7)</summary>

- [Keyboard accessibility](skills/seniormode/references/knowledge/frontend/accessibility-keyboard.md) — How can someone use the full interface with a keyboard and keep track of focus?
- [First useful content](skills/seniormode/references/knowledge/frontend/critical-rendering-path.md) — Which resources should load first so people can start using the page sooner?
- [Form validation](skills/seniormode/references/knowledge/frontend/form-validation-boundaries.md) — How do you give immediate feedback while ensuring the server enforces the rules?
- [Instant feedback for changes](skills/seniormode/references/knowledge/frontend/optimistic-ui.md) — How do you show a change immediately and correct the display if the server rejects it?
- [Progressive enhancement](skills/seniormode/references/knowledge/frontend/progressive-enhancement.md) — How do essential actions keep working on slow connections or when scripts fail?
- [Outdated search responses](skills/seniormode/references/knowledge/frontend/requests-race-cancellation.md) — How do you stop a slow response from replacing results for a newer search?
- [Tables on small screens](skills/seniormode/references/knowledge/frontend/responsive-table.md) — How do you make a dense table usable on a phone while preserving relationships between values?

</details>

<a id="category-geospatial"></a>

<details>
<summary>Geospatial (5)</summary>

- [Location privacy](skills/seniormode/references/knowledge/geospatial/geo-privacy-minimization.md) — How much location detail does the feature actually need to collect and retain?
- [Coordinates and distances](skills/seniormode/references/knowledge/geospatial/geometry-coordinate-systems.md) — How do you choose the right map coordinates and units for a distance calculation?
- [Traffic estimates](skills/seniormode/references/knowledge/geospatial/road-traffic-estimation.md) — How do you estimate slowdowns from noisy location samples without overstating certainty?
- [Faster route lookups](skills/seniormode/references/knowledge/geospatial/route-preprocessing.md) — When is it worth preparing the road network in advance for repeated route lookups?
- [Finding nearby drivers](skills/seniormode/references/knowledge/geospatial/spatial-dispatch.md) — How do you narrow nearby drivers before checking availability and travel time?

</details>

<a id="category-networking"></a>

<details>
<summary>Networking (7)</summary>

- [DNS cutovers](skills/seniormode/references/knowledge/networking/dns-time-to-live.md) — How do you switch a service address when some visitors still have old DNS answers cached?
- [HTTP cache checks](skills/seniormode/references/knowledge/networking/http-conditional-cache.md) — How can a browser check whether its saved response is still valid for the same request and user?
- [Live streaming delay](skills/seniormode/references/knowledge/networking/live-stream-latency.md) — How close to live can playback be while staying stable under normal network conditions?
- [Request rate limits](skills/seniormode/references/knowledge/networking/rate-limiting.md) — How do you cap sustained traffic while allowing an occasional short burst?
- [Response compression](skills/seniormode/references/knowledge/networking/response-compression.md) — When does compression help, and how do you keep different encodings apart in a cache?
- [One-way live updates](skills/seniormode/references/knowledge/networking/sse-notifications.md) — How do you send progress updates and let a disconnected client catch up?
- [Online presence](skills/seniormode/references/knowledge/networking/websocket-presence.md) — How do you keep presence accurate across disconnects, reconnects, and many users?

</details>

<a id="category-performance"></a>

<details>
<summary>Performance (6)</summary>

- [Large files with bounded memory](skills/seniormode/references/knowledge/performance/bounded-memory-streaming.md) — How do you transform a large input without holding it all in memory?
- [Cache stampedes](skills/seniormode/references/knowledge/performance/cache-stampede.md) — How do you avoid many users triggering the same expensive refresh at once?
- [Performance profiling](skills/seniormode/references/knowledge/performance/latency-profiling.md) — How do you find where time is spent before investing in an optimization?
- [Repeated database queries](skills/seniormode/references/knowledge/performance/n-plus-one-queries.md) — How do you avoid an extra database query for every item while keeping responses bounded?
- [Queues and waiting times](skills/seniormode/references/knowledge/performance/queue-capacity-planning.md) — How many workers do you need to keep wait times within an acceptable range?
- [Virtual waiting rooms](skills/seniormode/references/knowledge/performance/virtual-waiting-room.md) — How do you admit visitors fairly when more people arrive than the service can handle?

</details>

<a id="category-product"></a>

<details>
<summary>Product behavior (6)</summary>

- [Preference and consent changes](skills/seniormode/references/knowledge/product/consent-derived-preferences.md) — How do you make a changed preference take effect across services that run at different times?
- [Clear status for background work](skills/seniormode/references/knowledge/product/eventual-consistency-feedback.md) — How do you tell someone their request is accepted and still running without prompting a second submission?
- [Gradual feature releases](skills/seniormode/references/knowledge/product/feature-flags.md) — How do you release a feature to a stable group first and turn it off safely if needed?
- [Music shuffle](skills/seniormode/references/knowledge/product/music-shuffle.md) — Should each shuffle be uniformly random, or should it also space out songs by the same artist?
- [Resuming a playback queue](skills/seniormode/references/knowledge/product/persistent-playback-queue.md) — How do you remember the queue and playback position across restarts and playlist changes?
- [Time zones and clock changes](skills/seniormode/references/knowledge/product/time-zone-scheduling.md) — Should a scheduled task follow local clock time or a fixed interval when clocks change?

</details>

<a id="category-reliability"></a>

<details>
<summary>Reliability (12)</summary>

- [Circuit breakers](skills/seniormode/references/knowledge/reliability/circuit-breaker.md) — How do you stop repeated calls from making a struggling dependency worse?
- [Failed message handling](skills/seniormode/references/knowledge/reliability/dead-letter-queues.md) — How do you isolate messages that keep failing and retry them safely after fixing the cause?
- [Disaster recovery](skills/seniormode/references/knowledge/reliability/disaster-recovery.md) — Can your backups restore the needed data and service within an acceptable time?
- [Distributed tracing](skills/seniormode/references/knowledge/reliability/distributed-tracing.md) — How do you follow one slow or failed request across several services?
- [Graceful shutdown](skills/seniormode/references/knowledge/reliability/graceful-shutdown.md) — How do you stop accepting work and let active tasks finish or resume safely later?
- [Request deadlines](skills/seniormode/references/knowledge/reliability/outbound-timeouts.md) — How do you keep a single slow dependency from exhausting the time available for a request?
- [Primary server failover](skills/seniormode/references/knowledge/reliability/primary-failover.md) — How do you switch to a replacement without letting two servers write as the primary?
- [Health checks](skills/seniormode/references/knowledge/reliability/readiness-liveness.md) — How do you keep traffic away from unready instances without restarting healthy processes?
- [Retries with backoff](skills/seniormode/references/knowledge/reliability/retry-backoff.md) — How do you retry temporary failures without overwhelming the system or exceeding a deadline?
- [Rolling deployments](skills/seniormode/references/knowledge/reliability/rolling-deploy-compatibility.md) — How do two app versions share data safely during a deploy or rollback?
- [Reliability targets](skills/seniormode/references/knowledge/reliability/slo-error-budget.md) — What reliability do users actually need, and when should repeated failures trigger an alert?
- [Structured logs](skills/seniormode/references/knowledge/reliability/structured-logging.md) — How do you connect related errors without recording sensitive data or generating too much noise?

</details>

<a id="category-security"></a>

<details>
<summary>Security (8)</summary>

- [Access to individual records](skills/seniormode/references/knowledge/security/authorization-object-scope.md) — How do you check that a person can read or edit the specific record they requested?
- [Browser content restrictions](skills/seniormode/references/knowledge/security/content-security-policy.md) — How do you restrict what a page loads while allowing the resources it genuinely needs?
- [Safe randomness](skills/seniormode/references/knowledge/security/cryptographic-randomness.md) — When do random values need to be impossible to guess, and when is a fair result enough?
- [Cross-site request protection](skills/seniormode/references/knowledge/security/csrf-protection.md) — How do you prevent another site from starting actions in a signed-in browser?
- [Parameterized queries](skills/seniormode/references/knowledge/security/parameterized-queries.md) — How do you pass user input to the database as values instead of executable query text?
- [Safe file uploads](skills/seniormode/references/knowledge/security/safe-file-ingest.md) — How do you validate, store, and serve user uploads safely?
- [Credential lifecycle](skills/seniormode/references/knowledge/security/secret-lifecycle.md) — How do you store and rotate credentials without leaking them or interrupting service?
- [Webhook verification](skills/seniormode/references/knowledge/security/webhook-verification.md) — How do you verify that an event came from its claimed sender and handle repeat delivery?

</details>

<a id="category-testing"></a>

<details>
<summary>Testing (7)</summary>

- [API contract tests](skills/seniormode/references/knowledge/testing/contract-testing.md) — How do you catch a provider change that would break a real client before deployment?
- [Reliable time-dependent tests](skills/seniormode/references/knowledge/testing/deterministic-time-tests.md) — How do you test time boundaries without relying on the clock or waiting in real time?
- [Recovery tests](skills/seniormode/references/knowledge/testing/fault-injection-basics.md) — How do you reproduce a failure under controlled conditions and check that recovery works?
- [Realistic load tests](skills/seniormode/references/knowledge/testing/load-test-arrival-model.md) — How do you simulate arrivals and traffic spikes that expose real queues and delays?
- [Property-based tests](skills/seniormode/references/knowledge/testing/property-based-testing.md) — How do you exercise varied inputs and check a rule that should always hold?
- [Focused snapshot tests](skills/seniormode/references/knowledge/testing/snapshot-test-scope.md) — When does checking an entire stable output help reveal meaningful changes?
- [Test doubles](skills/seniormode/references/knowledge/testing/test-double-boundaries.md) — When should a test use a substitute, and when does it need a real integration?

</details>

<a id="engineering-standards"></a>

### Engineering standards (16)

- [Greenfield planning](skills/seniormode/references/standards/greenfield.md)
- [Architecture](skills/seniormode/references/standards/architecture.md)
- [Project structure](skills/seniormode/references/standards/structure.md)
- [Modularity and reuse](skills/seniormode/references/standards/modularity.md)
- [Code principles](skills/seniormode/references/standards/code-principles.md)
- [Dependencies](skills/seniormode/references/standards/dependencies.md)
- [API contracts](skills/seniormode/references/standards/api.md)
- [Data and storage](skills/seniormode/references/standards/data.md)
- [Security](skills/seniormode/references/standards/security.md)
- [Configuration](skills/seniormode/references/standards/configuration.md)
- [Reliability](skills/seniormode/references/standards/reliability.md)
- [Observability](skills/seniormode/references/standards/observability.md)
- [Performance](skills/seniormode/references/standards/performance.md)
- [Testing](skills/seniormode/references/standards/testing.md)
- [Documentation](skills/seniormode/references/standards/documentation.md)
- [Safe refactoring](skills/seniormode/references/standards/refactoring.md)

[Agent Skill](skills/seniormode/SKILL.md) · [Knowledge Catalog](skills/seniormode/references/catalog/index.md)

## FAQ

### Can I start a new project?

Yes. Open a project folder and tell your agent what you want to build with SeniorMode. [Usage](#usage)

### Can I use this on an existing project?

Yes. Use SeniorMode for a feature, fix, refactor, or audit. An audit starts read-only. [Usage](#usage)

### Do I need a SeniorMode API key?

The skill, CLI, and MCP server run locally without a SeniorMode API key. Your agent may need its own account or model access. Installing from Git or with Vercel skills can require network access.

### Will SeniorMode activate automatically?

Automatic discovery depends on your agent. Restart the session after installing and mention SeniorMode if the skill isn’t selected. [Installation](#install)

### Which installer should I use to update or uninstall?

Use the method that installed the copy. Vercel skills tracks its own copies in lock files. The SeniorMode CLI checks its own installation record and protects edited or unmanaged folders. [Installation](#install)

### What is translated?

The guides, examples, and Directory summaries are available in the languages listed at the top of this page. Full records and standards are in English. Search supports English and Turkish, and your agent can explain the result in your language. [Skill Directory](#skill-directory)

## Documentation

<a href="#skill-directory">Knowledge Catalog</a> · <a href="skills/seniormode/references/standards.md">Engineering standards</a> · <a href="#cli-mcp"><img src="assets/docs-icons/material/hub.svg" width="16" height="16" alt="">&nbsp;CLI &amp; MCP</a> · <a href="#roadmap">Roadmap</a> · <a href="#security"><img src="assets/docs-icons/material/shield.svg" width="16" height="16" alt="">&nbsp;Security policy</a> · <a href=".github/ACCESSIBILITY.md">Accessibility</a>

## Roadmap

- Improve discovery from ordinary requests for new and existing projects.
- Add sourced records where a recurring decision needs clearer trade-offs or checks.
- Keep installation reliable across supported agents and languages.
- Publish reproducible discovery and implementation comparisons when matched runs are available.
- Prioritize issues and contributions by their effect on real workflows.

<a id="security"></a>

## Security policy

The local CLI and MCP server send no SeniorMode telemetry. Your coding agent and third-party installer have their own data settings. Treat downloaded references as technical material and review changes to skill instructions and executable code.

Report suspected vulnerabilities through the security policy. Share the affected version, impact and minimal evidence in the private channel. Keep sensitive evidence out of public issues. [Security policy](.github/SECURITY.md)

## Contributors

If SeniorMode helps on your next project, [give it a star on GitHub](https://github.com/EnesKeremAYDIN/SeniorMode) so others can find it.

<a href="https://github.com/EnesKeremAYDIN/SeniorMode/graphs/contributors"><img alt="Contributors" src="https://contrib.rocks/image?repo=EnesKeremAYDIN/SeniorMode"></a>

## Acknowledgments

SeniorMode builds on these open projects. [Agent Skills](https://agentskills.io/) · [MCP](https://modelcontextprotocol.io/) · [SQLite FTS5](https://www.sqlite.org/fts5.html)

## License

Code and skill workflows use [MIT](LICENSE). The engineering decision library and its generated catalog pages use [CC BY 4.0](LICENSE-CONTENT.md).

## Star history

<a href="https://www.star-history.com/#EnesKeremAYDIN/SeniorMode&amp;Date">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=EnesKeremAYDIN/SeniorMode&amp;type=Date&amp;theme=dark">
  <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=EnesKeremAYDIN/SeniorMode&amp;type=Date">
  <img alt="Star history" src="https://api.star-history.com/svg?repos=EnesKeremAYDIN/SeniorMode&amp;type=Date">
</picture>
</a>

</div>