@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.
- package/CHANGELOG.md +79 -0
- package/README.md +5 -4
- package/agents/knowledge-builder.md +2 -0
- package/agents/workflow-orchestrator.md +2 -0
- package/assets/dist/hippocampus.css +1 -1
- package/assets/hippocampus.scss +124 -0
- package/bin/hippocampus.js +1 -0
- package/docs/add-project-context.md +8 -2
- package/docs/ask-whats-already-known.md +6 -2
- package/docs/check-for-unintended-consequences.md +7 -2
- package/docs/data-and-governance.md +6 -2
- package/docs/describe-the-context-of-use.md +134 -0
- package/docs/design-actions-and-decisions.md +8 -3
- package/docs/hippocampus-for-designers-and-researchers.md +98 -220
- package/docs/hippocampus-technical.md +16 -0
- package/docs/human-centred-design.md +165 -0
- package/docs/import-a-research-round.md +9 -2
- package/docs/link-insights-to-needs.md +6 -2
- package/docs/record-a-usability-test.md +118 -0
- package/docs/record-design-principles.md +76 -0
- package/docs/research-knowledge-graph.md +25 -6
- package/docs/review-and-promote-a-draft.md +7 -2
- package/docs/set-quality-objectives.md +87 -0
- package/docs/source-model.md +104 -23
- package/docs/start-here.md +67 -34
- package/docs/turn-personas-into-users-and-needs.md +9 -2
- package/docs/weigh-options-against-requirements.md +96 -0
- package/docs/write-requirements.md +161 -0
- package/lib/breadcrumb.js +67 -14
- package/lib/create-router.js +125 -2
- package/lib/docs.js +28 -4
- package/lib/flow-map.js +15 -4
- package/lib/hcd-views.js +362 -0
- package/lib/known.js +5 -2
- package/lib/lint-knowledge.js +170 -1
- package/lib/load-knowledge.js +128 -5
- package/lib/record-links.js +11 -2
- package/lib/schema.js +190 -4
- package/lib/tidy-principles.js +112 -0
- package/package.json +1 -1
- package/scripts/import-design-actions.js +11 -2
- package/scripts/init.js +19 -0
- package/scripts/migrate-knowledge.js +9 -1
- package/scripts/smoke-routes.js +12 -1
- package/scripts/tidy-principles.js +68 -0
- package/skills/COVERAGE-MATRIX.md +2 -0
- package/skills/README.md +5 -0
- package/skills/SKILL-FORMAT.md +1 -1
- package/skills/add-scenario/SKILL.md +5 -1
- package/skills/add-user-needs/SKILL.md +11 -1
- package/skills/create-journey-from-scenario/SKILL.md +5 -2
- package/skills/ingest-research-round/SKILL.md +3 -3
- package/skills/ingest-user-personas/SKILL.md +24 -7
- package/skills/map-research-to-graph/SKILL.md +7 -5
- package/skills/record-design-decision/SKILL.md +1 -0
- package/skills/review-research-import-draft/SKILL.md +7 -1
- package/skills/skills.json +54 -1
- package/skills/structure-research-draft/SKILL.md +12 -2
- package/skills/weigh-options-against-requirements/SKILL.md +60 -0
- package/skills/write-requirements/SKILL.md +69 -0
- package/views/hippocampus/_layout.html +15 -12
- package/views/hippocampus/components/_activity.njk +36 -0
- package/views/hippocampus/components/_journey-step.njk +30 -0
- package/views/hippocampus/context.html +197 -0
- package/views/hippocampus/design.html +128 -0
- package/views/hippocampus/evaluation.html +119 -0
- package/views/hippocampus/index.html +57 -11
- package/views/hippocampus/journey.html +25 -1
- package/views/hippocampus/journeys.html +3 -0
- package/views/hippocampus/plan.html +64 -0
- package/views/hippocampus/requirements.html +94 -0
- package/views/hippocampus/research.html +20 -1
- package/views/hippocampus/scenarios.html +3 -0
- package/views/hippocampus/user.html +43 -3
|
@@ -0,0 +1,64 @@
|
|
|
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 %}Plan{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block content %}
|
|
8
|
+
{{ activityHeader(1, "Plan",
|
|
9
|
+
"Why the service exists, the rules it works within, and what it must achieve for the people who use it.",
|
|
10
|
+
"human-centred quality objectives") }}
|
|
11
|
+
|
|
12
|
+
<section class="knowledge-status">
|
|
13
|
+
<div class="knowledge-status__grid">
|
|
14
|
+
{{ stat(plan.objectives.length, "Quality objectives", "What the service must achieve for its users", null, not plan.objectives.length) }}
|
|
15
|
+
{{ stat(plan.rules.policies + plan.rules.constraints, "Policies and constraints", "Recorded in the project context", basePath + "/project", false) }}
|
|
16
|
+
{{ stat(plan.rules.organisational, "Organisational requirements", "Rules turned into something a design can be checked against", basePath + "/requirements", (plan.rules.policies + plan.rules.constraints) and not plan.rules.organisational) }}
|
|
17
|
+
</div>
|
|
18
|
+
</section>
|
|
19
|
+
|
|
20
|
+
<section class="knowledge-section">
|
|
21
|
+
<h2>Project context</h2>
|
|
22
|
+
<p>{{ plan.context.purpose or plan.context.summary or knowledge.project.description }}</p>
|
|
23
|
+
{% if plan.context.problemStatement %}
|
|
24
|
+
<p><strong>Problem:</strong> {{ plan.context.problemStatement }}</p>
|
|
25
|
+
{% endif %}
|
|
26
|
+
<p><a href="{{ basePath }}/project">Purpose, vision, policies, channels, risks and milestones</a></p>
|
|
27
|
+
</section>
|
|
28
|
+
|
|
29
|
+
<section class="knowledge-section">
|
|
30
|
+
<h2>Human-centred quality objectives</h2>
|
|
31
|
+
<p class="knowledge-note">An objective says what the service must achieve for the people who use it -
|
|
32
|
+
for their usability, accessibility, experience, or safety from harm. Set early, refined as research
|
|
33
|
+
comes in, and made measurable by quantitative requirements.</p>
|
|
34
|
+
|
|
35
|
+
{% if plan.objectives.length %}
|
|
36
|
+
<div class="knowledge-card-grid knowledge-card-grid--wide">
|
|
37
|
+
{% for objective in plan.objectives %}
|
|
38
|
+
<article class="knowledge-card knowledge-card--compact">
|
|
39
|
+
<p class="knowledge-card__tags">
|
|
40
|
+
<strong class="nhsuk-tag nhsuk-tag--{{ 'red' if objective.dimension == 'harm' else 'blue' }}">{{ objective.dimensionLabel }}</strong>
|
|
41
|
+
</p>
|
|
42
|
+
<h3 class="knowledge-card__statement">
|
|
43
|
+
<a href="{{ basePath }}/objectives/{{ objective.id }}">{{ objective.statement }}</a>
|
|
44
|
+
</h3>
|
|
45
|
+
{% if objective.requirements.length %}
|
|
46
|
+
<h4 class="knowledge-card__label">Measured by</h4>
|
|
47
|
+
<ul class="nhsuk-list knowledge-linked-list">
|
|
48
|
+
{% for requirement in objective.requirements %}
|
|
49
|
+
<li><a href="{{ basePath }}/requirements/{{ requirement.id }}">{{ requirement.label }}</a></li>
|
|
50
|
+
{% endfor %}
|
|
51
|
+
</ul>
|
|
52
|
+
{% else %}
|
|
53
|
+
<p class="knowledge-card__meta nhsuk-u-margin-bottom-0">No quantitative requirement measures this yet</p>
|
|
54
|
+
{% endif %}
|
|
55
|
+
</article>
|
|
56
|
+
{% endfor %}
|
|
57
|
+
</div>
|
|
58
|
+
{% else %}
|
|
59
|
+
{{ emptyState("No quality objectives yet",
|
|
60
|
+
"For example: \"Users must never be led to conclude that nobody lives at an address when the service could not look properly\" (avoidance of harm), or \"Clinicians on a tablet at scene can find the patient as quickly as at a desk\" (efficiency).",
|
|
61
|
+
"Add them to hippocampus/source/quality-objectives.json. The guide's Plan section shows the shape.") }}
|
|
62
|
+
{% endif %}
|
|
63
|
+
</section>
|
|
64
|
+
{% endblock %}
|
|
@@ -0,0 +1,94 @@
|
|
|
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 %}Requirements{% endblock %}
|
|
6
|
+
|
|
7
|
+
{% block content %}
|
|
8
|
+
{{ activityHeader(3, "Requirements",
|
|
9
|
+
"What users need, and what the service must let them do - precisely enough to check a design against.",
|
|
10
|
+
"user needs, user requirements") }}
|
|
11
|
+
|
|
12
|
+
<section class="knowledge-status">
|
|
13
|
+
<div class="knowledge-status__grid">
|
|
14
|
+
{{ stat(view.needs.total, "User needs", "What is necessary to reach a goal", basePath + "/user-needs", false) }}
|
|
15
|
+
{{ stat(view.total, "Requirements", "What users must be able to do, and how well", "#requirements", not view.total) }}
|
|
16
|
+
{{ stat(view.needs.withoutRequirement, "Needs with no requirement", "No design can be checked against them yet", basePath + "/user-needs", view.needs.withoutRequirement) }}
|
|
17
|
+
{{ stat(view.needs.namingSolution, "Needs that name a solution", "A need says what, the design says how", basePath + "/user-needs", view.needs.namingSolution) }}
|
|
18
|
+
{% if view.placeholders %}
|
|
19
|
+
{{ stat(view.placeholders, "Placeholder measures", "Numbers not yet agreed", "#user-quantitative", true) }}
|
|
20
|
+
{% endif %}
|
|
21
|
+
</div>
|
|
22
|
+
</section>
|
|
23
|
+
|
|
24
|
+
{#
|
|
25
|
+
The difference between the two, said once, here. It is the distinction a
|
|
26
|
+
team most often blurs - a need that says "highlighted" and a requirement
|
|
27
|
+
that says nothing anyone can check are the same mistake from two sides.
|
|
28
|
+
#}
|
|
29
|
+
<section class="knowledge-section">
|
|
30
|
+
<div class="nhsuk-grid-row">
|
|
31
|
+
<div class="nhsuk-grid-column-one-half">
|
|
32
|
+
<h2 class="nhsuk-heading-s">A user need</h2>
|
|
33
|
+
<p class="nhsuk-body-s">Says what is necessary for a user to reach a goal, in a given context.
|
|
34
|
+
It names no solution - not the system, not a screen, not "highlighted" - and it does not have to be
|
|
35
|
+
checkable.</p>
|
|
36
|
+
<p class="nhsuk-body-s knowledge-muted">"As a safeguarding practitioner, I need to know everyone who lives at an address, so that no child at risk is missed."</p>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="nhsuk-grid-column-one-half">
|
|
39
|
+
<h2 class="nhsuk-heading-s">A user requirement</h2>
|
|
40
|
+
<p class="nhsuk-body-s">Says what the user must be able to recognise, select or input - or how well,
|
|
41
|
+
measurably - so a design can be checked against it. It still names no solution.</p>
|
|
42
|
+
<p class="nhsuk-body-s knowledge-muted">"The user must be able to recognise that a search returned only some of the people who match."</p>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</section>
|
|
46
|
+
|
|
47
|
+
<section class="knowledge-section" id="requirements">
|
|
48
|
+
<h2>Requirements</h2>
|
|
49
|
+
{% for group in view.groups %}
|
|
50
|
+
<h3 class="nhsuk-heading-s nhsuk-u-margin-bottom-1" id="{{ group.key }}">{{ group.label }} <span class="nhsuk-u-font-weight-normal nhsuk-u-secondary-text-color">({{ group.requirements.length }})</span></h3>
|
|
51
|
+
<p class="knowledge-note nhsuk-u-margin-bottom-3">{{ group.hint }}</p>
|
|
52
|
+
<div class="knowledge-card-grid knowledge-card-grid--wide nhsuk-u-margin-bottom-5">
|
|
53
|
+
{% for requirement in group.requirements %}
|
|
54
|
+
<article class="knowledge-card knowledge-card--compact">
|
|
55
|
+
<p class="knowledge-card__tags">
|
|
56
|
+
{% if requirement.verb %}<strong class="nhsuk-tag nhsuk-tag--white">{{ requirement.verb }}</strong>{% endif %}
|
|
57
|
+
{% if requirement.dimensionLabel %}<strong class="nhsuk-tag nhsuk-tag--{{ 'red' if requirement.dimensionLabel == 'Avoidance of harm' else 'blue' }}">{{ requirement.dimensionLabel }}</strong>{% endif %}
|
|
58
|
+
{% if requirement.measure and requirement.measure.valuesStatus != 'agreed' %}<strong class="nhsuk-tag nhsuk-tag--yellow">Placeholder numbers</strong>{% endif %}
|
|
59
|
+
{% if requirement.evaluation %}<strong class="nhsuk-tag nhsuk-tag--{{ requirement.evaluation.tag }}">Evaluated: {{ requirement.evaluation.label }}</strong>{% endif %}
|
|
60
|
+
</p>
|
|
61
|
+
<h4 class="knowledge-card__statement">
|
|
62
|
+
<a href="{{ basePath }}/requirements/{{ requirement.id }}">{{ requirement.statement }}</a>
|
|
63
|
+
</h4>
|
|
64
|
+
{% if requirement.source %}
|
|
65
|
+
<p class="knowledge-card__meta">From: {{ requirement.source }}</p>
|
|
66
|
+
{% endif %}
|
|
67
|
+
{% if requirement.needs.length %}
|
|
68
|
+
<h5 class="knowledge-card__label">Meets the needs</h5>
|
|
69
|
+
<ul class="nhsuk-list knowledge-linked-list">
|
|
70
|
+
{% for need in requirement.needs %}<li><a href="{{ basePath }}/needs/{{ need.id }}">{{ need.label }}</a></li>{% endfor %}
|
|
71
|
+
</ul>
|
|
72
|
+
{% endif %}
|
|
73
|
+
{% if requirement.constrainedBy.length %}
|
|
74
|
+
<h5 class="knowledge-card__label">Within the rule</h5>
|
|
75
|
+
<ul class="nhsuk-list knowledge-linked-list">
|
|
76
|
+
{% for rule in requirement.constrainedBy %}<li><a href="{{ basePath }}/requirements/{{ rule.id }}">{{ rule.label }}</a></li>{% endfor %}
|
|
77
|
+
</ul>
|
|
78
|
+
{% endif %}
|
|
79
|
+
{% if requirement.constrains.length %}
|
|
80
|
+
<p class="knowledge-card__meta nhsuk-u-margin-bottom-0">Constrains {{ requirement.constrains.length }} requirement{{ "" if requirement.constrains.length == 1 else "s" }}</p>
|
|
81
|
+
{% endif %}
|
|
82
|
+
{% if requirement.weighedCount %}
|
|
83
|
+
<p class="knowledge-card__meta nhsuk-u-margin-bottom-0">{{ requirement.weighedCount }} option{{ "" if requirement.weighedCount == 1 else "s" }} weighed against it - <a href="{{ basePath }}/design#options">see the options</a></p>
|
|
84
|
+
{% endif %}
|
|
85
|
+
</article>
|
|
86
|
+
{% endfor %}
|
|
87
|
+
</div>
|
|
88
|
+
{% else %}
|
|
89
|
+
{{ emptyState("No requirements yet",
|
|
90
|
+
"A requirement turns a need into something a design can be checked against: \"The user must be able to recognise that a search returned only some of the matches.\" Rules the service works within - information governance, access control - are requirements too, from a source rather than a need.",
|
|
91
|
+
"Add them to hippocampus/source/requirements.json. The guide's Requirements section shows each kind.") }}
|
|
92
|
+
{% endfor %}
|
|
93
|
+
</section>
|
|
94
|
+
{% endblock %}
|
|
@@ -22,13 +22,32 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
{% endif %}
|
|
24
24
|
|
|
25
|
+
{% if method %}
|
|
26
|
+
<div class="nhsuk-inset-text nhsuk-u-margin-top-0">
|
|
27
|
+
<p>Showing the {{ research.rounds.length }} round{{ "" if research.rounds.length == 1 else "s" }} run as a <strong>{{ methodLabel | lower }}</strong>.
|
|
28
|
+
<a href="{{ basePath }}/research">Show every round</a></p>
|
|
29
|
+
</div>
|
|
30
|
+
{% endif %}
|
|
31
|
+
|
|
25
32
|
<p class="knowledge-muted nhsuk-body-s">Most recent round first.</p>
|
|
26
33
|
|
|
27
34
|
{% if research.rounds.length %}
|
|
28
35
|
{% for round in research.rounds %}
|
|
29
|
-
<section class="knowledge-section">
|
|
36
|
+
<section class="knowledge-section" id="{{ round.id }}">
|
|
30
37
|
<p class="knowledge-card__meta">{{ round.date }} · {{ round.sourceType }}</p>
|
|
31
38
|
<h2>{{ round.title }}</h2>
|
|
39
|
+
{#
|
|
40
|
+
How the round was run. It decides what the round's insights can
|
|
41
|
+
claim: an interview tells you what people say they do, a usability
|
|
42
|
+
test what they actually do.
|
|
43
|
+
#}
|
|
44
|
+
<p class="knowledge-card__tags">
|
|
45
|
+
{% for tag in round.methodTags %}
|
|
46
|
+
<a class="nhsuk-tag nhsuk-tag--white knowledge-method-tag" href="{{ basePath }}/research?method={{ tag.key }}">{{ tag.label }}</a>
|
|
47
|
+
{% else %}
|
|
48
|
+
<span class="knowledge-muted nhsuk-body-s">Method not recorded</span>
|
|
49
|
+
{% endfor %}
|
|
50
|
+
</p>
|
|
32
51
|
<p class="knowledge-round-status">
|
|
33
52
|
<strong class="nhsuk-tag nhsuk-tag--{{ round.status.tag }}">{{ round.status.label }}</strong>
|
|
34
53
|
<span class="knowledge-muted">{{ round.status.detail }}</span>
|
|
@@ -20,8 +20,11 @@
|
|
|
20
20
|
{% set user = knowledge.index.users[scenario.userId] %}
|
|
21
21
|
<section class="knowledge-section">
|
|
22
22
|
<span class="nhsuk-tag nhsuk-tag--{{ 'red' if scenario.riskLevel == 'high' else 'yellow' }}">{{ scenario.riskLevel }} risk</span>
|
|
23
|
+
<span class="nhsuk-tag nhsuk-tag--{{ 'purple' if scenario.state == 'to-be' else 'white' }}">{{ "To-be" if scenario.state == "to-be" else "As-is" }}</span>
|
|
23
24
|
<h2>{{ scenario.title }}</h2>
|
|
24
25
|
<p><strong>User:</strong> <a href="{{ basePath }}/users/{{ user.id }}">{{ user.label }}</a></p>
|
|
26
|
+
{% set goal = knowledge.index.goals[scenario.goalId] if scenario.goalId else null %}
|
|
27
|
+
{% if goal %}<p><strong>Goal:</strong> <a href="{{ basePath }}/goals/{{ goal.id }}">{{ goal.statement }}</a></p>{% endif %}
|
|
25
28
|
<p><strong>Trigger:</strong> {{ scenario.trigger }}</p>
|
|
26
29
|
<p>{{ scenario.context }}</p>
|
|
27
30
|
|
|
@@ -7,12 +7,52 @@
|
|
|
7
7
|
|
|
8
8
|
<div class="nhsuk-grid-row">
|
|
9
9
|
<div class="nhsuk-grid-column-two-thirds">
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
10
|
+
{% set user = userGraph.user %}
|
|
11
|
+
<span class="nhsuk-caption-l">
|
|
12
|
+
{{ "Persona" if user.kind == "persona" else "User group" }}{% if user.userType %} · {{ user.userType }} user{% endif %}
|
|
13
|
+
</span>
|
|
14
|
+
<h1>{{ user.label }}</h1>
|
|
15
|
+
<p class="nhsuk-lede-text">{{ user.description }}</p>
|
|
16
|
+
{% if user.userGroupId and knowledge.index.users[user.userGroupId] %}
|
|
17
|
+
<p>A persona of <a href="{{ basePath }}/users/{{ user.userGroupId }}">{{ knowledge.index.users[user.userGroupId].label }}</a>.</p>
|
|
18
|
+
{% endif %}
|
|
13
19
|
</div>
|
|
14
20
|
</div>
|
|
15
21
|
|
|
22
|
+
{#
|
|
23
|
+
This user's part of the context of use: what they are trying to achieve,
|
|
24
|
+
and the conditions and resources they work with. Shown only when recorded
|
|
25
|
+
- a heading over "not recorded" four times is noise on every persona.
|
|
26
|
+
#}
|
|
27
|
+
{% set goals = [] %}
|
|
28
|
+
{% for goal in knowledge.goals %}{% if goal.userId == user.id %}{% set _ = goals.push(goal) %}{% endif %}{% endfor %}
|
|
29
|
+
{% set env = user.environment or {} %}
|
|
30
|
+
{% if goals.length or env.physical or env.social or env.technical or user.resources %}
|
|
31
|
+
<section class="knowledge-section">
|
|
32
|
+
<h2>Context of use</h2>
|
|
33
|
+
{% if goals.length %}
|
|
34
|
+
<h3 class="nhsuk-heading-s">Goals</h3>
|
|
35
|
+
<ul class="nhsuk-list nhsuk-list--bullet">
|
|
36
|
+
{% for goal in goals %}<li><a href="{{ basePath }}/goals/{{ goal.id }}">{{ goal.statement }}</a></li>{% endfor %}
|
|
37
|
+
</ul>
|
|
38
|
+
{% endif %}
|
|
39
|
+
<div class="nhsuk-grid-row">
|
|
40
|
+
{% for part in [["physical", "Physical conditions"], ["social", "Social conditions"], ["technical", "Technical conditions"]] %}
|
|
41
|
+
{% if env[part[0]] %}
|
|
42
|
+
<div class="nhsuk-grid-column-one-third">
|
|
43
|
+
<h3 class="nhsuk-heading-s">{{ part[1] }}</h3>
|
|
44
|
+
{{ bulletList(env[part[0]]) }}
|
|
45
|
+
</div>
|
|
46
|
+
{% endif %}
|
|
47
|
+
{% endfor %}
|
|
48
|
+
</div>
|
|
49
|
+
{% if user.resources %}
|
|
50
|
+
<h3 class="nhsuk-heading-s">Resources</h3>
|
|
51
|
+
{{ bulletList(user.resources) }}
|
|
52
|
+
{% endif %}
|
|
53
|
+
</section>
|
|
54
|
+
{% endif %}
|
|
55
|
+
|
|
16
56
|
<section class="knowledge-section">
|
|
17
57
|
<h2>Responsibilities and access needs</h2>
|
|
18
58
|
<div class="nhsuk-grid-row">
|