@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
@@ -21,5 +21,35 @@
21
21
  <li>{{ knowledge.index.needs[needId].statement }}</li>
22
22
  {% endfor %}
23
23
  </ul>
24
+
25
+ {#
26
+ The user journey map's own lanes: where it hurts, what could be better,
27
+ and how it feels. Pain points were only on the blueprint, which is the
28
+ view a team opens least when talking to users.
29
+ #}
30
+ {% if step.painPoints and step.painPoints.length %}
31
+ <h3 class="nhsuk-heading-s">Pain points</h3>
32
+ <ul class="nhsuk-list nhsuk-list--bullet">
33
+ {% for pain in step.painPoints %}<li>{{ pain.label }} <span class="knowledge-muted nhsuk-body-s">{{ pain.severity }}</span></li>{% endfor %}
34
+ </ul>
35
+ {% endif %}
36
+ {% if step.opportunities and step.opportunities.length %}
37
+ <h3 class="nhsuk-heading-s">Opportunities</h3>
38
+ <ul class="nhsuk-list nhsuk-list--bullet">
39
+ {% for item in step.opportunities %}<li>{{ item }}</li>{% endfor %}
40
+ </ul>
41
+ {% endif %}
42
+ {% if step.requirementIds and step.requirementIds.length %}
43
+ <h3 class="nhsuk-heading-s">Requirements this step must meet</h3>
44
+ <ul class="nhsuk-list nhsuk-list--bullet">
45
+ {% for id in step.requirementIds %}{% set req = knowledge.index.requirements[id] %}{% if req %}<li><a href="{{ basePath }}/requirements/{{ req.id }}">{{ req.statement }}</a></li>{% endif %}{% endfor %}
46
+ </ul>
47
+ {% endif %}
48
+ {% if step.principleIds and step.principleIds.length %}
49
+ <h3 class="nhsuk-heading-s">Principles applied</h3>
50
+ <ul class="nhsuk-list nhsuk-list--bullet">
51
+ {% for id in step.principleIds %}{% set principle = knowledge.index.principles[id] %}{% if principle %}<li><a href="{{ basePath }}/principles/{{ principle.id }}">{{ principle.title }}</a></li>{% endif %}{% endfor %}
52
+ </ul>
53
+ {% endif %}
24
54
  </li>
25
55
  {% endmacro %}
@@ -0,0 +1,197 @@
1
+ {% extends "hippocampus/_layout.html" %}
2
+ {% from "hippocampus/components/_activity.njk" import activityHeader, stat %}
3
+ {% from "hippocampus/components/_empty-state.njk" import emptyState %}
4
+
5
+ {% block pageTitle %}Context of use{% endblock %}
6
+
7
+ {% block content %}
8
+ {{ activityHeader(2, "Context of use",
9
+ "Who the users are, what they are trying to achieve, how they do it today, and the conditions they do it in.",
10
+ "user group profiles, personas, as-is scenarios, task models, user journey maps") }}
11
+
12
+ {#
13
+ The five parts of the context of use, each a link to where it is held.
14
+ Counts, because the question a team brings here is "what have we not
15
+ described yet?" - a zero is the answer to that, not a fault.
16
+ #}
17
+ <section class="knowledge-status">
18
+ <div class="knowledge-status__grid">
19
+ {{ stat(knowledge.users.length, "Users", context.unclassifiedCount + " not yet marked primary, secondary or indirect" if context.unclassifiedCount else "Each marked primary, secondary or indirect", "#users", context.unclassifiedCount) }}
20
+ {{ stat(context.goalCount, "Goals", "What users are trying to achieve", "#goals", not context.goalCount) }}
21
+ {{ stat(context.asIsScenarios.length, "Tasks", "As-is scenarios: how the work is done today", "#tasks", not context.asIsScenarios.length) }}
22
+ {{ stat(context.environmentCount, "Conditions", "Physical, social and technical", "#environment", not context.environmentCount) }}
23
+ {{ stat(context.resources.length, "Resources", "What users need to have to hand", "#resources", false) }}
24
+ </div>
25
+ </section>
26
+
27
+ <section class="knowledge-section" id="users">
28
+ <h2>Users</h2>
29
+ {% for group in context.usersByType %}
30
+ <h3 class="nhsuk-heading-s nhsuk-u-margin-bottom-1">{{ group.label }} <span class="nhsuk-u-font-weight-normal nhsuk-u-secondary-text-color">({{ group.users.length }})</span></h3>
31
+ <p class="knowledge-note nhsuk-u-margin-bottom-3">{{ group.hint }}</p>
32
+ <div class="knowledge-card-grid nhsuk-u-margin-bottom-5">
33
+ {% for user in group.users %}
34
+ <article class="knowledge-card knowledge-card--compact">
35
+ <p class="knowledge-card__meta nhsuk-u-margin-bottom-1">
36
+ {{ "Persona" if user.kind == "persona" else "User group" }} · {{ user.needCount }} need{{ "" if user.needCount == 1 else "s" }}{% if user.goals.length %} · {{ user.goals.length }} goal{{ "" if user.goals.length == 1 else "s" }}{% endif %}
37
+ </p>
38
+ <h4 class="nhsuk-heading-s nhsuk-u-margin-bottom-1"><a href="{{ basePath }}/users/{{ user.id }}">{{ user.label }}</a></h4>
39
+ {% if user.personas.length %}
40
+ <p class="nhsuk-body-s nhsuk-u-margin-bottom-0">Personas:
41
+ {% for persona in user.personas %}<a href="{{ basePath }}/users/{{ persona.id }}">{{ persona.label }}</a>{% if not loop.last %}, {% endif %}{% endfor %}
42
+ </p>
43
+ {% endif %}
44
+ </article>
45
+ {% endfor %}
46
+ </div>
47
+ {% else %}
48
+ {{ emptyState("No users yet", "Everything else hangs off a user: who the service is for, who supports it, and who lives with what it produces.", "Turn persona documents into users with the ingest-user-personas skill.") }}
49
+ {% endfor %}
50
+ </section>
51
+
52
+ <section class="knowledge-section" id="goals">
53
+ <h2>Goals</h2>
54
+ <p class="knowledge-note">What a user is trying to achieve - the reason a need exists. A goal outlives
55
+ any design: a safeguarding practitioner wants nobody at risk in the household missed, whatever the
56
+ search screen looks like.</p>
57
+ {% set anyGoals = false %}
58
+ {% for group in context.usersByType %}
59
+ {% for user in group.users %}
60
+ {% if user.goals.length %}
61
+ <h3 class="nhsuk-heading-xs nhsuk-u-margin-bottom-1">{{ user.label }}</h3>
62
+ <ul class="nhsuk-list nhsuk-list--bullet">
63
+ {% for goal in user.goals %}
64
+ <li><a href="{{ basePath }}/goals/{{ goal.id }}">{{ goal.statement }}</a></li>
65
+ {% endfor %}
66
+ </ul>
67
+ {% endif %}
68
+ {% endfor %}
69
+ {% endfor %}
70
+ {% if not context.goalCount %}
71
+ <p class="knowledge-note">No goals recorded. Until there are, a need's "so that" clause is the only place a goal is written down.</p>
72
+ {% endif %}
73
+ </section>
74
+
75
+ <section class="knowledge-section" id="tasks">
76
+ <h2>Tasks: how the work is done today</h2>
77
+ <p class="knowledge-note">As-is scenarios. Each is a task in its real setting: what starts it, the
78
+ steps people take, and where it goes wrong. CPUX-F calls the steps subtasks - a usability test task
79
+ is a whole task, never a subtask, because only a whole task reaches a goal.</p>
80
+ {% if context.asIsScenarios.length %}
81
+ <div class="knowledge-card-grid knowledge-card-grid--wide">
82
+ {% for scenario in context.asIsScenarios %}
83
+ <article class="knowledge-card knowledge-card--compact">
84
+ <p class="knowledge-card__meta nhsuk-u-margin-bottom-1">
85
+ {% if scenario.user %}<a href="{{ basePath }}/users/{{ scenario.user.id }}">{{ scenario.user.label }}</a> · {% endif %}{{ scenario.riskLevel }} risk
86
+ </p>
87
+ <h3 class="nhsuk-heading-s nhsuk-u-margin-bottom-2">{{ scenario.title }}</h3>
88
+ {% if scenario.goal %}<p class="nhsuk-body-s"><strong>Goal:</strong> {{ scenario.goal.label }}</p>{% endif %}
89
+ <p class="nhsuk-body-s"><strong>Starts when:</strong> {{ scenario.trigger }}</p>
90
+ <details class="nhsuk-details knowledge-card__details">
91
+ <summary class="nhsuk-details__summary"><span class="nhsuk-details__summary-text">Subtasks ({{ scenario.happyPath.length }})</span></summary>
92
+ <div class="nhsuk-details__text">
93
+ <ol class="nhsuk-list nhsuk-list--number nhsuk-body-s">
94
+ {% for step in scenario.happyPath %}<li>{{ step }}</li>{% endfor %}
95
+ </ol>
96
+ </div>
97
+ </details>
98
+ </article>
99
+ {% endfor %}
100
+ </div>
101
+ <p class="nhsuk-u-margin-top-3"><a href="{{ basePath }}/scenarios">All scenarios</a></p>
102
+ {% else %}
103
+ <p class="knowledge-note">No as-is scenarios yet.</p>
104
+ {% endif %}
105
+
106
+ {% if context.asIsJourneys.length %}
107
+ <h3 class="nhsuk-heading-s">User journey maps</h3>
108
+ <ul class="nhsuk-list nhsuk-list--bullet">
109
+ {% for journey in context.asIsJourneys %}
110
+ <li><a href="{{ basePath }}/journeys/{{ journey.id }}">{{ journey.title }}</a> <span class="knowledge-muted nhsuk-body-s">{{ journey.steps.length }} steps</span></li>
111
+ {% endfor %}
112
+ </ul>
113
+ {% endif %}
114
+ </section>
115
+
116
+ <section class="knowledge-section" id="environment">
117
+ <h2>Environment</h2>
118
+ <p class="knowledge-note">The conditions the work happens in. Kept as three kinds because they are
119
+ fixed in different ways: a design can work around a noisy ward, cannot argue with a Caldicott rule,
120
+ and has to survive a dropped connection.</p>
121
+ <div class="knowledge-card-grid knowledge-card-grid--wide">
122
+ {% for part in context.environment %}
123
+ <section class="knowledge-card knowledge-card--compact">
124
+ <h3 class="nhsuk-heading-s nhsuk-u-margin-bottom-1">{{ part.label }}</h3>
125
+ <p class="knowledge-card__meta">{{ part.hint }}</p>
126
+ {% if part.items.length %}
127
+ <ul class="nhsuk-list nhsuk-list--bullet nhsuk-body-s">
128
+ {% for item in part.items %}
129
+ <li>{{ item.text }}
130
+ <span class="knowledge-source">({% for from in item.from %}{{ from.label }}{% if not loop.last %}, {% endif %}{% endfor %})</span>
131
+ </li>
132
+ {% endfor %}
133
+ </ul>
134
+ {% else %}
135
+ <p class="knowledge-muted nhsuk-body-s nhsuk-u-margin-bottom-0">Nothing recorded</p>
136
+ {% endif %}
137
+ </section>
138
+ {% endfor %}
139
+ </div>
140
+ </section>
141
+
142
+ <section class="knowledge-section" id="resources">
143
+ <h2>Resources</h2>
144
+ <p class="knowledge-note">What users need to have to hand to do the work - a smartcard, a second screen, a colleague to ask.</p>
145
+ {% if context.resources.length %}
146
+ <ul class="nhsuk-list nhsuk-list--bullet">
147
+ {% for item in context.resources %}
148
+ <li>{{ item.text }} <span class="knowledge-source">({% for from in item.from %}{{ from.label }}{% if not loop.last %}, {% endif %}{% endfor %})</span></li>
149
+ {% endfor %}
150
+ </ul>
151
+ {% else %}
152
+ <p class="knowledge-note">Nothing recorded.</p>
153
+ {% endif %}
154
+ </section>
155
+
156
+ <section class="knowledge-section">
157
+ <h2>What describes the context of use</h2>
158
+ <table class="nhsuk-table">
159
+ <thead class="nhsuk-table__head">
160
+ <tr class="nhsuk-table__row">
161
+ <th class="nhsuk-table__header" scope="col">Deliverable</th>
162
+ <th class="nhsuk-table__header" scope="col">Covers</th>
163
+ <th class="nhsuk-table__header nhsuk-table__header--numeric" scope="col">Held here</th>
164
+ </tr>
165
+ </thead>
166
+ <tbody class="nhsuk-table__body">
167
+ {% for row in context.deliverables %}
168
+ <tr class="nhsuk-table__row">
169
+ <td class="nhsuk-table__cell">{{ row.label }}</td>
170
+ <td class="nhsuk-table__cell">{{ row.covers }}</td>
171
+ <td class="nhsuk-table__cell nhsuk-table__cell--numeric">{{ row.count }}</td>
172
+ </tr>
173
+ {% endfor %}
174
+ </tbody>
175
+ </table>
176
+ </section>
177
+
178
+ <section class="knowledge-section">
179
+ <h2>The research behind it</h2>
180
+ <p class="knowledge-note">Rounds run as interviews, observation, focus groups, surveys or desk research.
181
+ They describe the context of use; they cannot say whether a design is usable - that takes watching
182
+ people use it.</p>
183
+ {% if context.rounds.length %}
184
+ <ul class="nhsuk-list">
185
+ {% for round in context.rounds %}
186
+ <li>
187
+ <a href="{{ basePath }}/research#{{ round.id }}">{{ round.title }}</a>
188
+ <span class="knowledge-muted nhsuk-body-s">{{ round.date }} · {% for tag in round.methodTags %}{{ tag.label }}{% if not loop.last %}, {% endif %}{% endfor %} · {{ round.insightCount }} insights</span>
189
+ </li>
190
+ {% endfor %}
191
+ </ul>
192
+ {% endif %}
193
+ {% if context.roundsWithoutMethod %}
194
+ <p class="knowledge-note">{{ context.roundsWithoutMethod }} round{{ "" if context.roundsWithoutMethod == 1 else "s" }} do not say how they were run, so they are not listed here. Add <code>methods</code> to each round.</p>
195
+ {% endif %}
196
+ </section>
197
+ {% endblock %}
@@ -0,0 +1,128 @@
1
+ {% extends "hippocampus/_layout.html" %}
2
+ {% from "hippocampus/components/_activity.njk" import activityHeader, stat, outcomeTag %}
3
+ {% from "hippocampus/components/_empty-state.njk" import emptyState %}
4
+
5
+ {% block pageTitle %}Design{% endblock %}
6
+
7
+ {% block content %}
8
+ {{ activityHeader(4, "Design",
9
+ "The options weighed, the principles followed, and what was built - each traceable to the requirements it answers.",
10
+ "use scenarios, user journey maps, prototypes, design decisions") }}
11
+
12
+ <section class="knowledge-status">
13
+ <div class="knowledge-status__grid">
14
+ {{ stat(design.matrices.length, "Open questions with options weighed", "Options laid against the requirements", "#options", false) }}
15
+ {{ stat(knowledge.decisions.length, "Decisions", "Options considered, and what happened to each", "#decisions", false) }}
16
+ {{ stat(design.principleCount, "Principles", "How the team has chosen to design", "#principles", false) }}
17
+ {{ stat(design.screens.total, "Screens", "Prototype pages, each linked to the needs it meets", basePath + "/screens", false) }}
18
+ </div>
19
+ </section>
20
+
21
+ {#
22
+ The options for a design question, weighed against the requirements.
23
+
24
+ Laid out as a grid because the question it answers is about rows, not
25
+ columns: which requirement does no option meet? On Round 16 that row was
26
+ "search a whole postcode", and seeing it is what turned five options into
27
+ a combination of two.
28
+ #}
29
+ <section class="knowledge-section" id="options">
30
+ <h2>Options weighed against the requirements</h2>
31
+ {% for matrix in design.matrices %}
32
+ <h3 class="nhsuk-heading-s">{{ matrix.action.title }}</h3>
33
+ {% if matrix.unmetCount %}
34
+ <div class="nhsuk-warning-callout nhsuk-u-margin-top-2">
35
+ <h4 class="nhsuk-warning-callout__label">No single option meets {{ matrix.unmetCount }} requirement{{ "" if matrix.unmetCount == 1 else "s" }}</h4>
36
+ <p>The rows marked below are met only partly, or not at all, by every option - so the answer is a combination, or a requirement to revisit.</p>
37
+ </div>
38
+ {% endif %}
39
+ <div class="knowledge-matrix-wrap">
40
+ <table class="knowledge-matrix knowledge-matrix--options">
41
+ <thead>
42
+ <tr>
43
+ <th scope="col">Requirement</th>
44
+ {% for decision in matrix.decisions %}
45
+ <th scope="col">
46
+ <a href="{{ basePath }}/decisions/{{ decision.id }}">{{ decision.title }}</a>
47
+ <span class="knowledge-muted nhsuk-body-s">{{ decision.status }}{% if decision.fails %} · fails {{ decision.fails }}{% endif %}</span>
48
+ </th>
49
+ {% endfor %}
50
+ </tr>
51
+ </thead>
52
+ <tbody>
53
+ {% for row in matrix.rows %}
54
+ <tr{% if row.unmet %} class="knowledge-matrix__unmet"{% endif %}>
55
+ <th scope="row">
56
+ <a href="{{ basePath }}/requirements/{{ row.requirement.id }}">{{ row.requirement.statement }}</a>
57
+ {% if row.unmet %}<span class="knowledge-muted nhsuk-body-s">No option meets this alone</span>{% endif %}
58
+ </th>
59
+ {% for outcome in row.outcomes %}
60
+ <td>
61
+ {{ outcomeTag(outcome) }}
62
+ {% if outcome and outcome.note %}<p class="nhsuk-body-s nhsuk-u-margin-top-1 nhsuk-u-margin-bottom-0">{{ outcome.note }}</p>{% endif %}
63
+ </td>
64
+ {% endfor %}
65
+ </tr>
66
+ {% endfor %}
67
+ </tbody>
68
+ </table>
69
+ </div>
70
+ {% else %}
71
+ {{ emptyState("No options weighed yet",
72
+ "When a design action has more than one possible answer, record each as a decision that resolves the action, then link each decision to the requirements it was weighed against, with an outcome: meets, partly or fails.",
73
+ "The guide's recipe \"Weigh options against requirements\" walks through one.") }}
74
+ {% endfor %}
75
+ </section>
76
+
77
+ <section class="knowledge-section" id="principles">
78
+ <h2>Principles</h2>
79
+ <p class="knowledge-note">How the team has chosen to design. Not evidence: a principle is a decision about
80
+ the design, and counting it as research would overstate the research behind every step that follows it.</p>
81
+ {% for group in design.principleGroups %}
82
+ <h3 class="nhsuk-heading-s nhsuk-u-margin-bottom-2">{{ group.label }}</h3>
83
+ <ul class="nhsuk-list">
84
+ {% for principle in group.principles %}
85
+ <li class="nhsuk-u-margin-bottom-3">
86
+ <a href="{{ basePath }}/principles/{{ principle.id }}">{{ principle.title }}</a>
87
+ <span class="knowledge-muted">applied {{ principle.appliedBy }} time{{ "" if principle.appliedBy == 1 else "s" }}</span>
88
+ <p class="nhsuk-body-s nhsuk-u-margin-bottom-0">{{ principle.statement }}</p>
89
+ </li>
90
+ {% endfor %}
91
+ </ul>
92
+ {% else %}
93
+ <p class="knowledge-note">No principles recorded. If some are filed as evidence, <code>npx hippocampus tidy principles</code> moves them.</p>
94
+ {% endfor %}
95
+ </section>
96
+
97
+ <section class="knowledge-section" id="decisions">
98
+ <h2>Decisions</h2>
99
+ {% if design.decisions.length %}
100
+ <ul class="nhsuk-list">
101
+ {% for decision in design.decisions %}
102
+ <li>
103
+ {% if decision.status == 'accepted' %}{% set tone = 'green' %}{% elif decision.status == 'rejected' %}{% set tone = 'red' %}{% elif decision.status == 'superseded' %}{% set tone = 'grey' %}{% else %}{% set tone = 'blue' %}{% endif %}
104
+ <strong class="nhsuk-tag nhsuk-tag--{{ tone }}">{{ decision.status }}</strong>
105
+ <a href="{{ basePath }}/decisions/{{ decision.id }}">{{ decision.title }}</a>
106
+ {% if decision.weighed %}<span class="knowledge-muted nhsuk-body-s">weighed against {{ decision.weighed }} requirement{{ "" if decision.weighed == 1 else "s" }}</span>{% endif %}
107
+ </li>
108
+ {% endfor %}
109
+ </ul>
110
+ {% else %}
111
+ <p class="knowledge-note">No decisions recorded.</p>
112
+ {% endif %}
113
+ </section>
114
+
115
+ <section class="knowledge-section">
116
+ <h2>How the work will be done</h2>
117
+ <p class="knowledge-note">To-be scenarios and journeys: the work as it will be with the service being
118
+ designed. The as-is ones are under <a href="{{ basePath }}/context#tasks">Context of use</a>.</p>
119
+ {% if design.toBeScenarios.length or design.toBeJourneys.length %}
120
+ <ul class="nhsuk-list nhsuk-list--bullet">
121
+ {% for scenario in design.toBeScenarios %}<li>{{ scenario.title }} <span class="knowledge-muted nhsuk-body-s">scenario</span></li>{% endfor %}
122
+ {% for journey in design.toBeJourneys %}<li><a href="{{ basePath }}/journeys/{{ journey.id }}">{{ journey.title }}</a> <span class="knowledge-muted nhsuk-body-s">journey</span></li>{% endfor %}
123
+ </ul>
124
+ {% else %}
125
+ <p class="knowledge-note">None marked to-be yet. A scenario or journey with no <code>state</code> is read as as-is.</p>
126
+ {% endif %}
127
+ </section>
128
+ {% endblock %}
@@ -0,0 +1,119 @@
1
+ {% extends "hippocampus/_layout.html" %}
2
+ {% from "hippocampus/components/_activity.njk" import activityHeader, stat, outcomeTag %}
3
+ {% from "hippocampus/components/_empty-state.njk" import emptyState %}
4
+
5
+ {% block pageTitle %}Evaluation{% endblock %}
6
+
7
+ {% block content %}
8
+ {{ activityHeader(5, "Evaluation",
9
+ "What happened when people used the design, and whether it meets the requirements.",
10
+ "usability test reports, usability findings") }}
11
+
12
+ <section class="knowledge-status">
13
+ <div class="knowledge-status__grid">
14
+ {{ stat(evaluation.rounds.length, "Evaluation rounds", "Usability tests and inspections", "#rounds", false) }}
15
+ {{ stat(evaluation.findingCount, "Findings", "Problems and things that worked", "#findings", false) }}
16
+ {{ stat(evaluation.verified + " of " + evaluation.verification.length, "Requirements evaluated", "A finding says whether the design meets it", "#verification", evaluation.verified < evaluation.verification.length) }}
17
+ {{ stat(evaluation.unrated.length, "Findings not rated", "Not yet marked by severity, or as positive", "#unrated", evaluation.unrated.length) }}
18
+ </div>
19
+ </section>
20
+
21
+ <section class="knowledge-section" id="verification">
22
+ <h2>Requirements against what was found</h2>
23
+ <p class="knowledge-note">The question evaluation exists to answer. A requirement nobody has evaluated is
24
+ a hope about the design, however carefully it was written.</p>
25
+ {% if evaluation.verification.length %}
26
+ <table class="nhsuk-table">
27
+ <thead class="nhsuk-table__head">
28
+ <tr class="nhsuk-table__row">
29
+ <th class="nhsuk-table__header" scope="col">Requirement</th>
30
+ <th class="nhsuk-table__header" scope="col">Result</th>
31
+ <th class="nhsuk-table__header" scope="col">Finding</th>
32
+ </tr>
33
+ </thead>
34
+ <tbody class="nhsuk-table__body">
35
+ {% for row in evaluation.verification %}
36
+ <tr class="nhsuk-table__row">
37
+ <td class="nhsuk-table__cell"><a href="{{ basePath }}/requirements/{{ row.requirement.id }}">{{ row.requirement.statement }}</a></td>
38
+ <td class="nhsuk-table__cell">
39
+ {% if row.evaluation %}{{ outcomeTag(row.evaluation) }}{% else %}<span class="knowledge-muted">Not evaluated</span>{% endif %}
40
+ </td>
41
+ <td class="nhsuk-table__cell">
42
+ {% if row.evaluation and row.evaluation.insight %}<a href="{{ basePath }}/insights/{{ row.evaluation.insight.id }}">{{ row.evaluation.insight.label }}</a>{% endif %}
43
+ </td>
44
+ </tr>
45
+ {% endfor %}
46
+ </tbody>
47
+ </table>
48
+ {% else %}
49
+ <p class="knowledge-note">No user requirements to evaluate yet. They are added under <a href="{{ basePath }}/requirements">Requirements</a>.</p>
50
+ {% endif %}
51
+ </section>
52
+
53
+ {#
54
+ By rating, worst first, with positive findings last but not left out. CPUX-F
55
+ is specific that positive findings belong in every report: what works is
56
+ what the next change breaks if nobody wrote it down.
57
+ #}
58
+ <section class="knowledge-section" id="findings">
59
+ <h2>Findings by rating</h2>
60
+ {% for bucket in evaluation.byRating %}
61
+ {% if bucket.findings.length %}
62
+ <h3 class="nhsuk-heading-s nhsuk-u-margin-bottom-1">
63
+ <strong class="nhsuk-tag nhsuk-tag--{{ bucket.tag }}">{{ bucket.label }}</strong>
64
+ <span class="nhsuk-u-font-weight-normal nhsuk-u-secondary-text-color">({{ bucket.findings.length }})</span>
65
+ </h3>
66
+ <p class="knowledge-note nhsuk-u-margin-bottom-2">{{ bucket.hint }}</p>
67
+ <ul class="nhsuk-list nhsuk-list--bullet">
68
+ {% for finding in bucket.findings %}
69
+ <li><a href="{{ basePath }}/insights/{{ finding.id }}">{{ finding.title }}</a>
70
+ {% if finding.rating == 'catastrophic' %}<span class="knowledge-muted nhsuk-body-s">{{ "signed off by " + finding.signedOffBy if finding.signedOffBy else "not signed off" }}</span>{% endif %}
71
+ </li>
72
+ {% endfor %}
73
+ </ul>
74
+ {% endif %}
75
+ {% endfor %}
76
+ {% if not evaluation.findingCount %}
77
+ {{ emptyState("No findings yet",
78
+ "Findings come from rounds run as usability tests or inspections. Mark a round's methods, and each finding as a problem or a positive finding with its rating.",
79
+ "Usability findings are imported like any research round; see the guide's Evaluation section.") }}
80
+ {% endif %}
81
+ {% if evaluation.unrated.length %}
82
+ <h3 class="nhsuk-heading-s" id="unrated">Not yet rated ({{ evaluation.unrated.length }})</h3>
83
+ <ul class="nhsuk-list nhsuk-list--bullet">
84
+ {% for finding in evaluation.unrated %}<li><a href="{{ basePath }}/insights/{{ finding.id }}">{{ finding.title }}</a></li>{% endfor %}
85
+ </ul>
86
+ {% endif %}
87
+ </section>
88
+
89
+ {% if evaluation.screensWithFindings.length %}
90
+ <section class="knowledge-section">
91
+ <h2>Where findings were seen</h2>
92
+ <ul class="nhsuk-list">
93
+ {% for entry in evaluation.screensWithFindings %}
94
+ <li><a href="{{ basePath }}/screens/{{ entry.screen.id }}">{{ entry.screen.title }}</a> <span class="knowledge-muted nhsuk-body-s">{{ entry.count }} finding{{ "" if entry.count == 1 else "s" }}</span></li>
95
+ {% endfor %}
96
+ </ul>
97
+ </section>
98
+ {% endif %}
99
+
100
+ <section class="knowledge-section" id="rounds">
101
+ <h2>Evaluation rounds</h2>
102
+ <p class="knowledge-note">Rounds where people used a design while someone watched, or an expert inspected
103
+ one. An interview or focus group cannot do this job: it records what people say, and a usability test
104
+ records what they do.</p>
105
+ {% if evaluation.rounds.length %}
106
+ <ul class="nhsuk-list">
107
+ {% for round in evaluation.rounds %}
108
+ <li>
109
+ <a href="{{ basePath }}/research#{{ round.id }}">{{ round.title }}</a>
110
+ <span class="knowledge-muted nhsuk-body-s">{{ round.date }} · {% for tag in round.methodTags %}{{ tag.label }}{% if not loop.last %}, {% endif %}{% endfor %} · {{ round.insightCount }} findings</span>
111
+ </li>
112
+ {% endfor %}
113
+ </ul>
114
+ {% else %}
115
+ <p class="knowledge-note">No round says it was a usability test or inspection. Add <code>methods</code> to each round.</p>
116
+ {% endif %}
117
+ <p><a href="{{ basePath }}/research">All research</a></p>
118
+ </section>
119
+ {% endblock %}
@@ -99,19 +99,65 @@
99
99
  #}
100
100
  <h2 class="nhsuk-heading-m">Browse</h2>
101
101
 
102
- <h3 class="nhsuk-heading-s">The knowledge</h3>
102
+ {#
103
+ The knowledge, by activity.
104
+
105
+ The five activities of human-centred design, in the order of the cycle:
106
+ plan, understand the context of use, specify the requirements, design,
107
+ evaluate - and evaluation feeds back into the context of use. The number on
108
+ each is its place in that cycle, not a sequence a team must follow; most
109
+ start wherever they already have material, which is usually research.
110
+ #}
111
+ <h3 class="nhsuk-heading-s">The knowledge, by activity</h3>
103
112
  <p class="knowledge-note nhsuk-u-margin-bottom-3">
104
- What has been recorded, and where it came from.
113
+ Human-centred design as a cycle. Evaluation sends you back to the context of use with something new to understand.
105
114
  </p>
106
- <div class="knowledge-grid nhsuk-u-margin-bottom-6">
107
- {{ summaryCard("Project context", "Purpose, vision, policy context, channels, risks and source facts.", basePath + "/project", knowledge.projectContext.sourceArtefacts.length + " artefacts") }}
108
- {{ summaryCard("Users", "The user groups and responsibilities used by the slice.", basePath + "/users", knowledge.users.length + " records") }}
109
- {{ summaryCard("User needs", "Needs linked to users, scenarios, screens and evidence.", basePath + "/user-needs", knowledge.needs.length + " records") }}
110
- {{ summaryCard("Scenarios", "Happy paths, edge cases and risks.", basePath + "/scenarios", knowledge.scenarios.length + " records") }}
111
- {{ summaryCard("Journeys", "Scenarios walked end to end, with a blueprint, flow diagram and handover generated from each.", basePath + "/journeys", knowledge.journeys.length + " journeys") }}
112
- {{ summaryCard("Screens", "The prototype pages, and the needs each one addresses.", basePath + "/screens", knowledge.screens.length + " records") }}
113
- {{ summaryCard("Research", "Rounds, participants, insights and design actions.", basePath + "/research", knowledge.researchRounds.length + " rounds") }}
114
- </div>
115
+ <ol class="knowledge-cycle nhsuk-u-margin-bottom-6">
116
+ <li class="knowledge-cycle__step">
117
+ <span class="knowledge-cycle__number">1</span>
118
+ <h4 class="nhsuk-heading-s nhsuk-u-margin-bottom-1"><a href="{{ basePath }}/plan">Plan</a></h4>
119
+ <p class="nhsuk-body-s nhsuk-u-margin-bottom-1">Why the service exists, and what it must achieve for its users.</p>
120
+ <p class="knowledge-card__meta nhsuk-u-margin-bottom-0">{{ knowledge.qualityObjectives.length }} quality objectives · <a href="{{ basePath }}/project">project context</a></p>
121
+ </li>
122
+ <li class="knowledge-cycle__step">
123
+ <span class="knowledge-cycle__number">2</span>
124
+ <h4 class="nhsuk-heading-s nhsuk-u-margin-bottom-1"><a href="{{ basePath }}/context">Context of use</a></h4>
125
+ <p class="nhsuk-body-s nhsuk-u-margin-bottom-1">Who uses it, what they are trying to achieve, how they work today and in what conditions.</p>
126
+ <p class="knowledge-card__meta nhsuk-u-margin-bottom-0">
127
+ <a href="{{ basePath }}/users">{{ knowledge.users.length }} users</a> ·
128
+ {{ knowledge.goals.length }} goals ·
129
+ <a href="{{ basePath }}/scenarios">{{ knowledge.scenarios.length }} scenarios</a> ·
130
+ <a href="{{ basePath }}/journeys">{{ knowledge.journeys.length }} journeys</a>
131
+ </p>
132
+ </li>
133
+ <li class="knowledge-cycle__step">
134
+ <span class="knowledge-cycle__number">3</span>
135
+ <h4 class="nhsuk-heading-s nhsuk-u-margin-bottom-1"><a href="{{ basePath }}/requirements">Requirements</a></h4>
136
+ <p class="nhsuk-body-s nhsuk-u-margin-bottom-1">What users need, and what they must be able to do - checkable against a design.</p>
137
+ <p class="knowledge-card__meta nhsuk-u-margin-bottom-0">
138
+ <a href="{{ basePath }}/user-needs">{{ knowledge.needs.length }} needs</a> ·
139
+ {{ knowledge.requirements.length }} requirements
140
+ </p>
141
+ </li>
142
+ <li class="knowledge-cycle__step">
143
+ <span class="knowledge-cycle__number">4</span>
144
+ <h4 class="nhsuk-heading-s nhsuk-u-margin-bottom-1"><a href="{{ basePath }}/design">Design</a></h4>
145
+ <p class="nhsuk-body-s nhsuk-u-margin-bottom-1">Options weighed against the requirements, principles followed, and what was built.</p>
146
+ <p class="knowledge-card__meta nhsuk-u-margin-bottom-0">
147
+ {{ knowledge.decisions.length }} decisions · {{ knowledge.principles.length }} principles ·
148
+ <a href="{{ basePath }}/screens">{{ knowledge.screens.length }} screens</a>
149
+ </p>
150
+ </li>
151
+ <li class="knowledge-cycle__step">
152
+ <span class="knowledge-cycle__number">5</span>
153
+ <h4 class="nhsuk-heading-s nhsuk-u-margin-bottom-1"><a href="{{ basePath }}/evaluation">Evaluation</a></h4>
154
+ <p class="nhsuk-body-s nhsuk-u-margin-bottom-1">What happened when people used it, and whether it meets the requirements.</p>
155
+ <p class="knowledge-card__meta nhsuk-u-margin-bottom-0">
156
+ <a href="{{ basePath }}/research">{{ knowledge.researchRounds.length }} research rounds</a> ·
157
+ {{ knowledge.insights.length }} insights
158
+ </p>
159
+ </li>
160
+ </ol>
115
161
 
116
162
  <h3 class="nhsuk-heading-s">Views across it</h3>
117
163
  <p class="knowledge-note nhsuk-u-margin-bottom-3">
@@ -4,10 +4,34 @@
4
4
  {% block pageTitle %}{{ journey.title }}{% endblock %}
5
5
 
6
6
  {% block content %}
7
- <span class="nhsuk-caption-l">Journey</span>
7
+ <span class="nhsuk-caption-l">{{ "To-be journey" if journey.state == "to-be" else "As-is journey" }}</span>
8
8
  <h1>{{ journey.title }}</h1>
9
9
  <p class="nhsuk-lede-text">{{ journey.description }}</p>
10
10
 
11
+ {#
12
+ The sentiment line from a user journey map: how each step feels, from -2
13
+ to 2. Drawn only when steps carry a sentiment; a flat line invented from
14
+ missing values would say the journey was neutral, which nobody measured.
15
+ #}
16
+ {% set felt = [] %}
17
+ {% for step in journey.steps %}{% if step.sentiment is number %}{% set _ = felt.push(step) %}{% endif %}{% endfor %}
18
+ {% if felt.length >= 2 %}
19
+ {% set width = journey.steps.length * 120 %}
20
+ <figure class="knowledge-sentiment">
21
+ <svg viewBox="0 0 {{ width }} 128" role="img" aria-labelledby="sentiment-title">
22
+ <title id="sentiment-title">How each step feels, from -2 to 2: {% for step in journey.steps %}{{ step.label }} {{ step.sentiment if step.sentiment is number else "not recorded" }}{% if not loop.last %}; {% endif %}{% endfor %}</title>
23
+ <line x1="0" y1="54" x2="{{ width }}" y2="54" class="knowledge-sentiment__axis" />
24
+ <polyline class="knowledge-sentiment__line" fill="none" points="{% for step in journey.steps %}{% if step.sentiment is number %}{{ loop.index0 * 120 + 60 }},{{ 54 - step.sentiment * 21 }} {% endif %}{% endfor %}" />
25
+ {% for step in journey.steps %}{% if step.sentiment is number %}
26
+ <circle class="knowledge-sentiment__point" cx="{{ loop.index0 * 120 + 60 }}" cy="{{ 54 - step.sentiment * 21 }}" r="6" />
27
+ {% endif %}
28
+ <text class="knowledge-sentiment__step" x="{{ loop.index0 * 120 + 60 }}" y="122" text-anchor="middle">{{ loop.index }}</text>
29
+ {% endfor %}
30
+ </svg>
31
+ <figcaption class="knowledge-note">How each numbered step below feels, from the journey map's sentiment line. Higher is better.</figcaption>
32
+ </figure>
33
+ {% endif %}
34
+
11
35
  {#
12
36
  The four views, listed rather than shown as a row of buttons. A button says
13
37
  "do this next"; these are four ways of looking at the steps below, and the
@@ -24,6 +24,9 @@
24
24
  #}
25
25
  {% for journey in journeys %}
26
26
  <section class="knowledge-section">
27
+ <p class="knowledge-card__tags nhsuk-u-margin-bottom-1">
28
+ <strong class="nhsuk-tag nhsuk-tag--{{ 'purple' if journey.state == 'to-be' else 'white' }}">{{ "To-be" if journey.state == "to-be" else "As-is" }}</strong>
29
+ </p>
27
30
  <h2 class="nhsuk-heading-m nhsuk-u-margin-bottom-1">
28
31
  <a href="{{ basePath }}/journeys/{{ journey.id }}">{{ journey.title }}</a>
29
32
  </h2>