# AI Prompt — Schema-MCP discipline

This file holds the prompt you paste into Claude Code (or any other AI
coding agent) at the start of a session, OR include in your repo's
CLAUDE.md so it loads automatically.

The prompt's job is to make the AI agent actually USE MCP-USAGE.md — not
just store the file in a folder where it's ignored.

---

## Recommended approach 1 — reference from CLAUDE.md

Add this section to your repo's CLAUDE.md. It will be loaded automatically
every time Claude Code starts in this repo.

```markdown
## Schema and database

This project uses a central schema MCP server for all database schema
work. Before doing anything that touches database schema, read
`./docs/MCP-USAGE.md` in full.

Key rule: you do not write DDL. You do not invent table names. You
propose schema changes via `mcp__schema__propose_table_change` and wait
for DBA approval. See MCP-USAGE.md for the complete workflow.

Stop and read that file BEFORE you call any MCP tool or write any
data-touching code.
```

Then place MCP-USAGE.md at the path `./docs/MCP-USAGE.md` in your repo.

Claude Code automatically reads CLAUDE.md on session start and follows
referenced files when they're cited like this.

---

## Recommended approach 2 — explicit per-session prompt

If you prefer not to modify CLAUDE.md, paste this at the start of your
session.

> Before doing anything that touches database schema in this project,
> read `./docs/MCP-USAGE.md` from this repo. That document contains
> the workflow rules for using the schema MCP server. I want you to
> follow it strictly:
>
> 1. Don't write DDL.
> 2. Don't invent table or column names.
> 3. Always check existing tables before proposing new ones.
> 4. Stop and tell me if the MCP server is unreachable.
>
> Confirm that you've read the file and summarise the four key rules
> back to me before we start.

The "confirm and summarise" line is the important part — without it,
some sessions skip reading files cited in instructions. Asking for a
summary forces the read.

---

## Recommended approach 3 — when you start with a specific task

If you're already mid-session and about to give a data-touching
instruction, prepend this:

> This task touches database schema. Before you do anything, read
> `./docs/MCP-USAGE.md` and follow the rules there. Then start with
> the task.

This is the lightest-weight option for one-off requests. Use it when
you can't or don't want to update CLAUDE.md.

---

## What to do if the AI ignores MCP-USAGE.md

Some AI agents may not load files referenced by path unless explicitly
prompted. If you observe the AI doing any of these:

- Writing `CREATE TABLE` directly in code
- Citing a table name without calling `describe_table` first
- Skipping `find_existing_tables_for_concept` before proposing
- Hallucinating column names

Stop the AI and say:

> You are not following MCP-USAGE.md. Stop and re-read it now. List
> the six MCP tools and confirm the Prime Directive before continuing.

Then proceed.

---

## Why this exists

MCP-USAGE.md is too long for the AI to follow if it's just sitting in
a folder. The agent needs to be TOLD to read it. These three approaches
are three ways to make that happen — automated (CLAUDE.md reference),
per-session (explicit prompt), and ad-hoc (per-task prompt).

Pick approach 1 for new projects, approach 2 if CLAUDE.md is already
heavily customised and you don't want to touch it, approach 3 for
quick adjustments.
