Project spec writer

From revfactory/skills · View interactive version

Project spec writer is an AI agent skill from the GitHub repository revfactory/skills. Write comprehensive XML-structured project specifications (build plans / PRDs) for software projects. Use when a user wants to create a build plan, project spec, technical specification, PRD, or detailed requirements document for an application they want built — or wants to spec a new feature for an

How to use this skill

Skill file

Project Specification Writer

Generate detailed, structured XML project specifications that serve as comprehensive build plans for software projects. The specs are designed to be consumed by AI coding agents or developers to build applications with minimal ambiguity.

Modes

Pick the mode that matches the request before doing anything else:

| Mode | When | Instructions |

|------|------|--------------|

| New project spec | Greenfield app/service/tool idea | Workflow below |

| Feature spec | Adding/changing features in an existing codebase | Read references/feature-spec-mode.md |

| Refine existing spec | User has a spec file to review, improve, or expand | "Refining an Existing Spec" below |

Language Policy

Workflow (New Project Spec)

1. Gather Project Intent

Understand, in order of priority:

  1. What — Core purpose and key features (e.g., "a JIRA-like project management app")
  2. How — Technical preferences: framework, language, hosting model
  3. Who — Target users and usage context
  4. Look & Feel — Design preferences, reference apps, color themes

If the user provides a brief idea, ask focused follow-up questions. When the AskUserQuestion tool is available, prefer it over free-form questions — give concrete options so the user can decide quickly. Keep it to 1–2 rounds; don't interrogate.

Confirm the technology stack with the user before drafting. Derive 2–3 candidate stacks from the project's actual requirements (offline needs, team skills, hosting budget, scale) and present them with one-line tradeoffs, e.g.:

Let the user pick or adjust. Don't silently apply a default stack to a project whose requirements point elsewhere.

If the user can't respond (headless run, or they said "알아서 진행해"): choose the best-fit stack yourself and record the choice and rationale in <assumptions> so it's auditable later.

Version numbers — never invent them. Model memory of "latest versions" is stale. For each pinned library either:

Exact minor/patch numbers that were not verified are worse than none — an AI builder will faithfully install a version that may not exist.

2. Draft the Specification

Read the XML schema reference: references/xml-schema.md (it has a table of contents — read the sections relevant to this project type).

Write the specification inside a single <project_specification> root tag. Follow this section order:

project_name → overview → assumptions → open_questions → scope_boundaries →
technology_stack → prerequisites → environment_variables → file_structure →
core_data_entities → authentication → route_definitions → component_hierarchy →
pages_and_interfaces (or api_endpoints / commands_and_flags / public_api) →
core_functionality → ai_integration → error_handling →
third_party_integrations → aesthetic_guidelines → internationalization →
security_considerations → advanced_functionality →
final_integration_test → success_criteria → build_output →
deployment_and_operations → key_implementation_notes

Skip sections that don't apply (see applicability table in the schema reference). Complete examples:

Writing Principles

Be concrete, not abstract. Every design decision should have a specific value:

Be exhaustive on data models. Every entity needs complete field definitions with types, constraints, and relationships. Include compound indexes for any non-trivial querying patterns.

Be specific on UI. For each view/page: layout structure, dimensions, colors, content hierarchy, interactive behaviors (hover/click/drag/keyboard), empty states, and animations with durations.

Be opinionated on design. Provide a complete design system: color palette, typography, spacing scale, component styles, animation specifications.

Be actionable on implementation. Include a recommended implementation order that respects dependency chains. Provide concrete code for schemas/configs where helpful.

Be honest about uncertainty. Decisions you made without user confirmation go in <assumptions>; decisions only the user can make go in <open_questions>. A builder silently implementing on top of a wrong guess is the most expensive failure mode a spec can cause.

Write for AI agents. Prefer explicit, unambiguous descriptions. State architectural constraints with CRITICAL: prefix. Avoid prose that requires interpretation — use structured lists and specific values.

3. Review: Consistency Pass

Sections written hours (or context windows) apart drift. Before delivering, cross-check:

Then run the mechanical validator and fix what it reports:

python3 scripts/validate_spec.py <path/to/SPEC.md>

Finally, check the writing quality checklist at the end of the schema reference.

4. Output and Handoff

Save as a .md file in the current working directory (or a user-specified path). Filename: project name in SCREAMING_SNAKE_CASE with _SPEC suffix — CANOPY_SPEC.md, RECIPE_TRACKER_SPEC.md.

For large specs (>500 lines), write iteratively: outline first, then fill sections one at a time.

When presenting the finished spec to the user:

  1. Summarize what was specced (stack, scope, size)
  2. Surface <open_questions> explicitly — these need the user's answers before a build starts
  3. Offer to expand, revise, or add detail to any section

Refining an Existing Spec

When the user brings an existing spec to improve:

  1. Read the entire spec first — never edit based on the filename or a skim.
  2. Diagnose: run the consistency pass and scripts/validate_spec.py, and compare against the quality checklist. List concrete gaps (missing sections, vague values, contradictions), not generic advice.
  3. Confirm direction: present the diagnosis and let the user choose what to fix — unless they already specified the changes.
  4. Edit surgically: use targeted edits, preserving decisions the user already made. Rewriting sections wholesale discards deliberate choices that took feedback rounds to reach.
  5. Update <assumptions> / <open_questions> to reflect any new decisions, re-run the validator, and summarize what changed and why.

Section Depth Guidelines

Match detail level to project complexity:

| Project Complexity | Spec Length | Data Entities | UI Pages | Test Scenarios |

|-------------------|-------------|---------------|----------|----------------|

| Simple (todo, timer) | 200-400 lines | 2-4 entities | 2-4 views | 3-5 scenarios |

| Medium (blog, dashboard) | 400-800 lines | 5-8 entities | 5-10 views | 6-8 scenarios |

| Complex (PM tool, CRM) | 800-1700 lines | 8-15 entities | 10-20 views | 10-15 scenarios |

Adaptation for Non-Web Projects

Each replacement section below is fully defined in the schema reference:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.