Skip to content

Commit 7f08216

Browse files
committed
Improve AGENTS.md
- Add project name to the heading - Wrap long lines in the project overview paragraph - Add `composer run wp-run` to the commands list - Split the component overview into three separate diagrams
1 parent df28512 commit 7f08216

1 file changed

Lines changed: 35 additions & 16 deletions

File tree

AGENTS.md

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ MAINTENANCE: Update this file when:
66
- Adding new architectural patterns or conventions
77
-->
88

9-
# AGENTS.md
10-
This file provides guidance to AI coding agents when working with code in this repository.
9+
# AGENTS.md - SQLite Database Integration
1110

1211
## Project overview
1312
This project implements SQLite database support for MySQL-based projects.
@@ -20,7 +19,9 @@ It is a monorepo that includes the following components:
2019
- **WordPress plugin** — A plugin that adds SQLite support to WordPress.
2120
- **Test suites** — A set of extensive test suites to cover MySQL syntax and functionality.
2221

23-
The codebase is pure PHP with zero dependencies. It supports PHP 7.2 through 8.5, MySQL syntax from version 5.7 onward, and requires SQLite 3.37.0 or newer (with legacy mode down to 3.27.0).
22+
The codebase is pure PHP with zero dependencies. It supports PHP 7.2 through 8.5,
23+
MySQL syntax from version 5.7 onward, and requires SQLite 3.37.0 or newer
24+
(with legacy mode down to 3.27.0).
2425

2526
### New and old driver
2627
At the moment, the project includes two MySQL-on-SQLite driver implementations:
@@ -48,6 +49,7 @@ composer run test-e2e # Run E2E tests (Playwright via WP env)
4849

4950
# WordPress tests
5051
composer run wp-setup # Set up WordPress with SQLite for tests
52+
composer run wp-run # Run a WordPress repository command
5153
composer run wp-test-start # Start WordPress environment (Docker)
5254
composer run wp-test-php # Run WordPress PHPUnit tests
5355
composer run wp-test-e2e # Run WordPress E2E tests (Playwright)
@@ -60,21 +62,38 @@ into the SQLite driver to support diverse use cases both inside and outside the
6062
PHP ecosystem.
6163

6264
### Component overview
63-
The following diagram shows how different types of applications can be supported
64-
using components from this project:
65+
The following diagrams show how different types of applications can be supported
66+
using components from this project.
6567

68+
**PHP applications** are supported through a PDO\MySQL-compatible API:
6669
```
67-
Consumers: Components:
68-
69-
PHP applications ─────────────────────────┐
70-
Adminer, phpMyAdmin │
71-
72-
WordPress + plugins │
73-
WordPress Playground ─────→ wpdb drop-in ─────┼────→ SQLite driver ────→ SQLite
74-
(Studio, wp-env) │ (PDO API) (DB)
75-
76-
MySQL CLI │
77-
Desktop clients ─────→ MySQL proxy ──────┘
70+
PHP applications, Adminer, phpMyAdmin
71+
↓ PDO\MySQL API
72+
SQLite driver
73+
↓ PDO\SQLite
74+
SQLite
75+
```
76+
77+
**WordPress** projects are powered by a `wpdb` compatible drop-in:
78+
```
79+
WordPress + plugins, WordPress Playground, WordPress Studio, wp-env
80+
↓ wpdb
81+
wpdb drop-in
82+
↓ PDO\MySQL API
83+
SQLite driver
84+
↓ PDO\SQLite
85+
SQLite
86+
```
87+
88+
**Other applications** can be run using the MySQL proxy:
89+
```
90+
MySQL CLI, Desktop clients
91+
↓ MySQL binary protocol v10
92+
MySQL proxy
93+
↓ PDO\MySQL API
94+
SQLite driver
95+
↓ PDO\SQLite
96+
SQLite
7897
```
7998

8099
### Query processing pipeline

0 commit comments

Comments
 (0)