setup-patdhlk-skillslisted
Install: claude install-skill patdhlk/skills
# Setup patdhlk-skills
Run once per repo. Adapt to what exists — **never impose a need-type catalog**
(ADR_0004): read the user's `ubproject.toml` and map roles onto *their*
directives. Only add what is missing, and only with consent.
All templates referenced below live in [REFERENCE.md](REFERENCE.md).
## Workflow
### 1. Detect existing state
- `ubproject.toml` at repo root (or `spec*/`, `docs/`)? Parse `[needs.types]`
and any existing `[tool.patdhlk-skills]` (re-run = update, keep prior answers
as defaults).
- A Sphinx project using `sphinx_needs` (a `conf.py` mentioning it)? Note its
source dir — that becomes `spec_dir`.
- `uv` available? A `pyproject.toml`? A git remote GitHub can see (`gh repo
view`)? `ubc` on PATH? `pds` on PATH (`command -v pds`)?
### 2. Choose the issue backend
Ask the user: `github` or `sphinx-needs` (ADR_0003). Recommend `github` when
the repo has a GitHub remote with collaborators/public visibility; recommend
`sphinx-needs` for solo or spec-driven repos. Persist as `issue_backend`.
### 3. Ensure the spec exists
Requirements, ADRs, and glossary terms are **always** sphinx-needs regardless
of backend (ADR_0002), so a spec is required either way. If none exists,
scaffold per REFERENCE.md §1: root `ubproject.toml`, `spec/conf.py`,
`spec/schemas.json`, `spec/index.rst` + subdirs — and pin the toolchain with
`uv init` (non-package) + `uv add sphinx "sphinx-needs>=8,<9" furo
sphinx-autobuild`, committing `uv.lock`.
### 4. Build and persis