Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .changeset/agents-sql-changes-hint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@noormdev/cli': patch
'@noormdev/sdk': patch
---

`db/AGENTS.md` written by `noorm init` now states that `sql/` is the current state of the schema and `changes/` brings existing databases, production included, up to that state. An existing `db/AGENTS.md` is left as is.
2 changes: 1 addition & 1 deletion docs/cli/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ noorm init --yes
└── sql/
```

`db/AGENTS.md` also points data modeling at [ignatius](/modeling/) and its [`/ignatius-modeling` skill](/modeling/modeling-skill), and holds a marker comment for your own steering. `db/CLAUDE.md` is one line, `@AGENTS.md`. Without `--yes`, `init` prompts for a name and email when no identity exists yet.
`db/AGENTS.md` also states that `sql/` is the schema's current state and `changes/` brings existing databases up to it. It points data modeling at [ignatius](/modeling/) and its [`/ignatius-modeling` skill](/modeling/modeling-skill), and holds a marker comment for your own steering. `db/CLAUDE.md` is one line, `@AGENTS.md`. Without `--yes`, `init` prompts for a name and email when no identity exists yet.


## Flags
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ A **config** is a saved connection: `dev`, `staging`, `prod`. Commands use the a

```bash
noorm config use staging
noorm run build --config prod
noorm change ff --config prod
```

A **stage** in `.noorm/settings.yml` applies to the config with the same name. Its `defaults` seed that config when the TUI first creates it, `protected: true` caps its access, and `secrets` lists what it needs:
Expand Down Expand Up @@ -171,7 +171,7 @@ State is encrypted with your own key, so a copy is useless on another machine. E
| Edit a table in `db/sql/` with no change | new databases get the edit, existing ones never do | add a change: `noorm change add <slug>` |
| A change that is not safe to run twice | a database built from `db/sql/` has no change records, so `change ff` runs the change against a table that already has it | guard it: `ADD COLUMN IF NOT EXISTS`, `WHERE status IS NULL` |
| Folders without number prefixes | alphabetical order runs `functions/` before `tables/` | `01_tables/`, `02_views/` |
| `noorm -c prod run build` fails: `--cwd path is not a directory` | before the subcommand, `-c` is `--cwd`, so noorm looks for a project folder named `prod` | `noorm run build --config prod` |
| `noorm -c prod change ff` fails: `--cwd path is not a directory` | before the subcommand, `-c` is `--cwd`, so noorm looks for a project folder named `prod` | `noorm change ff --config prod` |


## Next
Expand Down
2 changes: 2 additions & 0 deletions src/core/project-init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const NOORM_GITIGNORE_BLOCK = `\n# noorm\n${NOORM_IGNORE_ENTRY}\n`;
const AGENTS_TEMPLATE = [
'Use the `/noorm` skill for managing files here.',
'',
'`sql/` is the current state of the schema; `changes/` brings existing databases, production included, up to that state.',
'',
'For data modeling, use ignatius (https://noorm.dev/modeling/) and its `/ignatius-modeling` skill '
+ '(https://noorm.dev/modeling/modeling-skill).',
'',
Expand Down
1 change: 1 addition & 0 deletions tests/core/project-init.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ describe('core: scaffoldDbLayout', () => {
const claude = readFileSync(join(tmpDir, 'db', 'CLAUDE.md'), 'utf-8');

expect(agents).toContain('Use the `/noorm` skill for managing files here.');
expect(agents).toContain('`sql/` is the current state of the schema; `changes/` brings existing databases');
expect(agents).toContain('`/ignatius-modeling` skill');
expect(agents).toContain('https://noorm.dev/modeling/');
expect(agents).toContain('<!-- add user specific LLM steering here -->');
Expand Down
Loading