author-test-stubs
Author test stub files (.pyi) whose signatures express the domain, relationships, and compositions, as the first contract surface.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Author test stub files (.pyi) whose signatures express the domain, relationships, and compositions, as the first contract surface.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Compile the contract set in your head — simulate how the real application would run from the specs, and disprove (or confirm) it works before any source .py is written.
Funnel level 3 — identify building-block names and rough boundaries only, and run gap analysis.
Funnel level 1 — establish the big picture with seven broad questions, applying CIT, Laddering, and CI Perspective throughout.
Squash-merge the feature commits into dev, regenerate docstrings, and verify the whole suite plus whole-suite stubtest are clean.
Publish the delivered batch as release notes, a PR to main, or a tagged release.
Close the pipeline cycle: regenerate the living spec from current tests, summarize the carry-over cache files, regenerate source docstrings then strip all .py so the next cycle starts compact.
| name | author-test-stubs |
| description | Author test stub files (.pyi) whose signatures express the domain, relationships, and compositions, as the first contract surface. |
.cache/<session_id>/journal.md (always present — bootstrapped at plan entry by model-data-schema) and .cache/<session_id>/interview-notes.md. Two rework trigger sources feed the backlog: (a) IF the journal carries escalation findings from build (contract gaps) THEN rework the contracts it names first; (b) IF the interview notes flag findings that MODIFY an existing block (rework — modifies existing <block> from interview-building-blocks) THEN rework those contracts' .pyi signatures to match the changed requirement. Either source marks the affected contracts as rework; write-test-py re-applies the @pytest.mark.pending marker to the affected tests so select-build-target pulls them from the backlog. A finding with no rework flag is new work — author a fresh stub.with vcr.use_cassette(cassette_path(NAME)): as a context manager around the adapter call — in-process replay against the captured exchange per [[software-craft/external-fixtures]]. pytester is reserved for CLI subprocess tests ONLY; never use it for vcrpy cassette replay (it spawns a child pytest process, breaks collection, and hides the cassette contract from the type surface). Exception: a library-boundary adapter vcrpy cannot intercept (e.g. ddgs/primp) uses monkeypatch on the adapter's transport, not pytester. The wrong-vs-right pattern and the kind-dispatch table are in [[software-craft/external-fixtures]].ruff check); the PYI rules lint stubs. Fix every violation.