AgentSkillsCN

diffing-and-versioning-context-packs

对比不同版本的上下文包,识别变化,生成语义差异,并践行版本控制规范。在更新上下文包、发布前审查变更、审计上下文漂移,或维护上下文历史时使用。

SKILL.md
--- frontmatter
name: diffing-and-versioning-context-packs
description: Compares context pack versions to identify changes, generates semantic diffs, and applies version control discipline. Use when updating context packs, reviewing changes before publish, auditing context drift, or maintaining context history.

Diffing and Versioning Context Packs

Quick start

Collect or infer:

  • Base context pack (previous version)
  • Head context pack (current/proposed version)
  • Change type (major, minor, patch) or infer from diff

Then produce output using TEMPLATES.md. Validate with RUBRIC.md.

Workflow

  1. Load base and head context packs.
  2. Run structural diff: identify added, removed, modified sections.
  3. Run semantic diff: classify changes by impact (breaking, additive, corrective).
  4. Determine version increment based on change classification.
  5. Generate changelog entry with human-readable summary.
  6. Run the rubric check. Revise until it passes.

Degrees of freedom

Level: Low

  • Default: follow semantic versioning rules exactly
  • Allowed variation: changelog prose style may vary; version scheme may follow organization conventions if documented

Behavioral logic

Context packs evolve. Without version discipline, consumers cannot know:

  • What changed between versions
  • Whether changes break existing content
  • When to update downstream assets

This skill enforces structured change tracking as a gate for context updates.

Version increment rules

Change typeExamplesVersion impact
BreakingRemove state, rename action, change error codeMajor (X.0.0)
AdditiveAdd new state, add vocabulary term, add error typeMinor (x.Y.0)
CorrectiveFix typo, clarify definition, improve content guidancePatch (x.y.Z)

Decision framework

ConditionAction
State removedMajor version bump
State renamedMajor version bump
Transition removedMajor version bump
Error code changedMajor version bump
Vocabulary term definition changed substantivelyMajor version bump
New state addedMinor version bump
New transition addedMinor version bump
New error type addedMinor version bump
New vocabulary term addedMinor version bump
Content guidance improvedPatch version bump
Typo fixedPatch version bump
No functional changeNo version bump

References