一键导入
demerzel-metasync
Detect and fix drift between documentation and reality — README counts, CLAUDE.md descriptions, cross-repo references, and grammar section counts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Detect and fix drift between documentation and reality — README counts, CLAUDE.md descriptions, cross-repo references, and grammar section counts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | demerzel-metasync |
| description | Detect and fix drift between documentation and reality — README counts, CLAUDE.md descriptions, cross-repo references, and grammar section counts. |
Detect drift between what Demerzel's documentation claims and what actually exists on disk. Auto-fix trivial drift (counts). Flag structural drift for review.
/demerzel metasync — full sync scan and auto-fix
/demerzel metasync --scan — scan only, report drift without fixing
/demerzel metasync --fix counts — fix only artifact counts in README and CLAUDE.md
/demerzel metasync --fix cross-repo — check cross-repo references are valid
/demerzel metasync --fix grammars — verify grammar section counts in README
The README.md contains a ## Artifact Counts table. MetaSync verifies each row against disk:
| Row | Source glob | How to count |
|---|---|---|
| Constitutions | constitutions/*.md | count .md files |
| Personas | personas/*.persona.yaml | count .persona.yaml files |
| Policies | policies/*.yaml | count .yaml files |
| Grammars | grammars/*.ebnf | count .ebnf files |
| Schemas | schemas/*.json | count .json files |
| Behavioral tests | tests/behavioral/*.md | count .md files |
| Skills | .claude/skills/*/ | count directories |
| Departments | state/streeling/departments/*.department.json | count .department.json files |
| Courses | state/streeling/courses/**/en/ | count en/ directories |
CLAUDE.md (the context file) embeds counts in prose descriptions. MetaSync verifies:
policies/ line: count listed policy names against policies/*.yamltests/behavioral/ line: count stated test suites against actual filespersonas/ line: stated persona count against personas/*.persona.yamlCheck that named files referenced in README ecosystem table exist:
grammars/sci-ml-pipelines.ebnf referenced in IxQL sectiondocs/ixql-guide.md referenced in READMEpolicies/alignment-policy.yaml referenced in HITL pattern noteREADME states IxQL grammar has "11 sections" — verify against actual grammars/sci-ml-pipelines.ebnf section headers.
The GitHub Wiki (github.com/GuitarAlchemist/Demerzel/wiki) contains 14+ pages with counts and descriptions. MetaSync MUST check:
| Wiki Page | What to Check |
|---|---|
| Home.md | Policy count, test count, department count, persona count |
| Streeling-University.md | Department count, department list matches actual |
| Policies.md | Policy list matches policies/*.yaml |
| Architecture.md | References to IxQL, agent teams, meta-tools exist |
| Metrics-and-Observability.md | D_c, ERGOL/LOLLI mentioned |
How to check: Clone wiki: git clone https://github.com/GuitarAlchemist/Demerzel.wiki.git
Then grep for counts and compare against disk.
Fix process: Same as README — auto-fix trivial count drift, flag structural drift.
Why this was missed: MetaSync v1 only checked README.md and CLAUDE.md. The wiki was a blind spot. This is a meta-recognition failure — documentation exists in multiple places but only some are in sync scope.
Prevention: Any new documentation surface (wiki, gh-pages, org README, Discord channel topics) must be added to MetaSync's check list immediately.
The gh-pages site (guitaralchemist.github.io) contains counts in:
Verify these match actual counts.
The org README (github.com/GuitarAlchemist/.github/profile/README.md) contains counts in:
Verify these match actual counts.
README body text says "16-department knowledge framework" — verify against actual department count in state/streeling/departments/.
For each check above:
TRIVIAL_DRIFT: documented count ≠ actual count (auto-fixable)
STRUCTURAL_DRIFT: referenced file missing, broken link, wrong description
Print drift summary:
MetaSync Scan Results — {date}
==============================
MATCHES (no action needed):
✓ Personas: 14
✓ Schemas: 23
✓ Skills: 37
✓ Courses: 14
TRIVIAL DRIFT (auto-fixable counts):
✗ Policies: README says 24, actual: 25
✗ Grammars: README says 21, actual: 26
✗ Behavioral tests: README says 44, actual: 52
✗ Departments: README says 16, actual: 21
✗ CLAUDE.md policies count: says 24, actual: 25
✗ CLAUDE.md tests count: says 41, actual: 52
STRUCTURAL DRIFT (requires review):
! docs/ixql-guide.md — referenced in README, check existence
! CLAUDE.md Streeling description says "16-department", actual: 21
Total: {N} trivial drifts, {M} structural flags
For each TRIVIAL_DRIFT:
fix: MetaSync — update artifact countsFor STRUCTURAL_DRIFT: report only, do not auto-fix. Flag for human review.
After fixing, update state/evolution/metasync-log.json:
{
"timestamp": "2026-03-22T00:00:00Z",
"scan_date": "2026-03-22",
"trivial_drifts_fixed": 6,
"structural_flags": 2,
"artifacts_checked": 9,
"fixes": [
{"artifact": "Policies", "was": 24, "now": 25, "file": "README.md"},
{"artifact": "Grammars", "was": 21, "now": 26, "file": "README.md"},
{"artifact": "Behavioral tests", "was": 44, "now": 52, "file": "README.md"},
{"artifact": "Departments", "was": 16, "now": 21, "file": "README.md"}
]
}
| Drift type | Description | Action |
|---|---|---|
| Count mismatch | README says N, disk has M | Auto-fix: update count |
| Missing reference | README links to file that doesn't exist | Flag for review |
| Stale description | Prose description inconsistent with reality | Flag for review |
| Schema count wrong | CLAUDE.md says "6 contract schemas", verify | Auto-fix if count-only |
MetaSync should run:
/demerzel metabuild (new artifacts created)/demerzel metasyncWhen MetaSync finds STRUCTURAL_DRIFT:
state/patterns//demerzel metafix for Level 2+ analysisUse when a pull request needs review by a different AI model than the one that authored it, or when configuring cross-model code review pipelines in CI/CD.
Run Demerzel's autonomous driver — full cycle or individual phases across all repos
Capture meaningful session state (current cursor, in-flight work, live hypotheses, open questions, do-NOT-carry-forward, success criteria) to state/digests/latest.md so the next session — including one after auto-compaction — can re-enter without re-discovering context cold. Distinct from /learnings (which captures surprises). Validates against docs/contracts/digest-schema.json.
Autonomous research scheduler — selects the most under-researched department by coverage ratio, generates questions from completeness gaps, cross-model validates, auto-produces courses at T>=0.8, rate-limited to 6 cycles/day with kill switch
Personalized AI tutor — turns any topic into a customized, progress-tracked learning course. Use when the user wants to LEARN a concept, skill, language, tool, or domain. Creates a MISSION, curated RESOURCES, iterative lessons with self-checks, and learning-records that persist across sessions. NOT for interrogating the user about their own design (use brainstorming/IDSD for that).
Run one bounded supervised autonomous cycle on the Demerzel governance repo. Picks the smallest unchecked governance slice inside allow_edit, implements it, runs the oracle (`pwsh scripts/verify.ps1`), emits cycle evidence, and stops. Refuses to run unless dev-process-overseer reports loop-eligible and the preflight passes. Use when asked to "run one supervised loop", "advance governance autonomously", or "do one cycle and stop".