c_agri_trade/process/.agents/skills/up-srs-derive/SKILL.md

4.0 KiB
Raw Blame History

name description
up-srs-derive Derive system requirements (NFRs, screen-to-system mapping, API/data/integration/validation/audit requirement formats) from the gated functional-requirement set, with every SRS/NFR item explicitly declaring the FR-xxx it derives from. Use this after the architecture spike (up-arch-risk-spike) has validated the highest-risk architecture, and before full HLD/LLD fan-out. This is Stage 8 (Elaboration) of the UP-AI v1.0 Process (process/AI_Native_Unified_Process_v1.md).

up-srs-derive — Stage 8 (Elaboration)

Objective

Derive SRS/NFR requirements from the use-case-owned functional requirements, using standard field-level formats (screen-to-system mapping, API requirement format, data requirement format, integration requirement format, validation and error-handling format, audit requirement format, non-functional requirement format), with a mandatory parent_fr link.

When to invoke

  • After up-arch-risk-spike (Stages 6–7) has produced a validated architecture baseline and service template.
  • When a CR-xxx re-baseline requires re-deriving SRS/NFR for a specific set of affected FRs (scope the run to just those FR-xxx, per the CR's Impact Analysis).

Read first

  • project_sdlc/03_requirements/use_cases/ (all FR-xxx, with parent_uc)
  • architecture_spike_report.md
  • process/AI_Native_Unified_Process_v1.md §5 "Stage 8"

Procedure

For every FR-xxx in scope, derive the applicable system requirements using the standard field formats:

  • Screen-to-system mapping (where the FR involves a UI screen)
  • API requirement format (endpoint-level requirements)
  • Data requirement format (entities, fields, constraints)
  • Integration requirement format (trigger, data sent, data received, failure expectation)
  • Validation and error-handling format
  • Audit requirement format
  • Non-functional requirement format (performance, security, scalability, availability — cross-cutting, may apply across multiple FRs)
  • Unified RBAC + ABAC + FSM State Authorization Matrix: Author project_sdlc/04_architecture_design/security/auth_matrix.yaml (following process/templates/auth-matrix.template.yaml). For every action and entity, specify:
    1. allowed_roles and explicit forbidden_roles (Negative SoD boundaries).
    2. allowed_fsm_states (FSM lifecycle guards).
    3. abac_predicates (tenant matching, geographic/yard boundaries, monetary threshold limits).
    4. enforcement bindings (API endpoint, backend permission scope, UI route, UI control selector).

Mandatory field: every SRS-xxx/NFR-xxx record must declare parent_fr: FR-xxx explicitly. An SRS/NFR requirement with no parent_fr is not a valid output (cross-cutting NFRs may declare multiple parent_fr values, or parent_fr: cross-cutting with an explicit scope note — but never omit the field).

Rules:

  • Do not invent NFRs not implied by an FR, a BRD constraint, or an explicit architectural decision (DEC-xxx) from the Stage 7 spike.
  • Where an FR's screen/data/integration needs are ambiguous, log AMB-xxx rather than guessing a format value.
  • The auth_matrix.yaml is the single authoritative source of truth for authorization across UI, API, database, and test models.

Output expected

project_sdlc/03_requirements/SRS-xxx_*.md (or scoped per-FR SRS sections within the use case's own folder), each declaring parent_fr; baselined project_sdlc/04_architecture_design/security/auth_matrix.yaml.

Exit criteria

Every FR in scope has at least one derived SRS/NFR requirement declaring its parent FR; auth_matrix.yaml is baselined and validated for all in-scope entities and operations. This is checked by up-traceability-gate (Gate 9.1) together with HLD/LLD linkage.

Sample invocation

"Run up-srs-derive for all FR-xxx under UC-001 (User Identity and Role Governance) — apply the integration requirement format for the Identity Provider / OIDC touchpoints specifically."

Previous: up-arch-risk-spike (Stage 7). Next: up-hld-lld-generate (Stage 9), then up-traceability-gate (Gate 9.1).