The SDLC pipeline
SRS: requirements
The ISO/IEC/IEEE 29148 requirements specification: requirements, compliance flags, and a four-part narrative.
15 min read8 sections
The SRS step turns the approved scope into a Software Requirements Specification, written to ISO/IEC/IEEE 29148 (the successor of IEEE 830): a numbered set of testable requirements, the regulatory frameworks they touch, the system features that own them, use cases, business rules and analysis diagrams. It is the busiest step in the pipeline (six agent calls on a clean run) and every later document cites the requirement ids it creates. Approving it unlocks the TAD.
What you get
A Markdown document titled Software Requirements Specification, assembled by the bridge from four parts the agent writes plus three pieces the bridge writes itself:
| Order | Section | Written by |
|---|---|---|
| 1 | Title block: project, client, version, date | Bridge |
| 2 | 1. Introduction, 2. Overall Description, 3. External Interface Requirements, 4. Non-Functional Requirements | Agent, part 1 |
| 3 | 5. System Features: one sub-section per feature (FEAT-01 …) | Agent, part 2 |
| 4 | Requirements Catalogue: Functional Requirements, then Non-Functional Requirements and Constraints, each a table of id, requirement, priority, feature and acceptance criteria | Bridge |
| 5 | 6. Use Cases and 7. Business Rules | Agent, part 3a |
| 6 | 8. Analysis Models, 9. Project Schedule (omitted when the scope has no dates), 10. TBD List | Agent, part 3b |
| 7 | Version History | Bridge |
The bridge writes the catalogue from the validated requirement data, so every requirement id is in the document by construction and the agent never retypes the rows. The Requirements Catalogue and the Version History are bridge-owned: if you edit the draft, they stay as the bridge wrote them.
Each part must carry its own headings and ids before it is accepted:
| Part | Required headings | Other checks |
|---|---|---|
| 1 | Introduction, Overall Description, External Interface, Non-Functional Requirements | None |
| 2 | System Features | Must cite every feature id and every functional requirement that is not "won't have" |
| 3a | Use Cases, Business Rules | May cite only feature ids that part 2 produced |
| 3b | Analysis Models, TBD | At least 3 Mermaid diagrams. May cite only feature ids that part 2 produced |
Part 3b's diagrams are a use-case overview (flowchart LR), a logical data model (erDiagram) and a key state machine (stateDiagram-v2), plus data-flow and sequence diagrams where they help, and a Gantt chart in the schedule. A scope with more than 25 use cases continues them in part 3b.
The catalogue rows look like this (illustrative values):
| ID | Requirement | Priority | Feature | Acceptance criteria |
|---|---|---|---|---|
| REQ-FUNC-012 | Approve a submitted invoice | must | FEAT-03 | Given a submitted invoice and a signed-in approver, When the approver selects Approve, Then the invoice status is Approved and the approver and time are recorded |
| REQ-NFUNC-004 | Search response time | must | Given 500 concurrent users, When a user searches invoices, Then 95 percent of searches return within 2 seconds |
Several criteria on one requirement are joined with " / ". The Feature cell is empty for non-functional and "won't have" requirements, because only functional requirements are owned by a feature. A non-functional requirement's category (here performance) is kept in the project data, not in a catalogue column.
Before you run it
- The scope must be approved. Until it is,
/srsis locked with "Approve Project Scope to unlock this". If the scope has not been run at all, the step rail says "Run Project Scope first" and the slash menu says "Run /scope first". - The project state must hold the scope document and a project name. If the scope is missing, the run stops with a message that begins "artifacts.scope missing" and ends "run /scope first". A missing project name stops it with "projectName is required in state.json."
- Put the numbers in the scope. The analyst uses only figures the approved scope states. Where the scope names a quality but gives no figure, the requirement is kept and "Target value for <quality> to be confirmed by the client" goes into its assumptions. If you know the response time, the retention period or the availability target, state it in the scope before approving it.
- The agent also receives the approved Scope document exactly as people reviewed and edited it, and treats it as authoritative where it differs from the structured scope data. Fix scope wording before you approve the scope, not after.
- On an existing-system project (or a new system once its repository holds code), the SRS also receives a summary of the indexed repository and a map of its services, data stores and routes, on a first run and on a new version.
How it works
The run has three stages of reasoning. Every agent call has its own checks and, by default, one attempt (the deployment can set 1 to 5).
- Bridge to Project agent: sdlc-business-analyst with the approved scope
- Project agent to Bridge: requirements
- Bridge to Bridge: Validate every requirement against the schema
- par: Compliance check
- Bridge to Project agent: sdlc-compliance-checker with requirements and 8 frameworks
- Project agent to Bridge: compliance flags
- otherwise: Narrative stage 1
- Bridge to Project agent: srs-narrative-writer parts 1 and 2
- Project agent to Bridge: introduction, features and ownership
- Bridge to Bridge: Save requirements and flags to state
- par: Narrative stage 2
- Bridge to Project agent: srs-narrative-writer part 3a with the feature ids
- otherwise:
- Bridge to Project agent: srs-narrative-writer part 3b with the feature ids
- Bridge to Bridge: Assemble and write srs-vN.md
1. Requirements
The sdlc-business-analyst skill receives the approved scope (overview, objectives, in and out of scope, deliverables, stakeholders, timeline, risks, constraints, assumptions, tech stack, delivery model, integrations and non-functional baseline) and returns requirements[]. Each requirement is meant to be atomic and testable, written as "The system shall …", with a MoSCoW priority (must, should, could, won't) and one to four Given/When/Then acceptance criteria. Non-functional requirements carry exactly one category: performance, security, scalability, usability, compliance or availability. A "won't" requirement must carry a deferral reason.
The set is sized to the real scope. A large enterprise scope can yield 30 to 120 requirements, and a small application can correctly yield fewer than ten.
The bridge validates every requirement against the requirement schema. An empty list, or any requirement that fails the schema (a bad id, a missing field, a non-functional requirement with no category, a "won't" with no deferral reason), is sent back as a correction. The schema also accepts constraint requirements (REQ-CON-NNN), but the analyst skill produces only functional and non-functional ones, so constraints appear in section 2 of the narrative.
2. Compliance flags
The sdlc-compliance-checker skill is given the requirements and every framework definition shipped with Alara Code: AAOIFI, CBUAE 2024, GDPR, ISO 27001, PCI DSS 4, PPRA 2024, SAMA 2024 and SBP 2024. It is told to raise a flag when a keyword from a control appears, case-insensitively, in a requirement's title, description or acceptance criteria. Each flag records the framework, control, triggering requirement, matched keyword, severity and required evidence, with the status "pending-review". There is at most one flag per framework, control and requirement. Requirements that triggered a flag are tagged with the frameworks that apply.
Zero flags is a valid result for an unregulated project. The reply is validated against the compliance schema. This check runs alongside narrative stage 1, and the requirements and flags are saved to the project state only once both are in. Flags are appended to any earlier ones, never replaced.
3. The narrative, in four parts
The sdlc-srs-narrative-writer skill is called four times, two at a time:
- Stage 1: parts 1 and 2 in parallel. Part 2 also returns the feature list: each feature's id, name, description, owned requirement ids, related requirement ids and primary actors.
- The ownership check: every functional requirement that is not "won't have" must be owned by exactly one feature, none left unowned and none owned twice.
- Stage 2: parts 3a and 3b in parallel, after stage 1 has finished. They receive the list of real feature ids, because every use case must name the feature it belongs to.
Each part has its own correction loop. A part that fails is sent back alone, with its own reply and the located problems, so a correct part is never written again. These are document checks, not stops: when a part's attempts run out, it is kept with the problems attached, and the reviewer sees them. Only a part that comes back empty, or a reply that can never be read, stops the step.
The run panel shows: Checking project state, Extracting requirements, Validating requirements, Running the compliance check, Persisting to project state, Writing the narrative, Assembling the document, Writing the Markdown document. The compliance check and the narrative run side by side, so the first rows can finish in a different order from the list.
Ids this step owns
| Id | Meaning |
|---|---|
REQ-FUNC-NNN | A functional requirement. |
REQ-NFUNC-NNN | A non-functional requirement, with a category. |
REQ-CON-NNN | A constraint requirement (accepted by the schema, not produced by the analyst). |
FEAT-NN | A system feature. It owns a partition of the functional requirements. |
UC-NN | A use case, tied to one feature. |
BR-NN | A business rule. |
Requirement ids are zero-padded and sequential per type. On a new project version, the analyst keeps every existing id, never renumbers or reuses one, and gives anything new the next free id.
Reviewing it
This is the most consequential review in the pipeline, because every later document is built on these requirements. The SRS finishes as Awaiting your review, and /tad stays locked until you approve it.
A good result has these signs:
- Each requirement is one thing, in the form "The system shall …", with no words such as "user-friendly", "fast", "robust" or "and/or".
- Every non-functional requirement states a measure, a number with units and the conditions, or says in its assumptions that the client must confirm the target.
- Every acceptance criterion has concrete values and a way to prove it. Rules, validation and integrations have an error-path criterion as well as a success one.
- Every feature owns at least one requirement, and every use case names its feature, its requirements and an exception flow.
- Sign-in, sessions, password reset and notification delivery appear as Poly-X interfaces, never as a login or mail sender the product builds.
- The TBD List holds the questions the scope really left open, each with an owner.
Check that:
- every in-scope item from the scope is covered by requirements, and nothing was added that the scope does not support;
- priorities are right: the design must cover every requirement that is not "won't have", "must" requirements drive the test priorities, and the top "must" requirements become the proposal's win themes;
- acceptance criteria are concrete enough to test;
- the figures come from the scope, not from the agent;
- the compliance flags make sense for your market. A flag is a keyword match, not a finding, and the full assessment comes later in Compliance;
- the feature list partitions the work sensibly, and no actor, system or date appears that your inputs do not mention.
You can edit the draft while it is under review. An edit changes the document text only. The requirement data that later steps read stays as the agent produced it, and later steps treat your edited text as authoritative where it differs. To change a priority, a criterion or an id, use Request changes so the data changes too.
When you approve the SRS, every requirement's status moves from draft to approved.
Request changes sends each of the analyst and the four writers its own previous output and your change list, and each returns only what it changes. A writer part your change does not touch can answer with nothing, and its previous text stands. The compliance check is asked again only if the requirement set changed. The version history row records what changed. Because the agent works from ids, name them:
| What you see | Wording that works |
|---|---|
| Wrong priority | "Change REQ-FUNC-027 to could. Keep its acceptance criteria." |
| A requirement that does two things | "Split REQ-FUNC-009 into one requirement for CSV export and one for PDF export. Keep REQ-FUNC-009 for CSV." |
| Vague criteria | "Rewrite the acceptance criteria of REQ-FUNC-015 with concrete values: the field limits and the exact error message." |
| A quality with no number | "Set REQ-NFUNC-004 to 2 seconds at the 95th percentile with 500 concurrent users." Use a figure the client has given. |
| A missing requirement | "Add a notification requirement: when an invoice is rejected, the submitter is emailed within 5 minutes. Source: SCOPE-007." |
| Something the scope excludes | "Remove REQ-FUNC-033, mobile apps are out of scope, and remove it from FEAT-05." |
| A requirement under the wrong feature | "Move REQ-FUNC-021 from FEAT-02 to FEAT-04." |
| A use case with no failure path | "Add an exception flow to UC-04 for a gateway timeout, branching from step 3." |
| A blank or wrong rule | "Fix the blank statement in BR-001." |
| An open question the scope left | "Add to the TBD List: audit log retention period, owner Compliance Officer." |
| A flag that comes from a passing mention | "Reword REQ-NFUNC-011 so it does not mention card payments, the product does not take them." |
Re-check the parts you did not mention when the draft comes back. If a draft was produced before this per-part revision existed, Request changes runs the whole step again with your change list as additional notes. The same happens if you edited the draft by hand: saving an edit discards the stored reply the patch is applied to, so the next Request changes writes the whole document again from the agent's data and your edit is not kept. Ask for changes first, edit last.
If the fix belongs in the scope (a missing objective, a wrong constraint), the approved scope is read-only. Change it by starting a new version of the pipeline, see How the pipeline works.
How later steps use the SRS
- SRS: REQ ids, FEAT ids, constraints, assumptions, flags to TAD: decisions cite REQ ids
- SRS: REQ ids, FEAT ids, constraints, assumptions, flags to SDS: every requirement mapped to a component
- SRS: REQ ids, FEAT ids, constraints, assumptions, flags to STS: test cases verify REQ ids
- SRS: REQ ids, FEAT ids, constraints, assumptions, flags to Delivery Plan: epics cite REQ ids
- SRS: REQ ids, FEAT ids, constraints, assumptions, flags to Proposal: must and should requirements
- SRS: REQ ids, FEAT ids, constraints, assumptions, flags to Prototype, Threat Model, API Contract, Tasks, Compliance, Traceability
| Step | What it takes from the SRS |
|---|---|
| TAD | The requirements and compliance flags, and the approved SRS text. Every REQ id a decision cites must exist. |
| Prototype | The requirements and the approved SRS text. |
| SDS | The requirements, plus the SRS constraints and assumptions. The coverage check requires each requirement that is not "won't have" (or deferred or rejected) to be implemented by a component and one of its units. "Won't have" requirements are listed as excluded with their deferral reason. |
| Threat Model | The requirements and the compliance flags. |
| API Contract | The approved SRS text. Every id in an operation's x-requirements is checked against it. |
| STS | The requirements. Test priority mirrors MoSCoW (a "must" gets critical or high cases), and coverage is counted per requirement. |
| Delivery Plan | The approved SRS text. Every epic must cite at least one requirement that exists. |
| Proposal | The requirements compliance table covers every "must" and "should" requirement, and the win themes come from the top three "must" requirements. |
| Tasks | The acceptance criteria are copied into the tickets, and each ticket's feature label is the feature that owns most of its requirements. |
| Compliance | Starts from the requirements and the flags, then checks the controls against the design and test documents. |
| Traceability | One row per requirement, with its design components and test cases. |
If you re-run an approved SRS, the requirements are extracted again and their links to design components and test cases start empty. The SDS and the steps after it are flagged stale until each is re-run. See How the pipeline works.
When it fails
| What you see | Why | What to do |
|---|---|---|
/srs locked: "Approve Project Scope to unlock this" | The scope is not approved yet. | Approve the scope. |
| "artifacts.scope missing … run /scope first." | The project state has no scope document. | Run /scope. |
| "projectName is required in state.json." | The project has no name. | Set the project name, then run again. |
| "The agent did not return a usable reply." | No attempt of one call produced readable output. | Run it again. |
| "The agent's reply still fails N check(s) the next step depends on, after M attempt(s)." | The requirements stayed empty or invalid, the compliance reply kept failing its schema, or a narrative part came back empty. | Run it again. The best reply is kept in .sdlc/tmp/business-analyst-last-response.json, compliance-checker-last-response.json or srs-part<N>-last-response.json. |
| A draft with a "problems to fix" panel, and a run message ending "accepted with N unresolved check(s) for the reviewer" | A part missed a heading, left a requirement or feature id uncited, cited a feature id part 2 never produced, had fewer than 3 diagrams, or the ownership check found a requirement unowned or owned twice. | Read the list, then Approve if you accept it or Request changes naming the section or the id. |
Under the hood
- The driver is
bridge/src/services/srsPipeline.service.ts. The part headings and the diagram minimum are inbridge/src/lib/documentSpecs.ts, the correction loop isbridge/src/lib/correctionLoop.ts, and the gate (srsrequires an approved scope) is inbridge/sdlc-engine/lib/sdlc/gate-rules.js. See Document checks and versioning. - Written to the project state:
requirements(with emptytraceForwardlinks for design components, test cases and cost items, filled in by later steps),complianceFlags(appended),systemFeatures, and the SRSconstraintsandassumptionsthat the SDS step reads. Each requirement'sownerFeatureIdis set from the feature list. The state is written once the compliance verdict is in, so a run that fails earlier leaves it untouched. - The document is
.sdlc/artifacts/srs-vN.md, registered asartifacts.srs. The assembled draft is kept in.sdlc/tmp/srs-data.jsonwhile under review, and the replies Request changes revises are kept in.sdlc/tmp/srs-reply.json.