Repo Conventions
Purpose
Help the agent work within this repository the way it is actually structured, configured, and validated, so the codebase stays clean and maintainable. This skill owns the repo-specific decisions; portable guidance lives in the skills listed under Scope boundaries.
Values
- Prefer simplicity over cleverness.
- Prefer maintainability over short-term convenience.
- Prefer explicit structure and predictable behavior over hidden magic.
When to use this skill
- Creating, moving, or reviewing code under
src/agentic_tools/ (features, entrypoints, core plumbing).
- Adding or updating tests, CLI entrypoints, or Poe tasks.
- Deciding which top-level folder (
src/, scripts/, .agents/, .github/) or package folder (main, features, core, shared, infrastructure) a file belongs in.
- Adjusting
pyproject.toml, tool configuration (Pyright, Black, pytest, Hatch), or the Poe tasks.
- Explaining how this repository is wired at the top level.
Scope boundaries
This skill is the repo-specific layer. Defer portable decisions:
.agents/skills/ref-sp-py-python/SKILL.md — portable Python structure, typing, and CLI patterns.
.agents/skills/ref-sp-dev-coding-patterns/SKILL.md — language-agnostic naming, control flow, comments, testing defaults.
.agents/skills/ref-sp-dev-projects-architecture/SKILL.md — portable feature-folder boundaries, shared-utility thresholds, product-vs-maintenance split.
Use this skill for the concrete package name, folder placement, pyproject.toml wiring, and validation commands in this repo.
Project context
- Language: Python (targets 3.14); legacy JS/JSDoc Node port remains under
src/agentic_tools_old until intentionally redesigned.
- Distribution name
agentic-tools; importable package agentic_tools under src/agentic_tools/ (the dash→underscore normalization is normal Python packaging).
- Tooling: Hatch (packaging), uv (dependencies/runner), Black (formatting), Pyright strict (types), pytest (tests), poethepoet (
[tool.poe.tasks]).
Top-level repo layout
AGENTS.md # source-of-truth agent guidance (Copilot reads it natively)
.agents/skills/<skill>/SKILL.md # agent workflow skills (+ references/ assets/ evals/ scripts/)
.agents/config.json # policy + skills config
.agents/playground/ # local scratch space for temporary helper files (gitignored)
.agents/tasks/ # local task backlog and tracked task folders (gitignored)
src/agentic_tools/ # shipped Python package (feature-first, see below)
src/agentic_tools_old/ # legacy Node port (boundary; do not extend unless asked)
scripts/ # repo maintenance/automation, not shipped product
pyproject.toml # single configuration hub for all tools
GEMINI.md, .claude/CLAUDE.md # thin provider routing stubs -> AGENTS.md
Package layout (feature-first)
src/agentic_tools/
main/ # app-level CLI composition and the installed entrypoint (cli.py)
cli.py cli_test.py translations/en.json
features/<feature>/ # user-facing capabilities and command groups, tests collocated
main.py main_test.py translations/en.json
core/<concern>/ # foundational plumbing: config, i18n wiring, logging, focused 3rd-party wrappers
main.py main_test.py
main: app-level command composition; keep src/agentic_tools/main/cli.py as the unique installed entrypoint.
features: product behavior and user-facing command groups; keep code and tests together.
core: foundational plumbing and third-party integration features depend on — not domain behavior.
shared: add only when a real domain-agnostic contract must be shared by multiple features.
infrastructure/infra: only for strict external adapters too large/specific for core; not the default here.
- Do not create generic
utils/helpers folders — choose a named core/<concern> or features/<feature>.
- Do not add
__init__.py just to mark packages; this repo uses implicit namespace packages unless package-level code is genuinely needed.
- Do not create a top-level
tests/ folder; tests are collocated (feature.py → feature_test.py).
Typing rules (Pyright strict)
- Type everything explicitly; avoid bare
dict/list/tuple/set — prefer dict[str, str], list[int], etc.
- Annotate parameters always; prefer inferred return types when sound, but add explicit returns for public/shared API contracts, protocols/callbacks, recursive/overloaded functions, or when inference would yield
Any/object/a misleading union.
- Fix strict-mode issues by improving annotations, adding type guards (
isinstance), or restructuring. Treat # type: ignore as a last resort with a short justifying comment.
- For untyped third-party libs: install
types-... stubs first, else add minimal local stubs under src/typings (Pyright stubPath), before considering # type: ignore.
CLI and scripts
- Installed commands belong in
[project.scripts], routed through the grouped agentic-tools entrypoint (src/agentic_tools/main/cli.py), mounting feature groups from src/agentic_tools/features/<feature>/main.py.
- Repo maintenance scripts stay in
scripts/ (if __name__ == "__main__": is fine there). A user-facing feature belongs under features/<feature>/, not hidden in scripts/.
- Use
[tool.poe.tasks] for dev workflows and shell-like orchestration that do not fit [project.scripts].
- Ask before moving an existing script into the package or changing how the user runs it.
Scratch and task workspaces
- Temporary helper files go under
.agents/playground/, created with the edit tools — not generated
through terminal heredocs or shell redirection.
- Local task notes and tracked task folders go under
.agents/tasks/ (see ref-sp-agents-local-tasks).
- Both are local workspaces: never ship product code from them.
Testing conventions
- Collocate a
*_test.py next to non-trivial code; name tests test_my_feature() for my_feature().
- pytest collects from
src/scripts, matching *_test.py. Add at least one focused test for new non-trivial logic.
Translation placement
- Root CLI strings:
src/agentic_tools/main/translations/en.json; feature strings: src/agentic_tools/features/<feature>/translations/en.json.
- Reusable i18n library code lives at
src/i18n/main.py (behaves like an external package); repo-specific i18n configuration at src/agentic_tools/core/i18n/main.py. Features import the configured helper from core/i18n, not the raw library.
Tools and commands
Prefer the Poe tasks as the standard entrypoints; reach for the raw tool only for focused flags or debugging.
uv run poe test — pytest
uv run poe lint / uv run poe lint-fix — Black check / format
uv run poe typecheck — Pyright strict on ./src
uv run agentic-tools policy sync / ... policy import-vscode — regenerate agent policy config
- Before committing:
uv run poe lint-fix → uv run poe typecheck → uv run poe test, then commit only if all pass.
For the full pyproject.toml section-by-section breakdown, the tool command reference, and common config tasks, read ./references/pyproject-and-tooling.md.
Validation
For a narrow scaffold or folder-layout change:
uv run python -m pytest src/agentic_tools/main/cli_test.py -q
uv run python -m black --check src/agentic_tools
uv run python -m pyright src/agentic_tools src/typings
For broader changes touching shared config or the legacy boundary, run the full Poe tasks above. Read ./references/checklist.md before finalizing a placement or pyproject.toml change.
References
./references/pyproject-and-tooling.md — pyproject.toml configuration hub, tool command reference, and common config tasks.
./references/checklist.md — quick review pass on placement and pyproject.toml consistency.
./assets/trigger-eval-queries.example.json — starter trigger-eval queries for this skill.
1---2name: ref-sp-dev-repo-conventions3description: Repo-specific conventions for this Python project (agentic-tools): the feature-first src/agentic_tools layout, pyproject.toml configuration hub, Black + Pyright-strict + pytest tooling via Poe, typing rules, CLI and script placement, and translations. Use when: creating or moving features, tests, or CLI entrypoints; deciding which top-level or package folder a file belongs in; adjusting pyproject.toml, Poe tasks, or tool config; or explaining how this repo is wired.4---56# Repo Conventions78## Purpose910Help the agent work within this repository the way it is actually structured, configured, and validated, so the codebase stays clean and maintainable. This skill owns the **repo-specific** decisions; portable guidance lives in the skills listed under Scope boundaries.1112## Values1314- Prefer simplicity over cleverness.15- Prefer maintainability over short-term convenience.16- Prefer explicit structure and predictable behavior over hidden magic.1718## When to use this skill1920- Creating, moving, or reviewing code under `src/agentic_tools/` (features, entrypoints, core plumbing).21- Adding or updating tests, CLI entrypoints, or Poe tasks.22- Deciding which top-level folder (`src/`, `scripts/`, `.agents/`, `.github/`) or package folder (`main`, `features`, `core`, `shared`, `infrastructure`) a file belongs in.23- Adjusting `pyproject.toml`, tool configuration (Pyright, Black, pytest, Hatch), or the Poe tasks.24- Explaining how this repository is wired at the top level.2526## Scope boundaries2728This skill is the repo-specific layer. Defer portable decisions:2930- `.agents/skills/ref-sp-py-python/SKILL.md` — portable Python structure, typing, and CLI patterns.31- `.agents/skills/ref-sp-dev-coding-patterns/SKILL.md` — language-agnostic naming, control flow, comments, testing defaults.32- `.agents/skills/ref-sp-dev-projects-architecture/SKILL.md` — portable feature-folder boundaries, shared-utility thresholds, product-vs-maintenance split.3334Use this skill for the concrete package name, folder placement, `pyproject.toml` wiring, and validation commands in *this* repo.3536## Project context3738- Language: Python (targets 3.14); legacy JS/JSDoc Node port remains under `src/agentic_tools_old` until intentionally redesigned.39- Distribution name `agentic-tools`; importable package `agentic_tools` under `src/agentic_tools/` (the dash→underscore normalization is normal Python packaging).40- Tooling: Hatch (packaging), uv (dependencies/runner), Black (formatting), Pyright strict (types), pytest (tests), poethepoet (`[tool.poe.tasks]`).4142## Top-level repo layout4344```text45AGENTS.md # source-of-truth agent guidance (Copilot reads it natively)46.agents/skills/<skill>/SKILL.md # agent workflow skills (+ references/ assets/ evals/ scripts/)47.agents/config.json # policy + skills config48.agents/playground/ # local scratch space for temporary helper files (gitignored)49.agents/tasks/ # local task backlog and tracked task folders (gitignored)50src/agentic_tools/ # shipped Python package (feature-first, see below)51src/agentic_tools_old/ # legacy Node port (boundary; do not extend unless asked)52scripts/ # repo maintenance/automation, not shipped product53pyproject.toml # single configuration hub for all tools54GEMINI.md, .claude/CLAUDE.md # thin provider routing stubs -> AGENTS.md55```5657## Package layout (feature-first)5859```text60src/agentic_tools/61 main/ # app-level CLI composition and the installed entrypoint (cli.py)62 cli.py cli_test.py translations/en.json63 features/<feature>/ # user-facing capabilities and command groups, tests collocated64 main.py main_test.py translations/en.json65 core/<concern>/ # foundational plumbing: config, i18n wiring, logging, focused 3rd-party wrappers66 main.py main_test.py67```6869- `main`: app-level command composition; keep `src/agentic_tools/main/cli.py` as the unique installed entrypoint.70- `features`: product behavior and user-facing command groups; keep code and tests together.71- `core`: foundational plumbing and third-party integration features depend on — not domain behavior.72- `shared`: add **only** when a real domain-agnostic contract must be shared by multiple features.73- `infrastructure`/`infra`: only for strict external adapters too large/specific for `core`; not the default here.74- Do **not** create generic `utils`/`helpers` folders — choose a named `core/<concern>` or `features/<feature>`.75- Do **not** add `__init__.py` just to mark packages; this repo uses implicit namespace packages unless package-level code is genuinely needed.76- Do **not** create a top-level `tests/` folder; tests are collocated (`feature.py` → `feature_test.py`).7778## Typing rules (Pyright strict)7980- Type everything explicitly; avoid bare `dict`/`list`/`tuple`/`set` — prefer `dict[str, str]`, `list[int]`, etc.81- Annotate parameters always; prefer inferred return types when sound, but add explicit returns for public/shared API contracts, protocols/callbacks, recursive/overloaded functions, or when inference would yield `Any`/`object`/a misleading union.82- Fix strict-mode issues by improving annotations, adding type guards (`isinstance`), or restructuring. Treat `# type: ignore` as a last resort with a short justifying comment.83- For untyped third-party libs: install `types-...` stubs first, else add minimal local stubs under `src/typings` (Pyright `stubPath`), before considering `# type: ignore`.8485## CLI and scripts8687- Installed commands belong in `[project.scripts]`, routed through the grouped `agentic-tools` entrypoint (`src/agentic_tools/main/cli.py`), mounting feature groups from `src/agentic_tools/features/<feature>/main.py`.88- Repo maintenance scripts stay in `scripts/` (`if __name__ == "__main__":` is fine there). A user-facing feature belongs under `features/<feature>/`, not hidden in `scripts/`.89- Use `[tool.poe.tasks]` for dev workflows and shell-like orchestration that do not fit `[project.scripts]`.90- Ask before moving an existing script into the package or changing how the user runs it.9192## Scratch and task workspaces9394- Temporary helper files go under `.agents/playground/`, created with the edit tools — not generated95 through terminal heredocs or shell redirection.96- Local task notes and tracked task folders go under `.agents/tasks/` (see `ref-sp-agents-local-tasks`).97- Both are local workspaces: never ship product code from them.9899## Testing conventions100101- Collocate a `*_test.py` next to non-trivial code; name tests `test_my_feature()` for `my_feature()`.102- pytest collects from `src`/`scripts`, matching `*_test.py`. Add at least one focused test for new non-trivial logic.103104## Translation placement105106- Root CLI strings: `src/agentic_tools/main/translations/en.json`; feature strings: `src/agentic_tools/features/<feature>/translations/en.json`.107- Reusable i18n library code lives at `src/i18n/main.py` (behaves like an external package); repo-specific i18n configuration at `src/agentic_tools/core/i18n/main.py`. Features import the configured helper from `core/i18n`, not the raw library.108109## Tools and commands110111Prefer the Poe tasks as the standard entrypoints; reach for the raw tool only for focused flags or debugging.112113- `uv run poe test` — pytest114- `uv run poe lint` / `uv run poe lint-fix` — Black check / format115- `uv run poe typecheck` — Pyright strict on `./src`116- `uv run agentic-tools policy sync` / `... policy import-vscode` — regenerate agent policy config117- Before committing: `uv run poe lint-fix` → `uv run poe typecheck` → `uv run poe test`, then commit only if all pass.118119For the full `pyproject.toml` section-by-section breakdown, the tool command reference, and common config tasks, read `./references/pyproject-and-tooling.md`.120121## Validation122123For a narrow scaffold or folder-layout change:124125```text126uv run python -m pytest src/agentic_tools/main/cli_test.py -q127uv run python -m black --check src/agentic_tools128uv run python -m pyright src/agentic_tools src/typings129```130131For broader changes touching shared config or the legacy boundary, run the full Poe tasks above. Read `./references/checklist.md` before finalizing a placement or `pyproject.toml` change.132133## References134135- `./references/pyproject-and-tooling.md` — `pyproject.toml` configuration hub, tool command reference, and common config tasks.136- `./references/checklist.md` — quick review pass on placement and `pyproject.toml` consistency.137- `./assets/trigger-eval-queries.example.json` — starter trigger-eval queries for this skill.