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
8 changes: 6 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,9 @@ npm i x

# Testing

- Write and run vitest unit tests for all new features and bug fixes - skip only if vitest isn't configured.
- Do not test trivial code, config, database models, third-party libraries or UI components.
- Write and run vitest unit tests for a new feature - a capability the codebase did not have - and for every bug fix. Skip only if vitest isn't configured.
- UI component tests (`*.test.tsx`) should test DOM output, click events, and dialogs. Never test CSS classes or form UI (`AutoForm`, form fields).
- Do not test an existing feature applied somewhere new. Building the widgets system earns tests; adding widget zones or widgets to another page or plugin does not, because the mechanism is already covered and only the wiring is new.
- Do not test database models or schema definitions (Drizzle tables, column types, indexes, foreign keys).
- Do not test static config, constants, color presets, or plugin configuration (`config.api`, content type definitions).
- Do not test third-party libraries or trivial helper/wrapper code.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
CREATE TABLE "example_pages" (
"id" serial PRIMARY KEY,
"createdAt" timestamp DEFAULT now() NOT NULL,
"updatedAt" timestamp DEFAULT now() NOT NULL,
"publishedAt" timestamp,
"status" varchar(32) DEFAULT 'draft' NOT NULL,
"title" varchar(200) NOT NULL,
"slug" varchar(160) NOT NULL,
"content" jsonb DEFAULT '[]' NOT NULL
);
--> statement-breakpoint
ALTER TABLE "example_pages" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
CREATE UNIQUE INDEX "example_pages_slug_key" ON "example_pages" ("slug");--> statement-breakpoint
CREATE INDEX "example_pages_created_at_idx" ON "example_pages" ("createdAt");--> statement-breakpoint
CREATE INDEX "example_pages_updated_at_idx" ON "example_pages" ("updatedAt");--> statement-breakpoint
CREATE INDEX "example_pages_status_published_at_idx" ON "example_pages" ("status","publishedAt");
Loading
Loading