Skip to content

Add agent skill - #122

Merged
virgesmith merged 2 commits into
mainfrom
feat/agent-skill
Sep 1, 2026
Merged

Add agent skill#122
virgesmith merged 2 commits into
mainfrom
feat/agent-skill

Conversation

@virgesmith

Copy link
Copy Markdown
Owner

Ports virgesmith/xenoform-rs#24 to this repo: an agent skill bundled inside the package, plus a console script to install it into a project. Documented on the docs site rather than in the README.

What

  • neworder/skill/SKILL.md — a compact reference for AI coding agents covering the modifystep/checkfinalise lifecycle, the four timeline types (and halt()), the MonteCarlo and SplitMix64 engines with their seeding strategies, neworder.df.transition/transition_conditional/unique_index, spatial domains, MPI patterns, and the framework's recurring pitfalls (uninitialised base class, strict C++ typing, NEVER being NaN, per-agent python loops).
  • neworder/skill_cli.py — a neworder-skill console script with --install [PATH] / --remove [PATH] (default PATH=.agents, so .agents/skills/neworder), registered under [project.scripts]. package_data in setup.py ships the skill in the wheel and sdist.
  • docs/agent-skill.md + nav entry in zensical.toml, and a two-line pointer to it from README.md.
  • test/test_skill_cli.py — 13 tests covering install/remove, default path, idempotency, the copy fallback and stale-copy refresh, and the refusals.

Notes

  • The skill points at the documentation site rather than restating it. Its header table links to the overview, tips, examples and developer pages at neworder.readthedocs.io/en/stable/; the body is a summary an agent can hold in context, not a second copy of the docs. That is also why the user-facing docs for this feature are a docs-site page — the README is inlined into docs/index.md via include_snippet, so anything longer there would duplicate the new page on the site's front page.
  • Symlink where possible, copy where not. A symlink to the bundled directory always matches the installed version, but CI and the classifiers cover Windows, where symlink_to needs developer mode — so --install falls back to shutil.copytree, and re-running it refreshes a copy (which, unlike a symlink, goes stale on upgrade).
  • Nothing unrecognised is overwritten or deleted. A symlink is "ours" if it resolves to the bundled directory; a directory only if every entry is a file we ship. Anything else is left untouched and the command exits 1.
  • Verified against a built wheel and sdist that neworder/skill/SKILL.md is packaged and the entry point registered — [tool.cibuildwheel] runs the test suite against the installed wheel, so the new tests would fail there otherwise.

Gates: ruff check, ruff format --check, ty check neworder examples test, pytest (102 passed, 1 skipped) all green; zensical build clean; examples/hello_world/model.py runs. JOURNAL.md entry added.

🤖 Generated with Claude Code

Bundle a SKILL.md agent reference inside the package and a neworder-skill
console script to install it into a project, plus a documentation-site page
describing it.

The skill summarises the model lifecycle, timelines, the MonteCarlo and
SplitMix64 engines, neworder.df, spatial domains and MPI patterns, and links
back to neworder.readthedocs.io for detail rather than restating it.

Install is by symlink to the copy inside the installed package where the
platform permits, falling back to a copy on Windows without developer mode;
both --install and --remove refuse to touch anything they don't own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.57%. Comparing base (a2ec234) to head (a1dee91).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #122   +/-   ##
=======================================
  Coverage   95.57%   95.57%           
=======================================
  Files          15       15           
  Lines         723      723           
=======================================
  Hits          691      691           
  Misses         32       32           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

os.path.relpath raises ValueError when the installed package and the target
project are on different drives, which is the normal case on the CI runners
(package on D:, temp dir on C:). Fall back to an absolute symlink target when
there is no relative path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@virgesmith
virgesmith merged commit 877a518 into main Sep 1, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant