@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
@@ -9,7 +9,9 @@ owners:
9
9
  - workflow-orchestrator
10
10
  reads:
11
11
  - node_modules/@hippo-digital/hippocampus/docs/source-model.md
12
+ - node_modules/@hippo-digital/hippocampus/docs/write-requirements.md
12
13
  - hippocampus/source/users.json
14
+ - hippocampus/source/goals.json
13
15
  - hippocampus/source/needs.json
14
16
  - hippocampus/source/evidence.json
15
17
  - hippocampus/source/assumptions.json
@@ -24,8 +26,11 @@ outputs:
24
26
  guardrails:
25
27
  - Do not invent evidence or rename existing IDs casually.
26
28
  - Keep need statements short enough to display cleanly in Hippocampus lists and blueprint views.
29
+ - A need names no solution - not the system, not a screen, not an interface element such as "highlighted" or "filters". It says what the user needs to know or do.
30
+ - A need says why - a "so that" or a goalId. A need with no reason cannot be weighed against another.
27
31
  acceptance:
28
32
  - Each changed need has a valid userId, priority, and supporting evidence or assumption gap.
33
+ - Each changed need has a goal clause or goalId, and validate does not report it as naming a solution.
29
34
  - Need text remains concise enough for lists and blueprint views.
30
35
  - npx hippocampus validate passes.
31
36
  ---
@@ -39,14 +44,19 @@ acceptance:
39
44
  ## Workflow
40
45
  1. Confirm the target `userId` already exists in `hippocampus/source/users.json`.
41
46
  2. Add or revise need records with a lowercase kebab-case `id`, a single clear statement, a `priority`, and at least one `evidenceId`.
47
+ - Write what is necessary, not how it will be provided: "I need to know when two records disagree", not "I need conflicting records highlighted".
48
+ - Give it a reason. Where the user already has a goal in `goals.json` that the need serves, set `goalId`; otherwise end with "so that ...".
49
+ - Set `qualityDimension` when the need is plainly about one - `harm` for a need whose failure could hurt someone, `accessibility` for an access need.
42
50
  3. Reuse existing evidence where it really supports the need.
43
51
  4. If the direction is plausible but not evidenced, add an assumption and call out the evidence gap.
44
52
 
45
53
  ## Guardrails
46
54
  - Do not invent evidence or rename existing IDs casually.
47
55
  - Keep need statements short enough to display cleanly in Hippocampus lists and blueprint views.
56
+ - No solution in a need, and no need without a reason.
57
+ - A requirement is a different record. When the team wants to say what the user must be able to recognise, select or input, use `write-requirements`.
48
58
 
49
59
  ## Finish
50
60
  - Run `npx hippocampus validate`.
51
- - Report needs added or changed, evidence used, assumptions added, and validation result.
61
+ - Report needs added or changed, evidence used, assumptions added, and validation result, including any need validate still reports as naming a solution or having no goal.
52
62
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: create-journey-from-scenario
3
- description: "Turns an existing scenario into a blueprint-ready journey with ordered steps and screens. Use when a scenario exists and needs a journey, or when someone asks to build, draft or map a user journey."
3
+ description: "Writes a journey record into the knowledge base from an existing scenario record: ordered steps with blueprint lanes, needs, screens and evidence. Use when a scenario in hippocampus/source/scenarios.json needs a journey, or when someone asks for a journey map or service blueprint. Not for building clickable screens (use add-prototype-screen) or for drafting journeys as standalone documents, which a project may have its own skill for."
4
4
  id: create-journey-from-scenario
5
5
  title: Create journey from scenario
6
6
  purpose: Turn an existing scenario into a blueprint-ready journey.
@@ -39,7 +39,10 @@ acceptance:
39
39
  1. Confirm the `scenarioId` exists.
40
40
  2. Add or revise a journey with `title`, `description`, `entryPoint`, `exitPoint`, and 4 to 7 steps.
41
41
  3. For each step, fill the real blueprint lanes used by `buildBlueprintViewModel()`: `userAction`, `frontstage`, `backstage`, `supportProcesses`, `dataDependencies`, `securityAndGovernance`, `painPoints`, `exceptionHandling`, `needIds`, `screenIds`, `evidenceIds`, and `decisionIds`.
42
- 4. Flag missing screens or evidence instead of hiding gaps in free text.
42
+ 4. Set the journey's `state` to match the scenario's: `as-is` for a journey map of the work today, `to-be` for the work with the new design.
43
+ 5. Where the evidence shows them, add the journey map's own lanes to each step: `opportunities` (what could be better here) and `sentiment` (how the step feels, -2 to 2). Two or more sentiments draw a sentiment line. Leave them out rather than guessing.
44
+ 6. List the requirements a step must meet in `requirementIds` and the principles it applies in `principleIds`. A principle is never an `evidenceIds` entry.
45
+ 7. Flag missing screens or evidence instead of hiding gaps in free text.
43
46
 
44
47
  ## Guardrails
45
48
  - Do not put all detail in `userAction`; the blueprint views render lane content separately.
@@ -45,9 +45,9 @@ acceptance:
45
45
 
46
46
  ## Workflow
47
47
  1. Put the artefact in `hippocampus/inbox/research/` and run the sync command if a draft does not exist yet.
48
- 2. Improve the generated draft with `structure-research-draft` using only the extracted review Markdown and draft JSON.
48
+ 2. Improve the generated draft with `structure-research-draft` using only the extracted review Markdown and draft JSON. This is where the round gets its `methods`, and a usability test's findings their polarity and rating.
49
49
  3. Review the draft with `review-research-import-draft` and treat dry-run failures or unsupported claims as blockers.
50
- 4. Add only supported links to existing needs, screens, evidence, journeys, or decisions with `map-research-to-graph`.
50
+ 4. Add only supported links to existing needs, screens, evidence, journeys, decisions or requirements with `map-research-to-graph`. For a usability test, that includes which requirements it showed were met.
51
51
  5. Repeat structuring and review until the draft has credible participants, real insights, concrete actions, and a clean dry-run result.
52
52
  6. Hand off for human approval before any real promotion command.
53
53
 
@@ -58,5 +58,5 @@ acceptance:
58
58
 
59
59
  ## Finish
60
60
  - Run the dry-run promotion command.
61
- - Report the draft path, counts improved, remaining warnings or blockers, supported graph links added, and whether the draft is ready for human promotion.
61
+ - Report the draft path, the round's methods, counts improved, remaining warnings or blockers - including any finding that may be catastrophic - supported graph links added, requirements evaluated, and whether the draft is ready for human promotion.
62
62
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ingest-user-personas
3
- description: "Turns persona documents into user records, the needs they state and the evidence behind both. Use when a project has personas but no user records - this is the first ingestion step, because needs, scenarios, journeys and screens all reference users."
3
+ description: "Turns persona documents into user records - with the goals, conditions and resources they state - the needs they state, and the evidence behind them. Use when a project has personas but no user records - this is the first ingestion step, because needs, scenarios, journeys and screens all reference users."
4
4
  id: ingest-user-personas
5
5
  title: Ingest user personas
6
6
  purpose: Turn persona documents into user records, the needs they state, and the evidence that backs both.
@@ -9,6 +9,7 @@ owners:
9
9
  - knowledge-builder
10
10
  reads:
11
11
  - node_modules/@hippo-digital/hippocampus/docs/source-model.md
12
+ - node_modules/@hippo-digital/hippocampus/docs/describe-the-context-of-use.md
12
13
  - node_modules/@hippo-digital/hippocampus/docs/research-source-file-conventions.md
13
14
  - hippocampus/inbox/personas/
14
15
  - hippocampus/source/users.json
@@ -18,6 +19,7 @@ reads:
18
19
  - hippocampus/source/relationships.json
19
20
  edits:
20
21
  - hippocampus/source/users.json
22
+ - hippocampus/source/goals.json
21
23
  - hippocampus/source/needs.json
22
24
  - hippocampus/source/evidence.json
23
25
  - hippocampus/source/assumptions.json
@@ -25,7 +27,8 @@ edits:
25
27
  runs:
26
28
  - npx hippocampus validate
27
29
  outputs:
28
- - One user record per persona document
30
+ - One user record per persona document, with kind, and with userType, environment and resources only where the document states them
31
+ - The goals the document states, linked from the needs they explain
29
32
  - One evidence record per source document, with a resolvable sourcePath
30
33
  - Needs the document actually states, each linked to that evidence
31
34
  - Assumptions naming every field the schema required but the document did not state
@@ -35,11 +38,14 @@ guardrails:
35
38
  - Do not create needs the persona document does not state. A thin persona yields a user with few needs, which is the honest result.
36
39
  - One user per persona. Do not merge two documents into a composite user, and do not split one into several.
37
40
  - Record the document's own filename in evidence.sourcePath. If the working copy will be deleted, the name is the only way back to the original.
41
+ - Do not set userType from judgement. Whether a group is primary, secondary or indirect is a team decision unless the document says; leave it out and list the user in the report.
42
+ - Leave an environment kind out rather than writing an empty list - an empty list claims there is nothing, when the truth is the document did not say.
38
43
  acceptance:
39
44
  - Every new user has a description and at least one responsibility taken from the document.
40
45
  - Every new need has a userId, a statement from the document, and at least one evidenceId.
41
46
  - Every persona document has exactly one evidence record with a sourcePath.
42
47
  - Every schema-required field the document did not state has an assumption naming it.
48
+ - Every goal, condition and resource recorded is stated in the document.
43
49
  - npx hippocampus validate passes.
44
50
  ---
45
51
 
@@ -54,10 +60,15 @@ acceptance:
54
60
  1. Put the documents in `hippocampus/inbox/personas/` and read each one in full before writing anything.
55
61
  2. For each document, add one **evidence** record: `sourceType: user persona`, a summary of what the document is, `confidence`, and `sourcePath` set to the document's own filename.
56
62
  3. Add one **user** per document. `label` and `description` come from the document. `responsibilities` are the ones it lists - do not generalise them into a tidier set.
57
- 4. Add the **needs the document states**, each with `userId`, a statement in the document's own terms, and `evidenceIds` pointing at that document's evidence record.
58
- 5. Add `has-need` relationships from the user to each need.
59
- 6. Record an **assumption** for every field the schema forced you to fill that the document did not state. See below.
60
- 7. Run `npx hippocampus validate` and fix what it reports.
63
+ - `kind`: `persona` when the document describes one fictitious person ("Carol, 64, ..."), `user-group` when it describes a group. A persona names its group in `userGroupId` if that group is already a user.
64
+ - `userType`: only when the document says how the group relates to the service. A persona is usually a primary user, but "usually" is a judgement - leave it out and report it.
65
+ - `environment`: the conditions the document describes, sorted into `physical` (where: ward, vehicle, home visit), `social` (rules, roles, pressures: information governance, workload, who else is there) and `technical` (devices, connectivity, other systems open at the same time). Only the kinds the document covers.
66
+ - `resources`: what the document says they need to have to hand - a smartcard, a second screen, a colleague to ask.
67
+ 4. Add a **goal** to `goals.json` for each thing the document says the user is trying to achieve ("Goals", "wants to", "so that I can"). A goal is an outcome, not a step and not a feature.
68
+ 5. Add the **needs the document states**, each with `userId`, a statement in the document's own terms, and `evidenceIds` pointing at that document's evidence record. Where a need's "so that" is one of the goals from step 4, set `goalId`.
69
+ 6. Add `has-need` relationships from the user to each need.
70
+ 7. Record an **assumption** for every field the schema forced you to fill that the document did not state. See below.
71
+ 8. Run `npx hippocampus validate` and fix what it reports.
61
72
 
62
73
  ## The two fields that force a guess
63
74
 
@@ -73,8 +84,14 @@ The schema requires both of these, so neither can be left empty and an unstated
73
84
  - Do not create needs the persona document does not state. A thin persona yields a user with few needs, which is the honest result.
74
85
  - One user per persona. Do not merge two documents into a composite user, and do not split one into several.
75
86
  - Record the document's own filename in `evidence.sourcePath`.
87
+ - Do not set `userType` from judgement, and do not write an empty environment list.
88
+
89
+ ## A need that names a solution
90
+
91
+ Persona documents often state needs as features: "I need conflicting records highlighted". Keep the document's words - rewriting them here would put your interpretation in place of the research - but `npx hippocampus validate` will report each one as naming a solution. List them in the report so the team can rewrite them as what the user needs to know or do. A need that is really a condition ("I need it to work on a small screen") belongs in `environment.technical` too; record it there as well and say so.
76
92
 
77
93
  ## Finish
78
94
 
79
95
  - Run `npx hippocampus validate`.
80
- - Report: users added, needs added per user, evidence records created, assumptions recorded and what each one covers, and any persona document that yielded no needs - that last one is a finding about the document, not a failure of the import.
96
+ - Report: users added, needs added per user, goals and conditions recorded, evidence records created, assumptions recorded and what each one covers, and any persona document that yielded no needs - that last one is a finding about the document, not a failure of the import.
97
+ - List the users with no `userType` for the team to classify, and the needs `validate` reports as naming a solution or having no goal.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: map-research-to-graph
3
- description: "Adds only the links a reviewed research draft actually supports, between insights, needs, users and screens. Use after reviewing a research draft, when insights need connecting to the rest of the knowledge base."
3
+ description: "Adds only the links a reviewed research draft actually supports, between insights, needs, screens and requirements. Use after reviewing a research draft, when insights need connecting to the rest of the knowledge base, or a usability test needs recording against the requirements it evaluated."
4
4
  id: map-research-to-graph
5
5
  title: Map research to graph
6
6
  purpose: Add only supported links between a reviewed research draft and existing Hippocampus entities.
@@ -18,6 +18,7 @@ reads:
18
18
  - hippocampus/source/screens.json
19
19
  - hippocampus/source/evidence.json
20
20
  - hippocampus/source/decisions.json
21
+ - hippocampus/source/requirements.json
21
22
  - hippocampus/source/relationships.json
22
23
  - hippocampus/imports/research/[draft-id].json
23
24
  edits:
@@ -44,9 +45,10 @@ acceptance:
44
45
 
45
46
  ## Workflow
46
47
  1. Read the reviewed draft and current canonical entities together.
47
- 2. Add only supported links such as `has-participant`, `produced-insight`, `contributed-to`, `supports-insight`, `leads-to-action`, `addresses-need`, `renders-screen`, and `records-decision`.
48
- 3. Prefer adding relationships inside the draft where the schema allows it.
49
- 4. Report plausible but unsupported links as recommendations rather than writing them.
48
+ 2. Add only supported links such as `has-participant`, `produced-insight`, `contributed-to`, `supports-insight`, `tests-need` (insight -> need), `responds-to-insight` (design action -> insight), `observed-on` (insight -> screen) and `records-decision`. Do not write `leads-to-action`: it points the wrong way and stops the evidence impact walk at the insight.
49
+ 3. For a usability test, link each **requirement it evaluated** to the finding that shows the result: `verified-by`, from the requirement to the insight, with `outcome` `meets`, `partly` or `fails`, and a `note` saying what participants did. Only where the text shows it - a test that did not cover a requirement leaves it unevaluated, which is the honest state.
50
+ 4. Prefer adding relationships inside the draft where the schema allows it.
51
+ 5. Report plausible but unsupported links as recommendations rather than writing them.
50
52
 
51
53
  ## Guardrails
52
54
  - Do not promote the draft.
@@ -55,5 +57,5 @@ acceptance:
55
57
 
56
58
  ## Finish
57
59
  - Run the dry-run promotion command.
58
- - Report links added, links recommended but not written, missing canonical entities, evidence gaps, and the dry-run result.
60
+ - Report links added, links recommended but not written, requirements evaluated and their outcomes, missing canonical entities, evidence gaps, and the dry-run result.
59
61
 
@@ -46,6 +46,7 @@ acceptance:
46
46
  1. Take a copy of `node_modules/@hippo-digital/hippocampus/templates/insight-design-action-tracker.xlsx` for the round.
47
47
  2. Fill the Design Actions sheet: one row per direction, listing the insight IDs that prompted it. An action is an open brief, not a solution.
48
48
  3. Fill the Decisions sheet: one row per option, all `proposed` while the team decides.
49
+ Before the team chooses, lay the options against the requirements with `weigh-options-against-requirements`, so the choice is made on what each option meets rather than on the options compared with each other.
49
50
  4. When the team decides, set one option to `accepted` and the rest to `rejected`, and write the `consequence` of the accepted one.
50
51
  5. Dry-run the import and fix anything it names.
51
52
  6. Import, then run `npx hippocampus validate`.
@@ -10,6 +10,7 @@ owners:
10
10
  reads:
11
11
  - node_modules/@hippo-digital/hippocampus/docs/research-knowledge-graph.md
12
12
  - node_modules/@hippo-digital/hippocampus/docs/source-model.md
13
+ - node_modules/@hippo-digital/hippocampus/docs/record-a-usability-test.md
13
14
  - hippocampus/imports/research/[draft-id].review.md
14
15
  - hippocampus/imports/research/[draft-id].json
15
16
  edits:
@@ -24,6 +25,7 @@ guardrails:
24
25
  - Do not edit the draft unless the user explicitly asks for fixes.
25
26
  acceptance:
26
27
  - Unsupported claims, weak insights, and vague actions are called out.
28
+ - A round with no methods, and usability findings with no polarity or rating, are called out.
27
29
  - No promotion occurs automatically.
28
30
  - The dry-run result is reported.
29
31
  ---
@@ -37,11 +39,15 @@ acceptance:
37
39
  1. Run the dry-run promotion command first.
38
40
  2. Check whether participants are real, insights are actual findings, actions are concrete, relationship endpoints exist, confidence levels are credible, and every structured item is supported by extracted text.
39
41
  3. Check for duplicate or conflicting canonical IDs before promotion.
42
+ 4. Check the round says **how it was run** (`methods`). Without it the round appears under neither Context of use nor Evaluation, and nobody can tell whether a finding speaks to usability.
43
+ 5. For a usability test, check every finding has a `polarity`, the positive findings were kept rather than dropped, and each `rating` matches the effect on participants rather than how hard it is to fix.
44
+ 6. Flag any finding that suggests a risk of major harm. Catastrophic is not the research team's call alone: name it for the person promoting the draft, who records who signed it off in `signedOffBy`.
45
+ 7. Check the round's claims against what its method can show. An interview or focus group cannot evaluate usability - a finding from one that says a design "works" is an opinion, and the review should say so.
40
46
 
41
47
  ## Guardrails
42
48
  - Do not promote the draft.
43
49
  - Do not edit the draft unless the user explicitly asks for fixes.
44
50
 
45
51
  ## Finish
46
- - Report promotion blockers, unsupported claims, weak insights or vague actions, relationship issues, suggested edits, and the dry-run result.
52
+ - Report promotion blockers, unsupported claims, weak insights or vague actions, missing methods, unrated or unmarked usability findings, possible catastrophic findings, relationship issues, suggested edits, and the dry-run result.
47
53
 
@@ -67,6 +67,7 @@
67
67
  ],
68
68
  "acceptance": [
69
69
  "Each changed need has a valid userId, priority, and supporting evidence or assumption gap.",
70
+ "Each changed need has a goal clause or goalId, and validate does not report it as naming a solution.",
70
71
  "Need text remains concise enough for lists and blueprint views.",
71
72
  "npx hippocampus validate passes."
72
73
  ]
@@ -290,7 +291,8 @@
290
291
  "npx hippocampus validate"
291
292
  ],
292
293
  "outputs": [
293
- "One user record per persona document",
294
+ "One user record per persona document, with kind, and with userType, environment and resources only where the document states them",
295
+ "The goals the document states, linked from the needs they explain",
294
296
  "One evidence record per source document, with a resolvable sourcePath",
295
297
  "Needs the document actually states, each linked to that evidence",
296
298
  "Assumptions naming every field the schema required but the document did not state"
@@ -300,6 +302,7 @@
300
302
  "Every new need has a userId, a statement from the document, and at least one evidenceId.",
301
303
  "Every persona document has exactly one evidence record with a sourcePath.",
302
304
  "Every schema-required field the document did not state has an assumption naming it.",
305
+ "Every goal, condition and resource recorded is stated in the document.",
303
306
  "npx hippocampus validate passes."
304
307
  ]
305
308
  },
@@ -418,6 +421,7 @@
418
421
  ],
419
422
  "acceptance": [
420
423
  "Unsupported claims, weak insights, and vague actions are called out.",
424
+ "A round with no methods, and usability findings with no polarity or rating, are called out.",
421
425
  "No promotion occurs automatically.",
422
426
  "The dry-run result is reported."
423
427
  ]
@@ -464,6 +468,7 @@
464
468
  ],
465
469
  "acceptance": [
466
470
  "The draft keeps source metadata and extracted text intact.",
471
+ "The round has methods when the text says how it was run, and every finding from a usability test has a polarity.",
467
472
  "Participants, insights, actions, and relationships are source-backed.",
468
473
  "npx hippocampus promote research -- --dry-run passes."
469
474
  ]
@@ -572,6 +577,54 @@
572
577
  "A briefing, if produced, is dated and readable without an agent.",
573
578
  "npx hippocampus validate passes."
574
579
  ]
580
+ },
581
+ {
582
+ "id": "weigh-options-against-requirements",
583
+ "title": "Weigh options against requirements",
584
+ "purpose": "Record how each option for a design action fares against each requirement, so the team can see what no option meets before choosing.",
585
+ "file": "weigh-options-against-requirements/SKILL.md",
586
+ "owners": [
587
+ "knowledge-builder",
588
+ "workflow-orchestrator"
589
+ ],
590
+ "runs": [
591
+ "npx hippocampus validate"
592
+ ],
593
+ "outputs": [
594
+ "weighed-against links from each option to each requirement it was judged against, with an outcome and a note",
595
+ "A report of requirements no option meets on its own, and of requirements that are design work whichever option wins"
596
+ ],
597
+ "acceptance": [
598
+ "Every option resolving the design action has an outcome for every requirement it was judged against.",
599
+ "Every partly and fails outcome has a note.",
600
+ "No decision status changed.",
601
+ "npx hippocampus validate passes."
602
+ ]
603
+ },
604
+ {
605
+ "id": "write-requirements",
606
+ "title": "Write requirements",
607
+ "purpose": "Draft verifiable user, quantitative and organisational requirements from existing needs, insights and policies, for the team to agree before they enter source.",
608
+ "file": "write-requirements/SKILL.md",
609
+ "owners": [
610
+ "knowledge-builder",
611
+ "workflow-orchestrator"
612
+ ],
613
+ "runs": [
614
+ "npx hippocampus validate"
615
+ ],
616
+ "outputs": [
617
+ "A requirements draft in hippocampus/imports/requirements/ with a .review.md beside it",
618
+ "Each requirement linked to the needs, insights, rules and objectives it rests on",
619
+ "A list of needs that could not be turned into a requirement, and why"
620
+ ],
621
+ "acceptance": [
622
+ "Every user requirement names at least one existing need, and every qualitative one has a verb.",
623
+ "Every quantitative requirement has a measure with a whole task, a dimension and valuesStatus placeholder.",
624
+ "Every organisational requirement has a source.",
625
+ "Every id the draft references exists in hippocampus/source.",
626
+ "Nothing in hippocampus/source/ changed unless the user asked for it."
627
+ ]
575
628
  }
576
629
  ]
577
630
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: structure-research-draft
3
- description: "Improves a script-generated research draft - participants, insights, actions and supported links - using only the extracted text. Use after `hippocampus import research-deck`, before review."
3
+ description: "Improves a script-generated research draft - how the round was run, participants, insights with their polarity and rating, actions and supported links - using only the extracted text. Use after `hippocampus import research-deck`, before review."
4
4
  id: structure-research-draft
5
5
  title: Structure research draft
6
6
  purpose: Improve a deterministic research import draft using extracted text only.
@@ -11,6 +11,7 @@ reads:
11
11
  - node_modules/@hippo-digital/hippocampus/docs/research-knowledge-graph.md
12
12
  - node_modules/@hippo-digital/hippocampus/docs/hippocampus-technical.md
13
13
  - node_modules/@hippo-digital/hippocampus/docs/source-model.md
14
+ - node_modules/@hippo-digital/hippocampus/docs/record-a-usability-test.md
14
15
  - hippocampus/imports/research/[draft-id].review.md
15
16
  - hippocampus/imports/research/[draft-id].json
16
17
  edits:
@@ -25,8 +26,10 @@ guardrails:
25
26
  - Do not edit canonical source files.
26
27
  - Preserve sourceDeck, sourcePath, importedAt, and extracted text.
27
28
  - Leave warnings in place unless the underlying issue is actually resolved.
29
+ - Record a method, polarity or rating only when the text shows it. Never rate a finding catastrophic, and never fill signedOffBy - those are for a person.
28
30
  acceptance:
29
31
  - The draft keeps source metadata and extracted text intact.
32
+ - The round has methods when the text says how it was run, and every finding from a usability test has a polarity.
30
33
  - Participants, insights, actions, and relationships are source-backed.
31
34
  - npx hippocampus promote research -- --dry-run passes.
32
35
  ---
@@ -41,13 +44,20 @@ acceptance:
41
44
  2. Improve only the draft JSON in `hippocampus/imports/research/`.
42
45
  3. Use the review Markdown and existing JSON draft to extract real participants, genuine findings, concrete design actions, and supported relationships.
43
46
  4. Reuse existing evidence IDs from `hippocampus/source/evidence.json` only when the extracted text explicitly supports the link.
47
+ 5. Say **how the round was run**: set `methods` on the research round from what the text describes - "discussion guide", "we asked" (`interview`); "at their desk", "on the ward" (`contextual-interview`); "tasks", "think aloud", "participants tried to" (`usability-test`); "survey", "poll" (`user-survey`); "card sort" (`card-sort`); "which do you prefer" (`preference-test`); prior reports and data (`desk-research`, `analytics`). Most rounds mix two. Leave it out if the text does not say.
48
+ 6. For a round that includes a usability test, mark each insight:
49
+ - `polarity`: `problem`, `positive` (something that worked or participants liked) or `observation`. Keep the positive findings - they are what stops a later change breaking something that works.
50
+ - `rating`, when the text shows the effect on participants: `minor` (noticeable delay, minor dissatisfaction), `major` (substantial delay, moderate dissatisfaction), `critical` (gave up, substantial dissatisfaction, or risk of minor harm), or `positive`. If the text suggests a risk of major harm, rate it `critical`, add a warning saying it may be catastrophic, and leave the call to a person.
51
+ - `qualityDimension` when plain: `effectiveness`, `efficiency`, `satisfaction`, `accessibility`, `harm`.
52
+ 7. When the text names the screen a finding was seen on and that screen exists in `screens.json`, add an `observed-on` relationship from the insight to the screen.
44
53
 
45
54
  ## Guardrails
46
55
  - Do not edit canonical source files.
47
56
  - Preserve `sourceDeck`, `sourcePath`, `importedAt`, and extracted text.
48
57
  - Leave warnings in place unless the underlying issue is actually resolved.
58
+ - No method, polarity or rating the text does not show. No catastrophic rating and no `signedOffBy` - a person decides those.
49
59
 
50
60
  ## Finish
51
61
  - Run the dry-run promotion command.
52
- - Report participants, insights, actions, relationships, warnings still needing review, and the dry-run result.
62
+ - Report the round's methods (or that the text did not say), participants, insights with their polarity and rating, actions, relationships, warnings still needing review - including any finding that may be catastrophic - and the dry-run result.
53
63
 
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: weigh-options-against-requirements
3
+ description: "Lays each option for a design question against the requirements - meets, partly or fails, with the reason - and reports any requirement no option meets on its own. Use when a design action has several options and the team needs to compare them, or when someone asks which option is best, what each option misses, or how the options stack up."
4
+ id: weigh-options-against-requirements
5
+ title: Weigh options against requirements
6
+ purpose: Record how each option for a design action fares against each requirement, so the team can see what no option meets before choosing.
7
+ owners:
8
+ - knowledge-builder
9
+ - workflow-orchestrator
10
+ reads:
11
+ - node_modules/@hippo-digital/hippocampus/docs/weigh-options-against-requirements.md
12
+ - node_modules/@hippo-digital/hippocampus/docs/design-actions-and-decisions.md
13
+ - hippocampus/source/design-actions.json
14
+ - hippocampus/source/decisions.json
15
+ - hippocampus/source/requirements.json
16
+ - hippocampus/source/relationships.json
17
+ edits:
18
+ - hippocampus/source/relationships.json
19
+ runs:
20
+ - npx hippocampus validate
21
+ outputs:
22
+ - weighed-against links from each option to each requirement it was judged against, with an outcome and a note
23
+ - A report of requirements no option meets on its own, and of requirements that are design work whichever option wins
24
+ guardrails:
25
+ - Judge each option as recorded in its decision. Do not improve an option to make it pass.
26
+ - Every outcome other than an obvious one carries a note saying why. The note is what someone reads in a year.
27
+ - Use not-assessed when the record does not say enough to judge. A guessed meets is worse than an honest gap.
28
+ - Do not accept or reject a decision. Choosing is the team's job; the grid shows the trade-off.
29
+ - Links run from the decision to the requirement. Written the other way they fail validation.
30
+ acceptance:
31
+ - Every option resolving the design action has an outcome for every requirement it was judged against.
32
+ - Every partly and fails outcome has a note.
33
+ - No decision status changed.
34
+ - npx hippocampus validate passes.
35
+ ---
36
+
37
+ # Weigh options against requirements
38
+
39
+ ## Use when
40
+ - A design action has several options recorded as decisions that resolve it, and the team needs to compare them.
41
+ - Someone asks which option is best, what each one misses, or how they stack up.
42
+
43
+ ## Workflow
44
+ 1. Find the design action and the decisions that resolve it (`resolves-action`). If there are none, stop: record the options first with `record-design-decision`.
45
+ 2. Find the requirements the options should be judged by - those derived from the needs behind the action's insights, and the organisational rules they work within. If there are none, stop: write them first with `write-requirements`.
46
+ 3. For each option and requirement, judge one `outcome`: `meets`, `partly` (only with something else, or only in some cases), `fails`, or `not-assessed`. Write a `note` for every `partly` and `fails`.
47
+ 4. Leave out requirements that come down to how the screen is designed whichever option wins - and list them in the report, because that work can start now.
48
+ 5. Add one `weighed-against` relationship per judgement, from the decision to the requirement, to `relationships.json`.
49
+ 6. Run `npx hippocampus validate`, then open `/hippocampus/design#options` to see the grid.
50
+
51
+ ## Guardrails
52
+ - Judge options as recorded; do not improve them.
53
+ - A note for every outcome that is not obvious.
54
+ - `not-assessed` over a guess.
55
+ - The team chooses, not the grid.
56
+ - Decision to requirement, never the reverse.
57
+
58
+ ## Finish
59
+ - Run `npx hippocampus validate`.
60
+ - Report, for the design action: each option's count of fails; the requirements **no option meets on its own** - usually the real design problem, and often a sign the answer is a combination; the requirements that are design work whichever option wins; and every `not-assessed` cell with what would settle it.
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: write-requirements
3
+ description: "Drafts requirements a design can be checked against - what users must recognise, select or input, how well, and the rules the service must follow - from existing needs, insights and policies, into a draft the team reviews. Use when needs exist but nothing says how a design will be judged against them, or when someone asks to write, specify or tighten requirements or acceptance criteria."
4
+ id: write-requirements
5
+ title: Write requirements
6
+ purpose: Draft verifiable user, quantitative and organisational requirements from existing needs, insights and policies, for the team to agree before they enter source.
7
+ owners:
8
+ - knowledge-builder
9
+ - workflow-orchestrator
10
+ reads:
11
+ - node_modules/@hippo-digital/hippocampus/docs/write-requirements.md
12
+ - node_modules/@hippo-digital/hippocampus/docs/human-centred-design.md
13
+ - node_modules/@hippo-digital/hippocampus/docs/source-model.md
14
+ - hippocampus/source/needs.json
15
+ - hippocampus/source/goals.json
16
+ - hippocampus/source/insights.json
17
+ - hippocampus/source/project-context.json
18
+ - hippocampus/source/requirements.json
19
+ - hippocampus/source/quality-objectives.json
20
+ edits:
21
+ - hippocampus/imports/requirements/
22
+ runs:
23
+ - npx hippocampus validate
24
+ outputs:
25
+ - A requirements draft in hippocampus/imports/requirements/ with a .review.md beside it
26
+ - Each requirement linked to the needs, insights, rules and objectives it rests on
27
+ - A list of needs that could not be turned into a requirement, and why
28
+ guardrails:
29
+ - Draft only. Do not write to hippocampus/source/ unless the user says the team has agreed the draft.
30
+ - A requirement names no solution - no screen, component or layout. It says what the user must be able to recognise, select or input, or how well.
31
+ - Every number in a quantitative requirement is a placeholder until the team agrees it. Set valuesStatus to placeholder and say where each number came from.
32
+ - An organisational requirement comes from a rule someone can point to. Name the source; never infer a rule from how a screen behaves.
33
+ - Do not invent needs to hang a requirement on. A requirement with no need behind it is a finding about the needs layer - report it.
34
+ acceptance:
35
+ - Every user requirement names at least one existing need, and every qualitative one has a verb.
36
+ - Every quantitative requirement has a measure with a whole task, a dimension and valuesStatus placeholder.
37
+ - Every organisational requirement has a source.
38
+ - Every id the draft references exists in hippocampus/source.
39
+ - Nothing in hippocampus/source/ changed unless the user asked for it.
40
+ ---
41
+
42
+ # Write requirements
43
+
44
+ ## Use when
45
+ - Needs exist but nothing says how a design will be judged against them.
46
+ - A design question has options to weigh and no requirements to weigh them against - write these first, then use `weigh-options-against-requirements`.
47
+ - Someone asks to write, specify or tighten requirements or acceptance criteria.
48
+
49
+ ## Workflow
50
+ 1. Read `write-requirements.md` for the kinds and their rules, and the needs, goals and insights in scope.
51
+ 2. Check the needs first. List any `npx hippocampus validate` reports as naming a solution or having no goal - a requirement written from a need that names a solution inherits the solution.
52
+ 3. For each need in scope, draft one or more **qualitative** requirements: "The user must be able to recognise / select / input ...", with `verb`, `needIds`, and `insightIds` for the research that shaped the wording. Test each one: could someone watch a person use a prototype and say whether they managed it?
53
+ 4. Where the team has said what "good enough" is, or a quality objective needs measuring, draft a **quantitative** requirement with a `measure`: `dimension`, a whole `task` (never a subtask), `userId`, `sampleSize`, `successRate`, `timeLimit`, and `valuesStatus: "placeholder"`. Say in the review file where each number came from - the current service, a stakeholder, or a guess.
54
+ 5. For each policy, constraint or governance rule in the project context or the research that the service must follow, draft an **organisational** requirement with its `source`. Link user requirements that must work within it with `constrained-by`.
55
+ 6. Link quantitative requirements to the objectives they measure with `refines-objective`.
56
+ 7. Write the draft to `hippocampus/imports/requirements/<date>-<topic>.json` - a `requirements` array and a `relationships` array in the shapes `source-model.md` gives - and a `.review.md` beside it listing each requirement, what it rests on, and the questions only the team can answer.
57
+ 8. Check every id the draft references exists in `hippocampus/source/`.
58
+
59
+ ## Guardrails
60
+ - Draft only; source changes when the team agrees.
61
+ - No solution in a requirement.
62
+ - Numbers are placeholders until agreed.
63
+ - An organisational requirement names its source.
64
+ - No invented needs.
65
+
66
+ ## Finish
67
+ - Run `npx hippocampus validate` to confirm source is unchanged and still valid.
68
+ - Report the draft path, requirements by kind, needs with no requirement and why, placeholder numbers and where each came from, and the questions for the team.
69
+ - When the team agrees the draft, move its records into `requirements.json` and `relationships.json` - only on the user's say-so - and run `npx hippocampus validate`.
@@ -51,18 +51,21 @@
51
51
  the list is /user-needs - so matching on the list's own href alone
52
52
  leaves every detail page with nothing marked.
53
53
  #}
54
- {% for item in [
54
+ {#
55
+ The five activities of human-centred design, then the views that cut
56
+ across them. The router passes the list (lib/breadcrumb.js navItems)
57
+ so the bar and the breadcrumb trail are built from the same table.
58
+ #}
59
+ {% for item in knowledgeNav or [
55
60
  { href: "", text: "Overview", match: [] },
56
- { href: "/project", text: "Project", match: ["/project"] },
57
- { href: "/users", text: "Users", match: ["/users"] },
58
- { href: "/user-needs", text: "Needs", match: ["/user-needs", "/needs"] },
59
- { href: "/scenarios", text: "Scenarios", match: ["/scenarios"] },
60
- { href: "/journeys", text: "Journeys", match: ["/journeys", "/handover"] },
61
- { href: "/screens", text: "Screens", match: ["/screens"] },
62
- { href: "/research", text: "Research", match: ["/research", "/insights"] },
63
- { href: "/graph", text: "Graph", match: ["/graph"] },
64
- { href: "/trace", text: "Trace", match: ["/trace"] },
65
- { href: "/docs", text: "Docs", match: ["/docs"] }
61
+ { href: "/plan", text: "Plan", match: ["/plan", "/project", "/objectives"] },
62
+ { href: "/context", text: "Context of use", match: ["/context", "/users", "/goals", "/scenarios", "/journeys", "/handover"] },
63
+ { href: "/requirements", text: "Requirements", match: ["/requirements", "/user-needs", "/needs"] },
64
+ { href: "/design", text: "Design", match: ["/design", "/principles", "/decisions", "/screens", "/route-review"] },
65
+ { href: "/evaluation", text: "Evaluation", match: ["/evaluation", "/research", "/insights"] },
66
+ { href: "/graph", text: "Graph", match: ["/graph"], secondary: true },
67
+ { href: "/trace", text: "Trace", match: ["/trace"], secondary: true },
68
+ { href: "/docs", text: "Docs", match: ["/docs"], secondary: true }
66
69
  ] %}
67
70
  {% set target = basePath + item.href %}
68
71
  {% set isCurrent = currentPage == target %}
@@ -71,7 +74,7 @@
71
74
  {% set isCurrent = true %}
72
75
  {% endif %}
73
76
  {% endfor %}
74
- <li class="knowledge-nav__item">
77
+ <li class="knowledge-nav__item{% if item.secondary %} knowledge-nav__item--secondary{% endif %}">
75
78
  <a class="knowledge-nav__link{% if isCurrent %} knowledge-nav__link--current{% endif %}"
76
79
  href="{{ target }}"
77
80
  {% if isCurrent %}aria-current="page"{% endif %}>{{ item.text }}</a>
@@ -0,0 +1,36 @@
1
+ {#
2
+ The header every activity page shares: which of the five it is, what it is
3
+ for in one sentence, and what CPUX-F calls the things it produces. The number
4
+ is the activity's place in the cycle, not a ranking - a team can start at any
5
+ of them, and usually starts wherever it already has material.
6
+ #}
7
+ {% macro activityHeader(number, title, purpose, produces) %}
8
+ <div class="nhsuk-grid-row">
9
+ <div class="nhsuk-grid-column-two-thirds">
10
+ <span class="nhsuk-caption-l">Activity {{ number }} of 5</span>
11
+ <h1>{{ title }}</h1>
12
+ <p class="nhsuk-lede-text">{{ purpose }}</p>
13
+ {% if produces %}
14
+ <p class="knowledge-muted nhsuk-body-s">Produces: {{ produces }}</p>
15
+ {% endif %}
16
+ </div>
17
+ </div>
18
+ {% endmacro %}
19
+
20
+ {# A count that links to where the work is, with a tone that says whether
21
+ anything is waiting. Same component as the landing page's status cards. #}
22
+ {% macro stat(value, label, detail, href, waiting) %}
23
+ <a class="knowledge-stat {% if waiting %}knowledge-stat--waiting{% else %}knowledge-stat--neutral{% endif %}" {% if href %}href="{{ href }}"{% endif %}>
24
+ <span class="knowledge-stat__value">{{ value }}</span>
25
+ <span class="knowledge-stat__label">{{ label }}</span>
26
+ {% if detail %}<span class="knowledge-stat__detail">{{ detail }}</span>{% endif %}
27
+ </a>
28
+ {% endmacro %}
29
+
30
+ {% macro outcomeTag(outcome) %}
31
+ {% if outcome %}
32
+ <strong class="nhsuk-tag nhsuk-tag--{{ outcome.tag }}">{{ outcome.label }}</strong>
33
+ {% else %}
34
+ <span class="knowledge-muted">Not weighed</span>
35
+ {% endif %}
36
+ {% endmacro %}