feat(skills): rename scribe-OKF>write-OKF, implement>weave, domain-modeling>model-domain, codebase-design>design-codebase, caveman>talk-caveman, background-work>harden-background-work, dev-python>develop-python, dev-r>develop-r, r-style>style-r, handoff>write-handoff, cavecrew-octobot>spawn-cavecrew, jj-atomic>commit-atomic-jj; bdd stays as the single grandfathered name docs(skills): sweep spec>blueprint across skill prose; spec-format.md becomes blueprint-format.md; internal Spec section becomes Contract; commit citations now read implements blueprint NNN docs(blueprint): numbering starts at 001 when OKF/blueprints/ is empty docs(conjure): 110-line cap applies to SKILL.md only; siblings uncapped fix(containerize): read an existing build-dev recipe and surface semantic mismatch instead of trusting the name
93 lines
3.2 KiB
Markdown
93 lines
3.2 KiB
Markdown
---
|
|
name: develop-python
|
|
description: Orchestrate the full Python dev loop: implement, lint, typecheck, test (bdd), commit.
|
|
disable-model-invocation: true
|
|
---
|
|
|
|
# develop-python
|
|
|
|
Workflow for `build-py-project`-shaped repos (uv + Docker + justfile).
|
|
Each phase must pass before the next. Do not advance silently.
|
|
|
|
## When to use
|
|
- User says "run the python workflow", "full dev loop", "/develop-python".
|
|
- A fresh feature or fix needs the complete loop, not a single skill.
|
|
|
|
## When NOT to use
|
|
- Single-task work: a bug fix → `/diagnose` + `/bdd` directly.
|
|
- Writing tests for an already-implemented behaviour → `/bdd` only.
|
|
- Committing a single change → `/commit-atomic-jj` only.
|
|
|
|
## Phases
|
|
|
|
### 0. Frame
|
|
Karpathy guardrails — state assumptions explicitly, name the simpler
|
|
approach you're rejecting, surface tradeoffs. Push back when warranted; if
|
|
something is unclear, stop and ask. See
|
|
[`../../../CLAUDE.md`](../../../CLAUDE.md) for the full version. If the
|
|
task is ambiguous, hand off to
|
|
[`/grill-me`](../../productivity/grill-me/SKILL.md) or
|
|
[`/grill-with-docs`](../grill-with-docs/SKILL.md) first.
|
|
|
|
### 1. Implement
|
|
- Write code under `src/<package>/`.
|
|
- Match existing style; touch only what the task requires.
|
|
|
|
### 2. Lint
|
|
```bash
|
|
just lint # ruff check
|
|
```
|
|
If it fails:
|
|
```bash
|
|
just lint-fix && just fmt
|
|
just lint && just fmt-check # confirm clean
|
|
```
|
|
|
|
### 3. Typecheck
|
|
```bash
|
|
just typecheck # ty check
|
|
```
|
|
Fix type errors. Don't suppress with `# type: ignore` unless genuinely
|
|
unavoidable — explain inline why.
|
|
|
|
### 4. Test (TDD-BDD)
|
|
Hand to [`/bdd`](../bdd/SKILL.md), which loops red→green→refactor
|
|
**one scenario at a time** — never write all the tests upfront (that's the
|
|
horizontal-slicing anti-pattern called out in bdd itself). When every
|
|
scenario from step 0 is green:
|
|
```bash
|
|
just test
|
|
```
|
|
The full suite must be green before commit. New edge case found mid-loop
|
|
→ add as the next scenario, don't skip.
|
|
|
|
### 5. Commit
|
|
Hand to [`/commit-atomic-jj`](../../productivity/commit-atomic-jj/SKILL.md). The fix
|
|
+ the regression test land in the **same** atomic change.
|
|
|
|
## Reference: justfile commands
|
|
|
|
| Command | What |
|
|
|---|---|
|
|
| `just build-dev` / `build-prod` | Build dev / prod container |
|
|
| `just up` / `up-prod` | Shell into dev / start prod container |
|
|
| `just down` | Stop all containers |
|
|
| `just lint` / `lint-fix` | ruff check / with auto-fix |
|
|
| `just fmt` / `fmt-check` | ruff format (apply / check) |
|
|
| `just typecheck` | ty check |
|
|
| `just test` / `test-verbose` | pytest with coverage |
|
|
| `just check` | lint + fmt-check + typecheck + test |
|
|
| `just fix-and-check` | lint-fix + fmt + typecheck + test |
|
|
|
|
## See also
|
|
- [`../bdd/SKILL.md`](../bdd/SKILL.md) — Given/When/Then loop;
|
|
Python siblings `tests-py.md`, `mocking-py.md`, `interface-design-py.md`,
|
|
`docstrings-py.md`.
|
|
- [`../diagnose/SKILL.md`](../diagnose/SKILL.md) — six-phase bug hunt.
|
|
- [`../../productivity/commit-atomic-jj/SKILL.md`](../../productivity/commit-atomic-jj/SKILL.md)
|
|
— commit discipline.
|
|
- [`../../scaffold/build-py-project/SKILL.md`](../../scaffold/build-py-project/SKILL.md)
|
|
— sets up the project this workflow assumes.
|
|
- [`write-readme-py`](../write-readme-py/SKILL.md) — README from
|
|
`pyproject.toml` + `justfile`.
|