Systemic Resonance Alignment

Calculate cosine similarity between Python AST tokens and Markdown governance terms.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/Icebane84/Synarche_Workshop --skill systemic-resonance-alignment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Systemic Resonance Alignment
Source: https://github.com/Icebane84/Synarche_Workshop/tree/main/.agent/skills/systemic-resonance-alignment
Command: npx skills add https://github.com/Icebane84/Synarche_Workshop --skill systemic-resonance-alignment

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires argparse, ast, math, re, sys, pathlib, json, and includes scripts (resource) components.

What problem does it solve?

It resolves mismatches between how Python code behaves and how governance documentation describes that behavior, reducing semantic drift that triggers “Resonance Warning” conditions.

Core Features & Use Cases

  • Cosine Similarity Scoring: Computes semantic alignment between Python AST-derived terms and Markdown governance terms using cosine similarity.
  • Iterative Refactoring Loop: Guides refactoring of code or documentation until resonance reaches a target threshold (>= 75%).
  • Directed Scanning: Supports single file comparisons or directory-wide pairing between .py files and .md counterparts.

Quick Start

Run the resonance scanner against your target Python file and its corresponding governance Markdown until the Resonance Score reaches 75.0 or higher.

Frequently Asked Questions about Systemic Resonance Alignment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if my Python code matches its Markdown governance documentation?

Code-documentation semantic alignment compares Python AST tokens against Markdown governance terms using cosine similarity. It detects semantic drift between implementation behavior and documented governance text, triggering warnings when mismatches occur.

How do I resolve a Resonance Warning during governance-driven development?

Run resonance_scanner.py targeting a Python file and its corresponding Markdown document to calculate cosine similarity. Iteratively refactor the code or documentation until the resonance score reaches at least 75.0.

Can I scan an entire directory for code and documentation semantic alignment?

Yes, directed scanning supports directory-wide pairing between .py files and .md counterparts. The scanner automatically matches Python files with their corresponding Markdown documents to calculate semantic alignment.

What is the minimum resonance score needed to pass documentation validation?

The minimum resonance score required is 75.0. You must iteratively refactor the Python implementation or Markdown governance text until the cosine similarity score reaches or exceeds this threshold.

Do I need external NLP libraries to calculate cosine similarity between code and documentation?

No external NLP libraries are required. The scanner uses Python's built-in ast module for token extraction and the math module for cosine similarity calculation, relying only on standard library dependencies.

When should I use AST token comparison for code-review validation instead of manual review?

Use AST token comparison during structural refactors, documentation overhauls, or governance-driven development. It automates semantic drift detection when manual review cannot reliably validate alignment between Python behavior and Markdown governance text.