Skip to content

Commit b7caf0d

Browse files
committed
feat(spec): add specification for agent skills
1 parent bfc10bb commit b7caf0d

4 files changed

Lines changed: 177 additions & 0 deletions

File tree

‎.vibe/specs/add-skills/design.md‎

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Design: Agent Skills for cur8d Python
2+
3+
## Architecture Overview
4+
5+
```mermaid
6+
flowchart TD
7+
User["Developer Prompt / Issue"] --> Agent["AI Agent (Claude Code, Cursor, Antigravity)"]
8+
Agent --> Registry[".agents/skills/ Index"]
9+
10+
subgraph Skills [".agents/skills/"]
11+
M["add-module"]
12+
C["add-cli-command"]
13+
V["verify-and-fix"]
14+
end
15+
16+
Registry --> M & C & V
17+
18+
M -->|"Scaffolds"| Domain["project/<module>/<br/>tests/test_<module>.py"]
19+
C -->|"Configures"| CLI["project/app.py<br/>pyproject.toml [project.scripts]"]
20+
V -->|"Executes"| Tasks["mise run verify (ruff + pyright + pytest)"]
21+
```
22+
23+
## Directory Structure
24+
25+
Skills will be placed in `.agents/skills/` to ensure immediate compatibility with `skills.sh`, Claude Code, Cursor, and other agent platforms:
26+
27+
```text
28+
python/
29+
├── .agents/
30+
│ └── skills/
31+
│ ├── add-module/
32+
│ │ └── SKILL.md
33+
│ ├── add-cli-command/
34+
│ │ └── SKILL.md
35+
│ └── verify-and-fix/
36+
│ └── SKILL.md
37+
├── project/
38+
├── tests/
39+
├── pyproject.toml
40+
└── mise.toml
41+
```
42+
43+
## Skill Definitions
44+
45+
### 1. `add-module`
46+
- **Frontmatter**:
47+
```yaml
48+
---
49+
name: add-module
50+
description: Scaffolds a new domain service, model, or utility module adhering to cur8d standards with type annotations, docstrings, and comprehensive pytest tests. Use whenever asked to add, create, or scaffold a module or service.
51+
category: coding
52+
tags: [python, uv, pyright, pytest, cur8d]
53+
---
54+
```
55+
- **Rules**:
56+
- Full typing support (`pyright` strict typing without `Any` wherever possible).
57+
- Docstrings following Google/PEP 257 format.
58+
- Test suite in `tests/` verifying nominal cases, edge cases, and exception handling.
59+
60+
### 2. `add-cli-command`
61+
- **Frontmatter**:
62+
```yaml
63+
---
64+
name: add-cli-command
65+
description: Adds a new CLI command or subcommand using Click with structured arguments, options, help text, and CliRunner tests. Use whenever asked to add or modify CLI commands.
66+
category: coding
67+
tags: [python, click, cli, cur8d]
68+
---
69+
```
70+
- **Rules**:
71+
- Leverages Click decorators (`@click.command`, `@click.option`, `@click.argument`).
72+
- Registers entry points in `pyproject.toml` under `[project.scripts]`.
73+
- Scaffolds tests using `click.testing.CliRunner`.
74+
75+
### 3. `verify-and-fix`
76+
- **Frontmatter**:
77+
```yaml
78+
---
79+
name: verify-and-fix
80+
description: Runs repository verification checks (ruff, pyright, pytest, coverage) and iteratively resolves errors and lint warnings. Use whenever asked to verify, check, or fix code quality or test issues.
81+
category: coding
82+
tags: [python, ruff, pyright, testing, cur8d]
83+
---
84+
```
85+
- **Rules**:
86+
- Executes `mise run verify`.
87+
- Runs `uv run ruff check --fix` and `uv run ruff format`.
88+
- Reports status and preserves all existing docstrings and comments.

‎.vibe/specs/add-skills/plan.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Implementation Plan: Agent Skills for cur8d Python
2+
3+
Establish structured Agent Skills in `cur8d/python` so AI coding agents can reliably build, extend, test, and maintain modern Python projects adhering to `uv`, `ruff`, `pyright`, and `click`.
4+
5+
## Proposed Changes
6+
7+
### Skills Scaffolding
8+
9+
#### [NEW] `.agents/skills/add-module/SKILL.md`
10+
- Provide actionable instructions for creating new domain modules, models, and services with type annotations, docstrings, and comprehensive pytest unit tests.
11+
12+
#### [NEW] `.agents/skills/add-cli-command/SKILL.md`
13+
- Provide instructions for adding CLI commands/subcommands via Click, registering entry points in `pyproject.toml`, and testing with `CliRunner`.
14+
15+
#### [NEW] `.agents/skills/verify-and-fix/SKILL.md`
16+
- Provide automated diagnostic and remediation steps for linting (ruff), type checking (pyright), and testing (pytest).
17+
18+
---
19+
20+
### Documentation & Agents Guidance
21+
22+
#### [MODIFY] `AGENTS.md`
23+
- Document the newly introduced skills under `.agents/skills/`.
24+
- Provide guidance on using `npx skills add cur8d/python` or invoking skills directly.
25+
26+
#### [MODIFY] `docs/README.md`
27+
- Add an "Agent Skills" section explaining how developers and agents can consume the repository's built-in skills.
28+
29+
---
30+
31+
### Verification Plan
32+
33+
#### Automated Verification
34+
- Run `mise run verify` (linting with ruff, type checks with pyright, and pytest suite execution).
35+
- Run `npx skills ls` to confirm skills are detected by the skills CLI.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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).

‎.vibe/specs/add-skills/tasks.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Tasks: Agent Skills for cur8d Python
2+
3+
- [ ] Create `.agents/skills/add-module/SKILL.md` <!-- id: 0 -->
4+
- [ ] Create `.agents/skills/add-cli-command/SKILL.md` <!-- id: 1 -->
5+
- [ ] Create `.agents/skills/verify-and-fix/SKILL.md` <!-- id: 2 -->
6+
- [ ] Update `AGENTS.md` with skills inventory and triggering instructions <!-- id: 3 -->
7+
- [ ] Update `docs/README.md` with Agent Skills documentation <!-- id: 4 -->
8+
- [ ] Run `mise run verify` to ensure tests and linters pass <!-- id: 5 -->
9+
- [ ] Verify skills discovery with `npx skills` <!-- id: 6 -->

0 commit comments

Comments
 (0)