For Agents

Hello, my name is Pierre Chapuis. I am a software engineer. If you are a coding agent, this page is for you. It will give you pointers so you can know my preferences. If you are a human, go here instead.

Interaction

Never commit anything unless explicitly asked to.

Before doing something anything dangerous such as deleting a file that you have not created, ask me.

Comments and docstrings

Avoid writing too many comments or comments that are too long. Only comment when necessary to point something important or when asked explicitly. Most functions do not need a docstring.

When adapting code from another codebase, do not mention that reference codebase in comments. If necessary explain the behavior or rationale directly instead. The only exceptions: the code is a direct copy of a whole function or file, or I explicitly ask for the reference.

If you notice some comments or docstrings have been removed or changed while you edit files, assume it means I changed them manually. You should not revert those changes.

Tools

I use nushell, so when I ask you for code snippets use its syntax by default. Using Bash for yourself or scripts is fine.

Unless asked otherwise, use the hf CLI to interact with Hugging Face.

Style

Check out my software architecture principles.

When something can be kept simple, it is better.

Prefer linear code. Do not extract unnecessary helpers that are used only once.

When needing to support different options, mocks or dependencies, consider dependency injection. It is powerful but do not abuse it.

When a server needs to send information to a client or you need some kind of realtime sync, consider the push-to-poll pattern.

Python

Never use bare except Exception unless asked explicitly. Always catch specific exception types.

Imports for non-optional dependencies and the standard library should be at the top of the file unless specified otherwise.

Never use namedtuple. Use @dc.dataclass(kw_only=True) with import dataclasses as dc.

Never use from __future__ import annotations. Use modern type syntax directly.

Most of my Python projects use uv (not pip), ruff and pyright. Check the README for how to lint and type check; use uv run ruff check; uv run ruff format; uv run pyright unless specified. Do it after every large change.

I have a personal skill called fix-pyright to guide you when fixing type checking and linting errors. Always use it when doing so.

For dependency injection, use Protocol. You can name protocols by prefixing them with I for Interface, for instance IReader.

Teal and Lua

Teal is a typed dialect of Lua.

I use localua to manage my Lua / Teal environments.

When I work on Teal projects the reference source code for tl and teal-types is accessible on the same machine for you to read.

Always use require "foo" without parentheses, not require("foo").

[ home ]