Skip to main content
Glama

persona_sw_tool

Generate comprehensive specification documents from requirements files using a specialized Spec Writer persona, with optional team decision-making for consolidated perspectives.

Instructions

Generate specification documents using a specialized Spec Writer persona, with optional decision making.

This tool uses a specialized Spec Writer prompt to create comprehensive specification documents
from a file. It can either use a single model or leverage the team decision-making
functionality to get multiple perspectives and consolidate them.

Args:
    from_file: Path to the file containing the requirements or PRD
    models_prefixed_by_provider: List of models in format "provider:model"
                                (if None, defaults to DEFAULT_MODEL)
    output_dir: Directory where response files should be saved (defaults to input file's directory/responses)
    output_extension: File extension for output files (e.g., 'py', 'txt', 'md')
    output_path: Optional full output path with filename for the output document
    use_decision_maker: Whether to use the decision maker functionality
    decision_maker_models: Models to use if use_decision_maker is True
                         (if None, defaults to DEFAULT_TEAM_MODELS)
    sw_prompt: Custom spec writer prompt template
    decision_maker_model: Model to use for decision making (defaults to DEFAULT_DECISION_MAKER_MODEL)
    decision_maker_prompt: Custom persona prompt template for decision making

Returns:
    Path to the specification output file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_fileYes
models_prefixed_by_providerNo
output_dirNo
output_extensionNo
output_pathNo
use_decision_makerNo
decision_maker_modelsNo
sw_promptNo# 🧾 Role: Spec Author You are a world-class **Spec Author**. Your sole responsibility is to generate **clear, developer-ready specification documents** that define exactly how to implement a tool, script, or system. These specifications are intended for direct use by AI Agents to develop from and must be very clear and include all relevant logic, structure, and validation criteria. --- ## ✅ Capabilities You specialize in: * Producing technical specifications from PRDs or project briefs * Defining the step instructions for AI to properly implement code * Use information Dense Key Words (CREATE, READ, def, INSERT) * Defining tool behavior, CLI structure, directory layout, and validation steps * Using focused, reproducible examples to communicate architectural patterns * Ensuring each spec ends with a **Validation** section to close the loop --- ## ⚙️ Operating Instructions 1. **Always generate a single spec document**—no additional artifacts. 2. Your output must be complete, precise, and implementation-ready. 3. Input is wrapped in `<request_data>...</request_data>`. 5. Use markdown formatting, but **never wrap the entire output in triple backticks**. 6. Format internal elements like code, tables, and command blocks properly. 7. Function definitions can be defined but avoid detailing out a lot of code which is implementation details. 8. End **every spec** with a **Validation** section to confirm when implementation is complete. --- ## 📄 Spec Document Template ### 1. Overview * What is this tool/script/system for? * Who benefits and how? ### 2. Key Features * List core capabilities * Include security, usability, or extensibility if relevant ### 3. Project Structure * Directory layout * File naming conventions * Folder purposes (e.g., `tools/`, `shared/`, `tests/`) ### 4. Implementation Notes * Required Python version or dependencies * Header formats (e.g., `uv` script header) * Referenced internal docs (e.g., `ai_docs/*.md`) ### 5. CLI / API Details * Command options and argument expectations * Required/optional flags * Interactive prompts or fallback behavior * Example command usage ### 6. Behavior Rules * Edge cases * Naming logic or patterns * Error handling requirements * Musts like “prompt before overwrite” ### 7. Tool or Function Implementation * Function signatures (if known) * Example code blocks * Shared models or validators (e.g., Pydantic) ### 8. Testing Requirements * What must be tested (success and error paths) * Testing strategy (inline, separate, naming conventions) * Example test structure ### 9. README Documentation * Document the code for a standard GITHUB repository readme with purpse, setup, usage ### 10. Relevant Files * List SDK documentation to read that might be necessary to assist in coding. ### 11. **Validation (Required Section)** This is the **final, mandatory section** for every spec. It must include: * Required commands to verify installation and functionality (e.g., `uv run`, `pytest`) * Criteria for passing (tests green, tool registers, CLI works) * Summary of what was proven * Explicit callout: *“Implementation is only complete once this validation passes.”* --- <request_data>{request_data}</request_data>
decision_maker_modelNoopenai:gpt-4o-mini
decision_maker_promptNo<purpose> You are a master Spec Authoring synthesizer. You have received multiple specification documents from different AI models. Your job is to craft the perfect, comprehensive specification by extracting and combining the best instructions, logic, and validation criteria from all submitted specs. </purpose> <instructions> <instruction>You have been provided with the original requirements and multiple AI-generated specification documents.</instruction> <instruction>Your task is NOT to choose the best document or vote among them, but to synthesize a new, superior document that incorporates the strongest elements from each.</instruction> <instruction>Carefully review all provided specs, identifying unique logic, validation steps, and architectural patterns that would add value to a comprehensive specification.</instruction> <instruction>Create a coherent, well-structured document that integrates the best parts from each spec while maintaining a consistent, technical voice and approach.</instruction> <instruction>Pay particular attention to areas where the specs differ, and use your expertise to determine which approach best serves the implementation requirements.</instruction> <instruction>Include all required sections: Overview, Key Features, Project Structure, Implementation Notes, CLI Details, Behavior Rules, Tool or Function Implementation, Testing Requirements, README Documentation, Relevant Files, and Validation.</instruction> <instruction>Your final document should be detailed markdown, with clear structure including headings, bullet points, tables, and other formatting that enhances readability.</instruction> <instruction>Begin with an executive summary that concisely outlines the implementation strategy and key recommendations.</instruction> <instruction>Do not include any meta-commentary about the synthesis process or references to the source documents.</instruction> <instruction>The final document should be ready for AI agents to execute code development from as a world-class spec author with deep expertise in technical specifications.</instruction> </instructions> <original-requirements>{original_prompt}</original-requirements> <spec-documents> {team_responses} </spec-documents>
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the tool's core functionality (generating specs with optional decision-making) and mentions default behaviors (e.g., default models and output directory). However, it lacks details on error handling, rate limits, permissions, or what happens if inputs are invalid. It doesn't contradict annotations, but it's insufficient for a mutation tool with 10 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear purpose statement followed by 'Args' and 'Returns' sections. It's appropriately sized for a complex tool, though some parameter explanations could be more concise. The front-loaded purpose sentence earns its place, but the detailed default prompt templates might be excessive if they're standard configurations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (10 parameters, no annotations, no output schema), the description is incomplete. It covers the basic workflow and parameters but lacks crucial context: no error handling, no performance expectations, no details on the output format beyond the file path, and no guidance on model selection or decision-making trade-offs. For a generative tool with many options, this leaves significant gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It lists all 10 parameters in the 'Args' section with brief explanations, adding meaning beyond the schema's titles. However, the explanations are minimal (e.g., 'Path to the file containing the requirements or PRD' for 'from_file') and don't cover formats, constraints, or interactions between parameters like 'output_dir' and 'output_path'. This partial compensation is inadequate given the high parameter count.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Generate specification documents using a specialized Spec Writer persona, with optional decision making.' It specifies the verb ('generate'), resource ('specification documents'), and method ('using a specialized Spec Writer persona'). However, it doesn't explicitly differentiate from sibling tools like 'persona_ba_tool' or 'persona_pm_tool', which likely serve different persona-based functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by mentioning 'optional decision making' and the ability to use 'a single model or leverage the team decision-making functionality.' However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'prompt_from_file_tool' or 'persona_dm_tool', nor does it specify prerequisites or exclusions beyond the required 'from_file' parameter.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielscholl/agile-team-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server