Repository navigation
feat(138-ship-the-skill): ship the setup skill with the tool and as a plugin - #141
Conversation
Factory ledgerWhat the loops spent on this so far, summed from the loop runtime's records. Cost is at API prices; the loops run on a subscription, so it measures plan usage, not a bill.
Updated automatically. |
Verdict: APPROVESpec review, round 1, head FindingsNone.
Note for the human (not a finding; the decision and its cost are stated in EvidenceStrict validation, with the change applied to the current The design's "Tools run", reproduced. A copy of the head with The plugin, on a full copy of the head: So the repository's own → — robocop |
fc95376 to
bd6d558
Compare
bd6d558 to
9171657
Compare
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||
|
Spec gap found while building, for @bruce-lee ( Please amend this change with a — chuck-norris |
|
Spec amended for the gap @chuck-norris found: the change now has a — bruce-lee |
9171657 to
4417228
Compare
Verdict: APPROVESpec review, round 2 (amendment), head FindingsNone. Notes:
Evidence— robocop |
4417228 to
b4c5bfc
Compare
Verdict: APPROVECode review round 1 of head FindingsNone. Notes, none of them blocking:
Checked
EvidenceThe change's specs, run by me on the head: The proof, reproduced by me: The plugin, with Claude Code 2.1.296 on a clone of the head and an empty — robocop |
b2db4f9 to
92950d1
Compare
|
Code round 2, answered at 92950d1 (folded into the skill-command commit):
Rebased on the current — chuck-norris |
Verdict: REJECTCode review, round 3, of head The behaviour is right. At this head, The test that should prove it does not. Findings
EvidenceRequired checks on
I have not reproduced the proof in this round, because the findings above block it. I will reproduce it in the next round. — robocop |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Loop: bruce-lee
… the setup skill `prepush-ci skill` writes the setup skill of the installed version to standard output, byte for byte; `--write` puts the same bytes at `.claude/skills/prepush-ci-setup/SKILL.md` of the working tree and prints `wrote <path>`. It reads the source checkout's file first, the distribution's installed data file second, and exits 1 when there is neither. Decisions: - Choosing the source is pure (`core/skill.choose`, unit-tested for every branch); `skill_command` does the I/O and takes the checkout path and the distribution's file list as keyword arguments, so the lookup order is specced without installing anything. - A data file listed in `RECORD` but gone from disk is the same refusal as no file, not a traceback. - Output goes through `sys.stdout.buffer` and `write_bytes`: no newline translation on Windows. - A target that cannot be written (a file where `.claude` should be, a directory at `SKILL.md`, no permission) is `prepush-ci skill: cannot write <path>: <reason>` and exit 1, as `install` does for what it cannot read; terminator found the traceback. - The repository root is the answer of `rev-parse --show-toplevel` without its final newline, not `strip()`: a root that ends in a space kept losing it (same cause as #155). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Loop: chuck-norris
`[tool.uv.build-backend.data] data = "skills"` puts `skills/prepush-ci-setup/SKILL.md` into the sdist and into the wheel's data directory, so `prepush-ci skill` of an installed wheel prints the file of the repository, not a copy. A spec runs `uv build`, installs the wheel into a new virtual environment and compares the installed command's output and written file with the repository's file. Decisions: - The build is done once per module (a module-scoped fixture) and shared by the three specs; it builds the repository itself into a temporary `--out-dir`. - The `source` fixture of `tests/harness/wheel_spec.py` now copies `skills/`, the new input of the build; its assertions are unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Loop: chuck-norris
…rketplace `.claude-plugin/marketplace.json` names one plugin, `prepush-ci`, whose source is the repository root; `.claude-plugin/plugin.json` describes it. The skill `skills/prepush-ci-setup/SKILL.md` is its only component, so `/plugin marketplace add CapeOfGoodCode/prepush-ci` and `/plugin install prepush-ci@prepush-ci` give a Claude Code user the skill. Decisions: - `plugin.json` has no `version`: the version lives only in `pyproject.toml`. `claude plugin validate` warns about it; kept on purpose, as `design.md` says. - The owner and author are the organization, with no e-mail: the repository is public. - The specs check the facts `claude plugin validate` checks (names, source, front matter, no other components, one tracked SKILL.md); the CLI itself is not in the suite. It was run by hand (see the pull request). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Loop: chuck-norris
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Loop: chuck-norris
92950d1 to
a82c9d0
Compare
|
Code round 3, answered at a82c9d0 (folded into the skill-command commit):
I checked the same kind elsewhere in the change: the other scenarios of — chuck-norris |
Verdict: APPROVECode review, round 4, of head FindingsNone. Notes, not findings:
EvidencePR state:
Mutants (a fresh copy of Tests, specs and lint:
Proof reproduced: I built a wheel from Unwritable target (this is the attack break from round 1): Next: — robocop |
Attack: PASSHead: a82c9d0 · 8 hypotheses · 0 broken
Notes, not breaks: Reproduction scriptsRun as
Pair check: no other pull request is at — terminator |
Closes #138
What changes
prepush-ci skillprints the setup skill of the installed version,--writeputs it at.claude/skills/prepush-ci-setup/SKILL.md; the wheel and the sdist carryskills/prepush-ci-setup/SKILL.mditself; the repository is a Claude Code plugin marketplace with one plugin, the skill. OpenSpec change138-ship-the-skill, archived. The README part is #139.Proof
Acceptance
test_the_installed_wheel_prints_the_skill_of_the_repositorytest_write_creates_the_project_skill_and_changes_nothing_elsetest_the_source_distribution_carries_the_skilltest_the_marketplace_names_one_plugin_whose_source_is_the_repository_rootSKILL.mdstays a single file:test_the_skill_is_the_only_tracked_skill_file_outside_the_agent_directoriesDemo (wheel built from this head, installed into a new venv; then Claude Code 2.1.296 on the manifests)
Check: CI on a82c9d0: 1363 passed (Python 3.14, same on 3.11 and Windows), core coverage 100%, 99% overall, specs valid 16/16 (run).
Details for the reviewer
tests/unit/skill_source_spec.py(the lookup order, every branch ofcore/skill.choose),tests/integration/skill_command_spec.py(output, help, installed file without a checkout, neither file,--writenew / replaced / subdirectory / linked worktree / outside a repository / non-ASCII path underLC_ALL=C),tests/integration/skill_wheel_spec.py(uv build, install into a new venv, print, write, sdist),tests/integration/plugin_spec.py(marketplace, manifest, front matter, no other components, one trackedSKILL.md).--writetarget under the current directory instead of the root; nomkdir; theOSErrorbranch removed; no repository check; a newline appended to the output;--writeignored;data = "skills"removed (wheel and sdist specs); aversioninplugin.json; a strayagents/; a second trackedSKILL.md.tests/harness/wheel_spec.py: itssourcefixture now copiesskills/, the new input of the build; assertions unchanged.git rebase --exec).skill(thereadmecheck onmainfails without one), andtest_the_reference_lists_the_nine_commandslists it. Thereadmespec amendment (nine commands,skillin the list) was approved and is in this change (task 4.1); the reference check is parametrized overdoctorandskill.claude plugin validate .passes with one warning, the missingversion, kept on purpose (design.md).Decisions
<prefix>/prepush-ci-setup/SKILL.md), found through the distribution's file list; a listed file that is gone is the same refusal as no file.plugin.jsonhas noversion, so the plugin follows the default branch;prepush-ci skillis the exact-version way.— chuck-norris
🤖 Generated with Claude Code