@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.
- package/CHANGELOG.md +55 -0
- package/LICENSE +21 -0
- package/README.md +153 -0
- package/assets/dist/hippocampus.css +1 -0
- package/assets/hippocampus.scss +896 -0
- package/assets/javascript/blueprint.js +123 -0
- package/bin/hippocampus.js +106 -0
- package/docs/agent-roadmap.md +217 -0
- package/docs/agent-workflow.md +56 -0
- package/docs/agentic-patterns-to-port.md +273 -0
- package/docs/colour-pairings.md +41 -0
- package/docs/components.md +52 -0
- package/docs/copilot-ncrs-research-curator-agent.md +298 -0
- package/docs/custom-agents-usage.md +95 -0
- package/docs/design-actions-and-decisions.md +95 -0
- package/docs/gp-connect-real-data-to-production.md +66 -0
- package/docs/hippocampus-for-designers-and-researchers.md +261 -0
- package/docs/hippocampus-technical.md +373 -0
- package/docs/prompt-architecture-guardrails.md +39 -0
- package/docs/repeatable-research-round-ingestion.md +239 -0
- package/docs/research-knowledge-graph.md +552 -0
- package/docs/research-source-file-conventions.md +121 -0
- package/docs/source-model.md +252 -0
- package/index.js +47 -0
- package/lib/config.js +46 -0
- package/lib/context.js +59 -0
- package/lib/create-router.js +187 -0
- package/lib/discover-projects.js +45 -0
- package/lib/docs.js +72 -0
- package/lib/host-edit.js +151 -0
- package/lib/lint-knowledge.js +133 -0
- package/lib/load-knowledge.js +629 -0
- package/lib/package-paths.js +32 -0
- package/lib/paths.js +33 -0
- package/lib/resolve-root.js +84 -0
- package/lib/schema-version.js +96 -0
- package/lib/schema.js +346 -0
- package/package.json +70 -0
- package/scripts/audit-provenance.js +147 -0
- package/scripts/doctor.js +114 -0
- package/scripts/eject.js +51 -0
- package/scripts/import-blueprint-spreadsheet.js +242 -0
- package/scripts/import-design-actions.js +230 -0
- package/scripts/import-project-context.js +427 -0
- package/scripts/import-research-batch.js +160 -0
- package/scripts/import-research-deck.js +448 -0
- package/scripts/index-source-artefacts.js +261 -0
- package/scripts/init.js +232 -0
- package/scripts/install-skills.js +160 -0
- package/scripts/lib/artefact-text.js +347 -0
- package/scripts/lib/xlsx-grid.js +114 -0
- package/scripts/link-insights-to-needs.js +209 -0
- package/scripts/migrate-knowledge.js +73 -0
- package/scripts/promote-project-context-draft.js +125 -0
- package/scripts/promote-research-draft.js +236 -0
- package/scripts/smoke-routes.js +157 -0
- package/scripts/sync-project-context.js +236 -0
- package/scripts/sync-research-artefacts.js +294 -0
- package/scripts/triage-research-corpus.js +274 -0
- package/scripts/validate-knowledge.js +49 -0
- package/scripts/validate-skills.js +247 -0
- package/skills/COVERAGE-MATRIX.md +39 -0
- package/skills/README.md +77 -0
- package/skills/SKILL-FORMAT.md +100 -0
- package/skills/add-prototype-screen.skill.md +54 -0
- package/skills/add-scenario.skill.md +47 -0
- package/skills/add-user-needs.skill.md +51 -0
- package/skills/audit-knowledge-source.skill.md +47 -0
- package/skills/capture-route-review-pack.skill.md +52 -0
- package/skills/create-journey-from-scenario.skill.md +50 -0
- package/skills/deliver-service-slice.skill.md +65 -0
- package/skills/examples/README.md +15 -0
- package/skills/examples/non-copilot-research-ingestion.md +68 -0
- package/skills/examples/non-copilot-service-slice.md +64 -0
- package/skills/generate-service-slice.skill.md +57 -0
- package/skills/ingest-project-context.skill.md +58 -0
- package/skills/ingest-research-round.skill.md +60 -0
- package/skills/map-research-to-graph.skill.md +58 -0
- package/skills/record-accessibility-review.skill.md +52 -0
- package/skills/record-design-decision.skill.md +53 -0
- package/skills/review-research-import-draft.skill.md +45 -0
- package/skills/skills.json +464 -0
- package/skills/skills.schema.json +111 -0
- package/skills/structure-project-context-draft.skill.md +51 -0
- package/skills/structure-research-draft.skill.md +51 -0
- package/skills/triage-research-corpus.skill.md +51 -0
- package/skills/write-delivery-summary.skill.md +51 -0
- package/skills/write-route-review-summary.skill.md +55 -0
- package/views/hippocampus/_layout.html +45 -0
- package/views/hippocampus/blueprint-classic.html +39 -0
- package/views/hippocampus/blueprint.html +52 -0
- package/views/hippocampus/components/_blueprint-cell.njk +42 -0
- package/views/hippocampus/components/_blueprint-controls.njk +20 -0
- package/views/hippocampus/components/_blueprint-minimap.njk +14 -0
- package/views/hippocampus/components/_empty-state.njk +12 -0
- package/views/hippocampus/components/_journey-step.njk +21 -0
- package/views/hippocampus/components/_list.njk +23 -0
- package/views/hippocampus/components/_summary-card.njk +15 -0
- package/views/hippocampus/doc.html +11 -0
- package/views/hippocampus/docs.html +19 -0
- package/views/hippocampus/evidence-impact.html +53 -0
- package/views/hippocampus/graph.html +48 -0
- package/views/hippocampus/handover-empty.html +12 -0
- package/views/hippocampus/handover.html +56 -0
- package/views/hippocampus/index.html +46 -0
- package/views/hippocampus/journey-flow.html +31 -0
- package/views/hippocampus/journey.html +23 -0
- package/views/hippocampus/not-found.html +10 -0
- package/views/hippocampus/project.html +102 -0
- package/views/hippocampus/research.html +68 -0
- package/views/hippocampus/route-review.html +83 -0
- package/views/hippocampus/scenarios.html +56 -0
- package/views/hippocampus/trace.html +113 -0
- package/views/hippocampus/user-needs.html +32 -0
- package/views/hippocampus/user.html +157 -0
- package/views/hippocampus/users.html +32 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
# Hippocampus Technical Model
|
|
2
|
+
|
|
3
|
+
Hippocampus is a structured design knowledge store for NHS Prototype Kit projects.
|
|
4
|
+
|
|
5
|
+
It is not a graph database. It is a set of validated JSON source files, helper functions and Nunjucks views that turn linked records into browsable knowledge views under `/hippocampus`.
|
|
6
|
+
|
|
7
|
+
## Source Layout
|
|
8
|
+
|
|
9
|
+
Canonical source data lives in:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
hippocampus/source/
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The current source collections are:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
project.json
|
|
19
|
+
project-context.json
|
|
20
|
+
users.json
|
|
21
|
+
needs.json
|
|
22
|
+
scenarios.json
|
|
23
|
+
journeys.json
|
|
24
|
+
screens.json
|
|
25
|
+
evidence.json
|
|
26
|
+
decisions.json
|
|
27
|
+
assumptions.json
|
|
28
|
+
research-rounds.json
|
|
29
|
+
participants.json
|
|
30
|
+
insights.json
|
|
31
|
+
design-actions.json
|
|
32
|
+
relationships.json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Supporting material lives near the source:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
hippocampus/inbox/research/ new research artefacts to import
|
|
39
|
+
hippocampus/inbox/project/ new project overview artefacts to import
|
|
40
|
+
hippocampus/imports/research/ reviewable import drafts
|
|
41
|
+
hippocampus/imports/project/ reviewable project context drafts
|
|
42
|
+
hippocampus/manifests/ import and promotion ledgers
|
|
43
|
+
hippocampus/source-artefacts/ copied evidence files
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Generated outputs belong in:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
artefacts/
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Deleting `artefacts/` should not break validation or rendering.
|
|
53
|
+
|
|
54
|
+
## Runtime Flow
|
|
55
|
+
|
|
56
|
+
The app loads source data through:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
node_modules/@hippo-digital/hippocampus/lib/load-knowledge.js
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The schema lives in:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
node_modules/@hippo-digital/hippocampus/lib/schema.js
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The runtime flow is:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
read JSON files
|
|
72
|
+
-> validate with Zod schemas
|
|
73
|
+
-> build ID indexes
|
|
74
|
+
-> build entity index
|
|
75
|
+
-> build view models
|
|
76
|
+
-> render Nunjucks views
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The main public route surface is:
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
/hippocampus
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Project context is rendered at:
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
/hippocampus/project
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Legacy `/knowledgeable` URLs redirect to `/hippocampus`.
|
|
92
|
+
|
|
93
|
+
## ID Indexes
|
|
94
|
+
|
|
95
|
+
Every source record has a stable lowercase kebab-case `id`.
|
|
96
|
+
|
|
97
|
+
At runtime, `buildIndex()` creates lookup maps:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
knowledge.index.users
|
|
101
|
+
knowledge.index.needs
|
|
102
|
+
knowledge.index.scenarios
|
|
103
|
+
knowledge.index.journeys
|
|
104
|
+
knowledge.index.screens
|
|
105
|
+
knowledge.index.evidence
|
|
106
|
+
knowledge.index.decisions
|
|
107
|
+
knowledge.index.assumptions
|
|
108
|
+
knowledge.index.researchRounds
|
|
109
|
+
knowledge.index.participants
|
|
110
|
+
knowledge.index.insights
|
|
111
|
+
knowledge.index.designActions
|
|
112
|
+
knowledge.index.relationships
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
This lets views and graph functions resolve references quickly without repeatedly scanning whole arrays.
|
|
116
|
+
|
|
117
|
+
## Entity Index
|
|
118
|
+
|
|
119
|
+
`buildEntityIndex()` creates one cross-collection entity map:
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
knowledge.index.entities
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
It normalises different record types into a common shape:
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"id": "need-example",
|
|
130
|
+
"type": "Need",
|
|
131
|
+
"label": "A human-readable label",
|
|
132
|
+
"collection": "needs",
|
|
133
|
+
"item": {}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This index is what allows `relationships.json` to link across different kinds of records.
|
|
138
|
+
|
|
139
|
+
## Project Context
|
|
140
|
+
|
|
141
|
+
`project-context.json` stores generic project overview material outside the relationship graph.
|
|
142
|
+
|
|
143
|
+
It is intended for:
|
|
144
|
+
|
|
145
|
+
- purpose and vision
|
|
146
|
+
- problem statement
|
|
147
|
+
- service proposition
|
|
148
|
+
- project-level users
|
|
149
|
+
- channels
|
|
150
|
+
- policies and regulations
|
|
151
|
+
- constraints
|
|
152
|
+
- risks
|
|
153
|
+
- milestones
|
|
154
|
+
- source facts
|
|
155
|
+
- source overview artefacts
|
|
156
|
+
|
|
157
|
+
The import flow mirrors research import:
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
hippocampus/inbox/project/
|
|
161
|
+
-> npx hippocampus import project-context
|
|
162
|
+
-> hippocampus/imports/project/*.json
|
|
163
|
+
-> npx hippocampus promote project-context
|
|
164
|
+
-> hippocampus/source/project-context.json
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
It remains separate from research because overview boards usually mix facts, strategy, constraints and policy context rather than direct research findings.
|
|
168
|
+
|
|
169
|
+
## Two Graph Models
|
|
170
|
+
|
|
171
|
+
Hippocampus currently has two graph mechanisms.
|
|
172
|
+
|
|
173
|
+
### Implied Graph
|
|
174
|
+
|
|
175
|
+
Some relationships are embedded directly in source records.
|
|
176
|
+
|
|
177
|
+
Examples:
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
need.userId
|
|
181
|
+
need.evidenceIds
|
|
182
|
+
scenario.userId
|
|
183
|
+
scenario.needIds
|
|
184
|
+
journey.scenarioId
|
|
185
|
+
journey.steps[].needIds
|
|
186
|
+
journey.steps[].screenIds
|
|
187
|
+
journey.steps[].evidenceIds
|
|
188
|
+
journey.steps[].decisionIds
|
|
189
|
+
screen.needIds
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
These produce an implied graph:
|
|
193
|
+
|
|
194
|
+
```text
|
|
195
|
+
user
|
|
196
|
+
-> needs
|
|
197
|
+
-> evidence
|
|
198
|
+
-> scenarios
|
|
199
|
+
-> needs
|
|
200
|
+
-> journeys
|
|
201
|
+
-> steps
|
|
202
|
+
-> screens
|
|
203
|
+
-> evidence
|
|
204
|
+
-> decisions
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
`getUserKnowledgeGraph(userId)` resolves this implied graph for one user. It powers pages such as:
|
|
208
|
+
|
|
209
|
+
```text
|
|
210
|
+
/hippocampus/users/policy-administrator
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Explicit Graph
|
|
214
|
+
|
|
215
|
+
`relationships.json` is the explicit graph layer.
|
|
216
|
+
|
|
217
|
+
Each relationship has:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"id": "rel-example",
|
|
222
|
+
"from": "source-entity-id",
|
|
223
|
+
"type": "relationship-type",
|
|
224
|
+
"to": "target-entity-id"
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Allowed relationship types currently include:
|
|
229
|
+
|
|
230
|
+
```text
|
|
231
|
+
has-scenario
|
|
232
|
+
has-need
|
|
233
|
+
tests-need
|
|
234
|
+
supported-by
|
|
235
|
+
drives-journey
|
|
236
|
+
renders-screen
|
|
237
|
+
addresses-need
|
|
238
|
+
uses-evidence
|
|
239
|
+
records-decision
|
|
240
|
+
has-participant
|
|
241
|
+
produced-insight
|
|
242
|
+
contributed-to
|
|
243
|
+
supports-insight
|
|
244
|
+
responds-to-insight
|
|
245
|
+
resolves-action
|
|
246
|
+
leads-to-action (legacy, no longer emitted)
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Validation checks that every `from` and `to` ID points to a known entity.
|
|
250
|
+
|
|
251
|
+
`getGraphExplorer()` reads `relationships.json`, enriches each relationship with labels and entity types, and powers:
|
|
252
|
+
|
|
253
|
+
```text
|
|
254
|
+
/hippocampus/graph
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Trace Tree
|
|
258
|
+
|
|
259
|
+
The trace tree route is:
|
|
260
|
+
|
|
261
|
+
```text
|
|
262
|
+
/hippocampus/trace
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
`getTraceExplorer(entityId)` uses the same enriched explicit relationships as the graph explorer.
|
|
266
|
+
|
|
267
|
+
For the selected entity, it builds:
|
|
268
|
+
|
|
269
|
+
- `upstream`: incoming relationships where `relationship.to` is the current entity
|
|
270
|
+
- `downstream`: outgoing relationships where `relationship.from` is the current entity
|
|
271
|
+
|
|
272
|
+
Each branch is expanded recursively to a maximum depth with cycle protection. This lets the viewer represent navigable paths such as:
|
|
273
|
+
|
|
274
|
+
```text
|
|
275
|
+
old design -> research -> insight -> action -> new design -> content
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
The trace tree is generic. It does not hard-code those labels; it renders whatever entities and relationship types exist in `relationships.json`.
|
|
279
|
+
|
|
280
|
+
## Evidence Impact
|
|
281
|
+
|
|
282
|
+
Evidence impact uses the explicit graph to show what depends on a piece of evidence.
|
|
283
|
+
|
|
284
|
+
Route:
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
/hippocampus/evidence/:evidenceId/impact
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
The process is:
|
|
291
|
+
|
|
292
|
+
```text
|
|
293
|
+
start with evidence ID
|
|
294
|
+
-> find relationships where relationship.to is the current ID
|
|
295
|
+
-> add relationship.from as an impacted dependent
|
|
296
|
+
-> repeat from each dependent
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
So if the graph says:
|
|
300
|
+
|
|
301
|
+
```text
|
|
302
|
+
need -> supported-by -> evidence
|
|
303
|
+
screen -> addresses-need -> need
|
|
304
|
+
journey -> uses-evidence -> evidence
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
then the impact view can show which needs, screens, journeys and decisions may be affected if that evidence changes.
|
|
308
|
+
|
|
309
|
+
Direction matters. Relationships should be modelled so that dependent things point to the thing they depend on.
|
|
310
|
+
|
|
311
|
+
## Research Import
|
|
312
|
+
|
|
313
|
+
The default import command is:
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
npx hippocampus research sync
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
This command:
|
|
320
|
+
|
|
321
|
+
- scans `hippocampus/inbox/research`
|
|
322
|
+
- fingerprints supported files
|
|
323
|
+
- skips already-known artefacts
|
|
324
|
+
- creates reviewable drafts in `hippocampus/imports/research`
|
|
325
|
+
- updates `hippocampus/manifests/research.json`
|
|
326
|
+
- asks before promoting drafts into canonical source data
|
|
327
|
+
|
|
328
|
+
Research imports can create:
|
|
329
|
+
|
|
330
|
+
```text
|
|
331
|
+
research rounds
|
|
332
|
+
participants
|
|
333
|
+
insights
|
|
334
|
+
design actions
|
|
335
|
+
relationships
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Promotion is deliberate. Imported draft data should be reviewed before it becomes canonical source.
|
|
339
|
+
|
|
340
|
+
## Validation
|
|
341
|
+
|
|
342
|
+
Run:
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
npx hippocampus validate
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
Validation checks:
|
|
349
|
+
|
|
350
|
+
- source JSON shape
|
|
351
|
+
- required fields
|
|
352
|
+
- lowercase kebab-case IDs
|
|
353
|
+
- enum values
|
|
354
|
+
- route format
|
|
355
|
+
- duplicate IDs
|
|
356
|
+
- cross-record references
|
|
357
|
+
- explicit relationship endpoints
|
|
358
|
+
|
|
359
|
+
Run:
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
npx hippocampus doctor
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
This starts the Prototype Kit and checks that generated Hippocampus routes and linked prototype screens return HTTP 200.
|
|
366
|
+
|
|
367
|
+
## Current Limits
|
|
368
|
+
|
|
369
|
+
- The graph is rendered as cards and relationship lists, not an interactive network diagram.
|
|
370
|
+
- The explicit graph is manually maintained or imported; it is not fully inferred from every source record.
|
|
371
|
+
- Relationship direction needs consistency for impact analysis to work well.
|
|
372
|
+
- There is no graph query language yet.
|
|
373
|
+
- There is no schema migration system yet.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Prompt Architecture Guardrails
|
|
2
|
+
|
|
3
|
+
The prompt pack is for repeatable source-model and prototype maintenance. Prompts should make agents safer, not more verbose.
|
|
4
|
+
|
|
5
|
+
## Principles
|
|
6
|
+
|
|
7
|
+
- Source data beats hard-coded pages.
|
|
8
|
+
- Evidence beats assertion.
|
|
9
|
+
- Assumption beats invented evidence.
|
|
10
|
+
- Small linked records beat large narrative blobs.
|
|
11
|
+
- Generated artefacts belong in `artefacts/`, not in the source model.
|
|
12
|
+
|
|
13
|
+
## Prompt Shape
|
|
14
|
+
|
|
15
|
+
Each prompt should include:
|
|
16
|
+
|
|
17
|
+
- files to read first
|
|
18
|
+
- source records that may be edited
|
|
19
|
+
- relationship constraints
|
|
20
|
+
- validation command
|
|
21
|
+
- expected finish summary
|
|
22
|
+
|
|
23
|
+
## Do Not
|
|
24
|
+
|
|
25
|
+
- Ask agents to create real patient data.
|
|
26
|
+
- Ask agents to bypass validation.
|
|
27
|
+
- Ask agents to copy large external component references into this repo.
|
|
28
|
+
- Ask agents to rewrite unrelated source records for style only.
|
|
29
|
+
- Ask agents to treat generated artefacts as source of truth.
|
|
30
|
+
|
|
31
|
+
## Useful Prompt Stages
|
|
32
|
+
|
|
33
|
+
1. Generate or revise a service slice.
|
|
34
|
+
2. Add user needs.
|
|
35
|
+
3. Add scenarios.
|
|
36
|
+
4. Create journeys and blueprint steps.
|
|
37
|
+
5. Add prototype screens.
|
|
38
|
+
6. Audit traceability, evidence and assumptions.
|
|
39
|
+
7. Produce review artefacts and delivery summaries.
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
# Repeatable Research Round Ingestion
|
|
2
|
+
|
|
3
|
+
This playbook describes how a team can turn research artefacts into Hippocampus source data without relying on a single opaque AI step.
|
|
4
|
+
|
|
5
|
+
This is the canonical staged ingestion workflow. If another repo doc overlaps with the step-by-step process, this document wins.
|
|
6
|
+
|
|
7
|
+
The pattern is:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
triage the folder (optional, for large corpora)
|
|
11
|
+
-> drop artefact
|
|
12
|
+
-> script extracts text
|
|
13
|
+
-> AI structures the draft from extracted text only
|
|
14
|
+
-> human reviews evidence and gaps
|
|
15
|
+
-> promotion script validates and merges
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Use this for every research round, show-and-tell deck, interview synthesis, usability test report or project overview artefact that should become part of the knowledge graph.
|
|
19
|
+
|
|
20
|
+
## Principles
|
|
21
|
+
|
|
22
|
+
- The script is responsible for deterministic extraction, fingerprints and repeatable file handling.
|
|
23
|
+
- Detection is scoped to section headings. A slide or Word heading such as "Insights",
|
|
24
|
+
"Findings", "Design actions" or "Participants" makes the lines beneath it
|
|
25
|
+
candidates; generic headings yield nothing. `docs/research-source-file-conventions.md`
|
|
26
|
+
explains how to author artefacts so this works.
|
|
27
|
+
- AI is responsible for structuring, synthesis and spotting links that simple text rules miss.
|
|
28
|
+
- Humans are responsible for deciding whether the draft is true enough to promote.
|
|
29
|
+
- Promotion scripts are responsible for schema validation and controlled writes to `hippocampus/source`.
|
|
30
|
+
- A draft passing schema validation does not mean the content is good.
|
|
31
|
+
|
|
32
|
+
## A Round Is Fieldwork, Not A File
|
|
33
|
+
|
|
34
|
+
A research round can span many artefacts: a discussion guide, twelve scenario maps,
|
|
35
|
+
a playback deck, an insight tracker. They all belong to one round.
|
|
36
|
+
|
|
37
|
+
`research:sync` reads the round from the folder name, so
|
|
38
|
+
`Round 16 - Patient Search in FHIR/03 Analysing the research/P27 ...docx` imports
|
|
39
|
+
into `round-16` rather than inventing a round called `p27-detailed-scenario-map`.
|
|
40
|
+
Pass `--round-id` to override it. Each artefact still produces its own draft, and
|
|
41
|
+
insight and design-action IDs are namespaced per artefact so drafts from one round
|
|
42
|
+
do not collide. Participants stay round-scoped, because the same participant code
|
|
43
|
+
in two artefacts is one person.
|
|
44
|
+
|
|
45
|
+
Promotion is idempotent for the records a round shares. Promoting a second artefact
|
|
46
|
+
from the same round reuses the existing round record and merges participants rather
|
|
47
|
+
than failing on duplicate IDs; it still fails if the round exists with a different
|
|
48
|
+
title or date, which means two rounds have been given the same ID.
|
|
49
|
+
|
|
50
|
+
Dates come from a `YYYY-MM-DD`, `YYYYMMDD` or `YYYY-MM` in the file or folder name.
|
|
51
|
+
Where none is found the draft carries today's date and a warning saying so, because
|
|
52
|
+
file modification dates do not survive a copy off a shared drive.
|
|
53
|
+
|
|
54
|
+
## Folder Contract
|
|
55
|
+
|
|
56
|
+
Research artefacts go in:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
hippocampus/inbox/research/
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Project overview artefacts go in:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
hippocampus/inbox/project/
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Generated review drafts are written to:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
hippocampus/imports/research/
|
|
72
|
+
hippocampus/imports/project/
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Promoted source data is written to:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
hippocampus/source/
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Triage First For Large Corpora
|
|
82
|
+
|
|
83
|
+
A shared drive holds far more than one round's worth of material, and most of it is
|
|
84
|
+
context rather than findings. Triage before you copy anything into the inbox:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npx hippocampus research triage -- --source "/path/to/research folder" --topic <topic>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
This reads every file, ranks it by the signals that matter to the schema, maps it to
|
|
91
|
+
the records it could become, and writes a review pack to
|
|
92
|
+
`artefacts/research-triage/`. It copies nothing, imports nothing and writes nothing
|
|
93
|
+
to `hippocampus/source/`.
|
|
94
|
+
|
|
95
|
+
Work down the tiers, take Tier 1 into the inbox first, and follow the round workflow
|
|
96
|
+
below one round at a time. `.github/skills/triage-research-corpus.skill.md` is the
|
|
97
|
+
skill entry point.
|
|
98
|
+
|
|
99
|
+
## Research Round Workflow
|
|
100
|
+
|
|
101
|
+
1. Drop the artefact into `hippocampus/inbox/research/`. PowerPoint, PDF, Word,
|
|
102
|
+
Excel, CSV, plain text and `.url` shortcuts are all read.
|
|
103
|
+
2. Run:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npx hippocampus research sync -- --no-promote
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
3. Find the generated draft:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
hippocampus/imports/research/<draft-id>.review.md
|
|
113
|
+
hippocampus/imports/research/<draft-id>.json
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
4. Ask an AI coding agent to use `.github/agents/ingestion-curator.md` and follow `.github/skills/structure-research-draft.skill.md` against the draft.
|
|
117
|
+
5. Review the changed JSON and the review Markdown together.
|
|
118
|
+
6. Run a dry-run promotion:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npx hippocampus promote research -- --draft hippocampus/imports/research/<draft-id>.json --dry-run
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
7. If the draft is still weak, ask AI to revise the JSON again. Do not promote weak drafts.
|
|
125
|
+
8. Promote only after review:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npx hippocampus promote research -- --draft hippocampus/imports/research/<draft-id>.json
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
9. Validate the knowledge base:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npx hippocampus validate
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Project Context Workflow
|
|
138
|
+
|
|
139
|
+
Use project context for overview material such as project purpose, pilot scope, service proposition, policy context, constraints, channels, milestones and source facts.
|
|
140
|
+
|
|
141
|
+
1. Drop the deck or text-based PDF into `hippocampus/inbox/project/`.
|
|
142
|
+
2. Run:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
npx hippocampus import project-context -- --no-promote
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
3. Find the generated draft:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
hippocampus/imports/project/<draft-id>.review.md
|
|
152
|
+
hippocampus/imports/project/<draft-id>.json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
4. Ask an AI coding agent to use `.github/agents/ingestion-curator.md` and follow `.github/skills/structure-project-context-draft.skill.md` against the draft.
|
|
156
|
+
5. Review the changed JSON and the review Markdown together.
|
|
157
|
+
6. Run a dry-run promotion:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
npx hippocampus promote project-context -- --draft hippocampus/imports/project/<draft-id>.json --dry-run
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
7. Promote only after review:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
npx hippocampus promote project-context -- --draft hippocampus/imports/project/<draft-id>.json
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
8. Validate the knowledge base:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npx hippocampus validate
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## AI Prompt Rules
|
|
176
|
+
|
|
177
|
+
Use a strong reasoning model for structuring drafts.
|
|
178
|
+
|
|
179
|
+
The AI must:
|
|
180
|
+
|
|
181
|
+
- use only the extracted review Markdown and existing JSON draft
|
|
182
|
+
- preserve extracted text, source paths and import metadata
|
|
183
|
+
- return actual JSON changes, not a summary of intended changes
|
|
184
|
+
- leave weak or missing material out rather than inventing it
|
|
185
|
+
- keep warnings for claims that need human review
|
|
186
|
+
- cite source page, slide, heading or section where the schema has a suitable field
|
|
187
|
+
- avoid generic policies, dates, risks or users that are not named in the source
|
|
188
|
+
|
|
189
|
+
Do not accept a report that says the model improved the file. Check the diff.
|
|
190
|
+
|
|
191
|
+
## Review Checklist
|
|
192
|
+
|
|
193
|
+
Before promotion, check:
|
|
194
|
+
|
|
195
|
+
- The draft file actually changed.
|
|
196
|
+
- The extracted text supports every important claim.
|
|
197
|
+
- Research insights are genuine findings, not slide headings.
|
|
198
|
+
- Participants are real people, roles or user groups from the source, not section labels.
|
|
199
|
+
- Design actions are concrete and traceable to evidence.
|
|
200
|
+
- Project context facts are not table-of-contents entries.
|
|
201
|
+
- Risks are complete statements, not fragments containing the word "risk".
|
|
202
|
+
- Duplicates and contradictions are called out.
|
|
203
|
+
- Schema dry-run passed.
|
|
204
|
+
- A human has approved the draft.
|
|
205
|
+
- Insight counts are plausible. The heading-scoped pass is deliberately generous: it
|
|
206
|
+
offers candidates, and an artefact yielding well over 60 insights is capturing
|
|
207
|
+
narrative text that a human should cut back before promotion.
|
|
208
|
+
|
|
209
|
+
## What Good Looks Like
|
|
210
|
+
|
|
211
|
+
A good promoted research round should let a team answer:
|
|
212
|
+
|
|
213
|
+
- What did we learn?
|
|
214
|
+
- Who did we learn it from?
|
|
215
|
+
- What evidence supports it?
|
|
216
|
+
- What design or product action follows?
|
|
217
|
+
- Which users, needs, journeys, screens or decisions does it affect?
|
|
218
|
+
|
|
219
|
+
A good promoted project context draft should let a team answer:
|
|
220
|
+
|
|
221
|
+
- What is this service or pilot trying to do?
|
|
222
|
+
- Who is involved?
|
|
223
|
+
- What constraints, policies, channels and risks matter?
|
|
224
|
+
- What milestones or facts are supported by source material?
|
|
225
|
+
- Which artefacts prove those claims?
|
|
226
|
+
|
|
227
|
+
## Recommended Team Operating Model
|
|
228
|
+
|
|
229
|
+
For each research round:
|
|
230
|
+
|
|
231
|
+
1. Researcher drops the final deck/report into the inbox.
|
|
232
|
+
2. Designer or researcher runs the sync command.
|
|
233
|
+
3. AI structures the generated draft.
|
|
234
|
+
4. Researcher checks evidence and wording.
|
|
235
|
+
5. Designer checks graph links and product implications.
|
|
236
|
+
6. One person promotes the draft.
|
|
237
|
+
7. The team reviews `/hippocampus`, `/hippocampus/graph` and `/hippocampus/trace`.
|
|
238
|
+
|
|
239
|
+
This keeps Hippocampus repeatable: teams can use AI heavily, but the graph only changes through reviewable drafts and validation scripts.
|