@hippo-digital/hippocampus 1.0.0-rc.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 (116) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/LICENSE +21 -0
  3. package/README.md +153 -0
  4. package/assets/dist/hippocampus.css +1 -0
  5. package/assets/hippocampus.scss +896 -0
  6. package/assets/javascript/blueprint.js +123 -0
  7. package/bin/hippocampus.js +106 -0
  8. package/docs/agent-roadmap.md +217 -0
  9. package/docs/agent-workflow.md +56 -0
  10. package/docs/agentic-patterns-to-port.md +273 -0
  11. package/docs/colour-pairings.md +41 -0
  12. package/docs/components.md +52 -0
  13. package/docs/copilot-ncrs-research-curator-agent.md +298 -0
  14. package/docs/custom-agents-usage.md +95 -0
  15. package/docs/design-actions-and-decisions.md +95 -0
  16. package/docs/gp-connect-real-data-to-production.md +66 -0
  17. package/docs/hippocampus-for-designers-and-researchers.md +261 -0
  18. package/docs/hippocampus-technical.md +373 -0
  19. package/docs/prompt-architecture-guardrails.md +39 -0
  20. package/docs/repeatable-research-round-ingestion.md +239 -0
  21. package/docs/research-knowledge-graph.md +552 -0
  22. package/docs/research-source-file-conventions.md +121 -0
  23. package/docs/source-model.md +252 -0
  24. package/index.js +47 -0
  25. package/lib/config.js +46 -0
  26. package/lib/context.js +59 -0
  27. package/lib/create-router.js +187 -0
  28. package/lib/discover-projects.js +45 -0
  29. package/lib/docs.js +72 -0
  30. package/lib/host-edit.js +151 -0
  31. package/lib/lint-knowledge.js +133 -0
  32. package/lib/load-knowledge.js +629 -0
  33. package/lib/package-paths.js +32 -0
  34. package/lib/paths.js +33 -0
  35. package/lib/resolve-root.js +84 -0
  36. package/lib/schema-version.js +96 -0
  37. package/lib/schema.js +346 -0
  38. package/package.json +70 -0
  39. package/scripts/audit-provenance.js +147 -0
  40. package/scripts/doctor.js +114 -0
  41. package/scripts/eject.js +51 -0
  42. package/scripts/import-blueprint-spreadsheet.js +242 -0
  43. package/scripts/import-design-actions.js +230 -0
  44. package/scripts/import-project-context.js +427 -0
  45. package/scripts/import-research-batch.js +160 -0
  46. package/scripts/import-research-deck.js +448 -0
  47. package/scripts/index-source-artefacts.js +261 -0
  48. package/scripts/init.js +232 -0
  49. package/scripts/install-skills.js +160 -0
  50. package/scripts/lib/artefact-text.js +347 -0
  51. package/scripts/lib/xlsx-grid.js +114 -0
  52. package/scripts/link-insights-to-needs.js +209 -0
  53. package/scripts/migrate-knowledge.js +73 -0
  54. package/scripts/promote-project-context-draft.js +125 -0
  55. package/scripts/promote-research-draft.js +236 -0
  56. package/scripts/smoke-routes.js +157 -0
  57. package/scripts/sync-project-context.js +236 -0
  58. package/scripts/sync-research-artefacts.js +294 -0
  59. package/scripts/triage-research-corpus.js +274 -0
  60. package/scripts/validate-knowledge.js +49 -0
  61. package/scripts/validate-skills.js +247 -0
  62. package/skills/COVERAGE-MATRIX.md +39 -0
  63. package/skills/README.md +77 -0
  64. package/skills/SKILL-FORMAT.md +100 -0
  65. package/skills/add-prototype-screen.skill.md +54 -0
  66. package/skills/add-scenario.skill.md +47 -0
  67. package/skills/add-user-needs.skill.md +51 -0
  68. package/skills/audit-knowledge-source.skill.md +47 -0
  69. package/skills/capture-route-review-pack.skill.md +52 -0
  70. package/skills/create-journey-from-scenario.skill.md +50 -0
  71. package/skills/deliver-service-slice.skill.md +65 -0
  72. package/skills/examples/README.md +15 -0
  73. package/skills/examples/non-copilot-research-ingestion.md +68 -0
  74. package/skills/examples/non-copilot-service-slice.md +64 -0
  75. package/skills/generate-service-slice.skill.md +57 -0
  76. package/skills/ingest-project-context.skill.md +58 -0
  77. package/skills/ingest-research-round.skill.md +60 -0
  78. package/skills/map-research-to-graph.skill.md +58 -0
  79. package/skills/record-accessibility-review.skill.md +52 -0
  80. package/skills/record-design-decision.skill.md +53 -0
  81. package/skills/review-research-import-draft.skill.md +45 -0
  82. package/skills/skills.json +464 -0
  83. package/skills/skills.schema.json +111 -0
  84. package/skills/structure-project-context-draft.skill.md +51 -0
  85. package/skills/structure-research-draft.skill.md +51 -0
  86. package/skills/triage-research-corpus.skill.md +51 -0
  87. package/skills/write-delivery-summary.skill.md +51 -0
  88. package/skills/write-route-review-summary.skill.md +55 -0
  89. package/views/hippocampus/_layout.html +45 -0
  90. package/views/hippocampus/blueprint-classic.html +39 -0
  91. package/views/hippocampus/blueprint.html +52 -0
  92. package/views/hippocampus/components/_blueprint-cell.njk +42 -0
  93. package/views/hippocampus/components/_blueprint-controls.njk +20 -0
  94. package/views/hippocampus/components/_blueprint-minimap.njk +14 -0
  95. package/views/hippocampus/components/_empty-state.njk +12 -0
  96. package/views/hippocampus/components/_journey-step.njk +21 -0
  97. package/views/hippocampus/components/_list.njk +23 -0
  98. package/views/hippocampus/components/_summary-card.njk +15 -0
  99. package/views/hippocampus/doc.html +11 -0
  100. package/views/hippocampus/docs.html +19 -0
  101. package/views/hippocampus/evidence-impact.html +53 -0
  102. package/views/hippocampus/graph.html +48 -0
  103. package/views/hippocampus/handover-empty.html +12 -0
  104. package/views/hippocampus/handover.html +56 -0
  105. package/views/hippocampus/index.html +46 -0
  106. package/views/hippocampus/journey-flow.html +31 -0
  107. package/views/hippocampus/journey.html +23 -0
  108. package/views/hippocampus/not-found.html +10 -0
  109. package/views/hippocampus/project.html +102 -0
  110. package/views/hippocampus/research.html +68 -0
  111. package/views/hippocampus/route-review.html +83 -0
  112. package/views/hippocampus/scenarios.html +56 -0
  113. package/views/hippocampus/trace.html +113 -0
  114. package/views/hippocampus/user-needs.html +32 -0
  115. package/views/hippocampus/user.html +157 -0
  116. package/views/hippocampus/users.html +32 -0
@@ -0,0 +1,157 @@
1
+ {% extends "hippocampus/_layout.html" %}
2
+ {% from "hippocampus/components/_list.njk" import bulletList %}
3
+
4
+ {% block pageTitle %}{{ userGraph.user.label }}{% endblock %}
5
+
6
+ {% block content %}
7
+ <a class="nhsuk-back-link" href="{{ basePath }}/users">Back to users</a>
8
+
9
+ <div class="nhsuk-grid-row">
10
+ <div class="nhsuk-grid-column-two-thirds">
11
+ <span class="nhsuk-caption-l">User knowledge graph</span>
12
+ <h1>{{ userGraph.user.label }}</h1>
13
+ <p class="nhsuk-lede-text">{{ userGraph.user.description }}</p>
14
+ </div>
15
+ </div>
16
+
17
+ <section class="knowledge-section">
18
+ <h2>How this interlinks</h2>
19
+ <p>This page resolves links from the source data: user to scenarios, scenarios to needs, needs to evidence, and any journey, screen or decision links that already exist.</p>
20
+
21
+ <div class="knowledge-graph-summary">
22
+ <div><strong>{{ userGraph.scenarios.length }}</strong><span>Scenarios</span></div>
23
+ <div><strong>{{ userGraph.needs.length }}</strong><span>User needs</span></div>
24
+ <div><strong>{{ userGraph.evidence.length }}</strong><span>Evidence items</span></div>
25
+ <div><strong>{{ userGraph.journeys.length }}</strong><span>Journeys</span></div>
26
+ <div><strong>{{ userGraph.screens.length }}</strong><span>Screens</span></div>
27
+ <div><strong>{{ userGraph.decisions.length }}</strong><span>Decisions</span></div>
28
+ </div>
29
+
30
+ <div class="knowledge-graph">
31
+ {% for node in userGraph.graph.nodes %}
32
+ <article class="knowledge-graph__node knowledge-graph__node--{{ node.type | lower }}">
33
+ <strong>{{ node.type }}</strong>
34
+ <span>{{ node.label }}</span>
35
+ </article>
36
+ {% endfor %}
37
+ </div>
38
+
39
+ <h3 class="nhsuk-heading-s">Link map</h3>
40
+ <ul class="nhsuk-list knowledge-edge-list">
41
+ {% for edge in userGraph.graph.edges %}
42
+ <li>
43
+ <strong>{{ edge.fromLabel }}</strong>
44
+ <span>{{ edge.label }}</span>
45
+ <strong>{{ edge.toLabel }}</strong>
46
+ </li>
47
+ {% endfor %}
48
+ </ul>
49
+ </section>
50
+
51
+ <section class="knowledge-section">
52
+ <h2>Responsibilities and access needs</h2>
53
+ <div class="nhsuk-grid-row">
54
+ <div class="nhsuk-grid-column-one-half">
55
+ <h3 class="nhsuk-heading-s">Responsibilities</h3>
56
+ {{ bulletList(userGraph.user.responsibilities) }}
57
+ </div>
58
+ <div class="nhsuk-grid-column-one-half">
59
+ <h3 class="nhsuk-heading-s">Access needs</h3>
60
+ {{ bulletList(userGraph.user.accessNeeds) }}
61
+ </div>
62
+ </div>
63
+ </section>
64
+
65
+ <section class="knowledge-section">
66
+ <h2>Scenarios</h2>
67
+ {% for scenario in userGraph.scenarios %}
68
+ <article class="knowledge-linked-block">
69
+ <span class="nhsuk-tag nhsuk-tag--{{ 'red' if scenario.riskLevel == 'high' else 'yellow' }}">{{ scenario.riskLevel }} risk</span>
70
+ <h3>{{ scenario.title }}</h3>
71
+ <p><strong>Trigger:</strong> {{ scenario.trigger }}</p>
72
+ <p>{{ scenario.context }}</p>
73
+
74
+ {% if scenario.locationSearch %}
75
+ <div class="knowledge-linked-block__detail">
76
+ <h4 class="nhsuk-heading-s">Location search intent</h4>
77
+ <p>{{ scenario.locationSearch.primaryIntent }}</p>
78
+ <p><strong>Scope:</strong> {{ scenario.locationSearch.searchScope }}</p>
79
+
80
+ <div class="nhsuk-grid-row">
81
+ <div class="nhsuk-grid-column-one-half">
82
+ <h5 class="nhsuk-heading-xs">Available information</h5>
83
+ {{ bulletList(scenario.locationSearch.availableInformation) }}
84
+ </div>
85
+ <div class="nhsuk-grid-column-one-half">
86
+ <h5 class="nhsuk-heading-xs">Outcomes</h5>
87
+ {{ bulletList(scenario.locationSearch.outcomes) }}
88
+ </div>
89
+ </div>
90
+ </div>
91
+ {% endif %}
92
+
93
+ <h4 class="nhsuk-heading-s">Linked needs</h4>
94
+ <ul class="nhsuk-list nhsuk-list--bullet">
95
+ {% for needId in scenario.needIds %}
96
+ {% set need = knowledge.index.needs[needId] %}
97
+ <li>{{ need.statement }}</li>
98
+ {% endfor %}
99
+ </ul>
100
+ </article>
101
+ {% else %}
102
+ <p class="knowledge-muted">No scenarios linked yet.</p>
103
+ {% endfor %}
104
+ </section>
105
+
106
+ <section class="knowledge-section">
107
+ <h2>User needs and evidence</h2>
108
+ <div class="knowledge-list">
109
+ {% for need in userGraph.needs %}
110
+ <article class="knowledge-card">
111
+ <p class="knowledge-card__meta">{{ need.priority }} priority</p>
112
+ <h3 class="nhsuk-heading-s">{{ need.statement }}</h3>
113
+ <h4 class="nhsuk-heading-xs">Evidence</h4>
114
+ <ul class="nhsuk-list">
115
+ {% for evidenceId in need.evidenceIds %}
116
+ {% set evidence = knowledge.index.evidence[evidenceId] %}
117
+ <li>{{ evidence.title }} <span class="knowledge-confidence-tag knowledge-confidence-tag--{{ evidence.confidence }}">{{ evidence.confidence }} confidence</span></li>
118
+ {% endfor %}
119
+ </ul>
120
+ </article>
121
+ {% endfor %}
122
+ </div>
123
+ </section>
124
+
125
+ <section class="knowledge-section">
126
+ <h2>Evidence detail</h2>
127
+ {% for evidence in userGraph.evidence %}
128
+ <article class="knowledge-linked-block">
129
+ <p class="knowledge-card__meta">{{ evidence.sourceType }}</p>
130
+ <span class="knowledge-confidence-tag knowledge-confidence-tag--{{ evidence.confidence }}">{{ evidence.confidence }} confidence</span>
131
+ <h3><a href="{{ basePath }}/evidence/{{ evidence.id }}/impact">{{ evidence.title }}</a></h3>
132
+ <p>{{ evidence.summary }}</p>
133
+ {% if evidence.quotes %}
134
+ <h4 class="nhsuk-heading-xs">Quoted signals</h4>
135
+ <ul class="nhsuk-list nhsuk-list--bullet">
136
+ {% for quote in evidence.quotes %}
137
+ <li>&ldquo;{{ quote }}&rdquo;</li>
138
+ {% endfor %}
139
+ </ul>
140
+ {% endif %}
141
+ </article>
142
+ {% endfor %}
143
+ </section>
144
+
145
+ <section class="knowledge-section">
146
+ <h2>Generated artefacts</h2>
147
+ {% if userGraph.journeys.length %}
148
+ <ul class="nhsuk-list">
149
+ {% for journey in userGraph.journeys %}
150
+ <li><a href="{{ basePath }}/journeys/{{ journey.id }}">{{ journey.title }}</a></li>
151
+ {% endfor %}
152
+ </ul>
153
+ {% else %}
154
+ <p class="knowledge-muted">No journey or prototype screen has been generated for this user yet. The scenario, needs and evidence are ready to drive that next slice.</p>
155
+ {% endif %}
156
+ </section>
157
+ {% endblock %}
@@ -0,0 +1,32 @@
1
+ {% extends "hippocampus/_layout.html" %}
2
+ {% from "hippocampus/components/_list.njk" import bulletList %}
3
+ {% from "hippocampus/components/_empty-state.njk" import emptyState %}
4
+
5
+ {% block pageTitle %}Users{% endblock %}
6
+
7
+ {% block content %}
8
+ <a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
9
+ <h1>Users</h1>
10
+ {% if knowledge.users.length %}
11
+ {% for user in knowledge.users %}
12
+ <section class="knowledge-section">
13
+ <h2><a href="{{ basePath }}/users/{{ user.id }}">{{ user.label }}</a></h2>
14
+ <p>{{ user.description }}</p>
15
+ <div class="nhsuk-grid-row">
16
+ <div class="nhsuk-grid-column-one-half">
17
+ <h3 class="nhsuk-heading-s">Responsibilities</h3>
18
+ {{ bulletList(user.responsibilities) }}
19
+ </div>
20
+ <div class="nhsuk-grid-column-one-half">
21
+ <h3 class="nhsuk-heading-s">Access needs</h3>
22
+ {{ bulletList(user.accessNeeds) }}
23
+ </div>
24
+ </div>
25
+ </section>
26
+ {% endfor %}
27
+ {% else %}
28
+ {{ emptyState("No users yet",
29
+ "Users are who the service is for. Every need, scenario and screen hangs off one.",
30
+ "Add them with the add-user-needs skill, or import a persona document into hippocampus/inbox/project/.") }}
31
+ {% endif %}
32
+ {% endblock %}