AGENT SKILL

srs-specifier

Generate professional Software Requirements Specification (SRS) compliant with ISO/IEC/IEEE 29148 and IEEE 830 standards, focusing purely on requirements (WHAT the system does) with granular use-case decomposition, high-level technology constraints, non-functional requirements, and strict exclusion of design details (no API routes, no ERD/DDL, no response envelopes).

License 许可
MIT
最近更新
2026-09-15
Stars
★ 0
Forks
0

01 前言 Front Matter

name
srs-specifier
author
Hermes Agent Team
license
MIT
version
2.1.0
metadata
{ "hermes": { "tags": [ "requirements", "srs", "iso-29148", "ieee-830", "use-case", "analysis", "specification" ], "related_skills": [ "grilling", "sdd-architect", "delegate-software-engineering-team" ] } }
platforms
[ "linux", "macos", "windows" ]
description
Generate professional Software Requirements Specification (SRS) compliant with ISO/IEC/IEEE 29148 and IEEE 830 standards, focusing purely on requirements (WHAT the system does) with granular use-case decomposition, high-level technology constraints, non-functional requirements, and strict exclusion of design details (no API routes, no ERD/DDL, no response envelopes).

03 SKILL.md 正文

Software Requirements Specification (SRS) Skill (ISO/IEC/IEEE 29148 & IEEE 830)

Overview

Produce a formal, enterprise-grade Software Requirements Specification (SRS) document that serves as the single source of truth for software scope, high-level technical constraints, granular functional requirements (use cases), and non-functional quality attributes.

Standards Compliance

  • ISO/IEC/IEEE 29148:2018: Systems and software engineering — Life cycle processes — Requirements engineering.
  • IEEE 830-1998: IEEE Recommended Practice for Software Requirements Specifications.

🔒 Strict Separation of Concerns: WHAT vs HOW

[!IMPORTANT] SRS vs SDD Boundary Rule:

  • SRS (WHAT): Defines user goals, functional use cases, business rules, tech stack constraints, and quality requirements from the user and domain perspective.
  • DO NOT include in SRS (Belongs Exclusively to SDD):
    • ❌ Specific REST API routes (e.g. POST /api/v1/meetings), query parameters, or HTTP status codes.
    • ❌ Entity-Relationship Diagrams (ERD), SQL DDL tables, column types, foreign keys.
    • ❌ Response envelope schemas (e.g. { success: true, data: ... }) or interceptors.
    • ❌ Class diagrams, internal service layers, or design patterns.

Target Output Path

/opt/data/workspace/{project_name}/docs/srs.md


🛠️ Step-by-Step Procedure

Step 1: Ingest Grilling Findings (\ge 2 Rounds Required)

Verify that the project has completed at least 2 rounds of interactive grilling interviews via the grilling skill:

  • Round 1 Decisions: Core business problem, target user actors (ACT-001~), in-scope/out-of-scope boundaries, and confirmed technology stack.
  • Round 2 Decisions: Edge cases, authentication/authorization concepts, business validation constraints, and non-functional requirements (NFRs). Synthesize all confirmed user answers directly into the SRS baseline.

Step 2: Formulate Actors & System Scope

  1. Define all user classes and system actors (ACT-001 ~ ACT-00N).
  2. Clearly demarcate In-Scope vs Out-of-Scope (OOS) capabilities to prevent scope creep.

Step 3: Granular Functional Requirements (Use Cases)

Decompose features into discrete Use Cases (UC-001 ~ UC-NNN). Describe them purely from the actor and system behavior perspective:

  • Actor: Specific actor ID.
  • Goal: Clear user objective.
  • Preconditions: Verifiable system states before execution.
  • Postconditions: Verifiable system states after execution.
  • Basic Flow (Happy Path): Step-by-step user actions and system responses.
  • Alternative Flows: Branching business logic (e.g. filtering, optional fields).
  • Exception Flows: Error handling from business perspective (e.g. invalid input, duplicate item, unauthorized attempt).

Step 4: Define Mandatory Technology Constraints (High-Level Stack)

Section 3 of the SRS locks the high-level technology choices agreed upon with the user:

  • Backend Language & Framework (e.g. Python 3.12+ FastAPI)
  • Database Engine & ORM (e.g. PostgreSQL 16 + SQLAlchemy 2.0 Async)
  • Frontend Framework & Tooling (e.g. React 18 + TypeScript + Vite + TailwindCSS)
  • Authentication Strategy (e.g. JWT Token-based Auth)
  • Containerization Target (e.g. Multi-stage Docker + Docker Compose)

Step 5: Define Non-Functional Requirements (NFRs)

Specify measurable, testable quality criteria:

  • NFR-PERF (Performance): API P95 response time $< 200\text{ms}$, page load $< 1.5\text{s}$.
  • NFR-SEC (Security): Password hashing with bcrypt, RBAC authorization, parameterized DB queries.
  • NFR-REL (Reliability): ACID transaction integrity, structured error feedback.
  • NFR-QA (Verification): 100% automated test pass rate, $\ge 80%$ code coverage.

Step 6: Write Document to /docs/srs.md

Write the complete markdown document to /opt/data/workspace/{project_name}/docs/srs.md.


📄 SRS Document Template Structure

# Software Requirements Specification (SRS)
## Project: {Project Name}
**Standard**: ISO/IEC/IEEE 29148:2018 & IEEE 830  
**Version**: 1.0.0  
**Status**: Approved / Baseline  
**Date**: {YYYY-MM-DD}  

---

## 1. Introduction
### 1.1 Purpose
[Describe the purpose of this document and the intended target audience]

### 1.2 Scope & Vision
[High-level summary of what the software will achieve]

### 1.3 Out-of-Scope (OOS)
- [Explicitly list what the system will NOT do in this release]

### 1.4 Definitions, Acronyms & Abbreviations
| Term | Definition |
| :--- | :--- |
| SRS | Software Requirements Specification |
| SDD | Software Design Description |
| RBAC | Role-Based Access Control |
| JWT | JSON Web Token |

---

## 2. Overall Description
### 2.1 Product Perspective & Context
[Describe how this system fits into the broader operational ecosystem]

### 2.2 User Classes & System Actors
- **ACT-001 (AnonymousVisitor)**: Unauthenticated user accessing public pages.
- **ACT-002 (AuthenticatedMember)**: Standard logged-in user.
- **ACT-003 (SystemAdmin)**: Administrative user with system management privileges.

### 2.3 Operating Environment
- Deployment Target: Docker Containers on Linux / Kubernetes
- Client Platform: Modern Evergreen Browsers (Chrome, Firefox, Safari, Edge)

---

## 3. 🔒 Mandatory Technology Stack Constraints (TC)
> [!IMPORTANT]
> This section is the **Single Source of Truth** for high-level technical choices. Downstream architecture (`docs/sdd.md`) must strictly build upon these constraints.

| Category | Locked Technology / Constraint | Rationale / Target Version |
| :--- | :--- | :--- |
| **Backend Language & Framework** | Python 3.12+ / FastAPI (Async) | High performance, async IO, automated OpenAPI support |
| **Database Engine & ORM** | PostgreSQL 16 / SQLAlchemy 2.0 Async | ACID transactions, relational integrity, async driver |
| **Frontend Framework & Tooling** | React 18 + TypeScript + Vite + TailwindCSS | Component modularity, static type safety, modern build tool |
| **Authentication Standard** | JWT (JSON Web Token) + bcrypt | Stateless auth, secure password hashing (work factor 12) |
| **Deployment Target** | Multi-stage Docker + Docker Compose | Reproducible local and containerized deployment |

---

## 4. Functional Requirements (Use Case Specification)

### UC-001: [Use Case Title]
- **Actor**: `ACT-002 (AuthenticatedMember)`
- **Goal**: [One clear user objective]
- **Preconditions**:
  1. User is authenticated with active session.
- **Postconditions**:
  1. Record is created and persisted in the system.
- **Basic Flow (Happy Path)**:
  1. Actor initiates action with required parameters (e.g. title, date, attendees).
  2. System validates that required fields are present and correctly formatted.
  3. System persists the entity and logs the creation event.
  4. System confirms success to the actor and displays the created entity summary.
- **Alternative Flows**:
  - *Alt-1 (Optional filters applied)*: Actor applies search/filter criteria; system presents filtered results.
  - *Alt-2 (Pagination)*: Actor navigates across result pages; system presents requested page slice.
- **Exception Flows**:
  - *Exc-1 (Validation Error)*: System detects invalid or missing fields; rejects request with descriptive validation feedback.
  - *Exc-2 (Resource Conflict)*: System detects duplicate unique identifier; notifies user of conflict.
  - *Exc-3 (Unauthorized Access)*: System rejects unauthenticated or unauthorized access attempts.

[Repeat for UC-002 ~ UC-NNN]

---

## 5. Non-Functional Requirements (NFRs)
### 5.1 Performance Requirements (PERF)
- **NFR-PERF-01**: System P95 response time $\le 200\text{ms}$ under standard operational load.
- **NFR-PERF-02**: Initial UI page load time $\le 1.5\text{s}$.

### 5.2 Security Requirements (SEC)
- **NFR-SEC-01**: Passwords must be securely hashed using bcrypt with work factor $\ge 12$.
- **NFR-SEC-02**: All private actions require valid token authentication and RBAC verification.
- **NFR-SEC-03**: All database queries executed via parameterized statements to eliminate SQL injection.

### 5.3 Reliability & Fault Tolerance (REL)
- **NFR-REL-01**: Multi-step business transactions must maintain ACID atomicity with automatic rollback on failure.
- **NFR-REL-02**: System must provide structured error messages for all failure modes.

### 5.4 Verification & Quality Gates (QA)
- **NFR-QA-01**: 100% automated test pass rate (`failed == 0, errors == 0`).
- **NFR-QA-02**: Code coverage $\ge 80\%$ measured across codebase.

---

## 6. Requirement Traceability Matrix (RTM) Baseline
| Use Case ID | Requirement Category | Priority | Functional Scope |
| :--- | :--- | :--- | :--- |
| `UC-001` | Authentication | Critical (P0) | User registration & authentication |
| `UC-002` | Core Domain | Critical (P0) | Core domain entity management |

04 同仓库更多 Skills