Logo di Validate Business Logic Against Code

Validate Business Logic Against Code

Community
meirm
validate-business-logic-against-code

Verifies whether documented business logic is actually implemented by mapping BL rules to code evidence. Flags rules as implemented, partially implemented, contradicted, or not found. Use when validating business logic documents, checking code coverage against requirements, or verifying BL-to-code alignment.

Panoramica

Autoremeirm
Repositoryreverse-engineering-skill
Nome della skillvalidate-business-logic-against-code
Stelle
46
Fork
7
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da meirm su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Validate Business Logic Against Code in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/meirm/reverse-engineering-skill/tree/main/skills/validate-business-logic-against-code
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/meirm/reverse-engineering-skill.git /tmp/reverse-engineering-skill
mkdir -p .claude/skills
cp -r /tmp/reverse-engineering-skill/skills/validate-business-logic-against-code .claude/skills/validate-business-logic-against-code
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Validate Business Logic Against Code in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Validate Business Logic Against Code non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Validate Business Logic Against Code non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Validating Business Logic Against Code

Project-agnostic. Use BDD/project_config.yaml → bl_output.root and validation (or entry_points) for BL and code paths when present (see tailor-bdd-skills-for-project).

Purpose

Build trust between documented business logic and actual implementation by systematically mapping each BL rule to concrete evidence in the codebase.

Prerequisites

  • A business logic document (markdown, YAML, or structured text)
  • Access to the relevant code files
  • Understanding of the project structure

Instructions

Step 1: Parse Business Logic Document

Read the BL document and extract all explicit rules:

bash
# Read the BL document
cat path/to/bl_document.md

Extract and categorize rules:

  • Validation rules: What conditions are checked
  • State transition rules: How state changes
  • Billing/credit rules: When charges occur
  • Error handling rules: How failures are processed
  • Workflow rules: Sequential/parallel operations
  • Routing/fallback rules: Provider selection logic

Step 2: Identify Relevant Code Files

For each rule category, identify the code files that would implement it:

bash
# Search for relevant code
grep -r "keyword" django_app/

Common mapping (adapt to your project):

  • Validation rules → views, serializers, validators
  • State transitions → models, state handlers
  • Billing rules → billing/ledger services, models
  • Error handling → views, task handlers
  • Workflow → entry points, background tasks
  • Routing → route handlers, middleware

Use BDD/project_config.yaml → entry_points and validation for actual paths when present.

Step 3: Map Each Rule to Code Evidence

For each extracted rule, search for implementation evidence:

Status Categories:

StatusDefinition
ImplementedClear, direct implementation matching BL
Partially ImplementedSome cases covered, edge cases missing
ContradictedCode does opposite of what BL states
Not FoundNo evidence of implementation
Hidden BehaviorCode does something not documented in BL

Evidence to collect:

  • File path and line numbers
  • Function/method names
  • Relevant code snippets
  • Model fields or constants

Step 4: Generate Coverage Matrix

Create a markdown table with this structure:

markdown
| BL Rule | Status | Evidence | Notes |
|---------|--------|----------|-------|
| [Rule summary] | [Status] | [file:line] | [Details] |

Step 5: Generate Summary Report

After mapping all rules, create a summary with:

  1. Coverage Statistics:

    • Total rules documented
    • Rules implemented (count and %)
    • Rules partially implemented (count and %)
    • Rules contradicted (count and %)
    • Rules not found (count and %)
  2. Critical Issues:

    • All contradicted rules
    • All not-found rules
    • Hidden behaviors that could impact billing or security
  3. Recommendations:

    • Which BL rules need clarification
    • Which code needs updates to match BL
    • Which tests are needed to verify alignment

Step 6: Save the Report

Save the coverage matrix and report to a file (e.g. under project root or [bl_root]):

bash
# Example: reports or BL output directory
mkdir -p reports/bl-validation
# or use BDD/project_config.yaml bl_output.root if desired
cat > reports/bl-validation/<domain>-validation.md

Best Practices

  • Be specific with evidence: Always include file:line references
  • Distinguish intent from bug: Code may implement correctly but have a bug
  • Check both happy and sad paths: Validate error handling too
  • Look for side effects: Some rules have hidden implementation side effects
  • Verify model constraints: Some rules are enforced at the database level
  • Check for multiple implementations: Same rule may be implemented in multiple places
  • Be thorough: Search multiple terms for each rule (e.g., "timeout", "retry", "fallback")
  • Read actual code: Don't rely on function names alone

Examples

Example 1: Validating request/operation BL

User request:

Validate the [feature] business logic against the backend code

You would:

  1. Read the BL document extracting rules, e.g.:

    • "Reject requests with invalid identifier format"
    • "Charge only on successful completion"
    • "Fallback to secondary handler after 30 second timeout"
    • "Reject when account has insufficient balance"
  2. Search code for evidence (use project config paths or typical locations):

    bash
    grep -r "identifier\|validate" <code_root>/
    grep -r "charge\|credit\|balance" <code_root>/
    grep -r "timeout\|fallback\|secondary" <code_root>/
  3. Read implementation files to verify and note file:line.

  4. Generate coverage matrix:

    markdown
    | BL Rule | Status | Evidence | Notes |
    |--------|--------|----------|------|
    | Reject invalid identifier | Implemented | path/to/views.py:88-97 | Validation matches BL |
    | Charge on success only | Contradicted | path/to/billing.py:145-160 | Charges before completion |
    | Fallback on timeout | Partially implemented | path/to/service.py:210-235 | Only for timeout, not 5xx |
    | Reject insufficient balance | Implemented | path/to/views.py:102-115 | Check before operation |
  5. Report findings with coverage %, critical issues, and gaps.

Example 2: Validating export/workflow BL

User request:

Check if the [export/workflow] feature matches the documented business rules

You would:

  1. Extract BL rules from documentation (e.g. state requirements, filters, limits, audit).

  2. Search codebase using project paths (from config or standard layout).

  3. Read relevant files and map each rule to evidence.

  4. Generate matrix with Status (Implemented / Partially / Contradicted / Not found) and file:line Evidence.

  5. Report coverage %, critical gaps (e.g. missing filter, wrong limit), and any hidden behavior not in BL.

Example 3: Validating billing/admin workflow

User request:

Verify the [replenishment/adjustment] workflow against business logic

You would:

  1. Extract BL rules (minimum amount, who can perform, ledger entry, quota update, audit).

  2. Search and read code using project config or typical admin/billing paths.

  3. Generate matrix mapping each rule to Status and Evidence (file:line).

  4. Report coverage and any contradictions or hidden behavior.

Output Format

The validation produces:

  1. Coverage Matrix (table format)
  2. Summary Statistics (counts and percentages)
  3. Critical Issues List (contradictions and missing implementations)
  4. Recommendations (actionable next steps)

Domande frequenti

Cosa fa la skill IA Validate Business Logic Against Code?

Verifies whether documented business logic is actually implemented by mapping BL rules to code evidence. Flags rules as implemented, partially implemented, contradicted, or not found. Use when validating business logic documents, checking code coverage against requirements, or verifying BL-to-code alignment.

Perché usare Validate Business Logic Against Code su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Validate Business Logic Against Code è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Validate Business Logic Against Code in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/meirm/reverse-engineering-skill/tree/main/skills/validate-business-logic-against-code. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Validate Business Logic Against Code?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Validate Business Logic Against Code?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Validate Business Logic Against Code: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Validate Business Logic Against Code è gratuita?

Sì. È pubblicata su GitHub da meirm con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇