Add use case model, ADR-0001, dictionary update and reviews RC-011 to RC-023

Refs #8
Refs #9
Refs #10
This commit is contained in:
2026-10-13 15:37:50 +08:00
parent ca084c65a0
commit 259d017ad2
30 changed files with 1481 additions and 128 deletions
+86
View File
@@ -0,0 +1,86 @@
# Domain Model
## Metadata
| Key | Value |
| --- | --- |
| ID | DM-001 |
| CrossReference | [UC-001], [UCD-001], [SSD-001], [DICT-001] |
| Language | en |
| Domain | it |
## Version History
| Date | Status | Author | Reviewer | Change | Commit |
| --- | --- | --- | --- | --- | --- |
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | pending |
---
## Purpose and Scope
Covers: [UC-001] Count squirrels by fur colour.
## Diagram
Concepts, attributes and associations only — no operations.
```plantuml
@startuml
class Participant
class "Census file" as CF {
name
}
class "Squirrel sighting" as SS
class "Fur colour" as FC {
name
}
class "Colour count" as CC {
number of sightings
}
class Summary
class "Summary file" as SF {
name
}
Participant "1" --> "1" CF : supplies
CF "1" --> "0..*" SS : contains
SS "0..*" --> "0..1" FC : has
CC "0..*" --> "1" FC : counts sightings of
Summary "1" --> "3" CC : consists of
Summary "1" --> "1" SF : is written to
Participant "1" --> "0..*" Summary : receives
@enduml
```
## Concept Table
| Concept | Definition | Attributes | Source (use case / glossary) |
| --- | --- | --- | --- |
| Participant | The course participant who runs the program | - | [UC-001] primary actor |
| Census file | The file with the 2018 squirrel census | name | [UC-001] step 1, [DICT-001] |
| Squirrel sighting | One recorded observation of one squirrel | - | [UC-001] step 2, [DICT-001] |
| Fur colour | The primary fur colour of a squirrel: Gray, Cinnamon or Black | name | [UC-001] step 2, [DICT-001] |
| Colour count | The number of sightings with one fur colour | number of sightings | [UC-001] step 4, [DICT-001] |
| Summary | The table of colour counts | - | [UC-001] step 3, [DICT-001] |
| Summary file | The file the summary is written to | name | [UC-001] step 1, [DICT-001] |
## Association Table
| From | Association (reading direction) | To | Multiplicity |
| --- | --- | --- | --- |
| Participant | supplies | Census file | 1 to 1 |
| Census file | contains | Squirrel sighting | 1 to 0..* |
| Squirrel sighting | has | Fur colour | 0..* to 0..1 |
| Colour count | counts sightings of | Fur colour | 0..* to 1 |
| Summary | consists of | Colour count | 1 to 3 |
| Summary | is written to | Summary file | 1 to 1 |
| Participant | receives | Summary | 1 to 0..* |
## Generalizations
None.
---
[UC-001]: ./uc.md
[UCD-001]: ../use-case-diagram.md
[SSD-001]: ./ssd.md
[DICT-001]: ../dictionary.md
+57
View File
@@ -0,0 +1,57 @@
# System Sequence Diagram
## Metadata
| Key | Value |
| --- | --- |
| ID | SSD-001 |
| CrossReference | [UC-001] |
| Language | en |
| Domain | it |
## Version History
| Date | Status | Author | Reviewer | Change | Commit |
| --- | --- | --- | --- | --- | --- |
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | pending |
---
## Source Use Case
Count squirrels by fur colour ([UC-001]) — scenario: main success scenario. The alternate flow 1a (census file missing) is the second diagram; flow 2a has no system message of its own.
## Diagram
```plantuml
@startuml
actor Participant as A
participant ":System" as S
A -> S : countByFurColor(censusFile, summaryFile)
S --> A : summary
@enduml
```
```plantuml
@startuml
actor Participant as A
participant ":System" as S
A -> S : countByFurColor(censusFile, summaryFile)
S --> A : censusFileMissing
@enduml
```
## System Operations
| Step | Message | Parameters | Return | Use case step |
| --- | --- | --- | --- | --- |
| 1 | countByFurColor | censusFile, summaryFile | summary (colour count of each fur colour) | 1 (input), 2 (count), 3 (write), 4 (shown to the participant) |
| 1a | countByFurColor | censusFile, summaryFile | censusFileMissing | 1a |
Steps 2 to 4 of the use case are the work of the system inside one operation: the system receives one message and returns one result, so one message covers steps 1 to 4.
## Lifecycle Notes
The system instance lives for one run of the program; nothing is kept between runs.
---
[UC-001]: ./uc.md
+55
View File
@@ -0,0 +1,55 @@
# Use Case (Brief/Casual/Fully Dressed)
## Metadata
| Key | Value |
| --- | --- |
| ID | UC-001 |
| CrossReference | [UCD-001], [US-001], [SA-001] |
| Language | en |
| Domain | it |
## Version History
| Date | Status | Author | Reviewer | Change | Commit |
| --- | --- | --- | --- | --- | --- |
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | pending |
---
**Format:** Fully Dressed
- **Scope:** Squirrel census program
- **Level:** user-goal
- **Primary Actor:** Participant (as named in [UCD-001])
- **Stakeholders and Interests:**
- S01 — a correct summary that matches the dataset and the assignment
- S02 — a result that is easy to reproduce from the README
- S03 — a program with no runtime dependencies
- **Preconditions:** The participant has the census file.
- **Postconditions (success guarantee):** The summary file exists and holds the colour count of Gray, Cinnamon and Black; the participant has seen the counts.
### Main Success Scenario
1. The participant supplies the census file and the name of the summary file.
2. The system counts the squirrel sightings of each fur colour.
3. The system writes the summary to the summary file.
4. The system shows the participant the colour count of each fur colour.
### Extensions / Alternative Flows
- 1a. The census file does not exist: the system tells the participant that the file is missing and ends without writing a summary.
- 2a. A squirrel sighting has no fur colour: the system leaves it out of every colour count.
### Special Requirements / Business Rules
- Step 2: only the fur colours Gray, Cinnamon and Black are counted; a colour count is the number of sightings with that exact fur colour.
- Step 3: the summary has one row per counted fur colour, in the order Gray, Cinnamon, Black.
### Open Issues
None.
---
[UCD-001]: ../use-case-diagram.md
[US-001]: ../user-stories.md
[SA-001]: ../stakeholder-analysis.md