|
| 1 | +# Agent Instructions |
| 2 | + |
| 3 | +This project is a **Cookiecutter template** used to generate new Python projects with a |
| 4 | +professional, ready-to-use structure. It integrates best practices for code quality, |
| 5 | +testing, security, documentation, and CI/CD. Because it is highly dynamic, it includes |
| 6 | +many optional settings and Jinja2 template blocks. |
| 7 | + |
| 8 | +## Getting Context |
| 9 | + |
| 10 | +Before interacting with the template, make sure to: |
| 11 | + |
| 12 | +1. **Review the README**: The `README.md` provides a high-level overview of the |
| 13 | + template, its features, CI/CD workflow, and instructions to generate new projects. |
| 14 | + Key features include: |
| 15 | + |
| 16 | + - Linting & type checking (Ruff & Mypy) |
| 17 | + - Security scanning (Bandit) |
| 18 | + - Code complexity analysis (Complexipy) |
| 19 | + - Testing (Pytest) |
| 20 | + - Auto documentation (MkDocs + GitHub Pages) |
| 21 | + - Preconfigured GitHub Actions for CI/CD |
| 22 | + |
| 23 | +2. **Review `AGENTS.md` in the generated project**: After generating a new project, the |
| 24 | + template copies an `AGENTS.md` file to the project itself |
| 25 | + (`{{cookiecutter.__package_slug}}/AGENTS.md`). This file provides project-specific |
| 26 | + instructions for agents. |
| 27 | + |
| 28 | +## Working with the Template |
| 29 | + |
| 30 | +- **Jinja2 blocks**: Because this is a Cookiecutter template, many files contain Jinja2 |
| 31 | + template syntax. Agents should expect template variables like |
| 32 | + `{{ cookiecutter.project_name }}` or conditional blocks. |
| 33 | + |
| 34 | +- **Testing functionality**: |
| 35 | + |
| 36 | + - Create new projects inside the `workspaces/` directory. |
| 37 | + - Run the Makefile targets to validate functionality: |
| 38 | + |
| 39 | + - `make install` → installs dependencies |
| 40 | + - `make pipeline` → runs linting, type checking, security analysis, complexity |
| 41 | + checks, and tests |
| 42 | + - `make all` → full workflow including documentation preview |
| 43 | + |
| 44 | + - Ensure the environment is isolated (e.g., via `venv`) and that |
| 45 | + [`uv`](https://github.com/astral-sh/uv) is installed to handle grouped dependency |
| 46 | + installations. |
| 47 | + |
| 48 | +## Summary |
| 49 | + |
| 50 | +Agents interacting with this template should: |
| 51 | + |
| 52 | +- Understand it is a **dynamic project generator**, not a single static project. |
| 53 | +- Always use the generated `workspaces/` directory for testing. |
| 54 | +- Follow the Makefile workflow to validate and test features. |
| 55 | +- Keep track of optional components and ensure `post_gen_project.py` handles cleanup |
| 56 | + properly. |
| 57 | + |
| 58 | +By following these instructions, agents will be able to safely generate, test, and |
| 59 | +maintain projects derived from this Python template. |
0 commit comments