Skip to content

Native modular agent skills: per-session worktree install + orx skill modules (v0.1.62)#87

Merged
sox8502 merged 7 commits into
mainfrom
daniel/native-session-skills
Jul 18, 2026
Merged

Native modular agent skills: per-session worktree install + orx skill modules (v0.1.62)#87
sox8502 merged 7 commits into
mainfrom
daniel/native-session-skills

Conversation

@sox8502

@sox8502 sox8502 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What

Breaks the 66KB monolithic SKILL.md into 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 filesagent-skills/<name>/SKILL.md with frontmatter, readable as-is on GitHub, embedded in the binary and installed verbatim (no render step). Local-mode body variants live as SKILL.local.md siblings under the same public skill name. Modules: orx-experiment-tree, orx-git, orx-compute, orx-compute-k8s, orx-evidence, orx-reports, orx-lit, plus orx-create (Full set only).
  • Local orx up sessions: 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 is now a literal template: SYSTEM_PROMPT.md at repo root, GitHub-readable, rendered by playbook_md() (leading doc comment stripped, {token} substitution for project facts / compute default / skills index; all ten tokens covered by a substitution test).
  • Playbook slimmed & deduped against skills (~29KB template -> ~10.5KB): per-backend compute detail, the k8s manifest contract, sizing, report layout, and loop elaboration move into skills (pointers remain); a generated ## Skills index 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 runs install-skills on every provision. Follow-up (openresearch.sh, one line): add --full to that call.
  • Codex shim migration: prompts are deprecated and model-invisible; the shim moves to ~/.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.

sox8502 added 7 commits July 17, 2026 16:48
… 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.
@sox8502
sox8502 merged commit f633b80 into main Jul 18, 2026
7 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