Skip to content

docs: add skill-lifecycle strategy spec#2

Open
luw2007 wants to merge 10 commits into
sb-arnav:mainfrom
luw2007:main
Open

docs: add skill-lifecycle strategy spec#2
luw2007 wants to merge 10 commits into
sb-arnav:mainfrom
luw2007:main

Conversation

@luw2007
Copy link
Copy Markdown
Contributor

@luw2007 luw2007 commented May 26, 2026

Summary

Adds a spec for a new skill-lifecycle mutation strategy that archives unused skills and recalls demanded archived skills based on session transcript usage analysis.

What this proposes

A 6th strategy for the nightly optimizer loop:

  • Archive: skills with 0 usage in 30 days get moved to _archive_skills/ — reduces prompt token noise
  • Recall: archived skills with ≥3 session hits in 14 days get moved back to active — responds to latent demand
  • One skill per run (consistent with the one-change-per-run principle)

Key design decisions

  • Self-contained adapter (src/skill_lifecycle.py): wraps session scanning + filesystem moves with JSON output and NIGHTLY-compatible exit codes (0/1/3)
  • Safety guards: protected skill set, minimum active count floor, symlink protection
  • Revert before git reset: filesystem moves happen outside git, so revert must undo the move before git reset --hard
  • Token savings as signal: prompt_token_delta tracked alongside replay score — score parity + significant token reduction = positive outcome

Files

  • docs/spec-skill-lifecycle.md — full English spec

No code changes in this PR — spec only for discussion before implementation.

luw2007 added 10 commits May 26, 2026 00:30
--bare stripped all MCP tools, causing 100% task failure.
Now uses DISABLE_OMC + OMC_SKIP_HOOKS env vars to prevent
hook recursion while keeping full tool access.

Also bumps defaults:
- max-budget-per-task: 0.30 -> 1.00
- total-budget: 2.00 -> 5.00
- timeout-sec: 180 -> 300
~/.claude is auto-managed by Claude Code, all changes are safe to commit.
The allowlist approach was blocking nightly runs whenever any new file
appeared (settings, plans, skills, etc).
- Add src/extract_corrections.py to scan session JSONL for user negation patterns
- Add plugin.json manifest for nightly plugin
- Add corrections.jsonl output placeholder
- Add .omc/ to .gitignore (runtime state)
…ptimizer

- Add src/skill_lifecycle.py adapter wrapping skill-router's manage.py
  for single-target archive/recall with JSON output and NIGHTLY-compatible
  exit codes (0=success, 1=no-candidate, 3=safety-rejected)
- Update agents/nightly-optimizer.md: add skill-lifecycle as 6th strategy,
  document propose/apply/revert flow, update hard rule 5 with skill directory
  exception
- Add .claude/nightly_skill-lifecycle-integration-spec.md design spec
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