story-map
Generate an implementation DAG from specification documents — vertical slices, NetworkX verification, Mermaid diagram
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate an implementation DAG from specification documents — vertical slices, NetworkX verification, Mermaid diagram
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | story-map |
| description | Generate an implementation DAG from specification documents — vertical slices, NetworkX verification, Mermaid diagram |
| user-invocable | true |
| argument-hint | [path to spec files or directory] |
Generate a dependency-ordered implementation DAG from specification documents. The DAG is structured as vertical feature slices (not waterfall layers), verified with NetworkX, and rendered as a Mermaid diagram.
Read skills/story-map/references/dag-conventions.md before proceeding. It contains the structural rules, color palette, and verification protocol that govern every DAG you produce.
$ARGUMENTS
If $ARGUMENTS contains file paths or a directory, read all referenced spec files. If $ARGUMENTS is empty or does not point to files, ask the user:
Which specification files should I use to build the DAG? Provide file paths, a directory, or paste the specs directly.
Read every spec file thoroughly. For each spec, extract:
Do NOT proceed to DAG generation without asking these questions. Present them all at once and wait for answers.
Record all answers. They directly shape the DAG structure.
Using the specs and the user's answers, design the DAG following the conventions in references/dag-conventions.md. For each node, determine:
Key structural rules (see references/dag-conventions.md for full details):
Write dag_verify.py — a Python script that:
networkx.DiGraphnx.is_directed_acyclic_graph(G) — exit with error if cycles foundnx.topological_sort(G)nx.dag_longest_path(G) (all edge weights = 1)nx.topological_generations(G)Structure the script so that the node and edge definitions are easy to edit. Use dictionaries for node metadata and a flat list for edges.
Execute python dag_verify.py and review the output.
Present the verification results to the user:
Ask the user to confirm the DAG structure or request changes. Iterate until approved.
Write dag_gen_mermaid.py — a Python script that:
nx.transitive_reduction(G) to remove redundant edgesflowchart LR diagram with:
references/dag-conventions.md)Write the output to DAG.mmd.
Present all three artifacts to the user:
dag_verify.py — NetworkX verification script (nodes, edges, validation, stats)dag_gen_mermaid.py — Mermaid generation script (transitive reduction, styling)DAG.mmd — The rendered Mermaid diagram fileSummarize the DAG:
If the user wants changes, return to Step 3 and iterate.