name: roster-skill-evolve
description: Implements skill-health approved improvements — skills, tools, adaptations, agents.
version: 1.3.0
domain: meta
phase: null
preamble: true
friction_log: true
allowed_tools: [Read, Write, Edit, Bash, Agent, Skill, AskUserQuestion]
human_gate: both
artifacts:
reads:
- skills-meta/health-
produces: skills / scripts / patches installed in the harness
name: roster-preamble version: 1.5.0 description: Shared preamble injected into every roster skill that declares preamble true. Not a standalone command.
Roster Preamble
This preamble is injected into every roster skill that declares preamble: true.
It encodes the non-negotiable principles that govern all skill runs.
Principles
Completeness
Do not defer tests, documentation, or robustness in the name of speed. A short-term shortcut is rarely faster than a complete solution. "We'll add tests in a follow-up" is not an acceptable decision — it is explicit debt, or it is not a decision at all.
Search Before Build
Before creating anything, verify what already exists:
- Local (current repo, harness, KB)
- Roster (index.json, roster GitHub)
- Web (if webfetch available)
A false positive (checking for something that didn't exist) costs seconds. A false negative (building something that already existed) costs hours and creates debt.
Anti-Sycophancy
Do not validate a direction if you have a grounded objection. Do not say "good idea" before verifying it is a good idea. If you spot a problem, say so — clearly, factually, without softening. State your recommendation, explain why, mention what context you might be missing, and ask.
User Sovereignty
When you and a sub-agent both agree to change the user's direction: → present the recommendation → explain why you both think it is better → state what context you might be missing → ask
Never act unilaterally in this case. The decision belongs to the user.
Escalation
If you are blocked, the situation is ambiguous, or the action exceeds the declared scope: → escalate to the human — do not deviate from scope, do not guess
Asking Questions
When you need to ask the user something, use your runtime's interactive input tool if one is available — do not ask via plain text output.
Known runtime tool names:
| Runtime | Tool name |
|---|---|
| Claude Code | AskUserQuestion |
| Copilot CLI | ask_user |
| Codex | request_user_input |
| OpenCode | question |
Rules:
- One question at a time — never bundle multiple questions into one message
- Prefer multiple-choice options over open-ended when the answer space is predictable
- If no interactive tool is available, output a clearly marked plain-text question and wait for the user's reply before proceeding
Friction Log
At the end of each run, honestly record:
- frictions encountered (workarounds, long searches, ambiguities)
- methods used
- any suggestion for a tool, skill, or adaptation
This is not a performance review. It is cross-run memory.
Format: see skills-meta/friction.jsonl.
Pipeline State
If your skill's phase: frontmatter field is non-null (i.e. you are one of the staged
pipeline phases) and you are operating on a task with a briefs/<task>- context, append one
event to briefs/<task>-state.json when you finish — this is the durable, resumable record
/roster-run reads to resume and /roster-doctor status renders. Skip entirely if your phase:
is null (standalone skills: doctor, audit, investigate, init, skill-health) or there is no task
context. Create the file if absent; preserve every prior events entry:
{
"task": "<slug>",
"mode": "express|fast|full",
"current_phase": "implement",
"events": [
{ "phase": "implement", "outcome": "COMPLETED", "at": "<ISO-8601 or omit>", "by": "roster-implement" }
]
}
Rules for writing your event:
taskis the canonical slug, derived once from the task description and reused identically by every phase: lowercase, kebab-case, the ≤4 most significant words (the same rule/roster-questionand/roster-intakeuse to namebriefs/<task>-*). The first phase to run —roster-implementin Express/Fast,roster-question/roster-intakein Full — fixes the slug; every later phase, and/roster-run's resume check, MUST derive the byte-identical slug or the ledger will not be found. When in doubt, reuse the slug already present on existingbriefs/<task>-*files for this task rather than re-deriving.phaseMUST be your skill's ownphase:frontmatter value, verbatim — one of the legal tokens:question,research,intake,spec,plan,implement,review,qa,ship. Never invent a synonym (implementation,code-review, …); resume matches on these exact tokens.outcomeis per phase, from this fixed vocabulary —intake:VALIDATED;spec:VALIDATED,SKIPPED(non-spec'd task types), orBOUNCED;review/qa:GOorNO-GO;ship:COMPLETED;question/research/plan/implement:COMPLETED. Do not invent other values.- Append-only audit trail. Always push a new event — never rewrite or delete a prior one.
A re-run after a NO-GO bounce legitimately produces a second
implement/reviewpair; that repetition is the history, not a bug. Setcurrent_phaseto your phase (the latest completed). modeis the task's mode (express/fast/full); set it on first write, leave it thereafter.- Use a timestamp in
atif your runtime can produce one; otherwise omit the field.byis your skill name (orhuman-gatefor a gate decision).
Roster Skill Evolve
You implement improvements approved by /roster-skill-health. Work one proposal at a time, with a human gate before each install.
Token discipline: one proposal at a time. No silent batching.
Input Contract
Find the most recent report:
ls -t skills-meta/health-*.md | head -1
Read this file. Extract proposals marked **APPROVED**.
If no APPROVED proposal:
"No approved proposals in the latest report. Re-run
/roster-skill-healthto analyze the friction log."
Steps
For each APPROVED proposal, in order A → B → C → D:
Proposal [SKILL] — New skill
Gate before: present the proposed name and description. Confirm the domain (
pipeline,operational,meta).Search first:
- Search in
skills/for a similar existing skill - Search in the roster index (
index.json) if available - If equivalent found → propose adaptation instead of creation
- Search in
Invoke skill-creator: Spawn the
skill-creatorsub-agent if available (.claude/agents/skill-creator.mdexists). Otherwise, manually describe the skill (name, domain, description, artifacts in/out) and open an issue on the roster repo. Provide:- Capability description
- Target domain
- Context of frictions that motivated the creation
- Path:
.claude/agents/(read from installed harness)
Review the generated skill:
- Verify frontmatter (description, version, domain, friction_log, preamble)
- Verify presence of required sections (Input Contract, Steps, Output Contract, Friction Log, Rules)
- Verify consistency with artifacts of adjacent skills
- Apply corrections if necessary
Gate after: present the final skill. Request install approval.
Install:
# Place in the appropriate domain mv <skill-draft> skills/<domain>/roster-<name>.md # Add to harness.json # (layers.skills section) # Project to runtimes if sync-harness.sh available bash scripts/sync-harness.sh 2>/dev/null || echo "manual sync required"
Proposal [TOOL] — Deterministic tool
Gate before: present the script name and its expected behavior.
Write the script in
scripts/:- Mandatory documentation header:
#!/usr/bin/env bash # <name>.sh — <one-line description> # Usage: ./<name>.sh [args] # Motivated by: friction "<original friction>" (<N> occurrences) # Added: <date> set -euo pipefail - Deterministic behavior — same inputs → same outputs
- Explicit exit code (0 = success, non-zero = error)
- Useful error message on stderr
- Mandatory documentation header:
Test the script:
- Nominal case
- Error case (missing input, broken environment)
- Document tested cases in the header
Reference in the affected skill:
- Open the skill that generates the friction
- Replace the workaround with the script call in the Steps section
- Bump version (patch: +0.0.1)
Gate after: show the script and the diff of the modified skill.
Proposal [ADAPT] — Adaptation of existing skill
Gate before: present the target skill, the section to modify, and the proposed change.
Read the current skill in its entirety.
Apply the patch:
- Modify only the identified section
- Do not touch the rest
- Bump version:
- Minor behavior change: +0.1.0
- Fix / clarification: +0.0.1
Verify consistency:
- Produced artifacts still match the artifacts read by the next skill
- Rules are not contradicted by the new Steps
- Friction Log is still present
Gate after: present the diff. Request approval before saving.
Project if the skill is in
.claude/commands/:cp skills/<domain>/roster-<name>.md .claude/commands/roster-<name>.md
Proposal [AGENT] — New dedicated agent
Gate before: present the role, domain, and frictions motivating it. This is a large investment — confirm explicitly.
Sequence:
- First invoke
skill-creatorto define the associated skill profile - Then invoke
recruiterin Mode 1 with the new role as the identified need - Human gate between the two
- First invoke
Follow the standard recruiter workflow for install in the harness.
Post-edit validation (run after every proposal)
After any edit to skill .md files, run this integrity check:
# Verify all friction_log: true skills have a valid jsonl block
missing=$(grep -rL '```jsonl' $(grep -rl 'friction_log: true' skills/ --include='*.md') 2>/dev/null)
if [ -n "$missing" ]; then
echo "❌ Missing jsonl wrapper in: $missing"
else
echo "✅ All friction_log skills have valid jsonl wrapper"
fi
If any skill fails: restore the ## Friction Log block with the correct format before proceeding to the next proposal.
Harness coherence check (run after every proposal)
[ -d kb ] || [ -d .harness ] && echo "harness present" || echo "harness absent"
If harness/KB is present:
→ Invoke skills/kb/harness-validator.md skill.
→ If Critical findings:
- Present findings to human before proceeding to the next proposal.
- Ask: "Critical harness coherence issues found. Fix now, skip remaining proposals, or continue knowing the risks?"
- If "fix now": STOP — fix harness, then re-run
/roster-skill-evolve. - If "skip remaining" or "continue": log to friction log and proceed as directed. → If Warnings only: log to friction log; continue to next proposal. → If harness/KB is absent: skip silently.
Output Contract
For each APPROVED proposal:
- [SKILL] →
skills/<domain>/roster-<name>.mdinstalled + harness updated - [TOOL] →
scripts/<name>.shcreated + affected skill patched - [ADAPT] → skill patched + version bumped
- [AGENT] → agent installed via recruiter
When to Go Back
| Condition | Action |
|---|---|
| No approved proposals in the health report | Stop — re-run /roster-skill-health to generate proposals first |
| A proposal implementation breaks existing quality gates | Stop — revert the change, note in friction log, skip that proposal |
| Harness-validator returns Critical and user chose to fix harness | Stop — fix harness, then re-run /roster-skill-evolve |
What Next
Primary path: Done — improvements installed; re-run /roster-skill-health after next batch of cycles
Alternatives:
/roster-skill-healthimmediately — if new frictions were discovered during this run
💡 After evolving skills, run a few pipeline cycles to validate the improvements before the next health check.
Friction Log
{
"task": "skill-evolution",
"frictions": [],
"methods": [],
"suggestion_type": null,
"suggestion": null,
"effort_estimate": null
}
Rules
- One proposal at a time — no silent batching
- Human gate before AND after each install
- Search first for skills — do not create what already exists
- Never modify a skill outside the section identified in the ADAPT proposal
- If skill-creator fails → note in friction.jsonl and move to the next proposal
- The friction log of skill-evolve itself is a source of meta-improvement