tp-use-case-spec

Generates use case specification documents in Word and Markdown from JSON definitions.

Updated Aug 24, 2026
One-click install
npx skills add https://github.com/aggutierrez98/TP-TD --skill tp-use-case-spec-aggutierrez98
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tp-use-case-spec
Source: https://github.com/aggutierrez98/TP-TD/tree/main/.agents/skills/tp-use-case-spec
Command: npx skills add https://github.com/aggutierrez98/TP-TD --skill tp-use-case-spec-aggutierrez98

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-docx, and includes scripts (resource) and references (resource) components.

What problem does it solve? Writing use case specifications in a consistent standard format (ID and Name, State, Description, Actors, Preconditions, Extension Points, Main Scenario, Alternative Flows, Postconditions) is repetitive and error-prone when done by hand in Word. This Skill turns a single JSON source of truth into a formatted .docx document plus a versionable Markdown mirror, keeping documentation synchronized with the actual implemented behavior. ## Core Features & Use Cases - JSON-driven generation: Define use cases once in JSON following a documented schema, then regenerate the .docx and .md outputs without manual editing. - Per-requirement and consolidated modes: Generate one document per requirement (T02, T03, ...) or merge all JSON files under a directory into a single consolidated document with global CU renumbering (CU01, CU02, ...). - Strict format validation: The script validates mandatory fields, list types, and known states before rendering, and enforces RUP/UML actor rules (secondary actors must be external entities, never internal classes). - Use Case: After implementing the login requirement, write diagramas/T02-login-logout/T02-login-logout-casos-de-uso.json and run the build script to produce the formal .docx deliverable and a .md mirror for git diff review. ## Quick Start Ask the AI to document the use cases for requirement T02 by creating the JSON file under diagramas/T02-login-logout and running the build-use-case-spec.py script to generate the .docx and .md files.

Frequently Asked Questions about tp-use-case-spec

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

FAQPage Schema
How do I generate a use case specification document from JSON?▼

Write a JSON file with a casos_de_uso list following the documented schema, then run scripts/build-use-case-spec.py with --input pointing to that JSON. It produces a .docx with one table per use case plus a Markdown mirror for version control.

How to merge multiple use case JSON files into one Word document?▼

Pass several JSON files or a directory to --input and the script builds a single consolidated .docx with all specifications stacked under requirement titles. Use --page-break-por-requisito to start each requirement on a new page.

What Python dependencies does the use case generator need?▼

The script requires Python 3.8 or newer and the python-docx package, installed with pip install python-docx. If the dependency is missing, the script prints an error message explaining how to install it.

Can internal classes be listed as secondary actors in a use case?▼

No. Under RUP/UML rules enforced by this Skill, a secondary actor must be an external entity such as another system, hardware device, or support person. Internal components like BLL, DAL, repositories, or Forms belong in sequence diagrams, not the actor field; use '-' when none exists.

Why are use case IDs renumbered in the consolidated document?▼

Consolidated mode renumbers use cases globally and correlatively (CU01, CU02, ...) so codes do not repeat across requirements. Per-requirement documents keep local numbering matching the sequence diagrams; use --sin-renumerar to preserve original codes.