@hippo-digital/hippocampus 2.7.2 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +5 -4
  3. package/agents/knowledge-builder.md +2 -0
  4. package/agents/workflow-orchestrator.md +2 -0
  5. package/assets/dist/hippocampus.css +1 -1
  6. package/assets/hippocampus.scss +124 -0
  7. package/bin/hippocampus.js +1 -0
  8. package/docs/add-project-context.md +8 -2
  9. package/docs/ask-whats-already-known.md +6 -2
  10. package/docs/check-for-unintended-consequences.md +7 -2
  11. package/docs/data-and-governance.md +6 -2
  12. package/docs/describe-the-context-of-use.md +134 -0
  13. package/docs/design-actions-and-decisions.md +8 -3
  14. package/docs/hippocampus-for-designers-and-researchers.md +98 -220
  15. package/docs/hippocampus-technical.md +16 -0
  16. package/docs/human-centred-design.md +165 -0
  17. package/docs/import-a-research-round.md +9 -2
  18. package/docs/link-insights-to-needs.md +6 -2
  19. package/docs/record-a-usability-test.md +118 -0
  20. package/docs/record-design-principles.md +76 -0
  21. package/docs/research-knowledge-graph.md +25 -6
  22. package/docs/review-and-promote-a-draft.md +7 -2
  23. package/docs/set-quality-objectives.md +87 -0
  24. package/docs/source-model.md +104 -23
  25. package/docs/start-here.md +67 -34
  26. package/docs/turn-personas-into-users-and-needs.md +9 -2
  27. package/docs/weigh-options-against-requirements.md +96 -0
  28. package/docs/write-requirements.md +161 -0
  29. package/lib/breadcrumb.js +67 -14
  30. package/lib/create-router.js +125 -2
  31. package/lib/docs.js +28 -4
  32. package/lib/flow-map.js +15 -4
  33. package/lib/hcd-views.js +362 -0
  34. package/lib/known.js +5 -2
  35. package/lib/lint-knowledge.js +170 -1
  36. package/lib/load-knowledge.js +128 -5
  37. package/lib/record-links.js +11 -2
  38. package/lib/schema.js +190 -4
  39. package/lib/tidy-principles.js +112 -0
  40. package/package.json +1 -1
  41. package/scripts/import-design-actions.js +11 -2
  42. package/scripts/init.js +19 -0
  43. package/scripts/migrate-knowledge.js +9 -1
  44. package/scripts/smoke-routes.js +12 -1
  45. package/scripts/tidy-principles.js +68 -0
  46. package/skills/COVERAGE-MATRIX.md +2 -0
  47. package/skills/README.md +5 -0
  48. package/skills/SKILL-FORMAT.md +1 -1
  49. package/skills/add-scenario/SKILL.md +5 -1
  50. package/skills/add-user-needs/SKILL.md +11 -1
  51. package/skills/create-journey-from-scenario/SKILL.md +5 -2
  52. package/skills/ingest-research-round/SKILL.md +3 -3
  53. package/skills/ingest-user-personas/SKILL.md +24 -7
  54. package/skills/map-research-to-graph/SKILL.md +7 -5
  55. package/skills/record-design-decision/SKILL.md +1 -0
  56. package/skills/review-research-import-draft/SKILL.md +7 -1
  57. package/skills/skills.json +54 -1
  58. package/skills/structure-research-draft/SKILL.md +12 -2
  59. package/skills/weigh-options-against-requirements/SKILL.md +60 -0
  60. package/skills/write-requirements/SKILL.md +69 -0
  61. package/views/hippocampus/_layout.html +15 -12
  62. package/views/hippocampus/components/_activity.njk +36 -0
  63. package/views/hippocampus/components/_journey-step.njk +30 -0
  64. package/views/hippocampus/context.html +197 -0
  65. package/views/hippocampus/design.html +128 -0
  66. package/views/hippocampus/evaluation.html +119 -0
  67. package/views/hippocampus/index.html +57 -11
  68. package/views/hippocampus/journey.html +25 -1
  69. package/views/hippocampus/journeys.html +3 -0
  70. package/views/hippocampus/plan.html +64 -0
  71. package/views/hippocampus/requirements.html +94 -0
  72. package/views/hippocampus/research.html +20 -1
  73. package/views/hippocampus/scenarios.html +3 -0
  74. package/views/hippocampus/user.html +43 -3
@@ -0,0 +1,118 @@
1
+ ---
2
+ section: evaluation
3
+ order: 10
4
+ audience: [viewer, cli]
5
+ summary: Bring a usability test into the knowledge base - its method, its findings rated by severity with the positive ones kept, and which requirements it showed were met.
6
+ ---
7
+ # Record a usability test
8
+
9
+ Evaluation is the activity that tells a team whether the design works. A
10
+ usability test watches representative users try real tasks with a design; an
11
+ inspection has an expert check it against principles. Both produce findings,
12
+ and findings are what say whether a requirement is met.
13
+
14
+ This is the fifth activity. The viewer brings it together at
15
+ `/hippocampus/evaluation`.
16
+
17
+ ## Import the round as usual
18
+
19
+ A usability test is a research round. Bring its report in the same way as any
20
+ other: [Import a research round](import-a-research-round.md), then
21
+ [Review a draft and promote it](review-and-promote-a-draft.md).
22
+
23
+ While reviewing the draft, add three things the importer cannot know.
24
+
25
+ ### 1. How the round was run
26
+
27
+ ```json
28
+ "methods": ["usability-test"]
29
+ ```
30
+
31
+ Add `interview` as well when sessions included one. The method decides which
32
+ activity page lists the round: only `usability-test`, `usability-inspection`
33
+ and `preference-test` rounds appear under Evaluation.
34
+
35
+ An interview or focus group cannot evaluate a design, however many people
36
+ say they like it. It records what people say; a usability test records what
37
+ they do.
38
+
39
+ ### 2. Each finding's polarity and rating
40
+
41
+ On each insight:
42
+
43
+ ```json
44
+ "polarity": "problem",
45
+ "rating": "major",
46
+ "qualityDimension": "efficiency"
47
+ ```
48
+
49
+ `polarity` is `problem`, `positive` or `observation`. **Record the positive
50
+ findings.** What works is what the next change breaks if nobody wrote it down.
51
+
52
+ `rating` follows the CPUX-F scale:
53
+
54
+ | Rating | Means |
55
+ | --- | --- |
56
+ | `positive` | Something that worked, or that participants liked |
57
+ | `minor` | Noticeable delay or minor dissatisfaction |
58
+ | `major` | Substantial delay or moderate dissatisfaction |
59
+ | `critical` | Participants gave up, or substantial dissatisfaction, or a risk of minor harm |
60
+ | `catastrophic` | A risk of major harm to the user or the organisation |
61
+
62
+ **Catastrophic is not the research team's call alone.** Record who agreed it in
63
+ `signedOffBy` - in an NHS service, normally the clinical safety officer.
64
+ `npx hippocampus validate` warns about a catastrophic finding with nobody
65
+ recorded.
66
+
67
+ Rate from the participant's point of view, not the team's. A finding is minor
68
+ because of what it did to the person using the design, not because it is quick
69
+ to fix.
70
+
71
+ ### 3. Where it was seen
72
+
73
+ Link a finding to the screen it was seen on:
74
+
75
+ ```json
76
+ { "id": "rel-finding-on-results", "from": "insight-truncation-misread", "type": "observed-on", "to": "screen-search-results" }
77
+ ```
78
+
79
+ The evaluation page then lists the screens with the most findings.
80
+
81
+ ## Say which requirements it evaluated
82
+
83
+ This is the step that closes the cycle. For each requirement the test checked,
84
+ link the requirement to the finding, with what it showed:
85
+
86
+ ```json
87
+ {
88
+ "id": "rel-req-partial-results-verified",
89
+ "from": "req-q-recognise-partial-results",
90
+ "type": "verified-by",
91
+ "to": "insight-truncation-misread",
92
+ "outcome": "fails",
93
+ "note": "4 of 6 participants read a truncated list as complete."
94
+ }
95
+ ```
96
+
97
+ `outcome` is `meets`, `partly` or `fails`. When a requirement has been tested
98
+ more than once, the most recently added link is the one shown.
99
+
100
+ ## In the viewer
101
+
102
+ `/hippocampus/evaluation` shows:
103
+
104
+ - **every user requirement against what was found**: met, partly met, failed,
105
+ or not evaluated. A requirement nobody has evaluated is a hope about the
106
+ design.
107
+ - **findings by rating**, worst first, with positive findings kept, and any not
108
+ yet rated listed separately
109
+ - **where findings were seen**: the screens they were observed on
110
+ - **the evaluation rounds**, with their methods
111
+
112
+ `/hippocampus/research?method=usability-test` lists every round run that way.
113
+
114
+ ## Then go round again
115
+
116
+ A failed requirement sends the team back to the context of use or the design:
117
+ was the requirement wrong, or the design? Record the answer as a design action
118
+ responding to the finding, so the next round of options starts from it.
@@ -0,0 +1,76 @@
1
+ ---
2
+ section: design
3
+ order: 20
4
+ audience: [viewer, cli]
5
+ summary: Keep the principles a design follows - interaction principles, heuristics, design system rules, and the team's own - as principles rather than evidence.
6
+ ---
7
+ # Record design principles
8
+
9
+ A principle is a choice about how to design. "A search that could not run must
10
+ not report that nobody was found" is one. So are ISO 9241-110's interaction
11
+ principles, a design system rule, or a pattern the team has adopted.
12
+
13
+ This is part of **Design**, the fourth activity. The viewer lists principles at
14
+ `/hippocampus/design`.
15
+
16
+ ## Why not evidence
17
+
18
+ Before principles were their own record, the only place to put one was
19
+ evidence, with a `sourceType` saying "design principle". That made every journey
20
+ step citing it look better supported by research than it was. A principle is a
21
+ decision the team made, not something learned about users.
22
+
23
+ ## Record one
24
+
25
+ In `hippocampus/source/principles.json`:
26
+
27
+ ```json
28
+ {
29
+ "id": "principle-could-not-run-is-not-nobody",
30
+ "kind": "design-principle",
31
+ "title": "Could not run is not nobody",
32
+ "statement": "A search that could not run must not report that nobody was found.",
33
+ "source": "Round 16 design session"
34
+ }
35
+ ```
36
+
37
+ | `kind` | For |
38
+ | --- | --- |
39
+ | `design-principle` | One the team arrived at |
40
+ | `interaction-principle` | ISO 9241-110's seven: suitability for the task, self-descriptiveness, conformity with expectations, learnability, controllability, use error robustness, user engagement |
41
+ | `heuristic` | A general rule of thumb used in inspection |
42
+ | `ui-guideline` | A design system or style guide rule |
43
+ | `design-pattern` | A reusable solution to a recurring problem |
44
+
45
+ Say where it applies:
46
+
47
+ - a journey step lists it in `principleIds`
48
+ - a screen, requirement, decision or journey links to it with
49
+ `applies-principle`
50
+
51
+ ## Move principles out of evidence
52
+
53
+ If your knowledge base already has principles filed as evidence,
54
+ `npx hippocampus validate` warns about them. To move them:
55
+
56
+ ```bash
57
+ npx hippocampus tidy principles
58
+ ```
59
+
60
+ It shows what it would do and writes nothing. Each principle moves to
61
+ `principles.json` with a `principle-` id; journey steps cite it under
62
+ `principleIds` instead of `evidenceIds`; a screen, requirement, decision or
63
+ journey that used it as evidence applies it instead.
64
+
65
+ **It leaves a principle where it is when it is the only evidence a need or step
66
+ cites**, and names that need or step. Moving it would leave the record citing
67
+ nothing, and the honest fix is to find the research behind it, not to hide the
68
+ gap.
69
+
70
+ When the plan is right:
71
+
72
+ ```bash
73
+ npx hippocampus tidy principles --apply
74
+ npx hippocampus validate
75
+ git diff hippocampus/source
76
+ ```
@@ -96,13 +96,29 @@ Supported relationship types currently include:
96
96
  - `resolves-action` (decision -> design action)
97
97
  - `leads-to-action` (legacy direction, no longer emitted)
98
98
 
99
- Validation checks that every `from` and `to` points to a known entity.
99
+ The requirements layer adds eight more, each pointing from the record that depends:
100
+
101
+ - `derives-from` (requirement -> need)
102
+ - `based-on-insight` (requirement -> insight)
103
+ - `constrained-by` (requirement -> organisational requirement)
104
+ - `refines-objective` (requirement -> quality objective)
105
+ - `verified-by` (requirement -> insight, with an `outcome`)
106
+ - `weighed-against` (decision -> requirement, with an `outcome`)
107
+ - `applies-principle` (screen, requirement, decision or journey -> principle)
108
+ - `observed-on` (insight -> screen)
109
+
110
+ A relationship may carry `outcome` (`meets`, `partly`, `fails`, `not-assessed`) and `note`. The [Source model](source-model.md#relationship-map) has the full table.
111
+
112
+ Validation checks that every `from` and `to` points to a known entity, and that the eight requirements-layer types run between the right kinds of record.
100
113
 
101
114
  ## Frontend Views
102
115
 
103
116
  Key routes:
104
117
 
105
118
  - `/hippocampus`
119
+ - `/hippocampus/plan`, `/hippocampus/context`, `/hippocampus/requirements`, `/hippocampus/design`, `/hippocampus/evaluation` - the five activities
120
+ - `/hippocampus/requirements/:id`, `/hippocampus/principles/:id`, `/hippocampus/decisions/:id`, `/hippocampus/goals/:id`, `/hippocampus/objectives/:id`
121
+ - `/hippocampus/research?method=:method`
106
122
  - `/hippocampus/users/:userId`
107
123
  - `/hippocampus/graph`
108
124
  - `/hippocampus/evidence/:evidenceId/impact`
@@ -113,11 +129,13 @@ Key routes:
113
129
  - `/hippocampus/journeys/:journeyId/flow`
114
130
  - `/hippocampus/journeys/:journeyId/handover`
115
131
 
116
- The policy administrator example is useful for checking the graph:
132
+ In this repository's demo, the allergy review slice uses every record type and is useful for checking the graph:
117
133
 
118
- - `/hippocampus/users/policy-administrator`
119
- - `/hippocampus/journeys/policy-household-eligibility`
120
- - `/hippocampus/evidence/evidence-policy-administrators-scenario-map/impact`
134
+ - `/hippocampus/users/clinician-reviewer`
135
+ - `/hippocampus/journeys/allergy-review`
136
+ - `/hippocampus/requirements/req-recognise-severe-allergy`
137
+ - `/hippocampus/design#options`
138
+ - `/hippocampus/evidence/evidence-clinical-risk/impact`
121
139
 
122
140
  ## Project Context Import Flow
123
141
 
@@ -328,7 +346,8 @@ hippocampus/imports/research/batches/<batch-id>/drafts/
328
346
 
329
347
  Before promotion, check:
330
348
 
331
- - Does the `researchRounds` record describe the round correctly?
349
+ - Does the `researchRounds` record describe the round correctly? Add `methods` - the importer cannot tell an interview from a usability test, and the method decides whether the round counts as evaluation.
350
+ - For a usability test, is each insight marked `polarity` and `rating`? See [Record a usability test](record-a-usability-test.md).
332
351
  - Are participant labels and roles useful?
333
352
  - Are insights genuine research findings rather than slide headings?
334
353
  - Are design actions phrased as concrete design work?
@@ -1,6 +1,6 @@
1
1
  ---
2
- section: recipes
3
- order: 30
2
+ section: context
3
+ order: 40
4
4
  audience: [viewer, cli]
5
5
  summary: Check an imported draft against the research it came from, then add it to the knowledge base. This is the only step that changes the record.
6
6
  ---
@@ -11,6 +11,11 @@ actions to the knowledge base, in `hippocampus/source/`. It is the only step in
11
11
  bringing research in that changes the record, and it only happens when a person
12
12
  runs it. Review the draft first.
13
13
 
14
+ While reviewing, add what the importer cannot know: the round's `methods`, and
15
+ for a usability test each finding's `polarity` and `rating`. Both are easier to
16
+ add to the draft than to the record afterwards. See
17
+ [Record a usability test](record-a-usability-test.md).
18
+
14
19
  ## Who this is for
15
20
 
16
21
  - **The reviewer**, usually the researcher who ran the round. You read the
@@ -0,0 +1,87 @@
1
+ ---
2
+ section: plan
3
+ order: 20
4
+ audience: [viewer, cli]
5
+ summary: Write down what the service must achieve for the people who use it - for usability, accessibility, experience and safety from harm - and make each one measurable.
6
+ ---
7
+ # Set quality objectives
8
+
9
+ A quality objective says what the service must achieve for the people who use
10
+ it. It is set while planning, before most of the research, so it is a
11
+ well-informed guess - and it is refined as research comes in.
12
+
13
+ This is part of **Plan**, the first activity. The viewer shows objectives at
14
+ `/hippocampus/plan`.
15
+
16
+ ## Why write them down
17
+
18
+ Without them, "is the design good enough?" has no answer anyone agreed in
19
+ advance. An objective written early gives the team something to check the
20
+ requirements against, and the requirements something to measure.
21
+
22
+ ## What a good objective looks like
23
+
24
+ Each objective is about one dimension of human-centred quality:
25
+
26
+ | Dimension | Example |
27
+ | --- | --- |
28
+ | `effectiveness` | Clinicians can find the right patient from partial details. |
29
+ | `efficiency` | Reconciling an admission's medicines takes no longer than on paper today. |
30
+ | `satisfaction` | Reception staff would choose the new search over the old one. |
31
+ | `accessibility` | Screen reader users can complete a patient search unaided. |
32
+ | `user-experience` | Staff trust the result enough not to phone the GP to check. |
33
+ | `harm` | Users are never led to conclude that nobody lives at an address when the service could not look properly. |
34
+ | `usability` | Use this when an objective covers all three of effectiveness, efficiency and satisfaction. |
35
+
36
+ An objective names an outcome for users, not a feature. "Add a severe allergy
37
+ banner" is a design. "A clinician must not miss a severe allergy because it was
38
+ recorded somewhere they did not look" is an objective.
39
+
40
+ ## In the viewer
41
+
42
+ `/hippocampus/plan` lists each objective with the quantitative requirements that
43
+ measure it. An objective with nothing measuring it says so - that is the gap to
44
+ close in [Write requirements](write-requirements.md).
45
+
46
+ The same page counts the policies and constraints in the project context and
47
+ the organisational requirements made from them. A policy nobody has turned into
48
+ a requirement is a rule no design is being checked against.
49
+
50
+ ## At the command line
51
+
52
+ Objectives live in `hippocampus/source/quality-objectives.json`:
53
+
54
+ ```json
55
+ [
56
+ {
57
+ "id": "objective-no-false-nobody-found",
58
+ "dimension": "harm",
59
+ "statement": "Users are never led to conclude that nobody lives at an address when the service could not look properly.",
60
+ "criteria": [
61
+ "A truncated result says it is truncated",
62
+ "A search that could not run says so, and offers the search that can"
63
+ ]
64
+ }
65
+ ]
66
+ ```
67
+
68
+ `criteria` is optional: the specific, checkable conditions that would show the
69
+ objective is met. When they become precise enough to test, they belong in a
70
+ quantitative requirement instead, linked to the objective:
71
+
72
+ ```json
73
+ { "id": "rel-req-no-false-nobody", "from": "req-n-no-false-nobody-found", "type": "refines-objective", "to": "objective-no-false-nobody-found" }
74
+ ```
75
+
76
+ Then run:
77
+
78
+ ```bash
79
+ npx hippocampus validate
80
+ ```
81
+
82
+ ## Revisit them
83
+
84
+ Objectives are guesses that research improves. After each round, look at the
85
+ plan page and ask whether any objective is now wrong, missing or too vague to
86
+ measure. Change the record rather than keeping the old one for history: git
87
+ keeps the history.
@@ -10,6 +10,8 @@ The knowledge base is driven by structured JSON in `hippocampus/source`.
10
10
 
11
11
  The source model is intentionally small. It should be easy for humans to inspect and easy for agents to update safely.
12
12
 
13
+ The records follow the human-centred design cycle - plan, context of use, requirements, design, evaluation. [Hippocampus and human-centred design](human-centred-design.md) explains the cycle and the words used for each record. Every field this page marks as optional can be left out; a knowledge base written before a field existed still loads.
14
+
13
15
  For the explicit graph layer, research entities and research artefact import/promotion process, read `docs/research-knowledge-graph.md`.
14
16
 
15
17
  ## Validation
@@ -35,11 +37,15 @@ Schema validation checks:
35
37
 
36
38
  Relationship validation checks:
37
39
 
38
- - user needs link to users and evidence
40
+ - user needs link to users and evidence, and to a goal when they name one
41
+ - goals link to users, and a persona to its user group
39
42
  - scenarios link to users and needs
40
43
  - journeys link to scenarios
41
- - journey steps link to needs, screens, evidence and decisions
44
+ - journey steps link to needs, screens, evidence, decisions, requirements and principles
42
45
  - screens link to user needs
46
+ - participants link to the user group they were recruited as
47
+ - requirements link to needs and insights, and carry what their kind needs (see [Requirements](#requirements))
48
+ - the requirements-layer relationship types run the right way round (see [Relationship map](#relationship-map))
43
49
 
44
50
  ## Records
45
51
 
@@ -55,6 +61,7 @@ Defines the small project identity used by the viewer:
55
61
  - phase
56
62
  - service area
57
63
  - prototype slice
64
+ - optional `shortName`: what people call the service day to day ("NCRS"). The linter treats it as naming the system when it appears in a need.
58
65
 
59
66
  ### Project context
60
67
 
@@ -91,8 +98,21 @@ Each user includes:
91
98
  - access needs
92
99
  - service context
93
100
 
101
+ Optional fields place the user in the context of use:
102
+
103
+ - `userType`: `primary` (uses it for its purpose), `secondary` (supports it: access, training, maintenance) or `indirect` (never touches it, lives with its output)
104
+ - `kind`: `user-group` or `persona`; a persona names its group in `userGroupId`
105
+ - `environment`: `{ "physical": [...], "social": [...], "technical": [...] }`, any of the three
106
+ - `resources`: what the user needs to have to hand
107
+
94
108
  Both `responsibilities` and `accessNeeds` need at least one entry. When nobody has researched one of them yet - common when a workbook names a user group before persona work reaches it - write exactly `Not yet researched` (exported as `UNRESEARCHED` from `lib/schema.js`). Do not invent an entry: a guessed access need reads as a finding. `npx hippocampus validate` counts users carrying the marker and reports them as coverage notes, so the gap stays visible.
95
109
 
110
+ ### Goals
111
+
112
+ File: `hippocampus/source/goals.json`. `npx hippocampus init` creates this file, and the other three collections added with it (quality objectives, requirements, principles), as empty files in a knowledge base made before they existed.
113
+
114
+ What a user is trying to achieve: `id`, `userId`, `statement`. Needs and scenarios point at a goal with `goalId`. A goal outlives any design, so it names no solution.
115
+
96
116
  ### User needs
97
117
 
98
118
  File: `hippocampus/source/needs.json`
@@ -105,7 +125,9 @@ Needs are linked to:
105
125
  - journey steps through `needIds`
106
126
  - screens through `needIds`
107
127
 
108
- Needs should be specific enough to influence journeys and screens.
128
+ Needs should be specific enough to influence journeys and screens, and must not name a solution: not the system, not a screen, not an interface element. `npx hippocampus validate` reports needs that do, and needs with no "so that" or `goalId`.
129
+
130
+ Optional: `goalId`, and `qualityDimension` - one of `usability`, `effectiveness`, `efficiency`, `satisfaction`, `accessibility`, `user-experience`, `harm`.
109
131
 
110
132
  A need may optionally carry a `reference` (e.g. an external ticket ID such as a Jira key) when it was imported from a source that already tracks it that way.
111
133
 
@@ -135,6 +157,8 @@ Each scenario links to:
135
157
 
136
158
  Scenarios include:
137
159
 
160
+ - optional `state`: `as-is` (the work today, the default) or `to-be` (the work with the new design)
161
+ - optional `goalId`, `environment` and `resources`, as on users
138
162
  - trigger
139
163
  - context
140
164
  - risk level
@@ -177,6 +201,15 @@ Each journey step includes the blueprint lanes:
177
201
  - exception handling
178
202
  - evidence and decisions
179
203
 
204
+ A journey may carry `state`: `as-is` (the default) or `to-be`.
205
+
206
+ A step may also carry:
207
+
208
+ - `opportunities`: what could be better at this step
209
+ - `sentiment`: how the step feels, an integer from `-2` to `2`. Two or more draw a sentiment line on the journey page.
210
+ - `requirementIds`: requirements this step must meet
211
+ - `principleIds`: principles applied at this step
212
+
180
213
  A step may optionally include `futureState`: proposed or target-state changes that are not yet true of the current journey (e.g. a planned self-serve flow, or an as-is/to-be process still being redesigned). Keep this separate from the as-is lanes above rather than blending proposed changes into them.
181
214
 
182
215
  `/hippocampus/journeys/:journeyId/flow` generates a Mermaid flowchart directly from a journey's steps (see `buildJourneyFlowDiagram` in `node_modules/@hippo-digital/hippocampus/lib/load-knowledge.js`) - one node per step in sequence, plus a dashed branch to its own node for each real `exceptionHandling` entry. A step's exception text is skipped rather than drawn as a branch if it's exactly `"No exception path was captured for this step in the source blueprint"` - an honest placeholder from importing the NHS Notify blueprint, not a real exception.
@@ -215,6 +248,44 @@ Evidence and insights may carry an optional `impact`: `critical`, `high`, `mediu
215
248
 
216
249
  Do not invent evidence. If a claim is not evidenced, add an assumption instead.
217
250
 
251
+ ### Research rounds, participants and insights
252
+
253
+ Files: `research-rounds.json`, `participants.json`, `insights.json`. Their import is described in [Research knowledge graph](research-knowledge-graph.md). Optional fields:
254
+
255
+ - a round's `methods`: a list of `contextual-interview`, `interview`, `observation`, `focus-group`, `user-survey`, `usability-test`, `usability-inspection`, `card-sort`, `preference-test`, `desk-research`, `analytics`, `other`. The method decides which activity page lists the round.
256
+ - a participant's `userId`: the user group they were recruited as
257
+ - an insight's `polarity` (`problem`, `positive`, `observation`), `rating` (`positive`, `minor`, `major`, `critical`, `catastrophic`), `signedOffBy` (who agreed a catastrophic rating) and `qualityDimension`
258
+
259
+ ### Quality objectives
260
+
261
+ File: `hippocampus/source/quality-objectives.json`
262
+
263
+ What the service must achieve for its users: `id`, `dimension` (a quality dimension, as on needs), `statement`, optional `criteria`. See [Set quality objectives](set-quality-objectives.md).
264
+
265
+ ### Requirements
266
+
267
+ File: `hippocampus/source/requirements.json`
268
+
269
+ What users must be able to do, precisely enough to check a design against. See [Write requirements](write-requirements.md).
270
+
271
+ | Field | Notes |
272
+ | --- | --- |
273
+ | `kind` | `user-qualitative`, `user-quantitative`, `organisational` or `market` |
274
+ | `statement` | "The user must be able to ..." for qualitative ones |
275
+ | `verb` | `recognise`, `select` or `input`. Required for `user-qualitative`. |
276
+ | `needIds` | Required, at least one, for both user kinds. Empty for organisational. |
277
+ | `insightIds` | Optional: research that shaped it |
278
+ | `source` | Required for `organisational` and `market`: where the rule comes from |
279
+ | `measure` | Required for `user-quantitative`: `dimension`, `task`, optional `userId`, `sampleSize`, `successRate` (0 to 1), `timeLimit`, and `valuesStatus` - `placeholder` (the default) or `agreed` |
280
+ | `qualityDimension` | Optional |
281
+ | `status` | Optional: `draft`, `agreed` or `retired` |
282
+
283
+ ### Principles
284
+
285
+ File: `hippocampus/source/principles.json`
286
+
287
+ Choices about how to design, kept apart from evidence: `id`, `kind` (`design-principle`, `interaction-principle`, `heuristic`, `ui-guideline`, `design-pattern`), `title`, `statement`, optional `source` and `sourcePath`. See [Record design principles](record-design-principles.md).
288
+
218
289
  ### Decisions
219
290
 
220
291
  File: `hippocampus/source/decisions.json`
@@ -246,29 +317,37 @@ Every record type except relationships may carry an optional `reference`: the id
246
317
 
247
318
  ## Relationship Map
248
319
 
320
+ Foreign keys on the records themselves:
321
+
249
322
  ```text
250
- users
251
- -> needs
252
- -> scenarios
253
- -> journeys
254
- -> journey steps
255
- -> screens
256
- -> evidence
257
- -> decisions
258
-
259
- screens
260
- -> needs
261
-
262
- needs
263
- -> evidence
264
-
265
- assumptions
266
- -> currently standalone review items
267
-
268
- project-context
269
- -> project-level briefing material outside the graph
323
+ goal, need, scenario -> user
324
+ need, scenario -> goal
325
+ scenario -> needs
326
+ journey -> scenario
327
+ journey step -> needs, screens, evidence, decisions, requirements, principles
328
+ screen -> needs
329
+ requirement -> needs, insights
330
+ insight -> research round, participants, evidence
331
+ participant -> research rounds, user
270
332
  ```
271
333
 
334
+ Typed links in `relationships.json` point from the record that depends to the record it depends on. The requirements layer adds:
335
+
336
+ | Type | From | To | `outcome` |
337
+ | --- | --- | --- | --- |
338
+ | `derives-from` | requirement | need | |
339
+ | `based-on-insight` | requirement | insight | |
340
+ | `constrained-by` | requirement | requirement (a rule) | |
341
+ | `refines-objective` | requirement | quality objective | |
342
+ | `verified-by` | requirement | insight | `meets`, `partly`, `fails` |
343
+ | `weighed-against` | decision | requirement | `meets`, `partly`, `fails`, `not-assessed` |
344
+ | `applies-principle` | screen, requirement, decision or journey | principle | |
345
+ | `observed-on` | insight | screen | |
346
+
347
+ A relationship may carry a `note` saying why. Validation checks the From and To of these eight; a link written the wrong way round does not fail on its own, it just stops traversal, so validation catches it instead. The older types are listed in [Research knowledge graph](research-knowledge-graph.md).
348
+
349
+ Project context stays outside the graph: it is briefing material, and organisational requirements are where its rules become checkable.
350
+
272
351
  ## Editing Rules
273
352
 
274
353
  - Preserve existing IDs unless renaming is explicitly requested.
@@ -277,3 +356,5 @@ project-context
277
356
  - Run validation before committing.
278
357
  - Keep fictional data fictional.
279
358
  - Prefer adding an assumption over pretending there is evidence.
359
+ - Do not file a principle as evidence; use `principles.json`.
360
+ - Leave a context-of-use field out rather than writing an empty list: an empty list claims there is nothing, when the truth is nobody asked.