Documents

Requirement Guide

Try it

A conversational requirement clarification tool with structured questioning and document generation.

What it does

A conversational requirement clarification tool with structured questioning and document generation.

The skill document

Requirement Guide

A conversational requirement clarification tool that guides users through structured questioning across six dimensions and assembles a structured requirement document from the gathered answers.

Features

  • Structured Questioning — Six preset dimensions drive a guided dialogue
  • Session Management — Track active, completed, and abandoned sessions
  • Required vs Optional — Distinguish mandatory elements from nice-to-haves
  • Document Generation — Assemble a requirement document with completeness scoring
  • Persistence — Save/load sessions and documents as JSON for resumable workflows
  • Thread-Safe — Concurrent calls do not corrupt session state
  • Zero Dependencies — Pure standard library (only pytest for tests)

Question Dimensions

DimensionElements
basic_infoproject_name, version, author
backgroundproblem, goal, context
functionalfeatures, user_roles, workflows
non_functionalperformance, security, usability
dataentities, interfaces, storage
acceptancecriteria, timeline, constraints

Installation

openclaw skills install requirement-guide

Quick Start

from src import RequirementGuide

guide = RequirementGuide()

# Start a guided session
session = guide.start_session("Inventory Management System")

# Ask questions and process answers
question = guide.ask_question(session.id)
print(question.text)            # "What is the project name?"
answer = guide.process_answer(session.id, "StockFlow")
print(answer.processed)         # True

# Continue the dialogue...
while True:
    q = guide.ask_question(session.id)
    if q is None:
        break
    guide.process_answer(session.id, "..." if q.required else "-")

# Generate the requirement document
doc = guide.generate_document(session.id)
print(doc.title)                # "Inventory Management System"
print(doc.completeness)         # 1.0

API

RequirementGuide

MethodDescription
start_session(topic: str) -> SessionStart a new requirement gathering session
ask_question(session_id: str) -> Question | NoneReturn the next unanswered question
process_answer(session_id: str, answer: str) -> AnswerProcess a user answer for the active question
generate_document(session_id: str) -> RequirementDocumentAssemble a requirement document from gathered answers
get_session_status(session_id: str) -> SessionStatusReturn the current session status
completeness(session_id: str) -> floatReturn the completeness ratio (0.0 - 1.0)
abandon_session(session_id: str) -> SessionMark a session as abandoned
save_session(session_id: str, path: str) -> strPersist a session to JSON
load_session(path: str) -> SessionLoad a session from JSON
save_document(session_id: str, path: str) -> strPersist the requirement document to JSON

Data Models

  • Sessionid, topic, status, questions_asked, answers, elements
  • Questionid, dimension, text, required
  • Answerquestion_id, content, processed
  • RequirementDocumenttitle, elements, completeness
  • SessionStatusACTIVE, COMPLETED, ABANDONED

Testing

cd d:\openclaw-skills\business-stack\requirement-guide
python -m pytest tests/ -v --tb=short

License

MIT License — Free for personal and commercial use.

Author

Terr123123

Related skills

Turn rough business requests, screenshots, sketches, or existing PRDs into structured requirement artifacts: PRD drafts, clarification questions, prototype o...

8 installs

PRD review stress-test simulator: 5 cross-functional roles challenge your requirements and outputs a scored HTML or Markdown survival report with radar chart...

32 installs2 stars

Turn customer background, current problems, and target requirements into a consulting-grade solution narrative and PPT-ready JSON outline. Use when Codex nee...

29 installs

Interview the user with sharp, one-at-a-time questions to turn a vague request into a tight, complete brief any other skill can run on. Use when a request is...

A requirement gate checker for requirement completeness, acceptance criteria, and scope validation.

1 installs

Transform feature briefs into structured design briefs that give designers the context they need before opening Figma. Use when asked to write a design brief...