[Phase 2.2] Skills as first-class mesh primitive (tool + guidance + constraints + lifecycle) #45

Closed
opened 2026-03-16 21:21:22 +00:00 by Mark · 3 comments
Owner

Decision Lock

  • Skills are a first-class primitive at skills/
  • Skills are not intents
  • Skills are not capabilities
  • Workers use skills during capability execution
  • Skills combine: tool runtime + semantic guidance + hard constraints + lifecycle

Plan Document

docs/SKILLS_IMPLEMENTATION_PLAN.md

Scope

Implement the full skills primitive with:

  • Runtime discovery/loader (skill_registry, skill_loader)
  • Safe tool runtime (tool_runner, skill_executor)
  • Worker integration and eligibility checks
  • Node deploy migration to skills/node_deploy
  • Independent skill lifecycle/championship
  • Ledger/audit/metrics support for skill runs

Work Breakdown

  • 1. Add runtime/skill_registry.py and runtime/skill_loader.py
  • 2. Add runtime/tool_runner.py and runtime/skill_executor.py with allowlisted adapters
  • 3. Integrate skill execution path into runtime/mesh_worker.py
  • 4. Extend runtime/worker_registry.py for worker-skill assignment + policy eligibility
  • 5. Create skills/node_deploy/{template.yaml,instructions.md,tool.py}
  • 6. Refactor capabilities/_muscle/node_provision/run.py to invoke execute_skill("node_deploy", ...)
  • 7. Add skill lifecycle modules (evolution/skill_championship.py, evolution/skill_promote.py)
  • 8. Extend ledger for skill_states, skill_runs, skill_tool_invocations, championship results
  • 9. Add metrics/events for skill and tool execution outcomes
  • 10. Add migration/cleanup for skill-vs-capability metadata separation
  • 11. Add unit/integration/evolution tests for full skill execution path and rollouts

Acceptance Criteria

  • Skills are loaded from skills/ and queryable independently
  • Tool execution is constrained and auditable
  • Workers can only execute assigned and policy-eligible skills
  • provision_node uses node_deploy skill (not capability-form skill)
  • Skill promotion/demotion works independently of capability lifecycle
  • Full traceability exists for each skill run and tool invocation
  • Complements #44 (node_provision) by moving node deployment mechanics into a true skill primitive
  • Aligns with Phase 2.1 federation architecture from #37
## Decision Lock - Skills are a first-class primitive at `skills/` - Skills are **not intents** - Skills are **not capabilities** - Workers use skills during capability execution - Skills combine: tool runtime + semantic guidance + hard constraints + lifecycle ## Plan Document `docs/SKILLS_IMPLEMENTATION_PLAN.md` ## Scope Implement the full skills primitive with: - Runtime discovery/loader (`skill_registry`, `skill_loader`) - Safe tool runtime (`tool_runner`, `skill_executor`) - Worker integration and eligibility checks - Node deploy migration to `skills/node_deploy` - Independent skill lifecycle/championship - Ledger/audit/metrics support for skill runs ## Work Breakdown - [ ] 1. Add `runtime/skill_registry.py` and `runtime/skill_loader.py` - [ ] 2. Add `runtime/tool_runner.py` and `runtime/skill_executor.py` with allowlisted adapters - [ ] 3. Integrate skill execution path into `runtime/mesh_worker.py` - [ ] 4. Extend `runtime/worker_registry.py` for worker-skill assignment + policy eligibility - [ ] 5. Create `skills/node_deploy/{template.yaml,instructions.md,tool.py}` - [ ] 6. Refactor `capabilities/_muscle/node_provision/run.py` to invoke `execute_skill("node_deploy", ...)` - [ ] 7. Add skill lifecycle modules (`evolution/skill_championship.py`, `evolution/skill_promote.py`) - [ ] 8. Extend ledger for `skill_states`, `skill_runs`, `skill_tool_invocations`, championship results - [ ] 9. Add metrics/events for skill and tool execution outcomes - [ ] 10. Add migration/cleanup for skill-vs-capability metadata separation - [ ] 11. Add unit/integration/evolution tests for full skill execution path and rollouts ## Acceptance Criteria - [ ] Skills are loaded from `skills/` and queryable independently - [ ] Tool execution is constrained and auditable - [ ] Workers can only execute assigned and policy-eligible skills - [ ] `provision_node` uses `node_deploy` skill (not capability-form skill) - [ ] Skill promotion/demotion works independently of capability lifecycle - [ ] Full traceability exists for each skill run and tool invocation ## Related - Complements #44 (`node_provision`) by moving node deployment mechanics into a true skill primitive - Aligns with Phase 2.1 federation architecture from #37
Author
Owner

Implemented and documented the latest skills/runtime updates, including Claude/OpenClaw compatibility.

Newly documented

  • Added thorough usage guide: docs/SKILLS_USAGE.md
    • native template.yaml skills
    • direct SKILL.md usage
    • compatibility key mapping
    • auto-inferred tool defaults when keys are omitted
    • tool primitive strategy (tool.ref)
    • runtime execution examples and champion gating
    • lifecycle/championship references and validation commands
  • Updated README.md to include skills/ and tools/ primitives and point to skill docs.
  • Updated docs/SKILLS_IMPLEMENTATION_PLAN.md compatibility section to reflect direct SKILL.md support and inferred defaults.

Runtime capability changes reflected in docs

  • runtime/skill_registry.py now supports direct skills/**/SKILL.md ingestion with frontmatter mapping.
  • runtime/skill_registry.py infers tool keys when omitted if tool.py exists.
  • runtime/tool_registry.py + runtime/skill_loader.py support reusable tool primitives via tool.ref.

Validation

  • pytest tests/unit/test_skill_compatibility.py tests/unit/test_skill_runtime.py passed.
  • Previously established skill/evolution suites remain green in local runs.

If you want, I can split this issue into sub-issues specifically for:

  1. SKILL.md schema hardening/linting,
  2. import/conversion CLI,
  3. nightly championship scheduler wiring.
Implemented and documented the latest skills/runtime updates, including Claude/OpenClaw compatibility. ### Newly documented - Added thorough usage guide: `docs/SKILLS_USAGE.md` - native `template.yaml` skills - direct `SKILL.md` usage - compatibility key mapping - auto-inferred tool defaults when keys are omitted - tool primitive strategy (`tool.ref`) - runtime execution examples and champion gating - lifecycle/championship references and validation commands - Updated `README.md` to include `skills/` and `tools/` primitives and point to skill docs. - Updated `docs/SKILLS_IMPLEMENTATION_PLAN.md` compatibility section to reflect direct `SKILL.md` support and inferred defaults. ### Runtime capability changes reflected in docs - `runtime/skill_registry.py` now supports direct `skills/**/SKILL.md` ingestion with frontmatter mapping. - `runtime/skill_registry.py` infers tool keys when omitted if `tool.py` exists. - `runtime/tool_registry.py` + `runtime/skill_loader.py` support reusable tool primitives via `tool.ref`. ### Validation - `pytest tests/unit/test_skill_compatibility.py tests/unit/test_skill_runtime.py` passed. - Previously established skill/evolution suites remain green in local runs. If you want, I can split this issue into sub-issues specifically for: 1) SKILL.md schema hardening/linting, 2) import/conversion CLI, 3) nightly championship scheduler wiring.
Author
Owner

Added an explicit SSH script-bootstrap deployment path as requested:

New tool primitive

  • tools/mesh_ssh_bootstrap/template.yaml
  • tools/mesh_ssh_bootstrap/tool.py

Behavior:

  • verifies SSH connectivity
  • uploads deterministic bootstrap script to /tmp/mesh-bootstrap-<node>.sh
  • executes script to clone/update repo, install deps, and start mesh worker via tmux
  • supports dry_run

New skill primitive

  • skills/ssh_deploy/template.yaml
  • skills/ssh_deploy/instructions.md

ssh_deploy uses tool.ref: mesh_ssh_bootstrap so this is reusable and policy-constrained.

Docs/tests updates

  • Updated docs/SKILLS_USAGE.md with ssh script-bootstrap example.
  • Added test coverage in tests/unit/test_skill_runtime.py (ssh_deploy dry-run path).
  • Validation:
    • pytest tests/unit/test_skill_runtime.py tests/unit/test_skill_compatibility.py passed.
Added an explicit SSH script-bootstrap deployment path as requested: ### New tool primitive - `tools/mesh_ssh_bootstrap/template.yaml` - `tools/mesh_ssh_bootstrap/tool.py` Behavior: - verifies SSH connectivity - uploads deterministic bootstrap script to `/tmp/mesh-bootstrap-<node>.sh` - executes script to clone/update repo, install deps, and start mesh worker via tmux - supports `dry_run` ### New skill primitive - `skills/ssh_deploy/template.yaml` - `skills/ssh_deploy/instructions.md` `ssh_deploy` uses `tool.ref: mesh_ssh_bootstrap` so this is reusable and policy-constrained. ### Docs/tests updates - Updated `docs/SKILLS_USAGE.md` with ssh script-bootstrap example. - Added test coverage in `tests/unit/test_skill_runtime.py` (`ssh_deploy` dry-run path). - Validation: - `pytest tests/unit/test_skill_runtime.py tests/unit/test_skill_compatibility.py` passed.
Author
Owner

Flagged security concerns for priority investigation in new issue #46.

Link: #46

Recommendation: treat #46 as a rollout blocker for production deploy-skill promotion.

Flagged security concerns for priority investigation in new issue #46. Link: https://forgejo.tail018ac4.ts.net/Mark/mesh-seed/issues/46 Recommendation: treat #46 as a rollout blocker for production deploy-skill promotion.
Mark closed this issue 2026-07-27 00:30:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/mesh-seed#45
No description provided.