@hippo-digital/hippocampus 2.4.0 → 2.6.0

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 (51) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/README.md +19 -0
  3. package/assets/dist/hippocampus.css +1 -1
  4. package/assets/hippocampus.scss +34 -1
  5. package/bin/hippocampus.js +1 -1
  6. package/docs/add-project-context.md +225 -0
  7. package/docs/agent-roadmap.md +6 -1
  8. package/docs/agent-workflow.md +6 -1
  9. package/docs/ask-whats-already-known.md +159 -0
  10. package/docs/check-for-unintended-consequences.md +191 -0
  11. package/docs/colour-pairings.md +6 -0
  12. package/docs/components.md +7 -1
  13. package/docs/custom-agents-usage.md +6 -1
  14. package/docs/data-and-governance.md +188 -0
  15. package/docs/design-actions-and-decisions.md +5 -0
  16. package/docs/diagrams/README.md +44 -0
  17. package/docs/diagrams/evidence-flow.mmd +56 -0
  18. package/docs/diagrams/mermaid.config.json +20 -0
  19. package/docs/hippocampus-for-designers-and-researchers.md +9 -3
  20. package/docs/hippocampus-technical.md +7 -1
  21. package/docs/images/evidence-flow.svg +1 -0
  22. package/docs/import-a-research-round.md +233 -0
  23. package/docs/link-insights-to-needs.md +225 -0
  24. package/docs/prompt-architecture-guardrails.md +6 -1
  25. package/docs/repeatable-research-round-ingestion.md +9 -3
  26. package/docs/research-knowledge-graph.md +12 -4
  27. package/docs/research-source-file-conventions.md +7 -2
  28. package/docs/review-and-promote-a-draft.md +212 -0
  29. package/docs/source-model.md +7 -1
  30. package/docs/start-here.md +223 -0
  31. package/docs/turn-personas-into-users-and-needs.md +207 -0
  32. package/lib/create-router.js +26 -3
  33. package/lib/docs.js +288 -30
  34. package/lib/templates.js +1 -1
  35. package/package.json +1 -1
  36. package/scripts/consequences.js +7 -5
  37. package/scripts/import-project-context.js +17 -5
  38. package/scripts/import-research-deck.js +31 -6
  39. package/scripts/known.js +2 -2
  40. package/scripts/link-insights-to-needs.js +38 -13
  41. package/scripts/promote-project-context-draft.js +66 -15
  42. package/scripts/promote-research-draft.js +99 -12
  43. package/scripts/smoke-routes.js +8 -1
  44. package/scripts/sync-project-context.js +90 -12
  45. package/skills/ingest-project-context/SKILL.md +1 -1
  46. package/skills/skills.json +2 -2
  47. package/skills/structure-project-context-draft/SKILL.md +1 -1
  48. package/templates/project-context.xlsx +0 -0
  49. package/views/hippocampus/doc.html +15 -0
  50. package/views/hippocampus/docs.html +42 -13
  51. package/views/hippocampus/research.html +9 -4
@@ -0,0 +1,225 @@
1
+ ---
2
+ section: recipes
3
+ order: 60
4
+ audience: [viewer, cli]
5
+ summary: Connect each research insight to the user needs it is evidence about, then check every proposed link before it stays.
6
+ ---
7
+ # Link insights to needs
8
+
9
+ An insight tests a need when it is evidence about it: it shows the need is
10
+ real, or unmet, or met. Those links are what put the research under a need's
11
+ page, what [Check for unintended consequences](check-for-unintended-consequences.md)
12
+ follows, and what the front page counts as **Insights not linked to a need**.
13
+
14
+ `npx hippocampus link insight-needs` proposes them by comparing the words in
15
+ each insight with the words in each need. It is a first pass, not a judgement.
16
+ Every link it writes is listed in a review pack for a person to check.
17
+
18
+ Like the personas step, this writes straight into `hippocampus/source/`, with
19
+ no draft. Review the change with git before you commit it.
20
+
21
+ ## Who this is for
22
+
23
+ Researchers who know the findings, working with whoever runs commands in the
24
+ prototype. Anyone can see the links in the viewer.
25
+
26
+ ## Before you start
27
+
28
+ ### Have something to link
29
+
30
+ You need promoted research rounds with insights in them
31
+ ([Review a draft and promote it](review-and-promote-a-draft.md)), and users
32
+ with needs ([Turn personas into users and needs](turn-personas-into-users-and-needs.md)).
33
+
34
+ ### Say which roles are which users
35
+
36
+ An insight is only compared with the needs of the users it concerns. That stops
37
+ a finding about receptionists attaching itself to a patient's need because
38
+ both mention "appointment".
39
+
40
+ The users an insight concerns come from the roles of the participants in its
41
+ round, such as `P1 - Practice receptionist`. Participants have roles; the
42
+ knowledge base has users. Which role is which user is something only your team
43
+ knows, so you write it down once in `hippocampus.config.json`, in your
44
+ prototype's folder:
45
+
46
+ ```json
47
+ {
48
+ "linkInsights": {
49
+ "userGroups": [
50
+ { "match": "receptionist", "users": ["receptionist"] },
51
+ { "match": "carer", "users": ["carer"] },
52
+ { "match": "patient", "users": ["patient"] }
53
+ ]
54
+ }
55
+ }
56
+ ```
57
+
58
+ Add `linkInsights` alongside what is already in the file. Each `match` is
59
+ checked against every participant's role, ignoring capitals. `users` is the
60
+ list of user ids, from `users.json`, whose needs that role's insights may test.
61
+ A `match` is a pattern, so `"nurse|midwife"` matches either word.
62
+
63
+ If an insight's summary names the groups it affects in a sentence such as
64
+ `Affects receptionists and carers.`, those groups are used instead of the
65
+ round's participants.
66
+
67
+ Without this mapping nothing is linked, and the command says so.
68
+
69
+ ### Start from a clean record
70
+
71
+ Commit or set aside other changes in `hippocampus/source/` first, so that
72
+ `git diff` shows only the new links.
73
+
74
+ ## At the command line
75
+
76
+ 1. See what it would do, without writing anything:
77
+
78
+ ```bash
79
+ npx hippocampus link insight-needs --dry-run
80
+ ```
81
+
82
+ It prints how many links there are now and would be, how many insights it
83
+ linked, the insights it could not link and why, and the weakest link it kept
84
+ for each insight.
85
+
86
+ 2. Write the links:
87
+
88
+ ```bash
89
+ npx hippocampus link insight-needs
90
+ ```
91
+
92
+ This updates `hippocampus/source/relationships.json` and writes a review
93
+ pack to `artefacts/research-triage/`, named with today's date.
94
+
95
+ 3. Read the review pack. Each insight is listed with the needs it was linked
96
+ to and a score. Scores compare the links under one insight, not one insight
97
+ with another. The lowest-scoring link under each insight is the one most
98
+ worth checking.
99
+
100
+ 4. Correct the links in `hippocampus/source/relationships.json`:
101
+
102
+ - **To remove a link that does not hold**, delete its entry. Its id is
103
+ `rel-<insight id>-tests-<need id>`.
104
+ - **To add a link it missed**, add an entry like this one:
105
+
106
+ ```json
107
+ { "id": "rel-playback-insight-1-tests-need-plain-test-name", "from": "playback-insight-1", "type": "tests-need", "to": "need-plain-test-name" }
108
+ ```
109
+
110
+ 5. Run `npx hippocampus validate`, review with `git diff hippocampus/source`,
111
+ and commit.
112
+
113
+ ### Link one round
114
+
115
+ After a new round is promoted, link only its insights:
116
+
117
+ ```bash
118
+ npx hippocampus link insight-needs --round round-2
119
+ ```
120
+
121
+ Only that round's insights are compared, and only their links are replaced.
122
+ Every other round's links are left as they are.
123
+
124
+ ### Before you run it again
125
+
126
+ Each run replaces every insight-to-need link for the insights it compares.
127
+ **Links you added by hand are removed, and links you deleted come back**,
128
+ unless the matcher reaches the same answer. So:
129
+
130
+ - after correcting links by hand, use `--round` for new rounds rather than
131
+ linking everything again
132
+ - always check `git diff` before committing a run. To undo one, run
133
+ `git checkout -- hippocampus/source/relationships.json`
134
+
135
+ Links from scenarios and screens to needs are never touched.
136
+
137
+ ## What it looks like
138
+
139
+ This example is made up.
140
+
141
+ ```text
142
+ $ npx hippocampus link insight-needs --dry-run
143
+ insight tests-need links: 0 -> 4
144
+ insights linked: 4 of 5
145
+ distinct needs reached: 3 of 4
146
+
147
+ unlinked insights (1):
148
+ no need scored: Patients book the wrong test because the letter only names it in clinical terms (P2, P4).
149
+
150
+ Dry run. Source files were not changed.
151
+
152
+ weakest kept link per insight (precision check):
153
+ 1.56 [receptionist ] I need fewer fasting appointments rebooked by phone, so that the phone line is f
154
+ for: Receptionists rebook about a third of fasting appointments by phone because th
155
+ 2.69 [carer ] I need to see which appointments are already booked for the person I look after,
156
+ for: Carers booking for someone else cannot see which appointments are already book
157
+ 1.02 [patient ] I need to know before the day whether I must stop eating before my blood test, s
158
+ for: P2 - “I had no idea I was not supposed to eat beforehand, so I had to come bac
159
+ 2.43 [patient ] I need to know before the day whether I must stop eating before my blood test, s
160
+ for: Patients ignore text reminders that do not say whether they need to stop eatin
161
+ ```
162
+
163
+ It also prints a sample of the links, which is left out here.
164
+
165
+ The unlinked insight is about the need "I need to know in plain English which
166
+ blood test I am booking", but "clinical terms" and "plain English" share no
167
+ words, so the matcher cannot see it. That is a link to add by hand.
168
+
169
+ A page of the review pack:
170
+
171
+ ```text
172
+ ## Patients ignore text reminders that do not say whether they need to stop eating before the test (P7).
173
+
174
+ | Score | User | Need |
175
+ | ---: | --- | --- |
176
+ | 2.43 | `patient` | I need to know before the day whether I must stop eating before my blood test, so that I do not have to come back. |
177
+ ```
178
+
179
+ ## In the viewer
180
+
181
+ - An insight's page lists the needs it tests under **Needs this tests**.
182
+ - A need's page lists the insights that test it under **Tested by**.
183
+ - The front page's **Insights not linked to a need** count goes down. An
184
+ insight left over is usually a sign of a need nobody has written yet, not a
185
+ bad insight.
186
+
187
+ ## How to check it worked
188
+
189
+ - `insights linked:` shows most of your insights.
190
+ - The review pack is in `artefacts/research-triage/`.
191
+ - `git diff hippocampus/source` shows only `relationships.json` changing.
192
+ - `npx hippocampus validate` no longer reports insights that link to no need,
193
+ or reports fewer.
194
+
195
+ ## If it goes wrong
196
+
197
+ - **"No linkInsights.userGroups mapping in ..."**: add the mapping described in
198
+ [Say which roles are which users](#say-which-roles-are-which-users).
199
+ - **"linkInsights.userGroups[0] ... needs a "match" pattern and a "users" array
200
+ of user ids"**: an entry in the mapping is missing one of the two. The number
201
+ is the entry's position, counting from 0.
202
+ - **"no user groups recorded and no participants in this round"** next to an
203
+ insight: no participant in its round has a role that any `match` covers, and
204
+ its summary names no groups. Add a `match` for those roles.
205
+ - **"no need scored"** next to an insight: no need of the right users shares at
206
+ least two uncommon words with it. Either the need is worded differently, so
207
+ add the link by hand, or the need has not been written yet.
208
+ - **Too many weak links**: words that are common in your service but not in
209
+ everyday English can make unrelated things look alike. List them in
210
+ `linkInsights.stopwords` in `hippocampus.config.json`, for example
211
+ `"stopwords": ["appointment", "practice"]`, and run it again.
212
+ - **Fewer links than before**, such as `insight tests-need links: 12 -> 9`:
213
+ links added by hand have been replaced. See
214
+ [Before you run it again](#before-you-run-it-again).
215
+
216
+ ## Related skills
217
+
218
+ - `map-research-to-graph`: an agent adds only the links a reviewed research
219
+ draft supports, between insights, needs, users and screens. Use it for
220
+ judgement the word matching cannot make.
221
+ - `whats-known-about`: once linked, ask what the team knows about a need. See
222
+ [Ask what's already known](ask-whats-already-known.md).
223
+
224
+ Whatever an agent reads is sent to the agent's service. See
225
+ [When anything leaves your machine](data-and-governance.md#when-anything-leaves-your-machine).
@@ -1,4 +1,9 @@
1
- # Prompt Architecture Guardrails
1
+ ---
2
+ section: contributors
3
+ order: 50
4
+ audience: [cli]
5
+ ---
6
+ # Prompt architecture guardrails
2
7
 
3
8
  The prompt pack is for repeatable source-model and prototype maintenance. Prompts should make agents safer, not more verbose.
4
9
 
@@ -1,4 +1,9 @@
1
- # Repeatable Research Round Ingestion
1
+ ---
2
+ section: reference
3
+ order: 40
4
+ audience: [cli]
5
+ ---
6
+ # Repeatable research round ingestion
2
7
 
3
8
  This playbook describes how a team can turn research artefacts into Hippocampus source data without relying on a single opaque AI step.
4
9
 
@@ -44,8 +49,9 @@ in two artefacts is one person.
44
49
 
45
50
  Promotion is idempotent for the records a round shares. Promoting a second artefact
46
51
  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.
52
+ than failing on duplicate IDs. If the second artefact carries a different date, the
53
+ round keeps the one it was first promoted with and says so. It still fails if the
54
+ round exists with a different title, which means two rounds have been given the same ID.
49
55
 
50
56
  Dates come from a `YYYY-MM-DD`, `YYYYMMDD` or `YYYY-MM` in the file or folder name.
51
57
  Where none is found the draft carries today's date and a warning saying so, because
@@ -1,4 +1,10 @@
1
- # Research Knowledge Graph and Import Process
1
+ ---
2
+ section: contributors
3
+ order: 10
4
+ audience: [cli]
5
+ summary: How research becomes linked records: the source files, the relationship graph, and each import and promotion step in detail.
6
+ ---
7
+ # Research knowledge graph and import process
2
8
 
3
9
  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
10
 
@@ -123,7 +129,7 @@ The default project context workflow is:
123
129
  npx hippocampus import project-context
124
130
  ```
125
131
 
126
- This scans `hippocampus/inbox/project`, fingerprints supported files, imports only new files, updates `hippocampus/manifests/project.json`, and asks before promoting unpromoted drafts.
132
+ This scans `hippocampus/inbox/project`, fingerprints supported files (a filled-in `templates/project-context.xlsx`, `.pptx` and `.pdf`), imports only new files, updates `hippocampus/manifests/project.json`, and asks before promoting unpromoted drafts.
127
133
 
128
134
  Use flags when needed:
129
135
 
@@ -134,12 +140,14 @@ npx hippocampus import project-context -- --yes
134
140
  npx hippocampus import project-context -- --source path/to/folder
135
141
  ```
136
142
 
137
- Single-artefact import is also available:
143
+ To import one file from anywhere, name it. It is recorded in the same manifest:
138
144
 
139
145
  ```bash
140
- npm run import:project-context -- --document path/to/overview.pdf --context-id overview-id --title "Project overview"
146
+ npx hippocampus import project-context path/to/overview.pdf --context-id overview-id --title "Project overview"
141
147
  ```
142
148
 
149
+ `--context-id` and `--title` are optional and apply when one file is named. `--context-id` names the draft; `--title` titles a deck or PDF's context. Both default to the file name. A filled-in template takes its id and title from its Overview tab.
150
+
143
151
  Review generated drafts in:
144
152
 
145
153
  ```text
@@ -1,3 +1,8 @@
1
+ ---
2
+ section: reference
3
+ order: 30
4
+ audience: [viewer, cli]
5
+ ---
1
6
  # Research source file conventions
2
7
 
3
8
  How to write and store research artefacts so they ingest cleanly into Hippocampus.
@@ -31,7 +36,7 @@ findings under generic headings imports as nothing at all.
31
36
  | --- | --- |
32
37
  | 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. |
33
38
  | Put the round number in the folder name (`Round 12 - ...`) | The round is derived from the path, so every artefact inherits the right `roundId`. |
34
- | 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. |
39
+ | Put the date the round started in the round folder's name, as a full `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. A full date on the folder is used for every file in it; without one, each file takes the date in its own name, and the round keeps the date of whichever file is promoted first. |
35
40
  | Keep one canonical version, not `- Copy`, `(1)`, `OLD`, `Archive` siblings | Near-identical duplicates each generate their own draft and their own IDs. |
36
41
  | Use participant codes (`P27`, `P104`) rather than names | Codes are safe to store, and they are what links a quote to a participant record. |
37
42
 
@@ -97,7 +102,7 @@ findings under generic headings imports as nothing at all.
97
102
  A round folder that ingests cleanly:
98
103
 
99
104
  ```text
100
- Round 17 - <topic>/
105
+ Round 17 - <topic> 2026-10-06/ <- the date the round started
101
106
  01 Planning research/
102
107
  Round 17 Research Plan 2026-10.docx <- Heading styles
103
108
  02 Doing the research/
@@ -0,0 +1,212 @@
1
+ ---
2
+ section: recipes
3
+ order: 30
4
+ audience: [viewer, cli]
5
+ summary: Check an imported draft against the research it came from, then add it to the knowledge base. This is the only step that changes the record.
6
+ ---
7
+ # Review a draft and promote it
8
+
9
+ Promoting a draft adds its research round, participants, insights and design
10
+ actions to the knowledge base, in `hippocampus/source/`. It is the only step in
11
+ bringing research in that changes the record, and it only happens when a person
12
+ runs it. Review the draft first.
13
+
14
+ ## Who this is for
15
+
16
+ - **The reviewer**, usually the researcher who ran the round. You read the
17
+ draft against the original research. You do not need to run anything.
18
+ - **The person who promotes**, who runs two commands once the reviewer is
19
+ happy. This can be the same person.
20
+
21
+ If you only use the viewer, you can check the result once it is promoted: see
22
+ [In the viewer](#in-the-viewer).
23
+
24
+ ## Before you start
25
+
26
+ - You have a draft from [Import a research round](import-a-research-round.md):
27
+ a `.json` file and a `.review.md` file in `hippocampus/imports/research/`.
28
+ - Commit or put aside any other changes, so that afterwards
29
+ `git diff hippocampus/source` shows exactly what promotion changed.
30
+
31
+ ## Review the draft
32
+
33
+ Open the review file, `hippocampus/imports/research/<name>.review.md`, next to
34
+ the original research. It is Markdown, so it reads as an ordinary page in most
35
+ editors' preview.
36
+
37
+ The importer offers candidates. It does not judge whether they are true. Check
38
+ that:
39
+
40
+ - **The round is right.** Its title and date match the research. A warning
41
+ saying the date is today's date means no date was found.
42
+ - **Participants are people.** Each one is a participant code with a role. A
43
+ role of "Research participant" means the file did not give one; add it if you
44
+ know it.
45
+ - **Insights are findings.** Each is something the team learned, in a sentence.
46
+ Remove headings, agenda items and narrative that were picked up by mistake.
47
+ - **Quotes are not insights.** A quote can be picked up as an insight of its
48
+ own. A quote supports a finding: fold it into the insight it supports, or
49
+ remove it.
50
+ - **Each insight names the right participants.** Participant codes in the line
51
+ are linked automatically. Check they are the people the finding came from.
52
+ - **Each design action points at the right insight.** The importer links every
53
+ design action to the last insight above it in the file, which is often not
54
+ the one it responds to.
55
+ - **Nothing identifies a participant.** Promoted records are committed to
56
+ git and stay in its history. Take out names, places, employers, rare
57
+ conditions and anything else that could identify someone, including from
58
+ quotes. See [Personal data in the record](data-and-governance.md#personal-data-in-the-record).
59
+ - **Confidence is honest.** Every imported insight starts at `medium`. Make it
60
+ `high` where several participants or sources agree, and `low` where it rests
61
+ on one person saying it once.
62
+ - **Every warning at the top has been dealt with**, or deliberately accepted.
63
+ - **The numbers are believable.** A short playback that produced 70 insights is
64
+ picking up narrative text.
65
+
66
+ ### Making changes
67
+
68
+ The review file is for reading. It is written once, when the file is imported,
69
+ and does not change. What gets promoted is the draft's `.json` file, so
70
+ corrections go there:
71
+
72
+ - in a text editor, if you are comfortable editing JSON, or
73
+ - by asking an AI agent to use the `structure-research-draft` skill, then
74
+ checking what it changed
75
+
76
+ Each insight has `title`, `summary`, `confidence` and `participantIds`. Each
77
+ design action has `title`, `action` and `insightIds`, the insights it responds
78
+ to. [Source model](source-model.md) describes every field.
79
+
80
+ ## Promote it
81
+
82
+ From your prototype's folder:
83
+
84
+ 1. Check it first:
85
+
86
+ ```bash
87
+ npx hippocampus promote research --draft hippocampus/imports/research/<name>.json --dry-run
88
+ ```
89
+
90
+ It says how many of each record it would add, and that nothing was changed.
91
+ Check the numbers match what the reviewer approved.
92
+
93
+ 2. Promote it:
94
+
95
+ ```bash
96
+ npx hippocampus promote research --draft hippocampus/imports/research/<name>.json
97
+ ```
98
+
99
+ It adds the records to `hippocampus/source/`, checks the whole knowledge
100
+ base still holds together, and marks the draft as promoted.
101
+
102
+ 3. See what changed and commit it, naming the round:
103
+
104
+ ```bash
105
+ git diff hippocampus/source
106
+ ```
107
+
108
+ If a round has several files, promote each draft in turn. The second and later
109
+ drafts reuse the round and any participants the earlier ones added, and say so.
110
+
111
+ ## What it looks like
112
+
113
+ This example is made up.
114
+
115
+ ```text
116
+ $ npx hippocampus promote research --draft hippocampus/imports/research/playback.json --dry-run
117
+ Promotion checked: researchRounds: +1, participants: +4, insights: +3, designActions: +2, relationships: +9
118
+ Dry run only. Source files were not changed.
119
+
120
+ $ npx hippocampus promote research --draft hippocampus/imports/research/playback.json
121
+ Promotion checked: researchRounds: +1, participants: +4, insights: +3, designActions: +2, relationships: +9
122
+ hippocampus: knowledge data is valid
123
+ info 3 of 3 insights link to no user need - usually a gap in the needs layer rather than a bad insight
124
+ Research draft promoted and knowledge validation passed.
125
+ ```
126
+
127
+ Promoting a second file from the same round:
128
+
129
+ ```text
130
+ Reusing existing records from earlier artefacts in this round: round round-1, participant participant-p2, relationship round-1-has-participant-participant-p2
131
+ Promotion checked: researchRounds: +0, participants: +1, insights: +1, designActions: +0, relationships: +2
132
+ ```
133
+
134
+ ## In the viewer
135
+
136
+ Refresh the viewer once the draft is promoted.
137
+
138
+ - `/hippocampus/research` shows the round, newest first, with its
139
+ participants, insights and design actions. A tag says where the round has got
140
+ to: **No insights yet**, **No design actions**, **2 actions outstanding** or
141
+ **All actions resolved**. A design action stays outstanding until a decision
142
+ resolves it.
143
+ - Select an insight to see the round it came from and its participants.
144
+ - The front page, `/hippocampus`, shows **Most recent research**,
145
+ **Design actions open** and **Insights not linked to a need**. New insights
146
+ count towards the last one until someone links them to a user need.
147
+
148
+ If you reviewed the draft, this is where to check that what was promoted is
149
+ what you approved.
150
+
151
+ ## How to check it worked
152
+
153
+ - The command ends with "Research draft promoted and knowledge validation
154
+ passed."
155
+ - The round is on the research page.
156
+ - `npx hippocampus research sync` shows `Unpromoted drafts: 0`, or no longer
157
+ lists this draft.
158
+ - `npx hippocampus known` finds a word from one of the new insights. See
159
+ [Ask what's already known](ask-whats-already-known.md).
160
+
161
+ ## If it goes wrong
162
+
163
+ - **"No draft at ..."**: the path is wrong. The message lists the drafts there
164
+ are.
165
+ - **"Already promoted"**: every insight and design action in this draft is
166
+ already in the knowledge base. Nothing was written.
167
+ - **"Research round round-1 already exists with a different title"**: two
168
+ rounds have been given the same number, usually two folders both starting
169
+ "Round 1". If this is a different round, give it a new number in the draft:
170
+ replace `round-1` with the new id, such as `round-2`, everywhere it appears
171
+ in the `.json` file, and change the round's `title` to match. If it is the
172
+ same round, make the title in the draft match
173
+ `hippocampus/source/research-rounds.json`. Either way, promote again.
174
+ - **"Round round-1 keeps its date"**: not an error. This file has a different
175
+ date from the one already promoted into the round, and the round keeps the
176
+ first. To change it, edit the date in `hippocampus/source/research-rounds.json`.
177
+ See [Name the round and its date](import-a-research-round.md#name-the-round-and-its-date).
178
+ - **"insights: ... already exists in source data"**: part of this draft has been
179
+ promoted before, often because a changed file was imported a second time.
180
+ Remove the records that are already there from the draft, or delete the
181
+ draft.
182
+ - **"... references missing id ..."**: something in the draft links to a record
183
+ that does not exist. Correct the link or remove it.
184
+ - **"Promotion wrote source files, but knowledge validation failed"**: the
185
+ records were written, but the knowledge base no longer holds together. The
186
+ lines above the message say what is wrong. Fix it, or undo the promotion.
187
+
188
+ ### Undo a promotion
189
+
190
+ Before you commit, put the files back as they were:
191
+
192
+ ```bash
193
+ git checkout -- hippocampus/source hippocampus/manifests
194
+ ```
195
+
196
+ After you have committed, use `git revert` on that commit. Either way, the
197
+ draft is still in `hippocampus/imports/research/` to correct and promote again.
198
+
199
+ ## Related skills
200
+
201
+ - `review-research-import-draft`: an AI agent checks the draft against the
202
+ extracted text, runs the dry run, and reports what is unsupported, thin or
203
+ wrongly linked. It does not edit the draft unless you ask, and never
204
+ promotes.
205
+ - `structure-research-draft`: an agent corrects the draft using only the text
206
+ the importer extracted.
207
+ - `map-research-to-graph`: an agent adds links from the draft to records you
208
+ already have, such as needs, screens and evidence, but only where the
209
+ research supports them. Links it is unsure of are suggested, not written.
210
+
211
+ Whatever an agent reads is sent to the agent's service. See
212
+ [Start here](start-here.md#when-anything-leaves-your-machine).
@@ -1,4 +1,10 @@
1
- # Source Model
1
+ ---
2
+ section: reference
3
+ order: 10
4
+ audience: [cli]
5
+ summary: Every record type in hippocampus/source, what its fields mean, and the rules for editing them by hand.
6
+ ---
7
+ # Source model
2
8
 
3
9
  The knowledge base is driven by structured JSON in `hippocampus/source`.
4
10