Guide

Requirements specification with the HANSA method: 2026 update

A HANSA specification has five parts. This guide describes how to fill in each of them using version 5 of the template, what has changed since 2021, and how to check a finished document with a checklist.

Author
Piotr Miklosik
Published
Updated
Reading time
13 min

Introduction

Dear reader, in 2021 I described the HANSA method on our blog, my approach to writing software requirements specifications. Since then the specification template has reached version 5. This article is a shorter, updated version of that text.

The basic concept has not changed. The specification still has five parts, and the first letters of their names spell the name of the method. The part names are Polish, so the English meaning follows each one:

  • H: Historia (History)
  • A: Aktorzy i obiekty (Actors and objects)
  • N: Narysuj! (Draw it!)
  • S: Specyfikacja funkcji (Specification of functions)
  • A: Aspekty jakości (Aspects of quality)

In this text you will learn:

  • what each of the five parts of the specification is for,
  • how to fill in each section according to the new template,
  • what has changed in the method since 2021,
  • how to verify a finished specification with a checklist.

If you are here only for the specification template with examples, you will find it in the attachments below the text. The template is in Polish.

Requirements specification and the HANSA method

The purpose of a specification is to describe how the software that a client wants to order from us should work. It is read both by the client, who orders and accepts the system on its basis, and by the IT team that will build it.

To the question of how detailed a specification should be, I still answer “it depends”. It depends, among other things, on whether the client knows well what they expect, whether they are ready to spend time on requirements analysis and pay for it, and how many changes we expect during the project. The less certainty there is in these matters, the lighter and faster to prepare the documentation we want to create.

In the previous version of this article I wrote that a lighter specification is achieved by removing sections that are not essential and by choosing the simplest ways of describing requirements. In the new template both decisions have already been made. Each section has one form of notation, a short instruction on how to fill it in, and an example about an online store.

I still believe that a client has a chance to read a short specification from cover to cover and understand it, and that is what we are after.

Before we go through the individual sections, here is a diagram of the whole specification.

HANSA specification diagram: five sections (History, Actors and objects, Draw it!, Specification of functions, Aspects of quality) and an attachment

HANSA specification diagram: 5 sections and an attachment

1. Historia (History)

History is an introduction for someone who did not take part in the discussions and has no prior knowledge of the system. After reading it, such a person should understand what concept is behind the software and what the scope of work is.

We begin the section with a description of the system, which should take half a page, one page at most. Then we briefly name the target audience, that is, the types of users who will use the system and benefit from it.

The third element is the expected business benefits. We write each benefit in one sentence and give it a number (G01, G02 and so on). The benefits help us understand why the client is carrying out the project, but achieving them is not a condition for accepting the software. Acceptance is based on the functional and non-functional requirements.

History closes with business processes, which show “from a bird’s-eye view” how the system will be used. We write a process as a numbered list of 5 to 10 steps with no branching. A step marked [S] happens in the system and has its requirement in section 4. A step marked [-] happens outside the system and only helps us understand the business needs better. An example step of the sales process looks like this in the template:

3. [S] The customer logs in, selects a product and adds the chosen quantity to the cart (KL.US1).

The code in brackets points to the requirement that describes this step in detail.

2. Aktorzy i obiekty (Actors and objects)

This section is meant to show who will operate on what in the system.

First we describe the actors, that is, users or other systems that actively take part in the activities. An actor is, for example, an online store customer, the store administrator or a warehouse worker, but also an external payment system. Each actor gets a code of 2-3 letters (for example KL for the customer), a short description, a scope of responsibility and a list of attributes. The actor code is important because it starts the identifiers of all of that actor’s requirements in section 4.

I still recommend keeping the same names throughout the specification and not writing “customer” once and “buyer” another time when we mean the same actor. A specification is not an essay for a language class, so repeating the same terms makes sense here.

Next we describe the business objects, that is, sets of data that matter for operations in the system, for example products, orders or payments. Each object has an identifier (O01, O02 and so on), a short description, relations to actors and other objects, and a list of attributes. There is no point in describing all the information the system will store (this is not a database schema!). We describe only the objects that are needed to understand the functional requirements.

3. Narysuj! (Draw it!)

A more formal name for this section is the context diagram, a concise graphical representation of the system and its actors. The diagram should make everyone who looks through the specification understand what it is about and, in general terms, how the system is supposed to work. Sometimes it is the only element of the specification that the reader looks at carefully.

In the new template we do not draw the diagram by hand. It is created from the list of actors in section 2 and written as text in Mermaid notation, which any Mermaid viewer turns into an image. The system is a single rectangle on the diagram, each actor is a node, and each arrow has a short label. We include the image in the specification together with its source, which looks like this in the template:

flowchart LR
  KL([KL Klient]) -->|przegląda produkty, składa zamówienia| SYS[Sklep internetowy]
  AD([AD Administrator sklepu]) -->|zarządza produktami| SYS
  MA([MA Magazynier]) -->|wysyła opłacone zamówienia| SYS
  SYS -->|żądanie płatności| SP[[SP System płatności]]
  SP -->|potwierdzenie płatności| SYS

And the diagram itself, in a simplified form, can look like this:

Context diagram of an online store generated from Mermaid code: the actors Customer, Store administrator and Warehouse worker and the payment system connected by arrows to the Online store system

Generated context diagram

With a little help from your favorite AI model, we can also generate a “prettier” version from the code. It presents the same information but looks more attractive.

The same online store context diagram in a version improved visually by an AI model, with the same actors and arrows

Generated context diagram: visually improved by AI

The diagram must be simple and fit on one screen. If it has more than eight nodes, the actors should be grouped.

4. Specyfikacja funkcji (Specification of functions)

This section is the core of the document, because it describes all the functions of the system that the client needs and that the team will have to deliver.

In the previous version of the article I presented three forms of writing functional requirements: the descriptive form, user stories and use cases. In the new template one of them remains. Every functional requirement is a user story, that is, one sentence containing an actor, an action and a reason:

As a <actor>, I want <action> so that <reason>.

The weakness of this form was the lack of detail. That is why under each sentence we write acceptance criteria, a few short points that let us check whether the requirement has been met. An example from the template:

KL.US2: As a Customer, I want to pay for the order online so that the store can ship it.

  • payment in an external payment system (SP)
  • order confirmed after the payment is confirmed
  • warehouse worker notified with the shipping address

We group user stories by actor. The requirement identifier consists of the actor code and a number, so KL.US2, for example, is the customer’s second requirement. A number, once assigned, is never changed or reused. External systems have no user stories of their own, because their behavior is described by the requirements of the users who use those systems.

As before, functional requirements describe only what the system should do. How it should do it is the subject of section 5.

5. Aspekty jakości (Aspects of quality)

The last section covers non-functional requirements, that is, everything that is not a function of the system but still matters to the client, for example speed, security or usability of the interface. Identifying these requirements is sometimes harder than for functional ones, because the analyst has to make the client aware of what they need in terms of quality. Without such agreements, problems appear at acceptance, because the client “thought it would work faster”.

The ISO/IEC 25010 standard helps with identifying requirements. Its 2023 edition lists nine quality characteristics, and each of them has its own subsection in the template. They are: functional suitability, performance efficiency, compatibility, interaction capability, reliability, security, maintainability, flexibility and safety. If a characteristic does not apply to the system, we write “not applicable” and give the reason.

Each non-functional requirement has an identifier (NFR01, NFR02 and so on) and a priority written in brackets: (H) high, (M) medium or (L) low.

When writing these requirements I still follow the SMART rule, and I consider measurability its most important part. A requirement such as “the product list should load quickly” cannot be verified unambiguously, which leads to discussions with the client at acceptance. The same requirement formulated in a measurable way looks like this in the template:

NFR01: The product list and the cart page load in at most 2 seconds for 95% of requests with 100 concurrent users; measured in the test environment before acceptance. (H)

Attachment: change history

An attachment with the change history has been added to the five parts of the specification. In the previous version of the article I wrote that the documentation would change both before the project starts and during its course, but I did not describe how to record those changes.

In the new template, each version of the specification and each accepted change has one entry in the attachment, with the newest entries at the top. A change reported during the project is entered as “proposed”. It changes the requirements and the version number only after the client accepts it. A removed requirement stays in the document with the status “withdrawn”.

What has changed since 2021

The five parts of the method and their order stay the same. What has changed is the way of writing in individual sections:

  • The subsections of History are no longer optional. The target audience, the expected business benefits and the business processes are now permanent elements of the template.
  • Business benefits have numbers, and each one takes one sentence.
  • A business process is written as a list of steps marked [S] and [-]. Before, it was a cause-and-effect description or a use case at the business level.
  • Actors and objects have codes and identifiers that the other sections refer to.
  • The context diagram is created from the list of actors as text in Mermaid notation and no longer contains business objects.
  • The section with modules is gone from the template. Already in 2021 I wrote that I usually skip it.
  • Functional requirements have one form of notation instead of three to choose from. It is the user story with acceptance criteria.
  • Functional requirement identifiers consist of the actor code and a number (for example KL.US1 instead of FR1) and never change.
  • Non-functional requirements are grouped by the nine characteristics of ISO/IEC 25010:2023, whereas earlier I wrote about eight areas. Each requirement has a priority, but we do not record a delivery date for it, because the specification contains no stages or work plan.
  • The change history is a new attachment.
  • The checklist is a new element of the method, and I describe it in the next section.

Fixed identifiers and the change history make it possible to version requirements when the specification changes during the project. In turn, a single form of writing requirements and a diagram stored as text mean that the specification can be handed to AI tools as a pattern for coding.

Checklist

All right, but once we have a specification, how do we know whether it is complete? We don’t, but we can check whether it lacks anything important and obvious.

The “checklist” I present below is a simple algorithm I prepared to make it easier to check what we may have missed while writing the requirements specification.

The algorithm consists of seven questions that we ask in order and answer “yes” or “no”. If the answer is “yes”, we move on to the next question. If it is “no”, we first add the missing element to the specification and only then go further.

The order of the questions is not accidental. We start with business processes, because the actors, objects and functions of the system follow from them. Thanks to this, whatever we add in an earlier step is checked in the later ones. For example, an actor added in step 2 must have functional requirements in step 5, and an object added in step 3 is checked for CRUD operations in step 6.

The whole algorithm as a process looks like this:

HANSA checklist as a process: seven control questions asked in order, and a step that completes the specification when the answer is “no”

HANSA checklist as a process

What we check in the following steps

  1. Business processes and client goals. We take the list of expected business benefits (G01, G02 and so on) and check whether each of them is realized by at least one business process. In the template, each process lists the goals it refers to (for example “Goals: G01, G02”), so it is enough to go through the numbers. If a goal does not appear in any process, we extend the existing processes or add a new one.
  2. Actors from business processes. We read the processes step by step and list everyone who appears in them, both users and external systems. Each of them should be described in section 2 and have a code, a scope of responsibility and attributes there. In the sales process from the template we have the Customer, the Store administrator, the Warehouse worker and the Payment system, so we look for these four actors in section 2. If someone is missing, we add them.
  3. Objects from business processes. We do the same with business objects. In the steps of the process we look for the data the actors operate on, for example a product, an order or a payment, and check whether each of these objects is described in section 2. If not, we add the missing object.
  4. System functions from business processes. Every step of a process that happens in the system (marked [S]) should have its functional requirement in section 4. In the template this is visible at once, because a step marked [S] has a requirement identifier in brackets, for example KL.US1. So we check whether every [S] step has such an identifier and whether a requirement with that identifier really exists. If not, we add the missing functional requirements.
  5. Scope of responsibility of actors. We go back to section 2 and read the scope of responsibility of each actor. Every activity on this list should be covered by at least one functional requirement of that actor. For example, the Warehouse worker’s scope of responsibility includes marking orders as shipped, and the requirement MA.US1 corresponds to it. If an activity has no requirement, we add one.
  6. CRUD operations on objects. For each business object we check whether the functional requirements allow us to create, read, update and delete it (Create, Read, Update, Delete). If an operation is missing, we ask ourselves an additional question: is the omission intentional? It may turn out that it is, because, for example, we deliberately do not plan to delete orders. If, however, the omission is an oversight, we add the missing operations.
  7. Non-functional requirements and the ISO/IEC 25010 standard. Finally we go through the list of quality characteristics from the standard and check whether each of them is covered in section 5. In the template each of the nine characteristics has its own subsection, so it is enough to check that each one contains at least one requirement or a “not applicable” entry with the reason. If not, we add the missing non-functional requirements.

The same checklist can be shown in another way. The figure below shows which sections of the template we compare at each question:

HANSA checklist with dependencies between template sections: columns correspond to sections, a dot marks the starting section and an arrow marks the section where we look for coverage

HANSA checklist with dependencies between sections

The columns of the figure correspond to the sections of the template. A dot marks the section we start checking from, and an arrow points to the section where we look for coverage. The context diagram (section 3) has no question of its own, because it is created from the list of actors.

Passing the checklist does not yet mean the specification is complete. It does mean that the individual sections are consistent with each other and that we have not missed anything obvious.

Summary

The most important points about this kind of documentation are:

  • a specification is for the client and for the IT team,
  • the time spent on preparing it should match the client’s involvement, including financial involvement,
  • the documentation must be understandable and readable, so the KISS (Keep It Simple, Stupid!) rule applies,
  • the introduction and the context diagram should be understandable even to someone who hears about the project for the first time,
  • we adapt the template to the needs of the project and do not stick to it “at all costs”,
  • requirements will change, and the place to record these changes is the change history,
  • a finished specification is worth checking with the checklist.

Piotr “Hans” Miklosik

Attachments and sources

Downloads

The template is in Polish.

Next step

Have an idea for an IT project? Let's talk.

Forty-five minutes with an analyst often tells you more than ten quotes from the internet. No sales presentations and nothing to sign.