@hippo-digital/hippocampus 1.0.0-rc.1 → 1.0.0-rc.2
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 +2 -2
- package/docs/agent-roadmap.md +2 -2
- package/docs/design-actions-and-decisions.md +2 -2
- package/docs/research-source-file-conventions.md +3 -2
- package/lib/docs.js +1 -2
- package/lib/schema.js +1 -1
- package/package.json +1 -1
- package/scripts/import-design-actions.js +1 -1
- package/scripts/init.js +1 -1
- package/scripts/link-insights-to-needs.js +62 -19
- package/scripts/smoke-routes.js +1 -1
- package/scripts/triage-research-corpus.js +1 -1
- package/skills/ingest-user-personas.skill.md +77 -0
- package/skills/record-design-decision.skill.md +2 -2
- package/skills/skills.json +26 -0
- package/templates/insight-design-action-tracker.xlsx +0 -0
- package/docs/agentic-patterns-to-port.md +0 -273
- package/docs/copilot-ncrs-research-curator-agent.md +0 -298
- package/docs/gp-connect-real-data-to-production.md +0 -66
package/CHANGELOG.md
CHANGED
|
@@ -47,9 +47,9 @@ journeys and screens they justify, rendered as a viewer inside your prototype.
|
|
|
47
47
|
|
|
48
48
|
### Docs and skills
|
|
49
49
|
|
|
50
|
-
- The
|
|
50
|
+
- The 13 guides are served at `{basePath}/docs`, version-matched to the
|
|
51
51
|
installed package rather than copied into your repo.
|
|
52
|
-
- `skills install` copies the
|
|
52
|
+
- `skills install` copies the 20 agent skills into `.github/skills` with content
|
|
53
53
|
hashes, so an upgrade can tell a stale copy from one your team has edited.
|
|
54
54
|
- `init` reports research material in `hippocampus/source-artefacts/` rather
|
|
55
55
|
than silently committing it; `--private-artefacts` gitignores it.
|
package/docs/agent-roadmap.md
CHANGED
|
@@ -206,8 +206,8 @@ The repo now has enough agent-facing documentation that overlap will become a ma
|
|
|
206
206
|
- Do not make skills promote drafts automatically.
|
|
207
207
|
- Do not treat generated artefacts as canonical source data.
|
|
208
208
|
- Do not reintroduce active prompt-first workflows.
|
|
209
|
-
- Do not port
|
|
210
|
-
- Do not add a huge
|
|
209
|
+
- Do not port a host project's domain content or integration-heavy workflows unless Hippocampus actually needs them.
|
|
210
|
+
- Do not add a huge component reference unless repeated component mistakes justify it.
|
|
211
211
|
|
|
212
212
|
## Recommended Next Commits
|
|
213
213
|
|
|
@@ -29,14 +29,14 @@ along; it was only ever used for five notes about the prototype spike.
|
|
|
29
29
|
## Why the rejected options matter
|
|
30
30
|
|
|
31
31
|
The accepted option ends up in production, where anyone can see it. The rejected
|
|
32
|
-
ones are the ones that get asked about eighteen months later — "why didn't
|
|
32
|
+
ones are the ones that get asked about eighteen months later — "why didn't we
|
|
33
33
|
just do the obvious thing?" — and by then the answer lives in one person's memory
|
|
34
34
|
or in a meeting no one recorded. A rejected decision record with a `consequence`
|
|
35
35
|
answers it.
|
|
36
36
|
|
|
37
37
|
## The workbook
|
|
38
38
|
|
|
39
|
-
`hippocampus/templates/
|
|
39
|
+
`hippocampus/templates/insight-design-action-tracker.xlsx`, one copy per round.
|
|
40
40
|
Three sheets that reference each other by ID:
|
|
41
41
|
|
|
42
42
|
| Sheet | One row per | Key columns |
|
|
@@ -7,8 +7,9 @@ is a change to how a file is *authored or named*, not a change to the research
|
|
|
7
7
|
itself. Each convention exists because the ingestion pipeline currently loses
|
|
8
8
|
something real without it.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
This guidance was derived from a real user research drive of 599 files and
|
|
11
|
+
2.3 million extractable words spanning thirteen rounds, so the conventions are
|
|
12
|
+
the ones that survived contact with a messy corpus rather than a tidy example.
|
|
12
13
|
|
|
13
14
|
## The one thing that matters most
|
|
14
15
|
|
package/lib/docs.js
CHANGED
|
@@ -15,8 +15,7 @@ const packagePaths = require('./package-paths')
|
|
|
15
15
|
// a stale copy from an edited one.
|
|
16
16
|
|
|
17
17
|
const TITLE_OVERRIDES = {
|
|
18
|
-
'hippocampus-for-designers-and-researchers': 'Hippocampus for designers and researchers'
|
|
19
|
-
'gp-connect-real-data-to-production': 'GP Connect: real data to production'
|
|
18
|
+
'hippocampus-for-designers-and-researchers': 'Hippocampus for designers and researchers'
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
function slugOf (filename) {
|
package/lib/schema.js
CHANGED
|
@@ -172,7 +172,7 @@ const ScreenSchema = z.object({
|
|
|
172
172
|
purpose: nonEmptyString,
|
|
173
173
|
needIds: z.array(id).min(1),
|
|
174
174
|
components: stringList,
|
|
175
|
-
// A screen in the
|
|
175
|
+
// A screen in the host project rather than in this viewer. The
|
|
176
176
|
// knowledge base models the service, not only the screens this repo happens
|
|
177
177
|
// to render, so the route smoke test skips these instead of failing on them.
|
|
178
178
|
external: z.boolean().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hippo-digital/hippocampus",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.2",
|
|
4
4
|
"description": "A design-knowledge base for NHS Prototype Kit projects: research, insights, needs, journeys and screens, traceable end to end.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -179,7 +179,7 @@ function main () {
|
|
|
179
179
|
|
|
180
180
|
function rows (workbook, sheetName) {
|
|
181
181
|
if (!workbook.sheetFiles.has(sheetName)) {
|
|
182
|
-
throw new Error(`The workbook has no "${sheetName}" sheet. It has: ${[...workbook.sheetFiles.keys()].join(', ')}. Start from hippocampus/templates/
|
|
182
|
+
throw new Error(`The workbook has no "${sheetName}" sheet. It has: ${[...workbook.sheetFiles.keys()].join(', ')}. Start from the blank tracker that ships with the package: node_modules/@hippo-digital/hippocampus/templates/insight-design-action-tracker.xlsx`)
|
|
183
183
|
}
|
|
184
184
|
const grid = readSheetGrid(workbook, sheetName)
|
|
185
185
|
const header = grid.find((r) => r && r.some(Boolean)) || []
|
package/scripts/init.js
CHANGED
|
@@ -87,7 +87,7 @@ function planKnowledgeBase (root) {
|
|
|
87
87
|
const id = kebab(dirName) || 'prototype'
|
|
88
88
|
const name = dirName
|
|
89
89
|
plan('hippocampus/source/project.json and an empty knowledge base', () => {
|
|
90
|
-
for (const dir of ['source', 'inbox/project', 'inbox/research', 'imports/project', 'imports/research', 'manifests']) {
|
|
90
|
+
for (const dir of ['source', 'inbox/personas', 'inbox/project', 'inbox/research', 'imports/project', 'imports/research', 'manifests']) {
|
|
91
91
|
fs.mkdirSync(path.join(root, 'hippocampus', dir), { recursive: true })
|
|
92
92
|
}
|
|
93
93
|
fs.writeFileSync(projectPath, JSON.stringify({
|
|
@@ -28,23 +28,47 @@ const { createContextOrExit } = require('../lib/context')
|
|
|
28
28
|
const ctx = createContextOrExit()
|
|
29
29
|
const { knowledgeSourceDir } = ctx.paths
|
|
30
30
|
|
|
31
|
-
// The tracker names user groups; the knowledge base names users.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
// The tracker names user groups; the knowledge base names users. Which group
|
|
32
|
+
// maps to which user is a fact about one project's records, not something this
|
|
33
|
+
// package can know, so it is declared in hippocampus.config.json:
|
|
34
|
+
//
|
|
35
|
+
// "linkInsights": {
|
|
36
|
+
// "affectsPattern": "Affects ([^.]+)\\.",
|
|
37
|
+
// "userGroups": [
|
|
38
|
+
// { "match": "safeguarding", "users": ["admin-safeguarding"] }
|
|
39
|
+
// ]
|
|
40
|
+
// }
|
|
41
|
+
//
|
|
42
|
+
// There is deliberately no default. A built-in table would match one project's
|
|
43
|
+
// user IDs and silently match nothing for everyone else, which reads as "your
|
|
44
|
+
// data is wrong" rather than "this is not configured".
|
|
45
|
+
const LINK_CONFIG = ctx.config.linkInsights || {}
|
|
46
|
+
|
|
47
|
+
const GROUP_TO_USERS = (LINK_CONFIG.userGroups || []).map((entry, i) => {
|
|
48
|
+
if (!entry || !entry.match || !Array.isArray(entry.users)) {
|
|
49
|
+
throw new Error(
|
|
50
|
+
`linkInsights.userGroups[${i}] in ${ctx.configPath} needs a "match" pattern ` +
|
|
51
|
+
'and a "users" array of user ids.'
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
return [new RegExp(entry.match, 'i'), entry.users]
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
// The affected groups are read out of the insight summary. The sentence shape
|
|
58
|
+
// comes from whichever importer wrote it, so it is configurable too.
|
|
59
|
+
const AFFECTS_PATTERN = new RegExp(LINK_CONFIG.affectsPattern || 'Affects ([^.]+)\\.')
|
|
60
|
+
|
|
61
|
+
// Generic English stopwords only. Domain vocabulary is deliberately NOT
|
|
62
|
+
// listed here: a term that is noise in one service is the whole point in
|
|
63
|
+
// another ("records" is filler in a clinical record service and the subject
|
|
64
|
+
// matter in a records-management one). Projects add their own via
|
|
65
|
+
// `linkInsights.stopwords` in hippocampus.config.json, which is merged in
|
|
66
|
+
// below rather than replacing this list.
|
|
67
|
+
const STOP = new Set(`a an and are as at be but by can for from has have i if in is it its me my need needs not of on or our so that the their them then there these they this to use used user users want we what when where which who will with would you your also more most only other same some such than very`.split(/\s+/))
|
|
68
|
+
|
|
69
|
+
for (const word of (ctx.config.linkInsights && ctx.config.linkInsights.stopwords) || []) {
|
|
70
|
+
STOP.add(String(word).toLowerCase())
|
|
71
|
+
}
|
|
48
72
|
|
|
49
73
|
function tokens (text) {
|
|
50
74
|
return (String(text).toLowerCase().match(/[a-z][a-z-]{2,}/g) || [])
|
|
@@ -75,12 +99,25 @@ function main () {
|
|
|
75
99
|
const links = []
|
|
76
100
|
const report = []
|
|
77
101
|
|
|
102
|
+
// Say this once, loudly, rather than only in per-insight reasons. Without a
|
|
103
|
+
// mapping every insight is skipped, and a run that scores nothing should not
|
|
104
|
+
// look like a run that found nothing.
|
|
105
|
+
if (!GROUP_TO_USERS.length && insights.length) {
|
|
106
|
+
console.warn(
|
|
107
|
+
`No linkInsights.userGroups mapping in ${ctx.configPath}.\n` +
|
|
108
|
+
'Insights are matched only against needs belonging to the users a round ' +
|
|
109
|
+
'affected, so with no mapping nothing can match and every insight will be ' +
|
|
110
|
+
'skipped. Add one entry per user group, e.g.\n' +
|
|
111
|
+
' "linkInsights": { "userGroups": [{ "match": "safeguarding", "users": ["admin-safeguarding"] }] }\n'
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
|
|
78
115
|
for (const insight of insights) {
|
|
79
116
|
// Round 16's tracker names the affected user groups on every row. Other
|
|
80
117
|
// rounds have no such column, so the candidate users come from who actually
|
|
81
118
|
// took part in that round - an insight cannot bear on the needs of a user
|
|
82
119
|
// group that was not in the room.
|
|
83
|
-
const affects = (insight.summary.match(
|
|
120
|
+
const affects = (insight.summary.match(AFFECTS_PATTERN) || [])[1] || ''
|
|
84
121
|
const users = new Set(
|
|
85
122
|
GROUP_TO_USERS.filter(([re]) => re.test(affects)).flatMap(([, ids]) => ids)
|
|
86
123
|
)
|
|
@@ -91,7 +128,13 @@ function main () {
|
|
|
91
128
|
.join(' | ')
|
|
92
129
|
for (const [re, ids] of GROUP_TO_USERS) if (re.test(roles)) for (const id of ids) users.add(id)
|
|
93
130
|
}
|
|
94
|
-
if (!users.size) {
|
|
131
|
+
if (!users.size) {
|
|
132
|
+
const reason = GROUP_TO_USERS.length
|
|
133
|
+
? 'no user groups recorded and no participants in this round'
|
|
134
|
+
: `no linkInsights.userGroups mapping in ${path.basename(ctx.configPath)} - nothing can be matched until user groups are mapped to user ids`
|
|
135
|
+
report.push({ insight, users: 0, matched: [], reason })
|
|
136
|
+
continue
|
|
137
|
+
}
|
|
95
138
|
|
|
96
139
|
const query = new Set(tokens(`${insight.title} ${insight.summary}`))
|
|
97
140
|
const candidates = needs.filter((n) => users.has(n.userId))
|
package/scripts/smoke-routes.js
CHANGED
|
@@ -76,7 +76,7 @@ function buildRoutes (basePath, knowledge) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
for (const screen of knowledge.screens) {
|
|
79
|
-
// Screens marked external live in
|
|
79
|
+
// Screens marked external live in another repo, not here, so
|
|
80
80
|
// this app has nothing to serve at their route.
|
|
81
81
|
if (screen.external) continue
|
|
82
82
|
routes.add(screen.route)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Hippocampus schema, and writes a ranked review pack. It never writes to
|
|
11
11
|
* hippocampus/source and never promotes anything.
|
|
12
12
|
*
|
|
13
|
-
* node scripts/triage-research-corpus.js --source "/path/to/folder" --topic
|
|
13
|
+
* node scripts/triage-research-corpus.js --source "/path/to/folder" --topic user-research
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
const fs = require('fs')
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ingest-user-personas
|
|
3
|
+
title: Ingest user personas
|
|
4
|
+
purpose: Turn persona documents into user records, the needs they state, and the evidence that backs both.
|
|
5
|
+
owners:
|
|
6
|
+
- ingestion-curator
|
|
7
|
+
- knowledge-builder
|
|
8
|
+
reads:
|
|
9
|
+
- node_modules/@hippo-digital/hippocampus/docs/source-model.md
|
|
10
|
+
- node_modules/@hippo-digital/hippocampus/docs/research-source-file-conventions.md
|
|
11
|
+
- hippocampus/inbox/personas/
|
|
12
|
+
- hippocampus/source/users.json
|
|
13
|
+
- hippocampus/source/needs.json
|
|
14
|
+
- hippocampus/source/evidence.json
|
|
15
|
+
- hippocampus/source/assumptions.json
|
|
16
|
+
edits:
|
|
17
|
+
- hippocampus/source/users.json
|
|
18
|
+
- hippocampus/source/needs.json
|
|
19
|
+
- hippocampus/source/evidence.json
|
|
20
|
+
- hippocampus/source/assumptions.json
|
|
21
|
+
- hippocampus/source/relationships.json
|
|
22
|
+
runs:
|
|
23
|
+
- npx hippocampus validate
|
|
24
|
+
outputs:
|
|
25
|
+
- One user record per persona document
|
|
26
|
+
- One evidence record per source document, with a resolvable sourcePath
|
|
27
|
+
- Needs the document actually states, each linked to that evidence
|
|
28
|
+
- Assumptions naming every field the schema required but the document did not state
|
|
29
|
+
guardrails:
|
|
30
|
+
- Every user, need and responsibility must come from the document. If it is not in the text, it does not go in the record.
|
|
31
|
+
- Do not fill accessNeeds or priority from judgement without recording an assumption - the schema requires both, so a guess is indistinguishable from a finding.
|
|
32
|
+
- Do not create needs the persona document does not state. A thin persona yields a user with few needs, which is the honest result.
|
|
33
|
+
- One user per persona. Do not merge two documents into a composite user, and do not split one into several.
|
|
34
|
+
- Record the document's own filename in evidence.sourcePath. If the working copy will be deleted, the name is the only way back to the original.
|
|
35
|
+
acceptance:
|
|
36
|
+
- Every new user has a description and at least one responsibility taken from the document.
|
|
37
|
+
- Every new need has a userId, a statement from the document, and at least one evidenceId.
|
|
38
|
+
- Every persona document has exactly one evidence record with a sourcePath.
|
|
39
|
+
- Every schema-required field the document did not state has an assumption naming it.
|
|
40
|
+
- npx hippocampus validate passes.
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
# Ingest user personas
|
|
44
|
+
|
|
45
|
+
## Use when
|
|
46
|
+
- A project has persona documents and no user records yet. This is the first ingestion step: needs, scenarios, journeys and screens all reference users, so nothing else can be added until users exist.
|
|
47
|
+
- New personas join an existing set after a later round of research.
|
|
48
|
+
|
|
49
|
+
## Workflow
|
|
50
|
+
|
|
51
|
+
1. Put the documents in `hippocampus/inbox/personas/` and read each one in full before writing anything.
|
|
52
|
+
2. For each document, add one **evidence** record: `sourceType: user persona`, a summary of what the document is, `confidence`, and `sourcePath` set to the document's own filename.
|
|
53
|
+
3. Add one **user** per document. `label` and `description` come from the document. `responsibilities` are the ones it lists - do not generalise them into a tidier set.
|
|
54
|
+
4. Add the **needs the document states**, each with `userId`, a statement in the document's own terms, and `evidenceIds` pointing at that document's evidence record.
|
|
55
|
+
5. Add `has-need` relationships from the user to each need.
|
|
56
|
+
6. Record an **assumption** for every field the schema forced you to fill that the document did not state. See below.
|
|
57
|
+
7. Run `npx hippocampus validate` and fix what it reports.
|
|
58
|
+
|
|
59
|
+
## The two fields that force a guess
|
|
60
|
+
|
|
61
|
+
The schema requires both of these, so neither can be left empty and an unstated value looks exactly like a researched one. When the document is silent, fill it and say so.
|
|
62
|
+
|
|
63
|
+
- **`Need.priority`** is an enum with no "unknown". Persona documents rarely rank needs. Default to `medium` and add one assumption covering the whole import: *"Needs imported from persona documents carry priority medium because the documents do not state priority. Priorities need a team decision before they sequence design work."*
|
|
64
|
+
- **`User.accessNeeds`** requires at least one entry. If the document does not cover access needs, say so in the field itself rather than inventing one, and add an assumption recording that the personas did not cover accessibility.
|
|
65
|
+
|
|
66
|
+
## Guardrails
|
|
67
|
+
|
|
68
|
+
- Every user, need and responsibility must come from the document. If it is not in the text, it does not go in the record.
|
|
69
|
+
- Do not fill `accessNeeds` or `priority` from judgement without recording an assumption.
|
|
70
|
+
- Do not create needs the persona document does not state. A thin persona yields a user with few needs, which is the honest result.
|
|
71
|
+
- One user per persona. Do not merge two documents into a composite user, and do not split one into several.
|
|
72
|
+
- Record the document's own filename in `evidence.sourcePath`.
|
|
73
|
+
|
|
74
|
+
## Finish
|
|
75
|
+
|
|
76
|
+
- Run `npx hippocampus validate`.
|
|
77
|
+
- Report: users added, needs added per user, evidence records created, assumptions recorded and what each one covers, and any persona document that yielded no needs - that last one is a finding about the document, not a failure of the import.
|
|
@@ -8,7 +8,7 @@ owners:
|
|
|
8
8
|
reads:
|
|
9
9
|
- node_modules/@hippo-digital/hippocampus/docs/design-actions-and-decisions.md
|
|
10
10
|
- node_modules/@hippo-digital/hippocampus/docs/source-model.md
|
|
11
|
-
- hippocampus/templates/
|
|
11
|
+
- node_modules/@hippo-digital/hippocampus/templates/insight-design-action-tracker.xlsx
|
|
12
12
|
edits:
|
|
13
13
|
- hippocampus/source/design-actions.json
|
|
14
14
|
- hippocampus/source/decisions.json
|
|
@@ -37,7 +37,7 @@ acceptance:
|
|
|
37
37
|
- Options have been weighed against an action and one has been chosen.
|
|
38
38
|
|
|
39
39
|
## Workflow
|
|
40
|
-
1. Take a copy of `hippocampus/templates/
|
|
40
|
+
1. Take a copy of `node_modules/@hippo-digital/hippocampus/templates/insight-design-action-tracker.xlsx` for the round.
|
|
41
41
|
2. Fill the Design Actions sheet: one row per direction, listing the insight IDs that prompted it. An action is an open brief, not a solution.
|
|
42
42
|
3. Fill the Decisions sheet: one row per option, all `proposed` while the team decides.
|
|
43
43
|
4. When the team decides, set one option to `accepted` and the rest to `rejected`, and write the `consequence` of the accepted one.
|
package/skills/skills.json
CHANGED
|
@@ -218,6 +218,32 @@
|
|
|
218
218
|
"npx hippocampus promote project-context -- --dry-run passes."
|
|
219
219
|
]
|
|
220
220
|
},
|
|
221
|
+
{
|
|
222
|
+
"id": "ingest-user-personas",
|
|
223
|
+
"title": "Ingest user personas",
|
|
224
|
+
"purpose": "Turn persona documents into user records, the needs they state, and the evidence that backs both.",
|
|
225
|
+
"file": "ingest-user-personas.skill.md",
|
|
226
|
+
"owners": [
|
|
227
|
+
"ingestion-curator",
|
|
228
|
+
"knowledge-builder"
|
|
229
|
+
],
|
|
230
|
+
"runs": [
|
|
231
|
+
"npx hippocampus validate"
|
|
232
|
+
],
|
|
233
|
+
"outputs": [
|
|
234
|
+
"One user record per persona document",
|
|
235
|
+
"One evidence record per source document, with a resolvable sourcePath",
|
|
236
|
+
"Needs the document actually states, each linked to that evidence",
|
|
237
|
+
"Assumptions naming every field the schema required but the document did not state"
|
|
238
|
+
],
|
|
239
|
+
"acceptance": [
|
|
240
|
+
"Every new user has a description and at least one responsibility taken from the document.",
|
|
241
|
+
"Every new need has a userId, a statement from the document, and at least one evidenceId.",
|
|
242
|
+
"Every persona document has exactly one evidence record with a sourcePath.",
|
|
243
|
+
"Every schema-required field the document did not state has an assumption naming it.",
|
|
244
|
+
"npx hippocampus validate passes."
|
|
245
|
+
]
|
|
246
|
+
},
|
|
221
247
|
{
|
|
222
248
|
"id": "ingest-research-round",
|
|
223
249
|
"title": "Ingest research round",
|
|
Binary file
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
# Agentic Patterns To Port From NCRS
|
|
2
|
-
|
|
3
|
-
Source reviewed:
|
|
4
|
-
|
|
5
|
-
- `/Users/mattfielding/clawd/projects/ncrs-prototype-agentic/.github`
|
|
6
|
-
- `/Users/mattfielding/clawd/projects/ncrs-prototype-agentic/docs`
|
|
7
|
-
- `/Users/mattfielding/clawd/projects/ncrs-prototype-agentic/artefacts`
|
|
8
|
-
|
|
9
|
-
## Recommendation
|
|
10
|
-
|
|
11
|
-
Port the operating model, not the NCRS clinical content.
|
|
12
|
-
|
|
13
|
-
The strongest transferable pattern is a Copilot-discoverable agent workspace:
|
|
14
|
-
|
|
15
|
-
- `.github/copilot-instructions.md`
|
|
16
|
-
- `.github/instructions/*.instructions.md`
|
|
17
|
-
- `.github/legacy/prompts/*.prompt.md`
|
|
18
|
-
- `.github/agents/*.md`
|
|
19
|
-
- `docs/` for architecture and workflow rules
|
|
20
|
-
- `artefacts/` for generated outputs, screenshots and audits
|
|
21
|
-
|
|
22
|
-
The knowledge base repo already has archived prompts in `.github/legacy/prompts`. The next useful work is to keep repo-wide Copilot instructions, focused custom agents and the portable skill catalog aligned.
|
|
23
|
-
|
|
24
|
-
## High-value ports
|
|
25
|
-
|
|
26
|
-
### 1. Copilot instructions
|
|
27
|
-
|
|
28
|
-
NCRS has `.github/copilot-instructions.md` loaded into every Copilot chat.
|
|
29
|
-
|
|
30
|
-
Port as:
|
|
31
|
-
|
|
32
|
-
```text
|
|
33
|
-
.github/copilot-instructions.md
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Purpose:
|
|
37
|
-
|
|
38
|
-
- tell Copilot this is an NHS Prototype Kit knowledge base
|
|
39
|
-
- define source model rules
|
|
40
|
-
- require validation after source edits
|
|
41
|
-
- require NHS Prototype Kit conventions
|
|
42
|
-
- forbid real patient data
|
|
43
|
-
- prefer source-model changes over hard-coded page changes
|
|
44
|
-
|
|
45
|
-
Why it matters:
|
|
46
|
-
|
|
47
|
-
Prompts are optional. Copilot instructions are ambient. They reduce bad default behaviour.
|
|
48
|
-
|
|
49
|
-
### 2. Focused custom agents
|
|
50
|
-
|
|
51
|
-
NCRS consolidated overlapping agents into four roles:
|
|
52
|
-
|
|
53
|
-
- `@prototype-builder`
|
|
54
|
-
- `@screenshot-runner`
|
|
55
|
-
- `@accessibility-tester`
|
|
56
|
-
- `@workflow-orchestrator`
|
|
57
|
-
|
|
58
|
-
Port as:
|
|
59
|
-
|
|
60
|
-
```text
|
|
61
|
-
.github/agents/README.md
|
|
62
|
-
.github/agents/knowledge-builder.md
|
|
63
|
-
.github/agents/prototype-builder.md
|
|
64
|
-
.github/agents/screenshot-runner.md
|
|
65
|
-
.github/agents/accessibility-tester.md
|
|
66
|
-
.github/agents/workflow-orchestrator.md
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Adaptation:
|
|
70
|
-
|
|
71
|
-
- add `@knowledge-builder` because this repo's primary product is source-model maintenance
|
|
72
|
-
- keep `@prototype-builder` for routes/views/screens
|
|
73
|
-
- keep `@screenshot-runner` and `@accessibility-tester` for review loops
|
|
74
|
-
- keep `@workflow-orchestrator` to coordinate build → validate → screenshot → accessibility → summary
|
|
75
|
-
|
|
76
|
-
### 3. Instruction files
|
|
77
|
-
|
|
78
|
-
NCRS uses `.github/instructions/*.instructions.md` for auto-attached guidance.
|
|
79
|
-
|
|
80
|
-
Port a smaller set:
|
|
81
|
-
|
|
82
|
-
```text
|
|
83
|
-
.github/instructions/knowledge-source.instructions.md
|
|
84
|
-
.github/instructions/nhs-prototype-kit.instructions.md
|
|
85
|
-
.github/instructions/nhs-frontend.instructions.md
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Do not copy the huge generated NHS component reference yet. It is useful but heavy. Start with concise instructions and add component reference later if Copilot needs it.
|
|
89
|
-
|
|
90
|
-
### 4. Agent workflow docs
|
|
91
|
-
|
|
92
|
-
NCRS has:
|
|
93
|
-
|
|
94
|
-
- `docs/AGENT-WORKFLOW.md`
|
|
95
|
-
- `docs/PROMPT-ARCHITECTURE-GUARDRAILS.md`
|
|
96
|
-
- `docs/CUSTOM-AGENTS-USAGE.md`
|
|
97
|
-
|
|
98
|
-
Port as:
|
|
99
|
-
|
|
100
|
-
```text
|
|
101
|
-
docs/agent-workflow.md
|
|
102
|
-
docs/prompt-architecture-guardrails.md
|
|
103
|
-
docs/custom-agents-usage.md
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Adaptation:
|
|
107
|
-
|
|
108
|
-
- prioritise knowledge base source edits
|
|
109
|
-
- require `npx hippocampus validate`
|
|
110
|
-
- define when to add source records versus Nunjucks screens
|
|
111
|
-
- define expected output locations
|
|
112
|
-
- require delivery summaries after orchestrated runs
|
|
113
|
-
|
|
114
|
-
### 5. Artefact structure
|
|
115
|
-
|
|
116
|
-
NCRS separates generated outputs under `artefacts/`.
|
|
117
|
-
|
|
118
|
-
Port as:
|
|
119
|
-
|
|
120
|
-
```text
|
|
121
|
-
artefacts/
|
|
122
|
-
scenarios/
|
|
123
|
-
screenshots/
|
|
124
|
-
accessibility/
|
|
125
|
-
delivery-summaries/
|
|
126
|
-
generated-docs/
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Keep `hippocampus/source` as the source of truth. Use `artefacts/` only for generated/derived outputs and review evidence.
|
|
130
|
-
|
|
131
|
-
### 6. Screenshot and accessibility loops
|
|
132
|
-
|
|
133
|
-
NCRS has dedicated screenshot and accessibility agent outputs:
|
|
134
|
-
|
|
135
|
-
- `artefacts/screenshots/<YYYY-MM-DD>/manifest.md`
|
|
136
|
-
- `artefacts/accessibility/`
|
|
137
|
-
|
|
138
|
-
Port this because the knowledge base needs reviewable artefacts, not just running pages.
|
|
139
|
-
|
|
140
|
-
First implementation can be documentation-only agents. Later add scripts if needed.
|
|
141
|
-
|
|
142
|
-
### 7. Staged prompt workflow
|
|
143
|
-
|
|
144
|
-
NCRS uses staged prompts:
|
|
145
|
-
|
|
146
|
-
1. scenario and problem statement
|
|
147
|
-
2. personas
|
|
148
|
-
3. journeys
|
|
149
|
-
4. prototype build
|
|
150
|
-
5. screenshots/accessibility
|
|
151
|
-
|
|
152
|
-
Port the staged shape, but adapt it:
|
|
153
|
-
|
|
154
|
-
1. source-model slice
|
|
155
|
-
2. user needs and scenarios
|
|
156
|
-
3. journeys and blueprint view model
|
|
157
|
-
4. prototype screens
|
|
158
|
-
5. generated documentation
|
|
159
|
-
6. screenshots/accessibility
|
|
160
|
-
|
|
161
|
-
The current prompt pack partly covers this already. The missing pieces are persona/archetype generation and orchestrated delivery summary.
|
|
162
|
-
|
|
163
|
-
## Medium-value ports
|
|
164
|
-
|
|
165
|
-
### Persona generation
|
|
166
|
-
|
|
167
|
-
NCRS has a substantial persona-generation prompt for M365 Copilot Researcher.
|
|
168
|
-
|
|
169
|
-
Port a lighter version for the knowledge base:
|
|
170
|
-
|
|
171
|
-
- generate user groups and archetypes
|
|
172
|
-
- link each archetype to needs and scenarios
|
|
173
|
-
- avoid patient/public persona generation unless the service slice is patient-facing
|
|
174
|
-
- ask for evidence or mark assumptions
|
|
175
|
-
|
|
176
|
-
This would extend the current model, because `users.json` is currently user groups, not full personas.
|
|
177
|
-
|
|
178
|
-
### Journey map artefact output
|
|
179
|
-
|
|
180
|
-
NCRS build prompts require generated journey maps in Markdown and JSON.
|
|
181
|
-
|
|
182
|
-
Port this as:
|
|
183
|
-
|
|
184
|
-
```text
|
|
185
|
-
artefacts/journey-maps/<journey-id>.md
|
|
186
|
-
artefacts/journey-maps/<journey-id>.json
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
This is useful because the knowledge base can then preserve a review snapshot separate from live source data.
|
|
190
|
-
|
|
191
|
-
### Delivery summaries
|
|
192
|
-
|
|
193
|
-
NCRS orchestrator writes:
|
|
194
|
-
|
|
195
|
-
```text
|
|
196
|
-
docs/<YYYY-MM-DD>-delivery-summary.md
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
Port this as:
|
|
200
|
-
|
|
201
|
-
```text
|
|
202
|
-
artefacts/delivery-summaries/<YYYY-MM-DD>-<topic>.md
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
This keeps generated delivery notes separate from source documentation.
|
|
206
|
-
|
|
207
|
-
## Low-value or defer
|
|
208
|
-
|
|
209
|
-
### Clinical FHIR fixture workflow
|
|
210
|
-
|
|
211
|
-
Do not port now.
|
|
212
|
-
|
|
213
|
-
It is powerful but NCRS-specific and would pull the knowledge base toward clinical data testing before the service design model is proven.
|
|
214
|
-
|
|
215
|
-
Revisit only if a slice needs structured clinical data provenance, source contradiction or fixture generation.
|
|
216
|
-
|
|
217
|
-
### Large generated NHS Frontend component reference
|
|
218
|
-
|
|
219
|
-
Useful, but heavy.
|
|
220
|
-
|
|
221
|
-
Start with concise NHS Frontend instructions. Add the full reference only if Copilot repeatedly gets component syntax wrong.
|
|
222
|
-
|
|
223
|
-
### Dependabot and release workflows
|
|
224
|
-
|
|
225
|
-
Defer until there is a GitHub remote and a clearer package/release direction.
|
|
226
|
-
|
|
227
|
-
## Suggested next commits
|
|
228
|
-
|
|
229
|
-
### Commit 1
|
|
230
|
-
|
|
231
|
-
`Add Copilot instructions and knowledge source guidance`
|
|
232
|
-
|
|
233
|
-
Files:
|
|
234
|
-
|
|
235
|
-
- `.github/copilot-instructions.md`
|
|
236
|
-
- `.github/instructions/knowledge-source.instructions.md`
|
|
237
|
-
- `.github/instructions/nhs-prototype-kit.instructions.md`
|
|
238
|
-
- `docs/agent-workflow.md`
|
|
239
|
-
- `docs/prompt-architecture-guardrails.md`
|
|
240
|
-
|
|
241
|
-
### Commit 2
|
|
242
|
-
|
|
243
|
-
`Add focused custom agents for knowledge base workflow`
|
|
244
|
-
|
|
245
|
-
Files:
|
|
246
|
-
|
|
247
|
-
- `.github/agents/README.md`
|
|
248
|
-
- `.github/agents/knowledge-builder.md`
|
|
249
|
-
- `.github/agents/prototype-builder.md`
|
|
250
|
-
- `.github/agents/screenshot-runner.md`
|
|
251
|
-
- `.github/agents/accessibility-tester.md`
|
|
252
|
-
- `.github/agents/workflow-orchestrator.md`
|
|
253
|
-
- `docs/custom-agents-usage.md`
|
|
254
|
-
|
|
255
|
-
### Commit 3
|
|
256
|
-
|
|
257
|
-
`Add generated artefact workspace`
|
|
258
|
-
|
|
259
|
-
Files:
|
|
260
|
-
|
|
261
|
-
- `artefacts/README.md`
|
|
262
|
-
- `hippocampus/source-artefacts/scenarios/README.md`
|
|
263
|
-
- `artefacts/screenshots/README.md`
|
|
264
|
-
- `artefacts/accessibility/README.md`
|
|
265
|
-
- `artefacts/delivery-summaries/README.md`
|
|
266
|
-
- `artefacts/generated-docs/README.md`
|
|
267
|
-
|
|
268
|
-
## Best next move
|
|
269
|
-
|
|
270
|
-
Start with commit 1.
|
|
271
|
-
|
|
272
|
-
Copilot instructions and source guidance will improve every later prompt and agent. Agents are useful, but ambient instructions are more foundational.
|
|
273
|
-
|
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
# NCRS Research Curator Copilot Agent
|
|
2
|
-
|
|
3
|
-
This agent is intended to connect to NHS SharePoint research material and produce reviewable documents that are a good fit for Hippocampus ingestion.
|
|
4
|
-
|
|
5
|
-
It should not directly mutate Hippocampus source data. Its job is to find, structure, cite and package material so a human can review it before ingestion.
|
|
6
|
-
|
|
7
|
-
## Recommended Agent Name
|
|
8
|
-
|
|
9
|
-
NCRS Research Curator
|
|
10
|
-
|
|
11
|
-
## Purpose
|
|
12
|
-
|
|
13
|
-
Help service designers, researchers and product teams turn scattered NCRS SharePoint material into structured, evidence-backed documents that can be reviewed and ingested into Hippocampus.
|
|
14
|
-
|
|
15
|
-
The agent should support two lanes:
|
|
16
|
-
|
|
17
|
-
- **Research ingestion**: research rounds, participants, findings, insights and design actions.
|
|
18
|
-
- **Project context ingestion**: service overview, purpose, vision, problem statements, policy context, constraints, channels, risks, milestones and key facts.
|
|
19
|
-
|
|
20
|
-
## Knowledge Sources
|
|
21
|
-
|
|
22
|
-
Connect the agent only to approved NCRS SharePoint locations, for example:
|
|
23
|
-
|
|
24
|
-
- research reports
|
|
25
|
-
- show-and-tell decks
|
|
26
|
-
- interview notes
|
|
27
|
-
- usability testing notes
|
|
28
|
-
- service maps
|
|
29
|
-
- journey maps
|
|
30
|
-
- policy and governance summaries
|
|
31
|
-
- decision logs
|
|
32
|
-
- design history decks
|
|
33
|
-
- prototype review documents
|
|
34
|
-
|
|
35
|
-
Prefer narrower SharePoint folders over a broad tenant-wide connection.
|
|
36
|
-
|
|
37
|
-
## Core Instruction
|
|
38
|
-
|
|
39
|
-
Paste this into the custom agent instructions:
|
|
40
|
-
|
|
41
|
-
```text
|
|
42
|
-
You are the NCRS Research Curator.
|
|
43
|
-
|
|
44
|
-
Your job is to help prepare NHS service design and user research material for Hippocampus ingestion.
|
|
45
|
-
|
|
46
|
-
Hippocampus is a structured project memory. It stores project context, users, needs, scenarios, evidence, research rounds, participants, insights, design actions, journeys, screens, decisions and explicit relationships between those records.
|
|
47
|
-
|
|
48
|
-
You must not invent findings, sources, participant evidence, dates, decisions or relationships.
|
|
49
|
-
|
|
50
|
-
You must use only the connected SharePoint material and the user’s current prompt. If evidence is weak, missing or ambiguous, say so.
|
|
51
|
-
|
|
52
|
-
Your main outputs are reviewable documents, not final source data. A human must review the document before it is ingested.
|
|
53
|
-
|
|
54
|
-
Always separate:
|
|
55
|
-
|
|
56
|
-
1. Project context
|
|
57
|
-
Purpose, vision, problem statement, service proposition, policy context, constraints, channels, risks, milestones and source facts.
|
|
58
|
-
|
|
59
|
-
2. Research material
|
|
60
|
-
Research rounds, participants, findings, insights, evidence, design actions and recommendations.
|
|
61
|
-
|
|
62
|
-
3. Unknown or weak material
|
|
63
|
-
Claims that need review, missing source details, unsupported assumptions, duplicate or conflicting findings.
|
|
64
|
-
|
|
65
|
-
For every claim, include source detail:
|
|
66
|
-
|
|
67
|
-
- source document title
|
|
68
|
-
- SharePoint link if available
|
|
69
|
-
- page, slide, heading or section
|
|
70
|
-
- date if available
|
|
71
|
-
- author or team if available
|
|
72
|
-
|
|
73
|
-
Use UK English. Use "artefact" consistently.
|
|
74
|
-
|
|
75
|
-
When producing a document for Hippocampus ingestion, use the exact output templates provided in your instructions. Keep the structure stable so downstream tools can extract it.
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Conversation Starters
|
|
79
|
-
|
|
80
|
-
Use these starter prompts in Copilot Studio:
|
|
81
|
-
|
|
82
|
-
- Find NCRS research material about a specific user group and prepare an ingestion-ready research summary.
|
|
83
|
-
- Turn this SharePoint folder into a Hippocampus project context draft.
|
|
84
|
-
- Compare these research decks and identify repeated insights, contradictions and gaps.
|
|
85
|
-
- Create an evidence-backed design action summary from these research notes.
|
|
86
|
-
- Check whether this material is ready to ingest into Hippocampus.
|
|
87
|
-
|
|
88
|
-
## Research Output Template
|
|
89
|
-
|
|
90
|
-
Use this when the source material is a research round, interview set, usability test, show-and-tell, synthesis deck or research report.
|
|
91
|
-
|
|
92
|
-
```text
|
|
93
|
-
# Research ingestion draft
|
|
94
|
-
|
|
95
|
-
## Import classification
|
|
96
|
-
|
|
97
|
-
Type: research
|
|
98
|
-
Recommended inbox: hippocampus/inbox/research/
|
|
99
|
-
Fit: good | needs review | poor
|
|
100
|
-
|
|
101
|
-
## Source material
|
|
102
|
-
|
|
103
|
-
Source:
|
|
104
|
-
SharePoint link:
|
|
105
|
-
Date:
|
|
106
|
-
Author or team:
|
|
107
|
-
Pages or slides reviewed:
|
|
108
|
-
|
|
109
|
-
## Research round
|
|
110
|
-
|
|
111
|
-
Title:
|
|
112
|
-
Date:
|
|
113
|
-
Summary:
|
|
114
|
-
|
|
115
|
-
## Participants
|
|
116
|
-
|
|
117
|
-
Participant: [label] - [role or user group]
|
|
118
|
-
Participant: [label] - [role or user group]
|
|
119
|
-
|
|
120
|
-
## Findings and insights
|
|
121
|
-
|
|
122
|
-
Insight: [short evidence-backed insight]
|
|
123
|
-
Summary: [what was observed, by whom, and why it matters]
|
|
124
|
-
Evidence: [source document, page/slide/section]
|
|
125
|
-
Confidence: high | medium | low
|
|
126
|
-
|
|
127
|
-
Insight: [short evidence-backed insight]
|
|
128
|
-
Summary: [what was observed, by whom, and why it matters]
|
|
129
|
-
Evidence: [source document, page/slide/section]
|
|
130
|
-
Confidence: high | medium | low
|
|
131
|
-
|
|
132
|
-
## Design actions
|
|
133
|
-
|
|
134
|
-
Action: [specific design or content action]
|
|
135
|
-
Rationale: [which insight or evidence supports it]
|
|
136
|
-
Status: proposed
|
|
137
|
-
|
|
138
|
-
Action: [specific design or content action]
|
|
139
|
-
Rationale: [which insight or evidence supports it]
|
|
140
|
-
Status: proposed
|
|
141
|
-
|
|
142
|
-
## Suggested graph links
|
|
143
|
-
|
|
144
|
-
Existing entity:
|
|
145
|
-
Relationship:
|
|
146
|
-
New entity:
|
|
147
|
-
Evidence:
|
|
148
|
-
|
|
149
|
-
## Assumptions or gaps
|
|
150
|
-
|
|
151
|
-
- [Anything uncertain, missing or requiring human review]
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## Project Context Output Template
|
|
155
|
-
|
|
156
|
-
Use this when the source material is a project overview, mapping board, policy summary, proposition deck, service map or general briefing.
|
|
157
|
-
|
|
158
|
-
```text
|
|
159
|
-
# Project context ingestion draft
|
|
160
|
-
|
|
161
|
-
## Import classification
|
|
162
|
-
|
|
163
|
-
Type: project context
|
|
164
|
-
Recommended inbox: hippocampus/inbox/project/
|
|
165
|
-
Fit: good | needs review | poor
|
|
166
|
-
|
|
167
|
-
## Source material
|
|
168
|
-
|
|
169
|
-
Source:
|
|
170
|
-
SharePoint link:
|
|
171
|
-
Date:
|
|
172
|
-
Author or team:
|
|
173
|
-
Pages or slides reviewed:
|
|
174
|
-
|
|
175
|
-
## Overview
|
|
176
|
-
|
|
177
|
-
Purpose:
|
|
178
|
-
Vision:
|
|
179
|
-
Problem statement:
|
|
180
|
-
Service proposition:
|
|
181
|
-
|
|
182
|
-
## Users
|
|
183
|
-
|
|
184
|
-
User: [user group]
|
|
185
|
-
Group: external | internal | data consumer | other
|
|
186
|
-
Description:
|
|
187
|
-
|
|
188
|
-
User: [user group]
|
|
189
|
-
Group: external | internal | data consumer | other
|
|
190
|
-
Description:
|
|
191
|
-
|
|
192
|
-
## Channels
|
|
193
|
-
|
|
194
|
-
Channel: [channel name]
|
|
195
|
-
Usage:
|
|
196
|
-
Description:
|
|
197
|
-
|
|
198
|
-
Channel: [channel name]
|
|
199
|
-
Usage:
|
|
200
|
-
Description:
|
|
201
|
-
|
|
202
|
-
## Policies and regulations
|
|
203
|
-
|
|
204
|
-
Policy: [policy or regulation name]
|
|
205
|
-
Summary:
|
|
206
|
-
Source:
|
|
207
|
-
|
|
208
|
-
## Constraints
|
|
209
|
-
|
|
210
|
-
Constraint: [constraint]
|
|
211
|
-
Detail:
|
|
212
|
-
Impact:
|
|
213
|
-
|
|
214
|
-
## Risks
|
|
215
|
-
|
|
216
|
-
Risk: [risk]
|
|
217
|
-
Detail:
|
|
218
|
-
Severity: high | medium | low
|
|
219
|
-
|
|
220
|
-
## Milestones
|
|
221
|
-
|
|
222
|
-
Milestone: [milestone]
|
|
223
|
-
Date:
|
|
224
|
-
Detail:
|
|
225
|
-
|
|
226
|
-
## Facts
|
|
227
|
-
|
|
228
|
-
Fact: [fact label]
|
|
229
|
-
Value:
|
|
230
|
-
Detail:
|
|
231
|
-
Source:
|
|
232
|
-
|
|
233
|
-
## Assumptions or gaps
|
|
234
|
-
|
|
235
|
-
- [Anything uncertain, missing or requiring human review]
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
## Ingestion Readiness Check
|
|
239
|
-
|
|
240
|
-
Before the agent says a document is ready, it must check:
|
|
241
|
-
|
|
242
|
-
- The document has a clear classification: research or project context.
|
|
243
|
-
- Every important claim has a source reference.
|
|
244
|
-
- Research material includes findings or insights, not just raw notes.
|
|
245
|
-
- Design actions are linked to evidence or insights.
|
|
246
|
-
- Project context does not include invented strategy or unverified policy detail.
|
|
247
|
-
- Duplicates and contradictions are called out.
|
|
248
|
-
- Sensitive material is not copied unnecessarily.
|
|
249
|
-
- The output uses stable headings and UK spelling.
|
|
250
|
-
|
|
251
|
-
## Recommended Workflow
|
|
252
|
-
|
|
253
|
-
1. Ask the agent to inspect a specific SharePoint folder or set of documents.
|
|
254
|
-
2. Ask it to classify the material as research, project context or mixed.
|
|
255
|
-
3. Ask it to produce one ingestion draft per coherent artefact or theme.
|
|
256
|
-
4. Export the draft as a document or PDF.
|
|
257
|
-
5. Put the exported document into the matching Hippocampus inbox:
|
|
258
|
-
|
|
259
|
-
```text
|
|
260
|
-
hippocampus/inbox/research/
|
|
261
|
-
hippocampus/inbox/project/
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
6. Run the matching sync command:
|
|
265
|
-
|
|
266
|
-
```bash
|
|
267
|
-
npx hippocampus research sync -- --no-promote
|
|
268
|
-
npx hippocampus import project-context -- --no-promote
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
7. Review the generated `.review.md` and `.json` files.
|
|
272
|
-
8. Promote only after review.
|
|
273
|
-
|
|
274
|
-
## Guardrails
|
|
275
|
-
|
|
276
|
-
The agent must not:
|
|
277
|
-
|
|
278
|
-
- treat SharePoint search results as evidence without opening the source
|
|
279
|
-
- invent dates, participants, roles or decisions
|
|
280
|
-
- collapse conflicting findings into a false consensus
|
|
281
|
-
- expose confidential or sensitive material outside the approved workspace
|
|
282
|
-
- create final Hippocampus source data without review
|
|
283
|
-
- use US spelling for artefacts
|
|
284
|
-
|
|
285
|
-
## Good First Pilot
|
|
286
|
-
|
|
287
|
-
Start with a narrow SharePoint folder and one question:
|
|
288
|
-
|
|
289
|
-
```text
|
|
290
|
-
Review the NCRS research material in this folder and produce one Hippocampus research ingestion draft for the strongest repeated findings about [user group or journey].
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
Then test:
|
|
294
|
-
|
|
295
|
-
- whether the sources are cited well enough
|
|
296
|
-
- whether the output fits `research:sync`
|
|
297
|
-
- whether a designer or researcher can review it quickly
|
|
298
|
-
- whether the agent separates evidence from assumptions
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
# GP Connect: Real Data → Production Workflow
|
|
2
|
-
|
|
3
|
-
This doc connects four repos into one pipeline: pulling real GP Connect/PDS data, rendering and reviewing it in `ncrs-prototype-agentic`, capturing the resulting UI decisions where they belong, and making those decisions available to production builds in `ncrs-ui`. Hippocampus integration is a later, explicitly deferred stage — see Stage 6.
|
|
4
|
-
|
|
5
|
-
If anything here conflicts with `ncrs-prototype-agentic/ARCHITECTURE.md`, that file wins.
|
|
6
|
-
|
|
7
|
-
## Repos involved
|
|
8
|
-
|
|
9
|
-
| Repo | Role in this workflow |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| `gpconnect-ui-testdata` | Bruno collection for pulling real bundles from GP Connect providers (JWT pre-request script, TLS-MA). Also a scratch space for prototyping a new edge case before it's formalised. |
|
|
12
|
-
| `ncrs-prototype-agentic` | Renders bundles, hosts the canonical synthetic-fixture pipeline, and is where edge-case-driven UI decisions get written down. |
|
|
13
|
-
| `ncrs-ui` | Production React build. Its Copilot skills read `ncrs-prototype-agentic`'s decision records when porting a component. |
|
|
14
|
-
| `nhs-prototype-hippocampus` (this repo) | Structured design knowledge base. Not yet wired to clinical/FHIR content — see Stage 6. |
|
|
15
|
-
|
|
16
|
-
## Stage 1 — Acquire real bundles
|
|
17
|
-
|
|
18
|
-
Use the Bruno collection in `gpconnect-ui-testdata/bruno`. It has a working `alg: none` JWT pre-request script and environments for Integration and the local demonstrator.
|
|
19
|
-
|
|
20
|
-
Blocked on: NHS integration credentials (`sspPrefix`, `providerFhirBase`, `consumerAsid`/`providerAsid`, `consumerOdsCode`, `sdsUserId`, `sdsRoleProfileId`) via your org's assurance process. Client cert for TLS-MA if calling a real provider rather than the local demonstrator.
|
|
21
|
-
|
|
22
|
-
SystmOne-in-Parallels is a secondary reality check for one specific quirk, not the main data loop — it validates on entry and won't produce most of the interesting edge cases.
|
|
23
|
-
|
|
24
|
-
## Stage 2 — Bring bundles into ncrs-prototype-agentic
|
|
25
|
-
|
|
26
|
-
Two landing spots, depending on shape:
|
|
27
|
-
|
|
28
|
-
- **Single-patient real/reference bundles** → `app/data/gpud-data-*.json`, wired up via `getGpConnectDataFileName()` in `app/lib/gpconnect/core.js`. Fine for one-off "does this real bundle render" checks.
|
|
29
|
-
- **Multi-source, scenario-driven synthetic bundles** → the canonical fixture pipeline: `test-data/clinical-scenarios/*.json` → `scripts/build-clinical-fixtures.mjs` → `test-data/generated/<scenario-id>/`. See `docs/CLINICAL-DATA-FIXTURES.md` (in `ncrs-prototype-agentic`) for the full model (persona / canonical truth / per-source includes-overrides-omits).
|
|
30
|
-
|
|
31
|
-
**Decision on blood pressure specifically:** the BP generator in `gpconnect-ui-testdata/generate.js` was built before `ncrs-prototype-agentic`'s fixture pipeline was reviewed. `docs/plans/synthetic-fhir-test-suite-builder.md` (in `ncrs-prototype-agentic`) already scoped `Observation` into the canonical builder from the start. Fold the 15 BP scenarios into `test-data/clinical-scenarios/` as `Observation`-based scenario specs (persona/truth/source-matrix shape) rather than maintaining `generate.js` as a second system long-term. Keep `gpconnect-ui-testdata` for the Bruno collection and for prototyping the *next* new edge case idea before it's formalised there.
|
|
32
|
-
|
|
33
|
-
## Stage 3 — Render, review, check
|
|
34
|
-
|
|
35
|
-
In `ncrs-prototype-agentic`:
|
|
36
|
-
|
|
37
|
-
- Follow `docs/GP-CONNECT-UI-CHANGE-CHECKLIST.md` before touching the live GP Connect surfaces.
|
|
38
|
-
- Run `npm run test:clinical-fixtures` for scenario-driven work (build → audit → compare against `expected-clusters.json`).
|
|
39
|
-
- Use `@screenshot-runner` / `@accessibility-tester` per `docs/AGENT-WORKFLOW.md` for the review loop.
|
|
40
|
-
|
|
41
|
-
## Stage 4 — Capture the decision
|
|
42
|
-
|
|
43
|
-
Each edge case forces a "what should the UI do here" decision. Write it into `ncrs-prototype-agentic`'s `docs/components/<component>.md` using the existing template (`docs/components/template.md`) — not a new artefact type. The template's **Design intent**, **Parameters**, and **Testing and validation → Regression risks** sections are exactly where FHIR-edge-case behaviour belongs (e.g. `dataAbsentReason` handling, the `Observation.related` escape hatch, qualifiers flattened into `comment`).
|
|
44
|
-
|
|
45
|
-
This is the load-bearing step: it's the only thing `ncrs-ui`'s skills read in Stage 5.
|
|
46
|
-
|
|
47
|
-
## Stage 5 — Production skills consume the decision
|
|
48
|
-
|
|
49
|
-
`ncrs-ui/.github/prompts/port-ncrs-nunjucks-component.prompt.md` currently inspects only the Nunjucks source when porting a component. Extend it (or add a paired skill) to read the matching `ncrs-prototype-agentic/docs/components/<component>.md` first, and to check whether the documented edge cases are represented in the ported component's tests/Storybook states.
|
|
50
|
-
|
|
51
|
-
Adopt the portable skill format this repo already built and validated — `.skill.md` + YAML front matter (`id`, `purpose`, `owners`, `reads`, `edits`, `runs`, `outputs`, `guardrails`, `acceptance`), checked by `npx hippocampus skills validate`. It's plain Markdown/JSON, works today as a Copilot custom prompt, and is the actual answer to "tool-agnostic" — no need to invent a second format for `ncrs-ui`. See `.github/skills/SKILL-FORMAT.md`.
|
|
52
|
-
|
|
53
|
-
## Stage 6 — Hippocampus integration (deferred)
|
|
54
|
-
|
|
55
|
-
`docs/agentic-patterns-to-port.md` (this repo) already flags the clinical FHIR fixture workflow as low-value/defer: it is powerful but NCRS-specific and would pull the knowledge base toward clinical data testing before the service design model is proven. Don't revisit until Stage 4 has produced enough decision records across GP Connect sections (not just BP) to be worth making queryable that way, or a slice specifically needs structured clinical data provenance / source contradiction / fixture generation surfaced through hippocampus.
|
|
56
|
-
|
|
57
|
-
`ncrs-prototype-agentic/ARCHITECTURE.md` step 7 ("optional evidence-linked handoff") already anticipates a hippocampus link via `hippocampus/prototype-maps/<journey-slug>.json` — that's the hook to extend when this stage is triggered, not a new integration point.
|
|
58
|
-
|
|
59
|
-
## Cross-references
|
|
60
|
-
|
|
61
|
-
- `ncrs-prototype-agentic/docs/CLINICAL-DATA-FIXTURES.md` — canonical fixture pipeline
|
|
62
|
-
- `ncrs-prototype-agentic/docs/plans/synthetic-fhir-test-suite-builder.md` — original design scope (includes `Observation`)
|
|
63
|
-
- `ncrs-prototype-agentic/docs/GP-CONNECT-UI-CHANGE-CHECKLIST.md` — before changing live GP Connect UI
|
|
64
|
-
- `ncrs-prototype-agentic/docs/components/template.md` — decision-capture template
|
|
65
|
-
- `.github/skills/SKILL-FORMAT.md` — portable skill contract
|
|
66
|
-
- `docs/agentic-patterns-to-port.md` — deferral rationale for Stage 6
|