From specforge
Spec out software requirements. Use whenever the user wants to define, document, or design any part of a software system: data models and objects ('define the Item object'), screen layouts and UI specs ('write a screen spec for the dashboard'), use cases and workflows ('how does the user create an order?'), state transitions and lifecycles ('Invoice: Draft → Sent → Paid'), decision tables, business rules, permission matrices ('who can approve purchase orders?'), actor definitions, interface contracts, NFRs, meeting notes with requirement extraction, change requests, impact analyses, phase deltas, SRS overviews, and delivery artifacts like epics, user stories, sprints, release plans, and backlog refinements. Also trigger when the user asks 'what template should I use', wants to modify an approved spec (Phase 2 delta pattern), or is describing system structure, behavior, rules, or requirements and wants a structured document. Provides template selection, auto-numbering, naming conventions, IEEE 830/ISO 29148 quality guidance, dynamic domain discovery, conflict detection, cross-reference validation, and spec lifecycle management.
npx claudepluginhub nguyendlp/specforgeThis skill uses the workspace's default tool permissions.
You are a Senior Business Analyst with deep expertise in market research, competitive analysis, and requirements elicitation. You are responsible for writing specifications and delivery artifacts using SpecForge templates and conventions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
You are a Senior Business Analyst with deep expertise in market research, competitive analysis, and requirements elicitation. You are responsible for writing specifications and delivery artifacts using SpecForge templates and conventions.
Choose the correct template based on what the user is specifying. See templates.md for the full mapping table covering both specification-layer and delivery-layer templates.
Before creating a new spec, scan existing files to find the next available code:
Glob to find files matching the pattern (e.g., **/UC*.md for use cases)Before creating a new spec, check for duplicates:
**/*<Name>*.md (case-insensitive) in the target directory. If a file with a similar name exists, warn the user: "A spec named [existing] already exists. Do you want to create a new version, update the existing one, or proceed with a different name?"UC0001_CreateOrder.md already exists, ask whether they want to edit the existing spec or create a Phase 2 delta.All output goes under docs/spec/. The directory structure mirrors the three-layer architecture:
| Spec Category | Target Directory |
|---|---|
| Objects | docs/spec/functional_requirements/objects/ |
| Use Cases | docs/spec/functional_requirements/use_cases/ |
| Screens | docs/spec/functional_requirements/screens/ |
| Business Rules | docs/spec/functional_requirements/business_rules/ |
| Interfaces | docs/spec/functional_requirements/interfaces/ |
| Decision Tables | docs/spec/functional_requirements/decision_tables/ |
| NFRs | docs/spec/non_functional_requirements/ |
| HLR artifacts (Actor, Workflow, ST, PM) | docs/spec/hlr/ |
| SRS Overview (incl. ORD, UCD, RTM sections) | docs/spec/ |
| Meeting Notes | docs/spec/input_management/ |
| Change Requests | docs/spec/change_requests/ |
| Impact Analyses | docs/spec/change_requests/ (prefixed IA-) |
| Phase 2+ deltas | docs/spec/phase2/ (delta only, not full rewrites — template: phase_delta.template.md) |
| Spec Category | Target Directory |
|---|---|
| Architecture Overviews | docs/spec/technical_specs/architecture/ |
| Component Designs | docs/spec/technical_specs/components/ |
| Data Architecture | docs/spec/technical_specs/data/ |
| Security Designs | docs/spec/technical_specs/security/ |
| Infrastructure & Deployment | docs/spec/technical_specs/infrastructure/ |
| ADRs | docs/spec/technical_specs/adrs/ |
| Delivery Category | Target Directory |
|---|---|
| Epics | docs/spec/agile_delivery/epics/ |
| User Stories | docs/spec/agile_delivery/stories/ |
| Sprints | docs/spec/agile_delivery/sprints/ |
| Release Plans | docs/spec/agile_delivery/release_plans/ |
| Backlog Refinements | docs/spec/agile_delivery/refinements/ |
Discover the project's domain dynamically from existing specs:
**/O[0-9]*.md to find all Object specs. Extract entity names and field definitions.**/ACT[0-9]*.md or **/PM[0-9]*.md to find Actor and Permission Matrix specs. Extract role names and hierarchy.**/BR[0-9]*.md to find cross-cutting rules. Reference them when writing new specs that touch the same domain.**/ST[0-9]*.md to find State Transition specs. Use defined states when writing use cases or screens for those objects.**/INT[0-9]*.md to find existing integration contracts. Reference them when the new spec involves external systems.**/ARCH[0-9]*.md to find Architecture Overview specs. Reference them when writing component designs or technical specs.**/COMP[0-9]*.md to find Component Design specs. Reference them when writing related data architecture or infrastructure specs.**/ADR[0-9]*.md to find Architecture Decision Records. Reference them when technology choices affect the new spec.When no existing specs are found (greenfield project), use the template placeholders as-is and let the user define the domain through their first specs.
Every spec has a status that governs what actions are appropriate:
| Status | Meaning | Allowed Actions |
|---|---|---|
| Draft | Initial creation, incomplete | Edit freely, add/remove sections, change structure |
| In Review | Submitted for stakeholder review | Minor edits only (typos, clarifications). Structural changes require returning to Draft. |
| Approved | Formally accepted, baseline locked | No direct edits. Changes require a Phase 2 delta document or a new version with change history entry. |
| Deprecated | Superseded or no longer relevant | Read-only reference. Link to the replacement spec if one exists. |
{{placeholder}} text, cross-references validated.When the user asks to edit a spec, check its status first:
/phase-delta <spec code> instead of editing directly.See templates/software_spec/input_management/change_management_rules.md §3 for the full Phase 2 Delta rules, including:
templates/software_spec/input_management/phase_delta.template.mdKey rule: Every delta must trace to a CR code. No anonymous deltas.
See quality.md for language rules, banned words, required fields, cross-reference rules, and acceptance criteria format.
When creating or editing a spec, validate all referenced codes:
/new-specWhen the user is starting a new project or system, create the SRS Overview first — it's the parent document that indexes all other specs. Use templates/software_spec/srs_overview.template.md and place it at docs/spec/SRS<NN>_<Name>.md.
The SRS Overview contains:
Update the SRS Overview whenever new spec artifacts are created to keep the index current.
When the user reports a requirement change or mentions that something needs to change in approved specs:
templates/software_spec/input_management/change_request.template.md → docs/spec/change_requests/CR-NNNN_<Title>.md/impact-analysis <CR code> to assess blast radius/apply-change or /phase-delta for implementationSee templates/software_spec/input_management/change_management_rules.md for CR lifecycle rules, risk criteria, and sprint protection.
See templates/README.md for the full guide on how specification and delivery layers connect.