modelagem-de-grafo-de-metas-narrativas-gmn

Models plot causal dependencies as a DAG with cycle detection and inconsistency propagation.

Updated Jul 19, 2026
One-click install
npx skills add https://github.com/Ryanzucchi/Eldritch_Lich --skill modelagem-de-grafo-de-metas-narrativas-gmn-ryanzucchi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modelagem-de-grafo-de-metas-narrativas-gmn
Source: https://github.com/Ryanzucchi/Eldritch_Lich/tree/main/.agents/skills/modelagem-de-grafo-de-metas-narrativas-gmn
Command: npx skills add https://github.com/Ryanzucchi/Eldritch_Lich --skill modelagem-de-grafo-de-metas-narrativas-gmn-ryanzucchi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Novelists managing complex plots with intertwined subplots often lose track of causal dependencies between scenes, leading to plot holes, circular dependencies, and tasks marked complete before their prerequisites are written. ## Core Features & Use Cases - Narrative Goal DAG Modeling: Represents each narrative goal as a vertex and each causal dependency as a directed edge stored in goals and goal_dependencies tables. - Cycle Detection: Runs Kahn's topological sort synchronously before persisting any new dependency edge, blocking circular dependencies at the UI level. - Inconsistency Propagation: Uses BFS or DFS to cascade an Inconsistent flag to all descendant goals when a premise-breaking edit occurs. - Completion Gating: Blocks a goal from transitioning to Concluído while any parent goal remains Pendente or Inconsistente. - Use Case: When an author tries to mark "Resolve the murder mystery" as complete before "Introduce the main suspect" is written, the system blocks the transition and lists the unfinished predecessor goals. ## Quick Start Ask the assistant to model the causal dependencies of your novel outline as a directed acyclic graph of narrative goals and validate that no circular dependencies exist.

Frequently Asked Questions about modelagem-de-grafo-de-metas-narrativas-gmn

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

FAQPage Schema
How do I model plot dependencies as a graph for my novel?▼

Create each narrative goal as a vertex with attributes like title, status, and associated chapter, then register each causal dependency as a directed edge meaning one goal must complete before another. Store vertices and edges in relational tables such as goals and goal_dependencies.

How to detect circular dependencies in a narrative task graph?▼

Run Kahn's topological sort algorithm over the full graph each time a new dependency edge is created. If the algorithm detects a cycle, block the edge insertion in the UI with an explanatory message before it is persisted to the database.

What algorithm propagates inconsistency flags through a dependency graph?▼

Breadth-first search is the default propagation algorithm, with depth-first search as an alternative. Starting from the edited goal node, the traversal applies the Inconsistent flag in cascade to all descendant vertices in the directed graph.

Can a narrative goal be completed before its prerequisite goals?▼

No. The completion validation blocks any status transition to Concluído when a parent goal still has status Pendente or Inconsistente. The UI displays a blocking message listing the unfinished predecessor goals.

When should I not use a DAG for story planning?▼

Avoid this approach for short, fully linear stories without intertwined subplots, where the graph overhead adds no value. It is also unsuited for software development task management, where dedicated tools like Jira are more appropriate.

What are the performance limits of narrative graph validation?▼

The validation criteria require acyclicity checks and full inconsistency propagation on a 200-goal DAG to complete in under 5 milliseconds on a local CPU. The default maximum dependency nesting depth is 10 levels, configurable via MAX_GOAL_DEPTH.