@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,552 @@
|
|
|
1
|
+
# Research Knowledge Graph and Import Process
|
|
2
|
+
|
|
3
|
+
This project treats design knowledge as linked source data. The frontend renders users, scenarios, journeys, blueprints, prototype screens, evidence impact and research artefacts from JSON in `hippocampus/source`.
|
|
4
|
+
|
|
5
|
+
The goal is traceability:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
research round
|
|
9
|
+
-> participant
|
|
10
|
+
-> insight
|
|
11
|
+
-> design action
|
|
12
|
+
-> scenario / need / journey / screen / decision
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The current implementation supports the graph model and a conservative research artefact import pipeline. Imported PowerPoint decks and text-based PDFs become reviewable drafts first. Reviewed drafts can then be promoted into the canonical knowledge source.
|
|
16
|
+
|
|
17
|
+
Use `docs/repeatable-research-round-ingestion.md` as the canonical staged ingestion workflow. This document focuses on the graph model, importer behavior, draft shape, validation and promotion semantics.
|
|
18
|
+
|
|
19
|
+
## Hippocampus Layout
|
|
20
|
+
|
|
21
|
+
The `hippocampus/` folder contains the knowledge base and the material being absorbed into it:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
hippocampus/
|
|
25
|
+
source/ canonical structured knowledge
|
|
26
|
+
inbox/project/ new project overview artefacts to scan
|
|
27
|
+
inbox/research/ new research artefacts to scan
|
|
28
|
+
imports/project/ reviewable project context drafts
|
|
29
|
+
imports/research/ reviewable import drafts
|
|
30
|
+
manifests/ import and promotion ledgers
|
|
31
|
+
source-artefacts/ copied evidence files that support source knowledge
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Generated outputs belong under `artefacts/`. The app should still validate and render if `artefacts/` is deleted.
|
|
35
|
+
|
|
36
|
+
## Core Source Files
|
|
37
|
+
|
|
38
|
+
The main source files live in `hippocampus/source`:
|
|
39
|
+
|
|
40
|
+
- `users.json`
|
|
41
|
+
- `project-context.json`
|
|
42
|
+
- `needs.json`
|
|
43
|
+
- `scenarios.json`
|
|
44
|
+
- `journeys.json`
|
|
45
|
+
- `screens.json`
|
|
46
|
+
- `evidence.json`
|
|
47
|
+
- `decisions.json`
|
|
48
|
+
- `assumptions.json`
|
|
49
|
+
- `relationships.json`
|
|
50
|
+
- `research-rounds.json`
|
|
51
|
+
- `participants.json`
|
|
52
|
+
- `insights.json`
|
|
53
|
+
- `design-actions.json`
|
|
54
|
+
|
|
55
|
+
The schema lives in `node_modules/@hippo-digital/hippocampus/lib/schema.js`.
|
|
56
|
+
|
|
57
|
+
The loader, index builder and cross-reference validation live in `node_modules/@hippo-digital/hippocampus/lib/load-knowledge.js`.
|
|
58
|
+
|
|
59
|
+
## Relationship Graph
|
|
60
|
+
|
|
61
|
+
`relationships.json` is the explicit graph layer. It records typed links between entities:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"id": "rel-policy-scenario-journey",
|
|
66
|
+
"from": "scenario-policy-administrator-household-eligibility",
|
|
67
|
+
"type": "drives-journey",
|
|
68
|
+
"to": "policy-household-eligibility"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Relationship IDs use lowercase kebab-case.
|
|
73
|
+
|
|
74
|
+
Supported relationship types currently include:
|
|
75
|
+
|
|
76
|
+
- `has-scenario`
|
|
77
|
+
- `has-need`
|
|
78
|
+
- `tests-need`
|
|
79
|
+
- `supported-by`
|
|
80
|
+
- `drives-journey`
|
|
81
|
+
- `renders-screen`
|
|
82
|
+
- `addresses-need`
|
|
83
|
+
- `uses-evidence`
|
|
84
|
+
- `records-decision`
|
|
85
|
+
- `has-participant`
|
|
86
|
+
- `produced-insight`
|
|
87
|
+
- `contributed-to`
|
|
88
|
+
- `supports-insight`
|
|
89
|
+
- `responds-to-insight` (design action -> insight)
|
|
90
|
+
- `resolves-action` (decision -> design action)
|
|
91
|
+
- `leads-to-action` (legacy direction, no longer emitted)
|
|
92
|
+
|
|
93
|
+
Validation checks that every `from` and `to` points to a known entity.
|
|
94
|
+
|
|
95
|
+
## Frontend Views
|
|
96
|
+
|
|
97
|
+
Key routes:
|
|
98
|
+
|
|
99
|
+
- `/hippocampus`
|
|
100
|
+
- `/hippocampus/users/:userId`
|
|
101
|
+
- `/hippocampus/graph`
|
|
102
|
+
- `/hippocampus/evidence/:evidenceId/impact`
|
|
103
|
+
- `/hippocampus/research`
|
|
104
|
+
- `/hippocampus/journeys/:journeyId`
|
|
105
|
+
- `/hippocampus/journeys/:journeyId/blueprint`
|
|
106
|
+
- `/hippocampus/journeys/:journeyId/blueprint/classic`
|
|
107
|
+
- `/hippocampus/journeys/:journeyId/flow`
|
|
108
|
+
- `/hippocampus/journeys/:journeyId/handover`
|
|
109
|
+
|
|
110
|
+
The policy administrator example is useful for checking the graph:
|
|
111
|
+
|
|
112
|
+
- `/hippocampus/users/policy-administrator`
|
|
113
|
+
- `/hippocampus/journeys/policy-household-eligibility`
|
|
114
|
+
- `/hippocampus/evidence/evidence-policy-administrators-scenario-map/impact`
|
|
115
|
+
|
|
116
|
+
## Project Context Import Flow
|
|
117
|
+
|
|
118
|
+
Project context is for generic overview material rather than research findings. Use it for service overviews, mapping boards, policy summaries, channel information, volumes, constraints, milestones and risks.
|
|
119
|
+
|
|
120
|
+
The default project context workflow is:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npx hippocampus import project-context
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
This scans `hippocampus/inbox/project`, fingerprints supported files, imports only new files, updates `hippocampus/manifests/project.json`, and asks before promoting unpromoted drafts.
|
|
127
|
+
|
|
128
|
+
Use flags when needed:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npx hippocampus import project-context -- --dry-run
|
|
132
|
+
npx hippocampus import project-context -- --no-promote
|
|
133
|
+
npx hippocampus import project-context -- --yes
|
|
134
|
+
npx hippocampus import project-context -- --source path/to/folder
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Single-artefact import is also available:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
npm run import:project-context -- --document path/to/overview.pdf --context-id overview-id --title "Project overview"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Review generated drafts in:
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
hippocampus/imports/project/
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Promote after review:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
npx hippocampus promote project-context -- --draft hippocampus/imports/project/<draft-id>.json
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Promoted project context is written to:
|
|
156
|
+
|
|
157
|
+
```text
|
|
158
|
+
hippocampus/source/project-context.json
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
and rendered at:
|
|
162
|
+
|
|
163
|
+
```text
|
|
164
|
+
/hippocampus/project
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Research Artefact Import Flow
|
|
168
|
+
|
|
169
|
+
The default research workflow is:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npx hippocampus research sync
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
This scans `hippocampus/inbox/research`, fingerprints supported files, imports only new files, updates `hippocampus/manifests/research.json`, and asks before promoting unpromoted drafts.
|
|
176
|
+
|
|
177
|
+
Use flags when needed:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
npx hippocampus research sync -- --dry-run
|
|
181
|
+
npx hippocampus research sync -- --no-promote
|
|
182
|
+
npx hippocampus research sync -- --yes
|
|
183
|
+
npx hippocampus research sync -- --source path/to/folder
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
The lower-level single-artefact and batch commands are still available when you need explicit control.
|
|
187
|
+
|
|
188
|
+
The single-artefact import flow has two stages:
|
|
189
|
+
|
|
190
|
+
```text
|
|
191
|
+
PowerPoint deck or text-based PDF
|
|
192
|
+
-> import draft JSON
|
|
193
|
+
-> human review
|
|
194
|
+
-> promotion into canonical source data
|
|
195
|
+
-> validation
|
|
196
|
+
-> frontend graph views
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
This is deliberate. An artefact may contain useful research, but extracted text often lacks stable structure. The importer should not silently mutate source data.
|
|
200
|
+
|
|
201
|
+
## Script And AI Workflow
|
|
202
|
+
|
|
203
|
+
The intended pattern remains:
|
|
204
|
+
|
|
205
|
+
```text
|
|
206
|
+
script extracts text
|
|
207
|
+
-> skill structures or reviews the draft
|
|
208
|
+
-> human checks the result
|
|
209
|
+
-> promotion script validates and merges
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
For the step-by-step team workflow, use `docs/repeatable-research-round-ingestion.md`.
|
|
213
|
+
|
|
214
|
+
The active skill entry points are:
|
|
215
|
+
|
|
216
|
+
- `.github/skills/ingest-research-round.skill.md`
|
|
217
|
+
- `.github/skills/ingest-project-context.skill.md`
|
|
218
|
+
- `.github/skills/structure-research-draft.skill.md`
|
|
219
|
+
- `.github/skills/review-research-import-draft.skill.md`
|
|
220
|
+
- `.github/skills/map-research-to-graph.skill.md`
|
|
221
|
+
|
|
222
|
+
The skills should not promote drafts. Promotion remains a deliberate command so source changes stay reviewable and auditable.
|
|
223
|
+
|
|
224
|
+
### 1. Import an Artefact
|
|
225
|
+
|
|
226
|
+
Run:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
npx hippocampus import research-deck -- --deck path/to/artefact.pptx-or.pdf --round-id round-id --title "Round title" --date YYYY-MM-DD
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
The importer:
|
|
233
|
+
|
|
234
|
+
- reads slide XML from `.pptx` files
|
|
235
|
+
- extracts page text from text-based `.pdf` files
|
|
236
|
+
- does not OCR scanned PDFs yet
|
|
237
|
+
- looks for prefixed lines:
|
|
238
|
+
- `Participant:`
|
|
239
|
+
- `User:`
|
|
240
|
+
- `Attendee:`
|
|
241
|
+
- `Insight:`
|
|
242
|
+
- `Finding:`
|
|
243
|
+
- `Observation:`
|
|
244
|
+
- `Action:`
|
|
245
|
+
- `Design action:`
|
|
246
|
+
- `Recommendation:`
|
|
247
|
+
- builds a draft JSON file under `hippocampus/imports/research/`
|
|
248
|
+
- writes a paired `.review.md` file for human review
|
|
249
|
+
- validates the draft against `ResearchImportDraftSchema`
|
|
250
|
+
- reports fit warnings when the artefact structure does not map well to the research graph
|
|
251
|
+
|
|
252
|
+
Example warnings:
|
|
253
|
+
|
|
254
|
+
- no participants detected
|
|
255
|
+
- no insights detected
|
|
256
|
+
- no design actions detected
|
|
257
|
+
- low insight density for the number of slides
|
|
258
|
+
|
|
259
|
+
The draft includes the extracted slide or page text so a human can inspect what the importer saw.
|
|
260
|
+
|
|
261
|
+
Use the `.review.md` file for review first. Use the `.json` file when editing data for promotion.
|
|
262
|
+
|
|
263
|
+
## Batch Import Flow
|
|
264
|
+
|
|
265
|
+
Use batch import when you have many files to process at once.
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
npx hippocampus research batch -- --source path/to/files --batch-id batch-id
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Optional arguments:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
npx hippocampus research batch -- --source path/to/files --batch-id batch-id --date YYYY-MM-DD --concurrency 4
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
The batch importer:
|
|
278
|
+
|
|
279
|
+
- recursively scans the source folder
|
|
280
|
+
- processes supported files in parallel
|
|
281
|
+
- currently supports `.pptx` and text-based `.pdf`
|
|
282
|
+
- writes one draft per supported source file
|
|
283
|
+
- writes a `manifest.json`
|
|
284
|
+
- records unsupported files and failed files separately
|
|
285
|
+
|
|
286
|
+
Batch output:
|
|
287
|
+
|
|
288
|
+
```text
|
|
289
|
+
hippocampus/imports/research/batches/<batch-id>/
|
|
290
|
+
drafts/
|
|
291
|
+
deck-a.json
|
|
292
|
+
deck-a.review.md
|
|
293
|
+
deck-b.json
|
|
294
|
+
deck-b.review.md
|
|
295
|
+
manifest.json
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
The manifest records:
|
|
299
|
+
|
|
300
|
+
- source folder
|
|
301
|
+
- import timestamp
|
|
302
|
+
- concurrency level
|
|
303
|
+
- files found
|
|
304
|
+
- drafts created
|
|
305
|
+
- unsupported files
|
|
306
|
+
- failed files
|
|
307
|
+
- draft and review paths
|
|
308
|
+
|
|
309
|
+
Parallel import is safe because it only writes draft files. Promotion should stay deliberate and reviewed.
|
|
310
|
+
|
|
311
|
+
### 2. Review the Draft
|
|
312
|
+
|
|
313
|
+
Open the generated file in `hippocampus/imports/research/`.
|
|
314
|
+
|
|
315
|
+
For batch imports, review files in:
|
|
316
|
+
|
|
317
|
+
```text
|
|
318
|
+
hippocampus/imports/research/batches/<batch-id>/drafts/
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Before promotion, check:
|
|
322
|
+
|
|
323
|
+
- Does the `researchRounds` record describe the round correctly?
|
|
324
|
+
- Are participant labels and roles useful?
|
|
325
|
+
- Are insights genuine research findings rather than slide headings?
|
|
326
|
+
- Are design actions phrased as concrete design work?
|
|
327
|
+
- Do relationships connect the right entities?
|
|
328
|
+
- Are IDs stable and lowercase kebab-case?
|
|
329
|
+
|
|
330
|
+
Edit the draft if needed before promotion.
|
|
331
|
+
|
|
332
|
+
### 3. Dry-Run Promotion
|
|
333
|
+
|
|
334
|
+
Run:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
npx hippocampus promote research -- --draft hippocampus/imports/research/round-id.json --dry-run
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Dry-run promotion:
|
|
341
|
+
|
|
342
|
+
- validates the draft against `ResearchImportDraftSchema`
|
|
343
|
+
- checks duplicate IDs against canonical source data
|
|
344
|
+
- checks references inside the draft
|
|
345
|
+
- checks relationship endpoints against known canonical and draft entities
|
|
346
|
+
- does not write source files
|
|
347
|
+
|
|
348
|
+
### 4. Promote the Draft
|
|
349
|
+
|
|
350
|
+
Run:
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
npx hippocampus promote research -- --draft hippocampus/imports/research/round-id.json
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
Promotion appends records into:
|
|
357
|
+
|
|
358
|
+
- `research-rounds.json`
|
|
359
|
+
- `participants.json`
|
|
360
|
+
- `insights.json`
|
|
361
|
+
- `design-actions.json`
|
|
362
|
+
- `relationships.json`
|
|
363
|
+
|
|
364
|
+
After writing, it runs:
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
npx hippocampus validate
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
If validation fails, review the promoted data before continuing.
|
|
371
|
+
|
|
372
|
+
## Validation
|
|
373
|
+
|
|
374
|
+
Run:
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
npx hippocampus validate
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
This checks:
|
|
381
|
+
|
|
382
|
+
- JSON shape through Zod schemas
|
|
383
|
+
- ID formats
|
|
384
|
+
- enum values
|
|
385
|
+
- route formats
|
|
386
|
+
- cross-file references
|
|
387
|
+
- relationship endpoints
|
|
388
|
+
|
|
389
|
+
Run:
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
npx hippocampus doctor
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
This starts the app on a smoke-test port and checks generated routes, user routes, evidence impact routes and prototype screen routes return 200.
|
|
396
|
+
|
|
397
|
+
## Current Limitations
|
|
398
|
+
|
|
399
|
+
- The importer uses visible PowerPoint slide text or text extracted from PDF pages only.
|
|
400
|
+
- Speaker notes are not imported yet.
|
|
401
|
+
- Slide layout is not interpreted.
|
|
402
|
+
- Decks without clear `Participant:`, `Insight:` or `Action:` prefixes will produce weak drafts.
|
|
403
|
+
- Promotion appends records; it does not update existing records.
|
|
404
|
+
- Research detail pages beyond the index are not built yet.
|
|
405
|
+
|
|
406
|
+
## Recommended Deck Format
|
|
407
|
+
|
|
408
|
+
For best import results, use explicit prefixes in the artefact text:
|
|
409
|
+
|
|
410
|
+
```text
|
|
411
|
+
Participant: P1 - Policy administrator
|
|
412
|
+
Insight: Users need caveats when household relationships are inferred from address history
|
|
413
|
+
Action: Add caveat capture to the eligibility evidence screen
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
Keep one insight or action per line where possible.
|
|
417
|
+
|
|
418
|
+
## Safe Editing Rules
|
|
419
|
+
|
|
420
|
+
- Import first, review second, promote third.
|
|
421
|
+
- Do not promote unrelated decks just because they parse.
|
|
422
|
+
- Prefer fit warnings over false confidence.
|
|
423
|
+
- Keep source data fictional unless explicitly approved.
|
|
424
|
+
- Run `npx hippocampus validate` and `npx hippocampus doctor` before committing.
|
|
425
|
+
|
|
426
|
+
## Testing the Import Flow
|
|
427
|
+
|
|
428
|
+
Use the safest route for testing:
|
|
429
|
+
|
|
430
|
+
```text
|
|
431
|
+
import -> inspect draft -> dry-run promotion -> promote only if the draft is right
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### 1. Create a Test Source Folder
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
mkdir -p hippocampus/imports/research/batches/test-batch/source
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
Copy one or more `.pptx` or text-based `.pdf` files into:
|
|
441
|
+
|
|
442
|
+
```text
|
|
443
|
+
hippocampus/imports/research/batches/test-batch/source/
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
For the first test, use a small artefact with clear text markers:
|
|
447
|
+
|
|
448
|
+
```text
|
|
449
|
+
Participant: P1 - Policy administrator
|
|
450
|
+
Insight: Users need caveats when household relationships are inferred
|
|
451
|
+
Action: Add caveat capture to the evidence screen
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
### 2. Run Batch Import
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
npx hippocampus research batch -- --source hippocampus/imports/research/batches/test-batch/source --batch-id test-batch --date 2026-07-07 --concurrency 2
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
Expected output:
|
|
461
|
+
|
|
462
|
+
```text
|
|
463
|
+
hippocampus/imports/research/batches/test-batch/
|
|
464
|
+
drafts/
|
|
465
|
+
manifest.json
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
### 3. Inspect the Manifest
|
|
469
|
+
|
|
470
|
+
```bash
|
|
471
|
+
cat hippocampus/imports/research/batches/test-batch/manifest.json
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
Check:
|
|
475
|
+
|
|
476
|
+
- `filesFound`
|
|
477
|
+
- `draftsCreated`
|
|
478
|
+
- `unsupported`
|
|
479
|
+
- `failed`
|
|
480
|
+
- `drafts`
|
|
481
|
+
|
|
482
|
+
If `failed` is not empty, inspect the error before continuing.
|
|
483
|
+
|
|
484
|
+
### 4. Inspect the Draft
|
|
485
|
+
|
|
486
|
+
```bash
|
|
487
|
+
ls hippocampus/imports/research/batches/test-batch/drafts
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
Open the generated `.review.md` file first. It is the human-readable view of the import and includes:
|
|
491
|
+
|
|
492
|
+
- fit warnings
|
|
493
|
+
- counts
|
|
494
|
+
- participants
|
|
495
|
+
- insights
|
|
496
|
+
- design actions
|
|
497
|
+
- extracted slide or page text
|
|
498
|
+
|
|
499
|
+
Then open the `.json` draft if you need to edit the data before promotion. Review:
|
|
500
|
+
|
|
501
|
+
- `warnings`
|
|
502
|
+
- `researchRounds`
|
|
503
|
+
- `participants`
|
|
504
|
+
- `insights`
|
|
505
|
+
- `designActions`
|
|
506
|
+
- `relationships`
|
|
507
|
+
- `slides`
|
|
508
|
+
|
|
509
|
+
Warnings are not automatic failures. They mean the extracted text did not map cleanly to the research graph. Fix the draft or improve the source markers before promotion.
|
|
510
|
+
|
|
511
|
+
### 5. Dry-Run Promotion
|
|
512
|
+
|
|
513
|
+
```bash
|
|
514
|
+
npx hippocampus promote research -- --draft hippocampus/imports/research/batches/test-batch/drafts/YOUR-DRAFT.json --dry-run
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
Dry-run promotion should pass before real promotion. It checks:
|
|
518
|
+
|
|
519
|
+
- draft schema
|
|
520
|
+
- duplicate IDs
|
|
521
|
+
- participant-to-round links
|
|
522
|
+
- insight-to-round and insight-to-participant links
|
|
523
|
+
- action-to-insight links
|
|
524
|
+
- relationship endpoints
|
|
525
|
+
|
|
526
|
+
### 6. Promote Only After Review
|
|
527
|
+
|
|
528
|
+
```bash
|
|
529
|
+
npx hippocampus promote research -- --draft hippocampus/imports/research/batches/test-batch/drafts/YOUR-DRAFT.json
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
Then run:
|
|
533
|
+
|
|
534
|
+
```bash
|
|
535
|
+
npx hippocampus validate
|
|
536
|
+
npx hippocampus doctor
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
View the result:
|
|
540
|
+
|
|
541
|
+
- `/hippocampus/research`
|
|
542
|
+
- `/hippocampus/graph`
|
|
543
|
+
|
|
544
|
+
### 7. Clean Up Throwaway Tests
|
|
545
|
+
|
|
546
|
+
If the batch was only a smoke test and should not remain in the repo, remove it with:
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
trash hippocampus/imports/research/batches/test-batch
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
Use `trash` rather than `rm` so the generated test files remain recoverable.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Research source file conventions
|
|
2
|
+
|
|
3
|
+
How to write and store research artefacts so they ingest cleanly into Hippocampus.
|
|
4
|
+
|
|
5
|
+
This is written for researchers and designers, not for the scripts. Everything here
|
|
6
|
+
is a change to how a file is *authored or named*, not a change to the research
|
|
7
|
+
itself. Each convention exists because the ingestion pipeline currently loses
|
|
8
|
+
something real without it.
|
|
9
|
+
|
|
10
|
+
The reference corpus behind this guidance is the NCRS user research drive:
|
|
11
|
+
599 files, 2.3 million extractable words, rounds 4 to 16.
|
|
12
|
+
|
|
13
|
+
## The one thing that matters most
|
|
14
|
+
|
|
15
|
+
**Write findings under a heading that says what they are.**
|
|
16
|
+
|
|
17
|
+
The importer scopes detection to section headings. A slide or Word heading called
|
|
18
|
+
`Insights`, `Findings`, `What we learned`, `Themes`, `Pain points`,
|
|
19
|
+
`Design actions`, `Recommendations`, `Participants` or `Assumptions` turns every
|
|
20
|
+
substantive line beneath it into a candidate record.
|
|
21
|
+
|
|
22
|
+
A heading called `Global Insights` works. `Slide 12` does not. A deck of genuine
|
|
23
|
+
findings under generic headings imports as nothing at all.
|
|
24
|
+
|
|
25
|
+
## Conventions by artefact type
|
|
26
|
+
|
|
27
|
+
### All artefacts
|
|
28
|
+
|
|
29
|
+
| Do | Why |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| Keep the `01 Planning / 02 Doing / 03 Analysing / 04 Sharing / 05 Design Actions` folder pattern | It is read as research-stage provenance. It already works well across rounds 4 to 16 — keep it. |
|
|
32
|
+
| Put the round number in the folder name (`Round 12 - ...`) | The round is derived from the path, so every artefact inherits the right `roundId`. |
|
|
33
|
+
| Put the fieldwork date in the file name as `YYYY-MM` or `YYYY-MM-DD` | Copying files off SharePoint resets every modification date. On this corpus, all 599 files carried the copy date, so file dates cannot be trusted as evidence dates. The name is the only surviving provenance. |
|
|
34
|
+
| Keep one canonical version, not `- Copy`, `(1)`, `OLD`, `Archive` siblings | Near-identical duplicates each generate their own draft and their own IDs. |
|
|
35
|
+
| Use participant codes (`P27`, `P104`) rather than names | Codes are safe to store, and they are what links a quote to a participant record. |
|
|
36
|
+
|
|
37
|
+
### Slide decks (.pptx)
|
|
38
|
+
|
|
39
|
+
- Section headings drive detection — see above.
|
|
40
|
+
- **Speaker notes are now read.** They were previously discarded, which lost about
|
|
41
|
+
10% of the text in this corpus and over 3,500 words in each of the round 16
|
|
42
|
+
playbacks. Notes are captured as context, but a finding stated only in the notes
|
|
43
|
+
will not seed an insight on its own — put the finding on the slide.
|
|
44
|
+
- Attribute quotes as `P104 - "the quote"`. An unattributed quote cannot be traced
|
|
45
|
+
to a participant and the importer will warn about it.
|
|
46
|
+
- One finding per bullet. A bullet that wraps into the next one imports as two
|
|
47
|
+
fragments.
|
|
48
|
+
|
|
49
|
+
### Documents (.docx)
|
|
50
|
+
|
|
51
|
+
- **Use real Word heading styles**, not bold body text. This is the single biggest
|
|
52
|
+
quality gap in the corpus: the round 16 `P## Detailed Scenario Map` documents are
|
|
53
|
+
beautifully structured with numbered sections, but every paragraph is styled
|
|
54
|
+
`Normal`, so the whole document imports as one undivided block. The persona
|
|
55
|
+
documents use `Heading 2` correctly and import as clean, separately addressable
|
|
56
|
+
sections.
|
|
57
|
+
- Keep the numbered section pattern used by the scenario maps. It maps directly onto
|
|
58
|
+
`scenario.locationSearch` in the schema.
|
|
59
|
+
- Transcripts should keep the `P##:` speaker prefix on every turn.
|
|
60
|
+
|
|
61
|
+
### Spreadsheets (.xlsx, .csv)
|
|
62
|
+
|
|
63
|
+
- **Put a header row in row 1 of every sheet.** Column headers are read as field
|
|
64
|
+
names, so `Insight / Feedback Summary` becomes the insight text and
|
|
65
|
+
`Design Action` becomes the action.
|
|
66
|
+
- The `Insight and Design Action Tracker` format already in use is close to ideal.
|
|
67
|
+
Its columns (`ID`, `Date Received`, `User Groups Affected`, `Feedback Source`,
|
|
68
|
+
`Need`, `Theme`, `Insight / Feedback Summary`, `Impact Level`, `Signal Strength`,
|
|
69
|
+
`Evidence Link 1-3`, `Design Action`, `Status`) map almost one-for-one onto
|
|
70
|
+
`insights`, `designActions`, `evidence` and `relationships`. Use it for every round.
|
|
71
|
+
- Keep date columns as real dates. Excel serials in date-named columns are converted
|
|
72
|
+
back to `YYYY-MM-DD`; serials elsewhere are left as opaque numbers.
|
|
73
|
+
- Do not merge cells across a header row.
|
|
74
|
+
- Save legacy `.xls` files as real `.xlsx`. Two files in this corpus carry an `.xlsx`
|
|
75
|
+
extension over a non-zip payload and cannot be opened by any tool in the pipeline.
|
|
76
|
+
|
|
77
|
+
### Links (.url)
|
|
78
|
+
|
|
79
|
+
- These are kept, not skipped. A MURAL board or Confluence page shortcut becomes an
|
|
80
|
+
evidence record pointing at where the analysis lives.
|
|
81
|
+
- Name the shortcut after what it points at (`Round 11 MURAL analysis.url`), because
|
|
82
|
+
the file name becomes the evidence title.
|
|
83
|
+
|
|
84
|
+
### Media (.mp4, .jpg, .png)
|
|
85
|
+
|
|
86
|
+
- Video and images carry no extractable text and are registered as evidence
|
|
87
|
+
artefacts only. On this corpus that is 3.4 GB of the 3.7 GB total.
|
|
88
|
+
- **Name clips as `P## - what the clip shows.mp4`.** The round 15 accessibility clips
|
|
89
|
+
do this well: `P94 - Not knowing how to navigate with a keyboard.mp4` is a usable
|
|
90
|
+
finding and a participant link from the file name alone.
|
|
91
|
+
- If a PDF is a scan or an exported board image, say so in the file name. It will
|
|
92
|
+
extract as near-zero words and would otherwise look like a failed import.
|
|
93
|
+
|
|
94
|
+
## What good looks like
|
|
95
|
+
|
|
96
|
+
A round folder that ingests cleanly:
|
|
97
|
+
|
|
98
|
+
```text
|
|
99
|
+
Round 17 - <topic>/
|
|
100
|
+
01 Planning research/
|
|
101
|
+
Round 17 Research Plan 2026-10.docx <- Heading styles
|
|
102
|
+
02 Doing the research/
|
|
103
|
+
P## transcripts, discussion guide
|
|
104
|
+
03 Analysing the research/
|
|
105
|
+
P## Detailed Scenario Map.docx <- Heading styles, numbered sections
|
|
106
|
+
Scenario_Evidence_Map.xlsx <- header row, one scenario per row
|
|
107
|
+
04 Sharing the research/
|
|
108
|
+
Round 17 Show and Tell 2026-11.pptx <- "Insights - <group>" headings,
|
|
109
|
+
P## attributed quotes, notes used
|
|
110
|
+
05 Design Actions/
|
|
111
|
+
R17 research insights.xlsx <- the tracker template
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Checking your own files before handing them over
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npx hippocampus research triage -- --source "/path/to/Round 17" --topic round-17
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Read the report in `artefacts/research-triage/`. If your finished playback deck lands
|
|
121
|
+
in Tier 3, the content is fine but the structure is hiding it.
|