rune-logic-guardian

Protects business logic from accidental deletion using a manifest and pre-edit gates.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/dangvu008/VietTruyen --skill rune-logic-guardian-dangvu008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rune-logic-guardian
Source: https://github.com/dangvu008/VietTruyen/tree/main/.agents/skills/rune-logic-guardian
Command: npx skills add https://github.com/dangvu008/VietTruyen --skill rune-logic-guardian-dangvu008

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI coding agents routinely destroy complex business logic (payment flows, trading strategies, state machines) by rewriting or deleting code they don't understand, causing silent regressions. This Skill maintains a machine-readable logic manifest and enforces gates so no manifested file is edited blindly. ## Core Features & Use Cases - Logic Manifest Generation: Scans the project for logic-heavy files (state machines, pipelines, validators) and writes .rune/logic-manifest.json with functions, signatures, parameters, and dependencies. - Pre-Edit Gate: Before any edit to a manifested file, forces the agent to display the component spec and explicitly state what will be preserved; blocks the edit if existing functions can't be listed. - Post-Edit Validation: Diffs edited files against the manifest, alerts on removed functions or changed signatures, and runs tests to confirm no regression. - Use Case: When refactoring a trading bot's RSI entry detection module, the Skill loads the manifest, surfaces cross-file invariants from .rune/INVARIANTS.md, and verifies after the edit that no detection function was silently removed. ## Quick Start Ask the agent to run the logic-guardian scan on this project to generate a logic manifest before I refactor the payment state machine.

Frequently Asked Questions about rune-logic-guardian

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

FAQPage Schema
How do I prevent AI agents from deleting existing business logic?

Use a logic manifest that records every function, signature, and parameter in critical files. Before any edit, a pre-edit gate forces the agent to list what it will preserve, and post-edit validation alerts if any manifested function was removed.

How to detect code drift between a manifest and the actual codebase?

The validation phase re-reads each manifested file and compares function names and signatures against the manifest. It reports SYNCED when they match or DRIFT_DETECTED with specific discrepancies such as missing functions, new unlisted functions, or changed signatures.

What files does the logic manifest scan cover?

The scan targets logic-heavy paths such as logic, strategy, engine, core, scenarios, rules, pipeline, and signals directories, plus files with high cyclomatic complexity like many if/else or switch branches. Each file is classified by role such as ENTRY_LOGIC, STATE_MACHINE, or VALIDATOR.

Can the manifest become outdated after manual edits?

Yes, manual edits not tracked by the workflow cause drift. The Skill mitigates this with checksum comparison on every load and Phase 1 validation that reconciles the manifest against actual code, prompting the user to update or investigate.

When should I not use a logic manifest approach?

It is not suited for implementing new features or refactoring code itself; it only protects existing logic. Very large projects with 100+ components should group functions into composite module-level components to keep the manifest manageable.