alunduil / alunduil/zfs-replicate

Code-generation conventions are documented for agents

オープン
#422 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Python
スター
24
フォーク
6
平均マージ
3時間 11分
マージ済み PR(30日)
49

説明

## User story

As a **coding agent writing Python for this repo**, I want **a concrete, repo-specific code-generation instructions file** so that **my output matches local conventions (typing style, subprocess wrappers, error class usage, module layout) without trial and error**.

## Why

AGENTS.md is the big-picture file; task-specific instructions go under `.github/copilot/*.instructions.md` so Copilot (and other tools that follow the GitHub convention) can auto-attach them based on the task. dungeon-studio demonstrates the split; borrowing it here keeps AGENTS.md readable while giving agents concrete per-task rules.

## Acceptance criteria

- [ ] `.github/copilot/code-generation.instructions.md` exists.
- [ ] Covers, in short bullet form:
- Subprocess calls go through `zfs/replicate/subprocess.py` — never `subprocess.Popen(..., shell=True)` directly.
- Commands are built from argv lists, not interpolated f-strings, once the `Command` builder lands.
- Use `logging.getLogger("zfs.replicate")` for operational output once the logging migration lands; use `click.echo` only for CLI-level messages to stdout.
- Types: PEP 604 unions (`str | None`), PEP 585 generics (`list[X]`), `dataclass(frozen=True)` for domain types.
- Errors inherit from `ZFSReplicateError` (which inherits from `click.ClickException`).
- Tests live in `zfs_test/replicate_test/...` mirroring `zfs/replicate/...`.
- Hypothesis strategies live in `zfs_test/replicate_test/_test/strategies.py`.
- Every new CLI flag updates `cli/main.py` + CHANGELOG (autogenerated from PR title) + `--help`.
- [ ] File is under 100 lines, scannable.

## Out of scope

- Review and commit-message instructions (separate issues).

## Notes

- Target release: **none — chore**
- Source: modernization assessment §6.1, §5 (dungeon-studio comparison).

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。