Adaptive Skill Governor
Purpose
Use this skill as a lightweight front door for a user's installed skill library. It does not replace domain skills. It selects the smallest useful skill chain, records routing evidence, and turns repeated friction into controlled evolution proposals.
Never load every skill body up front. Scan frontmatter and short metadata first, then read only selected candidate skills.
Operating Modes
onboarding: build or refresh the local profile from installed skills.routing: select skills for the current task.evolution: record what the route missed, overused, conflicted with, or should improve.health: inspect stale, overlapping, missing, or weakly described skills.
Use the lightest mode that answers the user's need.
Default Workflow
- Classify the task: artifact type, action, risk, required tools, and whether a reusable skill is warranted.
- Run
scripts/onboard_profile.pyif the local profile is missing or the user wants to personalize routing. Usescripts/scan_skills.pyfor a non-interactive refresh. - Choose a route from installed skill metadata and local profile rules.
- Announce a concise route before task work:
Skill Route:
- Primary:
- Supporting:
- Verification:
- Reason:
- Read only the selected skill bodies.
- Complete the task using the selected skills.
- In non-trivial tasks, run the evolution check and record useful signals with
scripts/record_evolution.py. - Periodically run
scripts/summarize_evolution.pyto promote repeated observations into concrete proposals.
Routing Policy
Prefer one primary skill. Add supporting skills only when they change behavior, guard risk, or are mandatory local policy.
Route priority:
- User-explicit skill or plugin request.
- Mandatory local rules from the workspace or profile.
- Domain/file-format skill.
- Process skill such as planning, debugging, testing, review, or governance.
- Verification skill or tool when the task output must be proven.
If no installed skill clearly fits:
- Say no clear installed skill was found.
- Search available skill metadata again if the profile may be stale.
- If
skill-installeris available, use it to search installable skills. - If no installable skill fits, use
skill-creatoror another skill-engineering tool to design one. - Record a
no_routeevolution event.
See references/routing-policy.md for selection heuristics.
Evolution Policy
Skill evolution is evidence-driven. Do not modify installed skills by default.
After meaningful tasks, check:
- Did the route miss a skill that should have triggered?
- Did a selected skill add no value?
- Did two skills overlap or conflict?
- Was a skill description too vague to route reliably?
- Did a repeated manual step deserve a script, reference, or template?
- Did local policy need to be added to the user profile?
- Did the task reveal a missing skill category?
Evolution levels:
L0 none: no record.L1 observation: record a trace or note.L2 proposal: write a suggested description, profile, or workflow change.L3 patch-draft: generate a patch for user review.L4 apply: modify a skill only after explicit user approval.
See references/evolution-policy.md for the ledger schema and promotion rules.
Use scripts/summarize_evolution.py when the user asks what should improve, when multiple route events have accumulated, or before editing another skill.
Onboarding Policy
Onboarding creates a private profile from the user's installed skills and preferences. It is safe to run because it reads skill metadata and writes only the governor profile unless the user provides a custom path.
Use onboarding when:
- The skill is newly installed.
- The installed skill set changed significantly.
- The user wants personal defaults, mandatory skills, preferred skills, or suppressed skills.
- Routing repeatedly selects the wrong skill.
Non-interactive refresh:
python scripts\onboard_profile.py --non-interactive
Interactive personalization:
python scripts\onboard_profile.py
Personalization Boundary
The public skill contains routing and evolution mechanics. User preferences live in a generated profile outside the skill body whenever possible.
Default profile path:
%USERPROFILE%\.codex\adaptive-skill-governor\profile.json
Default logs path:
%USERPROFILE%\.codex\adaptive-skill-governor\logs\
Do not hard-code one user's business rules into SKILL.md. Put mandatory skills, preferred skills, suppressed skills, and workspace-specific rules in the profile or the workspace AGENTS.md.
Scripts
scripts/onboard_profile.py: scan installed skills and create a personalized routing profile through prompts or an answers JSON file.scripts/scan_skills.py: scan installed skill folders, extract frontmatter, and write/updateprofile.json.scripts/route_task.py: recommend a route for a task from the profile.scripts/record_evolution.py: append route and evolution events to JSONL logs.scripts/summarize_evolution.py: summarize evolution events and promote repeated signals into proposals.scripts/skill_health_report.py: summarize duplicate names, weak descriptions, stale profiles, and no-route signals.
Scripts are helpers. If a script is unavailable or unsuitable, follow the same policy manually.
Scan to join WeChat group