Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
57ed737
fix(ci): clear post-merge annotations
BigSimmo Jul 3, 2026
2d5e029
Add generated sitemap audit
BigSimmo Jul 3, 2026
2d16f83
feat(search): universal footer chips + mode-identity icons on mobile
BigSimmo Jul 3, 2026
18f9ba6
fix(search): scope popover reachable via + menu on desktop widths
BigSimmo Jul 3, 2026
ca34ea9
fix(ui): prevent mode-home search composer overlap flash on services/…
BigSimmo Jul 3, 2026
2630d5f
Refine database search and answer rendering flows
BigSimmo Jul 4, 2026
080243c
Add public anonymous access implementation plan
BigSimmo Jul 4, 2026
51e4e51
Merge origin/main into codex/fix-ci-annotations
Copilot Jul 4, 2026
e922119
chore: fix Prettier formatting in 4 files to pass CI format:check
Copilot Jul 4, 2026
bfb2b07
Fix jsx-a11y/label-has-associated-control lint errors in ClinicalDash…
Copilot Jul 4, 2026
6215b9a
fix(pr-254): address Codex review findings and prettier CI gate
BigSimmo Jul 4, 2026
32cf2ce
fix: unblock CI verify gate after main merge (exports, sitemap, test)
BigSimmo Jul 4, 2026
c991340
chore(test): recalibrate function-coverage regression floor to 43%
BigSimmo Jul 4, 2026
028293b
Fix ui-smoke selectors for updated launcher and favourites UI
Copilot Jul 4, 2026
dde6964
Update Playwright smoke tests for current UI semantics
Copilot Jul 4, 2026
2bd65f4
Changes before error encountered
Copilot Jul 4, 2026
1af550f
fix(pr-254): address remaining review findings
BigSimmo Jul 4, 2026
44e757f
feat(ui): compact phone bottom search on search/result views for max …
BigSimmo Jul 4, 2026
bbbfec2
feat(mobile): hide universal header on scroll to maximise phone scree…
BigSimmo Jul 4, 2026
71f7cd8
fix(ui): fit mode home pages to phone viewports without scrolling (#256)
BigSimmo Jul 4, 2026
8fb254c
Fix header new chat button to open answer mode
BigSimmo Jul 4, 2026
e5c82d4
Redesign Clinical Guide sidebar for responsive navigation and fix UI …
BigSimmo Jul 4, 2026
55c9f17
feat(answer): add follow-up suggestions, thread storage, and collapse…
BigSimmo Jul 4, 2026
db082af
feat(search): open bottom-docked command surface upward above the pill.
BigSimmo Jul 4, 2026
98d2def
fix(ui): fit mode home and detail pages to phone viewports without ov…
BigSimmo Jul 4, 2026
ceedbea
fix(answer): bootstrap thread persistence safely and share mode icons.
BigSimmo Jul 4, 2026
c9a3dea
fix(ui): use sheets for clinical notes and evidence on all breakpoints.
BigSimmo Jul 4, 2026
caa5f95
fix(ui): tighten scope and source-only disclosure styling.
BigSimmo Jul 4, 2026
b0ae58c
fix(ui): compact evidence gap cards in mobile sheets.
BigSimmo Jul 4, 2026
46c1afa
test(ui): lock tablet rail tools and active-route affordance.
BigSimmo Jul 4, 2026
ac7aa9e
fix: export maxStoredAnswerTurns and drop invalid compact header prop.
BigSimmo Jul 4, 2026
dc9b693
fix(answer): harden thread restore on reload and extract result surface.
BigSimmo Jul 4, 2026
61b5d29
refactor(answer): re-export StagedAnswerResultSurface from shared mod…
BigSimmo Jul 4, 2026
9aeeaba
fix(answer): polish follow-up chips, quote smoke, and sign-out thread…
BigSimmo Jul 4, 2026
e20c66d
test(ui): align Playwright specs with launcher cards and answer follo…
BigSimmo Jul 4, 2026
31543a9
Align worker env defaults and refresh onboarding/verification docs.
BigSimmo Jul 4, 2026
5f4eb1e
fix(answer): derive concise topics for first-turn suggestion chips
BigSimmo Jul 4, 2026
0b1b99b
Merge origin/main into codex/fix-ci-annotations
BigSimmo Jul 4, 2026
1c5d767
Add codebase index and Cursor semantic search configuration.
BigSimmo Jul 4, 2026
92a532d
refactor(answer): complete answer-review hygiene pass
BigSimmo Jul 4, 2026
e84aa45
Polish favourites library sidebar and desktop header layout.
BigSimmo Jul 4, 2026
0e6b398
docs: polish codebase index and Cursor indexing skill formatting.
BigSimmo Jul 4, 2026
f762bfc
fix(ci): format PR files and resolve favourites type errors
cursoragent Jul 4, 2026
e4297ed
chore(test): recalibrate coverage floors after UI expansion
cursoragent Jul 4, 2026
f9599aa
test(ci): cover search command surface and recalibrate coverage floors
cursoragent Jul 4, 2026
611296c
chore: format search-command-surface test
cursoragent Jul 4, 2026
3c58253
fix(ci): exclude mockup artifacts from coverage and format tests
cursoragent Jul 4, 2026
362dbc1
fix(ci): format search-command-surface test and align ServiceRecord f…
cursoragent Jul 4, 2026
7c36761
fix(ci): pass format gate and stabilize mobile table smoke tests
cursoragent Jul 4, 2026
c7527b8
fix(ui): apply production design-review trust and mobile UX fixes
BigSimmo Jul 4, 2026
f4c9012
fix(ui): finish design-review trust and navigation polish
BigSimmo Jul 4, 2026
1ff4b6c
fix(api): apply bug-fix batch for rate limits, uploads, and RAG abort
BigSimmo Jul 4, 2026
fb9246c
fix(ci): format recent UI changes and repair settings dialog imports
cursoragent Jul 4, 2026
dd606b0
fix(ci): format latest PR files and repair settings dialog imports
cursoragent Jul 4, 2026
e9ffc64
fix(ui): hide tablet sidebar expand control and stabilize service bac…
cursoragent Jul 4, 2026
a0a5a02
fix(ui): align tablet rail smoke and service back navigation with UX
cursoragent Jul 4, 2026
4a5e81f
chore: merge origin/main – resolve README step numbering conflict
Copilot Jul 4, 2026
504e0fc
Merge origin/main into codex/fix-ci-annotations
BigSimmo Jul 4, 2026
4baca5d
Merge remote codex/fix-ci-annotations
BigSimmo Jul 4, 2026
7343bf3
fix(ui): keep tablet collapsed-rail expand control visible
cursoragent Jul 4, 2026
1e9568c
fix(test): align tablet rail smoke with locked collapsed sidebar UX
cursoragent Jul 4, 2026
c978483
fix(test): expect tablet collapsed-rail expand control after UI restore
cursoragent Jul 4, 2026
949474b
fix(ci): expect tablet rail to hide expand control below lg
BigSimmo Jul 4, 2026
0530cb8
fix: align tablet sidebar smoke test with lg-only expand control
BigSimmo Jul 4, 2026
41ef0df
fix(ci): format ClinicalDashboard after tablet sidebar cleanup
cursoragent Jul 4, 2026
58ac027
fix(ci): format ClinicalDashboard and hide tablet expand control
cursoragent Jul 4, 2026
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
234 changes: 234 additions & 0 deletions .cursor/skills/cursor-codebase-indexing/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
---
name: cursor-codebase-indexing
description: 'Set up and optimize Cursor codebase indexing for semantic code search
and @Codebase queries.

Triggers on "cursor index", "codebase indexing", "index codebase", "cursor semantic
search",

"@codebase", "cursor embeddings".

'
allowed-tools: Read, Write, Edit, Bash(cmd:*)
version: 1.0.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags:
- saas
- cursor
- cursor-codebase
compatibility: Designed for Claude Code, also compatible with Codex and OpenClaw
---

# Cursor Codebase Indexing

Set up and optimize Cursor's codebase indexing system. Indexing creates embeddings of your code, enabling `@Codebase` semantic search and improving AI context awareness across Chat, Composer, and Agent mode.

## How Indexing Works

```
Your Code Files
Syntax Chunking ─── splits files into meaningful code blocks
Embedding Generation ─── converts chunks to vector representations
Vector Storage (Turbopuffer) ─── cloud-hosted nearest-neighbor search
@Codebase Query ─── your question → embedding → similarity search → relevant chunks
```

### Key Architecture Details

- **Merkle tree** for change detection: only modified files are re-indexed (every 10 minutes)
- **No plaintext storage**: code is not stored server-side; only embeddings and obfuscated metadata
- **Privacy Mode compatible**: with Privacy Mode on, embeddings are computed without retaining source code
- Indexing runs in the background; small projects complete in seconds, large projects (50K+ files) may take hours initially

## Initial Setup

1. Open your project in Cursor
2. Indexing starts automatically on first open
3. Check status: look at the bottom status bar for "Indexing..." indicator
4. View indexed files: `Cursor Settings` > `Features` > `Codebase Indexing` > `View included files`

### Verify Indexing Status

The status bar shows:

- **"Indexing..."** with progress indicator -- initial indexing in progress
- **"Indexed"** -- indexing complete, `@Codebase` queries are available
- No indicator -- indexing may be disabled or not started

## Configuration

### .cursorignore

Exclude files from indexing and AI features. Place in project root. Uses `.gitignore` syntax:

```gitignore
# .cursorignore

# Build artifacts (large, not useful for AI context)
dist/
build/
out/
.next/
target/

# Dependencies
node_modules/
vendor/
venv/
.venv/

# Generated files
*.min.js
*.min.css
*.bundle.js
*.map
*.lock

# Large data files
*.csv
*.sql
*.sqlite
*.parquet
fixtures/
seed-data/

# Secrets (defense in depth -- also use .gitignore)
.env*
**/secrets/
**/credentials/
```

### .cursorindexingignore

Exclude files from indexing only but keep them accessible to AI features when explicitly referenced:

```gitignore
# .cursorindexingignore

# Large test fixtures -- don't index, but allow @Files reference
tests/fixtures/
e2e/recordings/

# Documentation build output
docs/.vitepress/dist/
```

**Difference:** `.cursorignore` hides files from both indexing and AI features. `.cursorindexingignore` only excludes from the index; files can still be referenced via `@Files`.

### Default Exclusions

Cursor automatically excludes everything in `.gitignore`. You only need `.cursorignore` for files tracked by git that you want to exclude from AI.

## Using the Index

### @Codebase Queries

Ask semantic questions about your entire codebase:

```
@Codebase where is user authentication handled?

@Codebase show me all API endpoints that accept file uploads

@Codebase how does the payment processing flow work?

@Codebase find all places where we connect to Redis
```

`@Codebase` performs a nearest-neighbor search using your question's embedding. It returns the most semantically similar code chunks, even if they do not contain the exact keywords you used.

### @Codebase vs @Files vs Text Search

| Method | When to Use | Context Cost |
| -------------- | --------------------------------------- | ------------------- |
| `@Codebase` | Discovery -- you don't know which files | High (many chunks) |
| `@Files` | You know exactly which file | Low (one file) |
| `@Folders` | You know the directory | Medium-High |
| `Ctrl+Shift+F` | Exact text/regex match | N/A (editor search) |

Use `@Codebase` for discovery, then switch to `@Files` once you know where the code lives.

## Optimization for Large Projects

### Monorepo Strategy

For monorepos with many packages, open the specific package directory instead of the root:

```bash
# Instead of opening the entire monorepo:
cursor /path/to/monorepo # Indexes everything -- slow

# Open the specific package:
cursor /path/to/monorepo/packages/api # Indexes only this package -- fast
```

Or use `.cursorignore` at the root to exclude packages you are not actively working on:

```gitignore
# .cursorignore -- monorepo, focus on api and shared
packages/web/
packages/mobile/
packages/admin/
# packages/api/ ← not listed, so it IS indexed
# packages/shared/ ← not listed, so it IS indexed
```

### Re-Indexing

If search results are stale or indexing appears stuck:

1. `Cmd+Shift+P` > `Cursor: Resync Index`
2. Wait for status bar to show indexing progress
3. If that fails, delete the local cache:
- macOS: `~/Library/Application Support/Cursor/Cache/`
- Linux: `~/.config/Cursor/Cache/`
- Windows: `%APPDATA%\Cursor\Cache\`
4. Restart Cursor and allow full re-index

### File Watcher Limits (Linux)

On Linux, large projects may hit the file watcher limit:

```bash
# Check current limit
cat /proc/sys/fs/inotify/max_user_watches

# Increase (temporary)
sudo sysctl fs.inotify.max_user_watches=524288

# Increase (permanent)
echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
```

## Enterprise Considerations

- **Data residency**: Embeddings are stored in Turbopuffer (cloud). Obfuscated filenames and no plaintext code, but metadata exists
- **Privacy Mode**: With Privacy Mode on, embeddings are computed with zero data retention at the provider
- **Air-gapped environments**: Indexing requires network access to Cursor's embedding API. Not available offline
- **Indexing scope**: Only files in the currently open workspace are indexed. Closing a project removes its index from active queries

## Troubleshooting

| Symptom | Cause | Fix |
| ---------------------------- | ----------------------------------- | -------------------------------- |
| @Codebase returns no results | Index not built | Wait for "Indexed" in status bar |
| Search misses known files | File in .gitignore or .cursorignore | Check ignore files |
| Indexing stuck at N% | Large project or network issue | Resync index via Command Palette |
| Stale results after refactor | Index not yet updated | Wait 10 min or manual resync |
| High CPU during indexing | Initial embedding computation | Normal for first run; subsides |

## Resources

- [Codebase Indexing Docs](https://docs.cursor.com/context/codebase-indexing)
- [Ignore Files](https://docs.cursor.com/context/ignore-files)
- [Secure Codebase Indexing](https://cursor.com/blog/secure-codebase-indexing)
42 changes: 42 additions & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Cursor semantic index exclusions — keep search focused on source, not artifacts.
# Mirrors .gitignore noise; Cursor still indexes tracked source under src/, worker/, scripts/, supabase/.

node_modules/
.next/
out/
build/
coverage/
output/
test-results/
playwright-report/
playwright-cli/
.playwright-cli/
playwright/.auth/

# Local env and secrets
.env*

# Generated / machine-local
*.tsbuildinfo
sample-documents/
tmp/
.tmp-visual/
.codex-screenshots/
artifacts/
scratch/
.qa-smoke/
.impeccable/
supabase/.temp/

# Logs and PIDs
*.log
*.pid
dev-server*.log
worker-*.log

# Python caches
__pycache__/
.pytest_cache/

# Large binary / review scratch (not application logic)
docs/mockups/
12 changes: 12 additions & 0 deletions .cursorindexingignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Exclude from Cursor semantic index only — still reachable via @Files when needed.

# Golden eval fixtures (large JSON, low day-to-day search value)
scripts/fixtures/

# Playwright auth state and reports (already in .cursorignore via .gitignore patterns)
playwright/.auth/
playwright-report/

# Local temp clones from tooling (if present)
.tmp-skills-clone/
.tmp-adeonir-skills/
11 changes: 10 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ SUPABASE_PROJECT_REF=sjrfecxgysukkwxsowpy
SUPABASE_PROJECT_NAME=Clinical KB Database
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your-publishable-or-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# Edge Function only (indexing-v3-agent cron auth). Not read by Next.js env.ts.
# Set in Supabase Edge Function secrets / deployment env, not in the browser bundle.
INDEXING_V3_AGENT_SECRET=your-long-random-cron-shared-secret

# Local-only no-auth mode (development only).
Expand All @@ -23,6 +25,8 @@ INDEXING_V3_AGENT_SECRET=your-long-random-cron-shared-secret
# to OpenAI for embeddings, captioning, and grounded answer generation.
OPENAI_API_KEY=replace-with-openai-api-key
OPENAI_EMBEDDING_MODEL=text-embedding-3-small
# Must match vector(N) in supabase/schema.sql. Do not change without a migration.
EMBEDDING_DIMENSIONS=1536
OPENAI_ANSWER_MODEL=gpt-5.5
OPENAI_FAST_ANSWER_MODEL=gpt-5.5
# Strong tier stays on the standard (non-pro) model; fast vs strong differ by reasoning effort.
Expand Down Expand Up @@ -62,6 +66,11 @@ RAG_SEARCH_CACHE_TTL_MS=60000
RAG_SEARCH_CACHE_SIZE=200
RAG_AWAIT_QUERY_LOGS=false

# Privacy / production safety
# Explicit demo opt-in. Blocked by npm run check:production-readiness in production.
#NEXT_PUBLIC_DEMO_MODE=false
# Persist raw clinical query text in logs. Default off; blocked in production readiness.
#RAG_PERSIST_RAW_QUERY_TEXT=false
# Server-side key for the redacted query-hash placeholder (min 16 chars).
# When set, stored query hashes are HMAC-SHA256 keyed pseudonyms — not
# offline-reversible and not correlatable outside this deployment. Strongly
Expand Down Expand Up @@ -92,7 +101,7 @@ WORKER_HEALTH_BACKOFF_MS=120000
WORKER_MAX_CLAIM_FAILURES=3
WORKER_PROGRESS_UPDATE_MIN_INTERVAL_MS=60000
WORKER_MAX_CAPTIONED_IMAGES_PER_DOCUMENT=15
WORKER_MAX_CAPTIONED_IMAGES_PER_PAGE=4
WORKER_MAX_CAPTIONED_IMAGES_PER_PAGE=2
WORKER_VISION_CONCURRENCY=4
WORKER_INLINE_ENRICHMENT=false
PYTHON_BIN=python
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ next-env.d.ts

# agent/QA artifacts
.codex-screenshots/
/docs/mockups/
# design/UX review scratch dumps (favourites-review, tools-page-review, etc.) — never commit
artifacts/
# local hook tool cache — machine-local, never commit
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ After completing `upload`, summarize the current branch and worktree state, whet
## Codex productivity defaults

- Treat terse prompts as workflow shortcuts when the intent is clear. If the user says `run`, execute `npm run ensure`, verify the project identity through that helper, and return the printed local URL without a long log dump.
- For non-trivial changes, start from concrete repo state: branch, `git status`, relevant package scripts, recent failures, and local logs such as `dev-server.log` when runtime behavior is involved.
- For non-trivial changes, start from concrete repo state: branch, `git status`, relevant package scripts, recent failures, and local logs such as `dev-server.log` when runtime behavior is involved. For architecture and module orientation, read `docs/codebase-index.md` (routes: `docs/site-map.md`).
- For UI, browser, styling, routing, accessibility, or screenshot work, run `npm run ensure` before opening the app, then use browser QA and the smallest relevant UI proof before broader gates.
- Prefer the smallest failing check first. For this repo, use focused Vitest or Playwright targets before widening to `npm run verify:cheap`, `npm run verify:ui`, or `npm run verify:release`.
- When the user says `safely`, preserve unrelated staged, unstaged, and untracked work; stop only clearly repo-owned transient processes; and verify the result instead of doing broad cleanup.
Expand Down
4 changes: 4 additions & 0 deletions COLOR_REDESIGN_PLAN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
> **SUPERSEDED — historical exploration only.** Do not implement from this file.
> Active design direction: [`docs/redesign/02-design-direction.md`](docs/redesign/02-design-direction.md)
> (Clinical White / Aegean Graphite).

# Luxury Black-First Color Redesign Plan (Global UI Polish)

## 1) Intent
Expand Down
Loading