|
| 1 | +# Requirements: Agent Skills for cur8d Python |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Equip the `cur8d/python` repository with modular Agent Skills following the open standard (compatible with `skills.sh`, Claude Code, Cursor, GitHub Copilot, and Google Antigravity). These skills enable AI agents to autonomously scaffold, extend, test, and maintain modern Python projects adhering to cur8d's standards (uv, ruff, pyright, pytest, and Click). |
| 6 | + |
| 7 | +## User Goals |
| 8 | + |
| 9 | +1. Enable developers and AI agents to quickly scaffold new domain services/modules with type annotations and clean separation of concerns. |
| 10 | +2. Enable agents to add new CLI commands and subcommands with Click and register them in `pyproject.toml`. |
| 11 | +3. Provide an iterative code verification and auto-remediation skill that executes `mise run verify` (or `ruff check --fix`, `ruff format`, `pyright`, and `pytest --cov`). |
| 12 | +4. Support distribution via `npx skills add cur8d/python` and project-level discovery under `.agents/skills/`. |
| 13 | + |
| 14 | +## Functional Requirements |
| 15 | + |
| 16 | +1. **`add-module` Skill**: |
| 17 | + - Location: `.agents/skills/add-module/SKILL.md` |
| 18 | + - Instructions for the agent to scaffold a new domain module under `project/<module_name>/`. |
| 19 | + - Requires full type annotations (`pyright`-compliant) and Google/PEP 257 style docstrings. |
| 20 | + - Requires matching unit tests under `tests/test_<module_name>.py` with complete test coverage. |
| 21 | + |
| 22 | +2. **`add-cli-command` Skill**: |
| 23 | + - Location: `.agents/skills/add-cli-command/SKILL.md` |
| 24 | + - Instructions to add a new CLI command or subcommand using Click in `project/app.py` or `project/cli/`. |
| 25 | + - Wires CLI parameters, help texts, and error handling. |
| 26 | + - Registers script entry points under `[project.scripts]` in `pyproject.toml` if creating a standalone binary. |
| 27 | + - Scaffolds CLI runner tests in `tests/test_cli.py` using Click's `CliRunner`. |
| 28 | + |
| 29 | +3. **`verify-and-fix` Skill**: |
| 30 | + - Location: `.agents/skills/verify-and-fix/SKILL.md` |
| 31 | + - Step-by-step diagnostic and auto-repair workflow for Python projects: |
| 32 | + 1. Run `mise run verify` (linting, type checking, security audits, test suite). |
| 33 | + 2. Automatically format and fix mechanical issues using `uv run ruff check --fix` and `uv run ruff format`. |
| 34 | + 3. Diagnose and fix type errors identified by `pyright`. |
| 35 | + 4. Resolve any test failures or coverage drops reported by `pytest`. |
| 36 | + |
| 37 | +4. **Integration & Discoverability**: |
| 38 | + - Update `AGENTS.md` and `docs/README.md` to document the newly added skills and how to consume them via `npx skills`. |
| 39 | + |
| 40 | +## Non-Functional Requirements |
| 41 | + |
| 42 | +- All skills must include valid YAML frontmatter (`name`, `description`, `category`, `tags`). |
| 43 | +- Descriptions must be trigger-rich and action-oriented for progressive disclosure. |
| 44 | +- Must keep each `SKILL.md` file concise (under 500 lines). |
| 45 | +- Must adhere strictly to existing repository validation (`mise run verify` must pass). |
0 commit comments