Logo
Section 1 / 3

项目概述与设置

从零开始搭建一个 Flask 像素画画布项目,并编写 AGENTS.md,以指导整个构建过程中的每个 Codex 任务。

导入

项目概述与设置

从零开始搭建一个 Flask 像素画画布项目,并编写 AGENTS.md,以指导整个构建过程中的每个 Codex 任务。

No configuration found for ID: 4f11c290e9c995a01c1c0dbf456dbdb3be23fa5f61ad74f176a1f734bec78bd3

代码示例

1mkdir pixel-art-canvas 2cd pixel-art-canvas

代码示例

1flask 2flask-sqlalchemy 3pillow 4pytest

代码示例

1pip install -r requirements.txt

AGENTS.md 文件

1# Pixel art canvas — agent instructions 2 3## Setup 4pip install -r requirements.txt 5 6## Tests 7pytest tests/ -v 8# Single file: pytest tests/test_routes.py -v 9 10## Project structure 11- App entry point: app.py 12- Database models: models.py 13- Routes: routes/ (one file per feature area) 14- Templates: templates/ 15- Static files: static/ 16- Tests: tests/ 17 18## Do 19- Use Flask-SQLAlchemy for all database access 20- Use Pillow for PNG export 21- Use pytest for all tests 22- Keep route handlers thin: business logic belongs in service functions 23 24## Don't 25- Do not use print statements for logging 26- Do not write raw SQL: use the SQLAlchemy ORM 27- Do not add new dependencies without updating requirements.txt 28 29## Safety and permissions 30Allowed without asking: read files, run single-file tests, lint 31Ask first: deleting files, installing new packages, running the full test suite 32 33## Review guidelines 34- Flag any route that modifies data without validating the input 35- Flag any database query that could return unbounded results

代码示例

1pixel-art-canvas/ 2├── requirements.txt 3└── AGENTS.md

团队工作流中的 Codex

从空白项目到可工作的画布