Native modular agent skills: per-session worktree install + orx skill modules (v0.1.62)#87
Merged
Merged
Conversation
… modules (v0.1.62) - Factor the 66KB SKILL.md into 10 embedded modules under agent-skills/ - Write the Local set as native SKILL.md skills into each orx up session worktree (harness-specific dir), fresh every turn beside the playbook - Slim the playbook: compute/k8s/report detail moves to skills, generated skills index added; cardinal rules and command surface stay inline - orx skill <name> serves bundled modules (API fallback unchanged); no-arg prints the slim root + module index - orx install-skills --full writes the Full set globally (cloud box); Codex shim migrates to ~/.agents/skills (native, model-discoverable), legacy prompt kept
…atim Each module is now a complete, GitHub-readable skill at agent-skills/<name>/SKILL.md (frontmatter included); local-mode body variants live as SKILL.local.md siblings. The render() step is gone — files are embedded and installed byte-for-byte, and the frontmatter drift test now validates the files against the code's name/description.
…en' cues Descriptions are the model's trigger surface; err toward false-positive loads. Bound raised 150 -> 400 chars (Codex ambient budget is ~8k across the set).
The system prompt is now a GitHub-readable template at repo root; playbook_md
strips the leading doc comment and substitutes {tokens} (project facts,
compute default, skills index). Content duplicated by the installed skills is
trimmed to pointers: the five per-backend exp-run table rows collapse to one,
the loop keeps only its skeleton, and the sizing/analysis sections fold into
one-liners. The prompt now explicitly tells the agent to load the relevant
skill before acting in its area (long-horizon staleness guard). Placeholder
test extended to all ten tokens + comment-stripping.
The playbook trim removed the slurm/openresearch table rows, but orx-compute's body (extracted from the old SKILL.md) never had sections for them — the detail existed only in the playbook. Content moved from the pre-PR playbook rows in the same per-backend section style. Also restore the shell-tool time-limit rationale on the wait loop step in SYSTEM_PROMPT.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Breaks the 66KB monolithic
SKILL.mdinto 10 focused modules and delivers them as native, harness-discoverable skills, scoped so they never touch the user's other agentic workflows.agent-skills/modules are literal, complete skill files —agent-skills/<name>/SKILL.mdwith frontmatter, readable as-is on GitHub, embedded in the binary and installed verbatim (no render step). Local-mode body variants live asSKILL.local.mdsiblings under the same public skill name. Modules:orx-experiment-tree,orx-git,orx-compute,orx-compute-k8s,orx-evidence,orx-reports,orx-lit, plusorx-create(Full set only).orx upsessions: the Local set is written as native skill dirs into the session worktree, fresh on every turn beside the playbook — the dir is picked by the session's harness at runtime (.claude/skills/.opencode/skills/.agents/skills). Isolation by construction (files exist only inside orx worktrees); zero drift (rewritten from the binary each turn). New skills dirs added to.git/info/exclude.SYSTEM_PROMPT.mdat repo root, GitHub-readable, rendered byplaybook_md()(leading doc comment stripped,{token}substitution for project facts / compute default / skills index; all ten tokens covered by a substitution test).## Skillsindex is added, and the prompt explicitly instructs loading the relevant skill before acting in its area. Cardinal rules, command surface, and the auto-research loop stay always-in-context. The compute default-target conditionals are unchanged.orx skill: no-arg prints the slim root + bundled module index (+ existing API references);orx skill <name>prints a bundled module (orx-prefix optional), falling back to the API fetch.orx install-skills --full: writes the Full set into an agent's global skills dir — for the single-tenant cloud box, whose provisioning already runsinstall-skillson every provision. Follow-up (openresearch.sh, one line): add--fullto that call.~/.agents/skills/orx/SKILL.md(native skill), keeping the legacy~/.codex/prompts/orx.md.Drift guards
Tests assert: the literal files' frontmatter agrees with the code's name/description (JSON-quoted YAML scalars, round-tripped), unique
orx--prefixed names, description length, idempotent worktree writes, and that the playbook's skills index regenerates from the same set the worktree receives.Testing
cargo fmt --all --check/cargo clippy --all-targets -- -D warnings/cargo test --locked(181 passed) all green; 3-round multi-agent review converged clean. Content accounting verified: every old SKILL.md section lands in the slim root or exactly one module.