Skip to content

Ship the coding-agent skill with the Python package - #553

Draft
jat255 wants to merge 15 commits into
mainfrom
jat255/83hz-py-agent-skill
Draft

jat255 wants to merge 15 commits into
mainfrom
jat255/83hz-py-agent-skill

Conversation

@jat255

@jat255 jat255 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

This PR adds the coding-agent skill to the Python package, with the same five references the R package shipped at 0.1.0. Users copy it out of the installed package into their coding agent's skills directory, as the get-started page shows.

Review notes

  • The R skill gained two references after 0.1.0: reviewing trajectories and reproducing an analysis from them. The parity page now lists them. Reproducing needs the model-free commons object from posit-dev/commons#459, which Python does not have yet.
  • data-dictionaries.md reads the same in both languages, so it has one source in agent-skill/, and scripts/sync-shared.sh copies it into both skills. The other references are written for Python.
  • The evaluation reference uses Inspect with a small custom solver, because a commons agent has no to_solver().
  • The new get-started section shows only for versions 0.1.0 and later, because great-docs builds every listed version from one source tree and 0.1.0b2 does not ship the skill. The parity page keeps one table for all versions, since it goes away once the packages reach parity.

Testing

test_agent_skill.py reads the skill through importlib.resources, as a user does. It checks that every linked reference exists, that no R API name is left, and that the shared reference matches its source. The pytest suite uses an editable install, so CI's wheel check now also lists the skill's files. I ran the install snippet and the Inspect example's solver against a real agent. ruff, pyrefly, the Python suite, and the R skills tests pass.

Agent-written details
  • kata: 83hz. Follow-up kata ne4t: a measure's provenance footer uses a whole entry as the link target when it starts with a URL, in both packages. The Python skill avoids this by putting the URL in its own entry. The R skill's provenance section still recommends forms that render as broken links.
  • Not done: the R skill's carry/land wording (inherited by the Python copies), and a CI wheel check built through the sdist path that releases use.

R changes

Only the R skill's data dictionary reference changed. Its one R code block, which showed how to name a dictionary after its source, is now a sentence that states the same rule. The R skill's SKILL.md layout already shows the rule. With that change, the file reads the same in both packages, so it now has one source at the repository root, and scripts/sync-shared.sh writes the R copy.

Issue Fix Code
A Python copy of the data dictionary reference would differ from the R one only by an R code block, which would leave a hand-kept duplicate The code block is now a sentence, and the file is generated from one root source data-dictionaries.md

The reference reads the same in R and Python once its one R code block is
replaced by a sentence, so it moves to agent-skill/ at the repository root
and scripts/sync-shared.sh copies it into both packages' skills. The Python
copy has no SKILL.md yet; the next commit adds it.
The wheel now has the skill at commons/skills/commons/: SKILL.md and the
same five references the R package shipped at 0.1.0. The references name
the Python API, deploy with rsconnect-python, and evaluate with Inspect
through a custom solver, since a commons agent has no to_solver(). The
test reads the skill through importlib.resources, as a user copying it
does, and checks that every linked reference exists and no R API name
remains.
Get-started gains the section the R vignette has, copying the skill out of
the installed package with importlib.resources. The parity page keeps a row
only for the two references the R skill gained after 0.1.0.
The suite runs against an editable install, so CI's wheel check now lists
the skill's files too. The onboarding reference names the tracing extra
that log=True needs, the provenance guidance keeps a retrieval date out of
a measure's link, and the evaluation solver keeps the trajectory for the
scorer, because the agent does not repeat a table or plot a measure already
displayed.
With dirs_exist_ok, copying over an earlier or R copy of the skill left
files from both behind. Without it, copytree stops, and the page says to
delete the old copy to update.
great-docs builds every listed version from the one source tree, so the
0.1.0b2 site at py/ would otherwise tell readers to copy a skill that
release does not ship. Version fences keep the section and the new parity
row to the dev build, and keep the old row for 0.1.0b2.
Inspect loads a task file with evals/ as the working directory and on
sys.path, so the example puts the project root on sys.path before
importing agent.py, and the reference says to anchor paths on the file.
The onboarding requirements list now names the model provider's SDK,
which chatlas does not install.
A dev-only fence would hide the install section from the release that
ships the skill. The fences now select versions >=0.1.0, which includes the
dev build and the coming release and excludes 0.1.0b2.
It has each tool's value, so a formatted table appears as raw values and a
plot not at all as an image. The reference says to grade those from their
values and send plot-dependent questions to human review.
A table in the export may have fewer rows than the display, and a plot is
not an image. The reference now grades from exported values only when they
settle the answer, and sends the rest to a reviewer who asks the question
in the running app.
The exported trajectory has each tool's value as the model received it,
which can differ from what the user saw. The example solver now also
records each tool result's display HTML, the scorer gets displayed tables
from it, and a reviewer reads plots from the same sample's saved HTML
rather than from a new run.
Reconstructing what the chat displayed (errors, Markdown, dependencies,
viewable files) is an eval harness rather than an example. The reference
now says what the trajectory can and cannot show, and leaves a sample the
trajectory cannot settle ungraded for human review.
A measure's display can differ from the value the model sees, so the
reference no longer calls trajectory values what the user saw, and marks
a sample it cannot settle as unresolved instead of sending it to a review
the saved log cannot support.
The chat links an entry that starts with a URL as a whole, so the skill
now puts the repository URL in one entry and the revision and path in the
next.
@jat255 jat255 added documentation Improvements or additions to documentation py Affects the Python implementation needs-manual-review Agent-created work that needs a human review labels Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployed to Connect (dogfood.team.pct.posit.it): https://dogfood.team.pct.posit.it/connect/#/apps/d7a36cae-8f27-448b-a478-61b81fbe3942/draft/393279

Deployed from commit ac5c331.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployed to Connect (connect.staging.pct.posit.it): https://connect.staging.pct.posit.it/connect/#/apps/ad662e1b-5048-4acc-9ad7-f9478c92274e/draft/5343

Deployed from commit ac5c331.

@github-actions

Copy link
Copy Markdown
Contributor

Preview root: https://posit-dev.github.io/commons/pr-553/

Python site preview: https://posit-dev.github.io/commons/pr-553/py/

Built from the latest commit on this branch. The R links in it point at the published R site, which no pull request rebuilds.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation needs-manual-review Agent-created work that needs a human review py Affects the Python implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant