Skip to content

Commit 4fc805e

Browse files
committed
Initialization:
1 parent 4a9625a commit 4fc805e

28 files changed

Lines changed: 1177 additions & 0 deletions

.claude/agents/db-inspector.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: db-inspector
3+
description: Connects to the local dev PostgreSQL database via psql and explains schema and data state in plain English. Read-only — never modifies the database.
4+
tools:
5+
- Bash
6+
- Read
7+
---
8+
9+
You run read-only psql commands against the local dev database (connection string from `.env` or Docker Compose defaults: `postgresql://postgres:postgres@localhost:5432/college_exploration`) and explain what you find.
10+
11+
Permitted commands only:
12+
- `\dt` — list tables
13+
- `\d <table>` — describe a table's columns and indexes
14+
- `SELECT COUNT(*) FROM <table>` — row counts
15+
- `EXPLAIN SELECT ...` — query plan (no `EXPLAIN ANALYZE` — that executes the query)
16+
17+
Never run: `INSERT`, `UPDATE`, `DELETE`, `DROP`, `ALTER`, `TRUNCATE`, or any DDL.
18+
Never modify the database.
19+
20+
Report table names, column types, row counts, and index presence in plain English. If the database is not running or the connection fails, report the error and stop.

.claude/agents/explorer.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: explorer
3+
description: Investigates the codebase and returns concise summaries of relevant files, symbols, and structure. Use for orientation before editing — never for making changes.
4+
tools:
5+
- Read
6+
- Grep
7+
- Glob
8+
---
9+
10+
You investigate the codebase and return concise summaries. Never edit files. Return:
11+
- Relevant file paths with one-line descriptions
12+
- Key functions/classes with signatures
13+
- A 3-sentence synthesis of what you found
14+
15+
No code blocks unless explicitly asked. When nothing relevant is found, say so briefly.

.claude/agents/ranking-tester.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: ranking-tester
3+
description: Runs the ranking test suite and reports failures with file:line references and likely root causes. Locked to tests/ranking/ only — does not touch any other tests or files.
4+
tools:
5+
- Bash
6+
- Read
7+
---
8+
9+
You run `cd apps/api && uv run pytest tests/ranking/ -v` and report results.
10+
11+
For each failure, cite:
12+
1. The file and line number (file:line)
13+
2. The assertion that failed
14+
3. Your best guess at the root cause
15+
16+
Rules:
17+
- Do not edit any files.
18+
- Do not run tests outside `tests/ranking/`.
19+
- If `tests/ranking/` does not exist yet, say so and stop.
20+
- If the command itself fails to run (missing deps, import errors), report the error output verbatim.

.claude/settings.local.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(ls /mnt/c/Users/Codys/OneDrive/Desktop/Projs/College_Exploration/docs/)"
5+
]
6+
}
7+
}

.claudeignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
node_modules/
2+
.next/
3+
dist/
4+
build/
5+
__pycache__/
6+
.venv/
7+
*.pyc
8+
data/raw/*
9+
*.log
10+
coverage/
11+
.pytest_cache/
12+
pnpm-lock.yaml
13+
uv.lock

.env.example

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Shared
2+
APP_ENV=development
3+
4+
# Frontend
5+
NEXT_PUBLIC_API_BASE_URL=http://localhost:8000
6+
7+
# Backend
8+
API_HOST=127.0.0.1
9+
API_PORT=8000
10+
DATABASE_URL=postgresql://college:college@localhost:5432/college_exploration
11+
REDIS_URL=redis://localhost:6379/0
12+
13+
# External services
14+
# OPENAI_API_KEY=

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
frontend:
9+
name: Frontend placeholder
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
working-directory: apps/web
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Check frontend scaffold
19+
shell: bash
20+
run: |
21+
if [ -f package.json ]; then
22+
echo "TODO: replace placeholder with frontend install, lint, and build commands."
23+
echo "Example: pnpm install --frozen-lockfile && pnpm lint && pnpm build"
24+
else
25+
echo "apps/web has no package.json yet; skipping frontend lint/build placeholder."
26+
fi
27+
28+
backend:
29+
name: Backend placeholder
30+
runs-on: ubuntu-latest
31+
defaults:
32+
run:
33+
working-directory: apps/api
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
- name: Check backend scaffold
39+
shell: bash
40+
run: |
41+
if [ -f pyproject.toml ] || [ -f requirements.txt ]; then
42+
echo "TODO: replace placeholder with backend dependency install and test commands."
43+
echo "Example: pytest"
44+
else
45+
echo "apps/api has no Python project file yet; skipping backend test placeholder."
46+
fi

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Node / Next.js
2+
node_modules/
3+
.next/
4+
out/
5+
dist/
6+
*.tsbuildinfo
7+
.env*.local
8+
9+
# Python
10+
__pycache__/
11+
*.py[cod]
12+
*.pyo
13+
.venv/
14+
*.egg-info/
15+
.pytest_cache/
16+
.mypy_cache/
17+
.ruff_cache/
18+
19+
# Build / test artifacts
20+
coverage/
21+
htmlcov/
22+
.coverage
23+
build/
24+
25+
# Environment / secrets
26+
.env
27+
.env.local
28+
29+
# macOS
30+
.DS_Store
31+
.AppleDouble
32+
.LSOverride
33+
34+
# IDE
35+
.vscode/
36+
.idea/
37+
*.swp
38+
*.swo
39+
40+
# Data snapshots (raw sources can be large; keep directory marker only)
41+
data/raw/*
42+
!data/raw/.gitkeep

AGENTS.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Agent Instructions
2+
3+
These instructions apply to Codex and other LLM coding agents working in this repository.
4+
5+
## Coding Standards
6+
7+
- Read `README.md`, `tasks.md`, `docs/architecture.md`, and the docs relevant to the current task before editing.
8+
- Keep each implementation step small and aligned with the V1/V2/V3 roadmap.
9+
- Prefer typed contracts and explicit validation over ad hoc objects.
10+
- Keep SQL out of route handlers when backend code is added; use repository or service modules.
11+
- Use parameterized SQL only. Never concatenate user input into SQL.
12+
- Treat missing data as unknown, not as zero, unless zero is semantically correct.
13+
- Keep application logic deterministic where user decisions depend on ranking, sorting, filtering, or scoring.
14+
15+
## Validation Commands
16+
17+
Real commands will be added as the apps are implemented. Expected future commands:
18+
19+
```powershell
20+
cd apps/web; pnpm lint; pnpm build
21+
cd apps/api; pytest
22+
pnpm exec playwright test
23+
```
24+
25+
Until those runtimes exist, validate foundation changes with:
26+
27+
```powershell
28+
Get-ChildItem -Recurse -File
29+
```
30+
31+
## Documentation Update Rules
32+
33+
- Update `tasks.md` whenever a roadmap item changes status.
34+
- Update `docs/api-contract.md` in the same change as any endpoint contract.
35+
- Update `docs/data-dictionary.md` in the same change as schema, seed, or data-source changes.
36+
- Update `docs/scoring-methodology.md` in the same change as ranking or explanation logic.
37+
- Update `docs/deployment.md` when infrastructure, environment variables, or deployment steps change.
38+
- Do not claim measured performance, users, uptime, or deployment status unless those facts have been verified.
39+
40+
## LLM Guardrails
41+
42+
- Do not build V2 or V3 features before the required V1 foundation is stable.
43+
- Do not invent college facts, data-source freshness, performance numbers, users, or deployment status.
44+
- Do not present the product as admissions advice, guaranteed ROI, or financial advice.
45+
- Do not store sensitive student details without clear product boundaries and privacy documentation.
46+
- Prefer fixtures, seed data, tests, and typed schemas over mock-only demos.
47+
48+
## Ranking and Generated Text
49+
50+
Keep deterministic ranking separate from LLM-generated text.
51+
52+
- Ranking scores, sort order, category scores, confidence, reason codes, and tradeoffs must come from deterministic code and structured data.
53+
- LLM-generated text may later summarize known deterministic outputs, but it must not create school facts, change scores, decide rankings, or hide missing data.
54+
- Every ranking logic change must update the scoring methodology docs and use a versioned ranking constant once the ranking engine exists.

CLAUDE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# College Exploration Platform
2+
3+
Full project spec: docs/SPEC.md (read on demand, not by default)
4+
Current task tracker: tasks.md (always check before starting work)
5+
Architecture: docs/architecture.md
6+
API contract: docs/api-contract.md
7+
Scoring methodology: docs/scoring-methodology.md
8+
Data dictionary: docs/data-dictionary.md
9+
10+
## Stack
11+
- Frontend: Next.js App Router + TypeScript + Tailwind + shadcn/ui (apps/web)
12+
- Backend: FastAPI + Pydantic + SQLAlchemy (apps/api)
13+
- DB: PostgreSQL 16 + pgvector (Docker for dev, RDS for prod)
14+
- Cache: Redis (Docker for dev)
15+
- Tests: pytest, Vitest + RTL, Playwright
16+
17+
## Commands
18+
- Web: `cd apps/web && pnpm dev | pnpm test | pnpm lint | pnpm build`
19+
- API: `cd apps/api && uv run uvicorn app.main:app --reload`
20+
- API tests: `cd apps/api && uv run pytest`
21+
- DB: `docker compose up -d postgres redis`
22+
- Migrations: `cd apps/api && uv run alembic upgrade head`
23+
- E2E: `pnpm exec playwright test`
24+
25+
## Hard rules (from spec section 3.3)
26+
- Never build V2 features before V1 is complete and stable
27+
- Never replace deterministic ranking with LLM output
28+
- Never invent performance numbers — mark as placeholder if not measured
29+
- Never use string-concatenated SQL; parameterized only
30+
- Missing data is never zero unless zero is semantically correct
31+
- All API responses are typed (Pydantic on backend, generated types on frontend)
32+
33+
## Conventions
34+
- Repository pattern: SQL stays in repos/, never in route handlers
35+
- Cache keys include ranking_version and schema_version
36+
- Every ranking change requires a bumped ranking_version constant
37+
- New endpoints update docs/api-contract.md in the same commit
38+
39+
## Definition of done (spec 3.4)
40+
Functional + Technical + Tested + UX-coherent + Documented.
41+
Don't claim a milestone is done until all five gates pass.

0 commit comments

Comments
 (0)