/dev-process:schema-drift-playbookfrom dev-process
Three-part fix for schema drift between a strict validator/spec and looser data that producers actually emit. Use when: (1) lint/validation flags many pre-existing records as invalid, (2) emitters routinely omit or rename fields the spec requires, (3) the natural instinct is to fix the data OR the spec — but fixing only one lets the drift reappear. Covers relaxation, migration, and upstream-producer fix as a coordinated change.
Ships in dev-process. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A validator (lint, schema check, type system) enforces a strict shape. Producers (agents, tools, migrations, users) emit a looser shape. Over time, valid data accumulates that the validator rejects. Naive fixes fail:
The right move is a coordinated three-part change.
Apply this playbook when you see:
Signals this ISN'T schema drift (skip this playbook):
Open the validator and sort each required field into:
| Category | Definition | Treatment |
|---|---|---|
| Strict | Absence breaks downstream code or loses irrecoverable provenance | Keep required |
| Recommended | Useful defaults exist; absence is cosmetic | Move to optional/recommended list |
| Either-or | Two fields hold the same information under different schemas | Validate via helper, not per-field |
Example from a real frontmatter validator:
tags, source, created (provenance you can't regenerate)id, status, confidence, scope (have safe defaults)type (canonical) vs type holding a knowledge-type value (simplified)Update the validator to accept both shapes. Introduce a resolver helper:
def get_knowledge_type(metadata):
"""Return knowledge type from either schema."""
kt = metadata.get("knowledge_type")
if isinstance(kt, str) and kt in VALID_TYPES:
return kt
t = metadata.get("type")
if isinstance(t, str) and t in VALID_TYPES:
return t
return None
Validation then checks get_knowledge_type(meta) is not None rather than per-field
presence. Canonical schema still passes; simplified schema also passes.
Don't modify records inline from a one-shot script. Make it a proper CLI subcommand so:
--help lists it)Required properties:
--apply to actually write--json for machine inspectionsource: "migrated:unknown" — passes lint, stays auditableThis is the step teams skip. Without it, drift returns in weeks.
Common producers and their fixes:
kb compile --write-note)kb new command that emits the canonical shapeDocument WHY in the producer's skill/readme so the next author doesn't regress: "Use the CLI path because direct Write bypasses frontmatter generation and creates schema drift."
Run the validator on real data:
kb migrate-frontmatter --apply
kb lint --json | jq '.frontmatter | map(select(.fields_missing | length > 0)) | length'
# Should output: 0
Real case from an Obsidian-based knowledge wiki:
kb lint due to missing id, status, confidence, scope fields + type: pattern (simplified) rejected as invalidfrontmatter.py to dual-accept, (b) added kb migrate-frontmatter CLI, (c) updated compile-note skill to mandate kb compile --write-note over direct file writeskb lint reports 0 issues across all 134 notes; future compile runs via CLI path will emit canonical shape; migration rerunnable if drift recursmigrated:unknown) should be greppable so you can audit how many records needed them later.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cajias/claude-skills --plugin dev-process8 skills in this plugin
/create-readmeCreate a README.md file for the project/design-phase-artifactsUse whenever the user asks to "do the design", "design this feature/change", produce design docs, write up an architecture, or plan a non-trivial change before implementation — this is the DESIGN phase of their AI-native SDLC. Trigger it even when they don't say "artifact" or name the documents. It produces a C4 architecture overview plus FIVE Notion design artifacts (Logical Design, Structural Design, Implementation Plan, Test & Verification Plan, Evaluation Plan), each grounded in the real code, and it encodes the content contract for each document plus the Notion publishing and orchestration gotchas. Prefer this over generic planning skills when the deliverable is a design that will be published to Notion./Other plugins' skills for the same job