@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,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: triage-research-corpus
|
|
3
|
+
title: Triage research corpus
|
|
4
|
+
purpose: Rank a large research folder into ingestion contenders before any artefact is imported.
|
|
5
|
+
owners:
|
|
6
|
+
- ingestion-curator
|
|
7
|
+
- workflow-orchestrator
|
|
8
|
+
composes:
|
|
9
|
+
- ingest-research-round
|
|
10
|
+
reads:
|
|
11
|
+
- node_modules/@hippo-digital/hippocampus/docs/repeatable-research-round-ingestion.md
|
|
12
|
+
- node_modules/@hippo-digital/hippocampus/docs/research-source-file-conventions.md
|
|
13
|
+
- node_modules/@hippo-digital/hippocampus/docs/source-model.md
|
|
14
|
+
edits:
|
|
15
|
+
- artefacts/research-triage/
|
|
16
|
+
runs:
|
|
17
|
+
- npx hippocampus research triage -- --source "[folder]" --topic [topic]
|
|
18
|
+
outputs:
|
|
19
|
+
- Ranked triage report in artefacts/research-triage/
|
|
20
|
+
- Tiered contender list mapped to Hippocampus record types
|
|
21
|
+
guardrails:
|
|
22
|
+
- Do not copy artefacts into hippocampus/inbox/ during triage.
|
|
23
|
+
- Do not edit hippocampus/source/ or promote anything.
|
|
24
|
+
- Report the format coverage gap rather than silently ignoring unsupported files.
|
|
25
|
+
acceptance:
|
|
26
|
+
- Every file in the source folder appears in the report or in the needs-handling list.
|
|
27
|
+
- Contenders are tiered and mapped to the records they would become.
|
|
28
|
+
- Files the pipeline cannot read today are named explicitly.
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
# Triage research corpus
|
|
32
|
+
|
|
33
|
+
## Use when
|
|
34
|
+
- A shared drive or SharePoint export holds far more research material than one round's worth.
|
|
35
|
+
- You need to decide what is worth ingesting before spending review effort on drafts.
|
|
36
|
+
|
|
37
|
+
## Workflow
|
|
38
|
+
1. Run `npx hippocampus research triage -- --source "[folder]" --topic [topic]` against the folder. It reads only; nothing is copied or imported.
|
|
39
|
+
2. Read the coverage-gap table first. It shows how much of the corpus the ingestion pipeline can currently read.
|
|
40
|
+
3. Work down the tiers. Tier 1 files are the ones to move into `hippocampus/inbox/research/` first.
|
|
41
|
+
4. For each Tier 1 file, check the "Becomes" column against `app/lib/hippocampus/schema.js` and confirm the mapping is real, not just keyword noise.
|
|
42
|
+
5. Sequence ingestion so records land in dependency order: users, then needs, then evidence, then scenarios, journeys, screens, decisions.
|
|
43
|
+
6. Feed the chosen files into `ingest-research-round` one round at a time.
|
|
44
|
+
|
|
45
|
+
## Guardrails
|
|
46
|
+
- Triage ranks candidates; it does not judge whether the content is true. A high score means "worth a human read", not "ready to promote".
|
|
47
|
+
- Do not copy artefacts into the inbox during triage.
|
|
48
|
+
- Do not edit `hippocampus/source/` or promote anything.
|
|
49
|
+
|
|
50
|
+
## Finish
|
|
51
|
+
- Report the triage file path, the number of Tier 1 contenders, the format coverage gap, and the recommended ingestion order.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: write-delivery-summary
|
|
3
|
+
title: Write delivery summary
|
|
4
|
+
purpose: Capture a durable handover note for multi-step Hippocampus work.
|
|
5
|
+
owners:
|
|
6
|
+
- workflow-orchestrator
|
|
7
|
+
composes:
|
|
8
|
+
- audit-knowledge-source
|
|
9
|
+
reads:
|
|
10
|
+
- node_modules/@hippo-digital/hippocampus/docs/agent-workflow.md
|
|
11
|
+
- node_modules/@hippo-digital/hippocampus/docs/agent-workflow.md
|
|
12
|
+
- artefacts/delivery-summaries/
|
|
13
|
+
edits:
|
|
14
|
+
- artefacts/delivery-summaries/[yyyy-mm-dd-topic].md
|
|
15
|
+
runs:
|
|
16
|
+
- git --no-pager status --short
|
|
17
|
+
outputs:
|
|
18
|
+
- Dated summary under artefacts/delivery-summaries/
|
|
19
|
+
- Reviewable record of commands, outcomes, and follow-up
|
|
20
|
+
guardrails:
|
|
21
|
+
- Do not treat the summary as source of truth.
|
|
22
|
+
- Do not omit failed checks or unresolved risks.
|
|
23
|
+
- Do not claim promotion happened unless the promotion command really ran.
|
|
24
|
+
acceptance:
|
|
25
|
+
- The summary includes what changed, what ran, and unresolved risks.
|
|
26
|
+
- Failed checks or unrun steps are stated explicitly.
|
|
27
|
+
- The summary path is reported.
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# Write delivery summary
|
|
31
|
+
|
|
32
|
+
## Use when
|
|
33
|
+
- A multi-step change needs a durable review note for handover, design review, or later promotion.
|
|
34
|
+
- Orchestrated work has touched source data, prototype views, import drafts, or generated artefacts.
|
|
35
|
+
|
|
36
|
+
## Workflow
|
|
37
|
+
1. Capture the request or outcome being delivered in one sentence.
|
|
38
|
+
2. List the records, routes, views, drafts, or docs changed.
|
|
39
|
+
3. Record the commands actually run and their results, especially `npx hippocampus validate`, `npx hippocampus doctor`, and any dry-run promotion checks.
|
|
40
|
+
4. Record assumptions added, warnings left in drafts, blockers, and the smallest sensible next step.
|
|
41
|
+
5. Write the summary to `artefacts/delivery-summaries/<YYYY-MM-DD>-<topic>.md`.
|
|
42
|
+
|
|
43
|
+
## Guardrails
|
|
44
|
+
- Do not treat the summary as source of truth.
|
|
45
|
+
- Do not omit failed checks or unresolved risks.
|
|
46
|
+
- Do not claim promotion happened unless the promotion command really ran.
|
|
47
|
+
|
|
48
|
+
## Finish
|
|
49
|
+
- Run `git --no-pager status --short`.
|
|
50
|
+
- Report the summary path and any remaining follow-up items.
|
|
51
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: write-route-review-summary
|
|
3
|
+
title: Write route review summary
|
|
4
|
+
purpose: Combine smoke, screenshot, and accessibility evidence into one route-review handover note.
|
|
5
|
+
owners:
|
|
6
|
+
- workflow-orchestrator
|
|
7
|
+
- screenshot-runner
|
|
8
|
+
- accessibility-tester
|
|
9
|
+
composes:
|
|
10
|
+
- capture-route-review-pack
|
|
11
|
+
- record-accessibility-review
|
|
12
|
+
- write-delivery-summary
|
|
13
|
+
reads:
|
|
14
|
+
- node_modules/@hippo-digital/hippocampus/docs/agent-workflow.md
|
|
15
|
+
- artefacts/screenshots/README.md
|
|
16
|
+
- artefacts/accessibility/README.md
|
|
17
|
+
- artefacts/delivery-summaries/README.md
|
|
18
|
+
edits:
|
|
19
|
+
- artefacts/delivery-summaries/[yyyy-mm-dd-topic]-route-review.md
|
|
20
|
+
runs:
|
|
21
|
+
- git --no-pager status --short
|
|
22
|
+
outputs:
|
|
23
|
+
- Dated route-review summary under artefacts/delivery-summaries/
|
|
24
|
+
- Linked references to screenshot and accessibility artefacts
|
|
25
|
+
guardrails:
|
|
26
|
+
- Do not claim a screenshot pack or accessibility pass exists unless the artefact file exists.
|
|
27
|
+
- Keep the summary review-focused rather than restating all code changes.
|
|
28
|
+
- Keep failed checks and unresolved issues visible.
|
|
29
|
+
acceptance:
|
|
30
|
+
- The summary distinguishes screenshots, notes-only evidence, and code-based review.
|
|
31
|
+
- Missing artefacts or unresolved blockers stay visible.
|
|
32
|
+
- The summary path is reported.
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# Write route review summary
|
|
36
|
+
|
|
37
|
+
## Use when
|
|
38
|
+
- A route or view change has screenshot notes, accessibility findings, or smoke-test results that need one handover summary.
|
|
39
|
+
- You want a durable review note rather than scattered comments across artefact folders.
|
|
40
|
+
|
|
41
|
+
## Workflow
|
|
42
|
+
1. Collect the smoke-test result, screenshot manifest, accessibility note, and any relevant route or template changes.
|
|
43
|
+
2. Write `artefacts/delivery-summaries/<YYYY-MM-DD>-<topic>-route-review.md` with the review scope, routes checked, evidence created, blockers, follow-up improvements, and the smallest next action.
|
|
44
|
+
3. Link back to screenshot and accessibility artefacts rather than duplicating their full content.
|
|
45
|
+
4. State clearly if the review used screenshots, route notes, code inspection, or a mixture.
|
|
46
|
+
|
|
47
|
+
## Guardrails
|
|
48
|
+
- Do not claim a screenshot pack or accessibility pass exists unless the artefact file exists.
|
|
49
|
+
- Keep the summary review-focused rather than restating all code changes.
|
|
50
|
+
- Keep failed checks and unresolved issues visible.
|
|
51
|
+
|
|
52
|
+
## Finish
|
|
53
|
+
- Run `git --no-pager status --short`.
|
|
54
|
+
- Report the summary path and any blockers that still need implementation work.
|
|
55
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{#
|
|
2
|
+
The layout every Hippocampus view extends.
|
|
3
|
+
|
|
4
|
+
It extends the Prototype Kit's own template rather than the host's
|
|
5
|
+
layout.html, because a host may not have one, may not expose a head block,
|
|
6
|
+
and should not have to know this library needs either. Its stylesheet and
|
|
7
|
+
client JS come from the viewer's own router, so installing Hippocampus adds
|
|
8
|
+
no sass entry point and no stylesheet link to the host project.
|
|
9
|
+
#}
|
|
10
|
+
{% extends "prototype-kit-template.njk" %}
|
|
11
|
+
|
|
12
|
+
{% block head %}
|
|
13
|
+
<link href="/nhsuk-frontend/nhsuk-frontend.min.css" rel="stylesheet">
|
|
14
|
+
<link href="{{ hippocampusAssets }}/hippocampus.css" rel="stylesheet">
|
|
15
|
+
{% endblock %}
|
|
16
|
+
|
|
17
|
+
{% block header %}
|
|
18
|
+
{{ header({
|
|
19
|
+
service: {
|
|
20
|
+
text: serviceName or knowledge.project.name or "Knowledge base",
|
|
21
|
+
href: basePath
|
|
22
|
+
}
|
|
23
|
+
}) }}
|
|
24
|
+
{% endblock %}
|
|
25
|
+
|
|
26
|
+
{% block footer %}
|
|
27
|
+
{{ footer({
|
|
28
|
+
meta: {
|
|
29
|
+
items: [
|
|
30
|
+
{
|
|
31
|
+
href: basePath,
|
|
32
|
+
text: "Knowledge base"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
href: "/prototype-admin/reset?returnPage=" + (currentPage | urlencode),
|
|
36
|
+
text: "Reset data"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}) }}
|
|
41
|
+
{% endblock %}
|
|
42
|
+
|
|
43
|
+
{% block bodyEnd %}
|
|
44
|
+
{{ super() }}
|
|
45
|
+
{% endblock %}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
{% from "hippocampus/components/_blueprint-cell.njk" import renderCell %}
|
|
3
|
+
|
|
4
|
+
{% block pageTitle %}{{ blueprint.meta.journeyTitle }} matrix{% endblock %}
|
|
5
|
+
|
|
6
|
+
{% block content %}
|
|
7
|
+
<a class="nhsuk-back-link" href="{{ basePath }}/journeys/{{ blueprint.journey.id }}/blueprint">Back to stacked blueprint</a>
|
|
8
|
+
<span class="nhsuk-caption-l">Classic service blueprint</span>
|
|
9
|
+
<h1>{{ blueprint.meta.journeyTitle }}</h1>
|
|
10
|
+
|
|
11
|
+
<div class="knowledge-matrix-wrap">
|
|
12
|
+
<table class="knowledge-matrix">
|
|
13
|
+
<thead>
|
|
14
|
+
<tr>
|
|
15
|
+
<th scope="col">Swimlane</th>
|
|
16
|
+
{% for step in blueprint.steps %}
|
|
17
|
+
<th scope="col">{{ step.label }}</th>
|
|
18
|
+
{% endfor %}
|
|
19
|
+
</tr>
|
|
20
|
+
</thead>
|
|
21
|
+
<tbody>
|
|
22
|
+
{% for lane in blueprint.lanes %}
|
|
23
|
+
<tr>
|
|
24
|
+
<th scope="row">{{ lane.label }}</th>
|
|
25
|
+
{% for step in blueprint.steps %}
|
|
26
|
+
<td>{{ renderCell(step, lane.key) }}</td>
|
|
27
|
+
{% endfor %}
|
|
28
|
+
</tr>
|
|
29
|
+
{% if lane.boundaryAfter %}
|
|
30
|
+
<tr class="knowledge-matrix__boundary">
|
|
31
|
+
<td colspan="{{ blueprint.steps.length + 1 }}">{{ lane.boundaryAfter }}</td>
|
|
32
|
+
</tr>
|
|
33
|
+
{% endif %}
|
|
34
|
+
{% endfor %}
|
|
35
|
+
</tbody>
|
|
36
|
+
</table>
|
|
37
|
+
</div>
|
|
38
|
+
{% endblock %}
|
|
39
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
{% from "hippocampus/components/_blueprint-cell.njk" import renderCell %}
|
|
3
|
+
{% from "hippocampus/components/_blueprint-controls.njk" import renderBlueprintControls %}
|
|
4
|
+
{% from "hippocampus/components/_blueprint-minimap.njk" import renderBlueprintMinimap %}
|
|
5
|
+
|
|
6
|
+
{% block pageTitle %}{{ blueprint.meta.journeyTitle }} blueprint{% endblock %}
|
|
7
|
+
|
|
8
|
+
{% block content %}
|
|
9
|
+
<a class="nhsuk-back-link" href="{{ basePath }}/journeys/{{ blueprint.journey.id }}">Back to journey</a>
|
|
10
|
+
<span class="nhsuk-caption-l">Stacked service blueprint</span>
|
|
11
|
+
<h1>{{ blueprint.meta.journeyTitle }}</h1>
|
|
12
|
+
<p class="nhsuk-lede-text">{{ blueprint.meta.scenarioTitle }}</p>
|
|
13
|
+
|
|
14
|
+
<p><a href="{{ basePath }}/journeys/{{ blueprint.journey.id }}/blueprint/classic">View classic matrix blueprint</a></p>
|
|
15
|
+
|
|
16
|
+
{{ renderBlueprintControls(blueprint.lanes) }}
|
|
17
|
+
|
|
18
|
+
<div class="knowledge-blueprint-layout">
|
|
19
|
+
{{ renderBlueprintMinimap(blueprint.steps) }}
|
|
20
|
+
|
|
21
|
+
<div class="knowledge-blueprint-steps">
|
|
22
|
+
{% for step in blueprint.steps %}
|
|
23
|
+
<section class="knowledge-blueprint-step" id="step-{{ step.id }}" data-step-id="{{ step.id }}">
|
|
24
|
+
<div class="knowledge-blueprint-step__header">
|
|
25
|
+
<h2 class="nhsuk-heading-m">{{ step.label }}</h2>
|
|
26
|
+
<span class="nhsuk-tag">{{ step.channel }}</span>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
{% for lane in blueprint.lanes %}
|
|
30
|
+
<div class="knowledge-lane" data-lane="{{ lane.key }}" data-lenses="{{ lane.lenses | join(' ') }}">
|
|
31
|
+
<div class="knowledge-lane__label">
|
|
32
|
+
<h3>{{ lane.label }}</h3>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="knowledge-lane__content">
|
|
35
|
+
{{ renderCell(step, lane.key) }}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
{% if lane.boundaryAfter %}
|
|
39
|
+
<div class="knowledge-boundary">{{ lane.boundaryAfter }}</div>
|
|
40
|
+
{% endif %}
|
|
41
|
+
{% endfor %}
|
|
42
|
+
</section>
|
|
43
|
+
{% endfor %}
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
{% endblock %}
|
|
47
|
+
|
|
48
|
+
{% block bodyEnd %}
|
|
49
|
+
{{ super() }}
|
|
50
|
+
<script type="module" src="{{ hippocampusAssets }}/blueprint.js"></script>
|
|
51
|
+
{% endblock %}
|
|
52
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{% from "hippocampus/components/_list.njk" import bulletList %}
|
|
2
|
+
|
|
3
|
+
{% macro renderCell(step, laneKey) %}
|
|
4
|
+
{% if laneKey == "screens" %}
|
|
5
|
+
{% if step.screens.length %}
|
|
6
|
+
<ul class="nhsuk-list">
|
|
7
|
+
{% for screen in step.screens %}
|
|
8
|
+
<li><a href="{{ screen.route }}">{{ screen.title }}</a></li>
|
|
9
|
+
{% endfor %}
|
|
10
|
+
</ul>
|
|
11
|
+
{% else %}
|
|
12
|
+
<span class="knowledge-muted">No linked screens</span>
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% elif laneKey == "userAction" %}
|
|
15
|
+
<p class="nhsuk-body-s">{{ step.userAction }}</p>
|
|
16
|
+
{% elif laneKey == "painPoints" %}
|
|
17
|
+
{% for painPoint in step.painPoints %}
|
|
18
|
+
<div class="knowledge-tagged-item knowledge-tagged-item--{{ painPoint.severity }}">
|
|
19
|
+
<strong>{{ painPoint.severity | upper }}</strong>
|
|
20
|
+
<span>{{ painPoint.label }}</span>
|
|
21
|
+
</div>
|
|
22
|
+
{% endfor %}
|
|
23
|
+
{% elif laneKey == "exceptionHandling" %}
|
|
24
|
+
{{ bulletList(step.exceptionHandling) }}
|
|
25
|
+
{% elif laneKey == "evidence" %}
|
|
26
|
+
{% if step.evidence.length or step.decisions.length %}
|
|
27
|
+
<ul class="nhsuk-list">
|
|
28
|
+
{% for evidence in step.evidence %}
|
|
29
|
+
<li><strong>Evidence:</strong> {{ evidence.title }}</li>
|
|
30
|
+
{% endfor %}
|
|
31
|
+
{% for decision in step.decisions %}
|
|
32
|
+
<li><strong>Decision:</strong> {{ decision.title }}</li>
|
|
33
|
+
{% endfor %}
|
|
34
|
+
</ul>
|
|
35
|
+
{% else %}
|
|
36
|
+
<span class="knowledge-muted">None linked</span>
|
|
37
|
+
{% endif %}
|
|
38
|
+
{% else %}
|
|
39
|
+
{% set items = step[laneKey] %}
|
|
40
|
+
{{ bulletList(items, "Not defined") }}
|
|
41
|
+
{% endif %}
|
|
42
|
+
{% endmacro %}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{% macro renderBlueprintControls(lanes) %}
|
|
2
|
+
<div class="knowledge-blueprint-controls" data-blueprint-controls>
|
|
3
|
+
<div class="knowledge-blueprint-controls__lenses" role="group" aria-label="Blueprint lens presets">
|
|
4
|
+
<button type="button" class="knowledge-lens-btn" data-lens="all" aria-pressed="true">All</button>
|
|
5
|
+
<button type="button" class="knowledge-lens-btn" data-lens="executive" aria-pressed="false">Executive</button>
|
|
6
|
+
<button type="button" class="knowledge-lens-btn" data-lens="technical" aria-pressed="false">Technical</button>
|
|
7
|
+
<button type="button" class="knowledge-lens-btn" data-lens="risk" aria-pressed="false">Risk</button>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<fieldset class="knowledge-blueprint-controls__lanes">
|
|
11
|
+
<legend>Show or hide lanes</legend>
|
|
12
|
+
{% for lane in lanes %}
|
|
13
|
+
<span class="knowledge-lane-toggle">
|
|
14
|
+
<input type="checkbox" id="lane-toggle-{{ lane.key }}" data-lane-toggle="{{ lane.key }}" checked>
|
|
15
|
+
<label for="lane-toggle-{{ lane.key }}">{{ lane.label }}</label>
|
|
16
|
+
</span>
|
|
17
|
+
{% endfor %}
|
|
18
|
+
</fieldset>
|
|
19
|
+
</div>
|
|
20
|
+
{% endmacro %}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{% macro renderBlueprintMinimap(steps) %}
|
|
2
|
+
<nav class="knowledge-blueprint-minimap" aria-label="Jump to step" data-blueprint-minimap>
|
|
3
|
+
<ul>
|
|
4
|
+
{% for step in steps %}
|
|
5
|
+
<li>
|
|
6
|
+
<a href="#step-{{ step.id }}" data-minimap-step="{{ step.id }}">
|
|
7
|
+
<span class="knowledge-blueprint-minimap__marker" aria-hidden="true">{{ loop.index }}</span>
|
|
8
|
+
<span class="nhsuk-u-visually-hidden">{{ step.label }}</span>
|
|
9
|
+
</a>
|
|
10
|
+
</li>
|
|
11
|
+
{% endfor %}
|
|
12
|
+
</ul>
|
|
13
|
+
</nav>
|
|
14
|
+
{% endmacro %}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{#
|
|
2
|
+
One macro rather than 17 rewritten views. A freshly initialised knowledge base
|
|
3
|
+
renders every route; each page that has nothing to show says what belongs
|
|
4
|
+
there and how to put it there, instead of an empty container or a crash.
|
|
5
|
+
#}
|
|
6
|
+
{% macro emptyState(title, explanation, hint) %}
|
|
7
|
+
<div class="knowledge-empty-state">
|
|
8
|
+
<h2 class="nhsuk-heading-m">{{ title }}</h2>
|
|
9
|
+
<p>{{ explanation }}</p>
|
|
10
|
+
{% if hint %}<p class="knowledge-muted">{{ hint }}</p>{% endif %}
|
|
11
|
+
</div>
|
|
12
|
+
{% endmacro %}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{% macro journeyStep(step, knowledge) %}
|
|
2
|
+
<li class="knowledge-timeline__item">
|
|
3
|
+
<h2 class="nhsuk-heading-m">{{ step.label }}</h2>
|
|
4
|
+
<p>{{ step.userAction }}</p>
|
|
5
|
+
|
|
6
|
+
<h3 class="nhsuk-heading-s">Linked screens</h3>
|
|
7
|
+
<ul class="nhsuk-list">
|
|
8
|
+
{% for screenId in step.screenIds %}
|
|
9
|
+
{% set screen = knowledge.index.screens[screenId] %}
|
|
10
|
+
<li><a href="{{ screen.route }}">{{ screen.title }}</a></li>
|
|
11
|
+
{% endfor %}
|
|
12
|
+
</ul>
|
|
13
|
+
|
|
14
|
+
<h3 class="nhsuk-heading-s">User needs</h3>
|
|
15
|
+
<ul class="nhsuk-list nhsuk-list--bullet">
|
|
16
|
+
{% for needId in step.needIds %}
|
|
17
|
+
<li>{{ knowledge.index.needs[needId].statement }}</li>
|
|
18
|
+
{% endfor %}
|
|
19
|
+
</ul>
|
|
20
|
+
</li>
|
|
21
|
+
{% endmacro %}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{% macro bulletList(items, emptyText) %}
|
|
2
|
+
{% if items and items.length %}
|
|
3
|
+
<ul class="nhsuk-list nhsuk-list--bullet">
|
|
4
|
+
{% for item in items %}
|
|
5
|
+
<li>{{ item }}</li>
|
|
6
|
+
{% endfor %}
|
|
7
|
+
</ul>
|
|
8
|
+
{% else %}
|
|
9
|
+
<span class="knowledge-muted">{{ emptyText or "Not defined" }}</span>
|
|
10
|
+
{% endif %}
|
|
11
|
+
{% endmacro %}
|
|
12
|
+
|
|
13
|
+
{% macro plainList(items, emptyText) %}
|
|
14
|
+
{% if items and items.length %}
|
|
15
|
+
<ul class="nhsuk-list">
|
|
16
|
+
{% for item in items %}
|
|
17
|
+
<li>{{ item }}</li>
|
|
18
|
+
{% endfor %}
|
|
19
|
+
</ul>
|
|
20
|
+
{% else %}
|
|
21
|
+
<span class="knowledge-muted">{{ emptyText or "None linked" }}</span>
|
|
22
|
+
{% endif %}
|
|
23
|
+
{% endmacro %}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{% macro summaryCard(title, body, href, meta) %}
|
|
2
|
+
<div class="knowledge-card">
|
|
3
|
+
{% if meta %}
|
|
4
|
+
<p class="knowledge-card__meta">{{ meta }}</p>
|
|
5
|
+
{% endif %}
|
|
6
|
+
<h2 class="nhsuk-heading-s nhsuk-u-margin-bottom-2">
|
|
7
|
+
{% if href %}
|
|
8
|
+
<a href="{{ href }}">{{ title }}</a>
|
|
9
|
+
{% else %}
|
|
10
|
+
{{ title }}
|
|
11
|
+
{% endif %}
|
|
12
|
+
</h2>
|
|
13
|
+
<p class="nhsuk-body-s nhsuk-u-margin-bottom-0">{{ body }}</p>
|
|
14
|
+
</div>
|
|
15
|
+
{% endmacro %}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
|
|
3
|
+
{% block pageTitle %}{{ doc.title }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<a class="nhsuk-back-link" href="{{ basePath }}/docs">Back to documentation</a>
|
|
7
|
+
<article class="knowledge-doc">
|
|
8
|
+
{{ doc.html | safe }}
|
|
9
|
+
</article>
|
|
10
|
+
<p class="knowledge-muted">@hippo-digital/hippocampus {{ packageVersion }}</p>
|
|
11
|
+
{% endblock %}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
|
|
3
|
+
{% block pageTitle %}Documentation{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
|
|
7
|
+
<h1>Documentation</h1>
|
|
8
|
+
<p class="nhsuk-lede-text">These guides ship with the package, so they always describe the version you have installed.</p>
|
|
9
|
+
<p class="knowledge-muted">@hippo-digital/hippocampus {{ packageVersion }}</p>
|
|
10
|
+
|
|
11
|
+
<div class="knowledge-grid">
|
|
12
|
+
{% for doc in docs %}
|
|
13
|
+
<div class="knowledge-card">
|
|
14
|
+
<h2 class="nhsuk-heading-s"><a href="{{ basePath }}/docs/{{ doc.slug }}">{{ doc.title }}</a></h2>
|
|
15
|
+
{% if doc.summary %}<p>{{ doc.summary }}</p>{% endif %}
|
|
16
|
+
</div>
|
|
17
|
+
{% endfor %}
|
|
18
|
+
</div>
|
|
19
|
+
{% endblock %}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
|
|
3
|
+
{% block pageTitle %}Evidence impact - {{ impact.evidence.title }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<a class="nhsuk-back-link" href="{{ basePath }}/graph">Back to relationship graph</a>
|
|
7
|
+
|
|
8
|
+
<span class="nhsuk-caption-l">Evidence impact</span>
|
|
9
|
+
<h1>{{ impact.evidence.title }}</h1>
|
|
10
|
+
<p class="nhsuk-lede-text">{{ impact.evidence.summary }}</p>
|
|
11
|
+
|
|
12
|
+
<div class="knowledge-graph-summary">
|
|
13
|
+
<div><strong>{{ impact.directRelationships.length }}</strong><span>Direct links</span></div>
|
|
14
|
+
<div><strong>{{ impact.impactedEntities.length }}</strong><span>Impacted entities</span></div>
|
|
15
|
+
<div><strong>{{ impact.evidence.confidence }}</strong><span>Confidence</span></div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
{% if impact.evidence.quotes %}
|
|
19
|
+
<section class="knowledge-section">
|
|
20
|
+
<h2>Quoted signals</h2>
|
|
21
|
+
<ul class="nhsuk-list nhsuk-list--bullet">
|
|
22
|
+
{% for quote in impact.evidence.quotes %}
|
|
23
|
+
<li>“{{ quote }}”</li>
|
|
24
|
+
{% endfor %}
|
|
25
|
+
</ul>
|
|
26
|
+
</section>
|
|
27
|
+
{% endif %}
|
|
28
|
+
|
|
29
|
+
<section class="knowledge-section">
|
|
30
|
+
<h2>Impacted entities</h2>
|
|
31
|
+
<div class="knowledge-graph">
|
|
32
|
+
{% for entity in impact.impactedEntities %}
|
|
33
|
+
<article class="knowledge-graph__node knowledge-graph__node--{{ entity.type | lower }}">
|
|
34
|
+
<strong>{{ entity.type }}</strong>
|
|
35
|
+
<span>{{ entity.label }}</span>
|
|
36
|
+
</article>
|
|
37
|
+
{% endfor %}
|
|
38
|
+
</div>
|
|
39
|
+
</section>
|
|
40
|
+
|
|
41
|
+
<section class="knowledge-section">
|
|
42
|
+
<h2>Impact path</h2>
|
|
43
|
+
<ul class="nhsuk-list knowledge-edge-list">
|
|
44
|
+
{% for relationship in impact.relationships %}
|
|
45
|
+
<li>
|
|
46
|
+
<strong>{{ relationship.fromLabel }}</strong>
|
|
47
|
+
<span>{{ relationship.label }}</span>
|
|
48
|
+
<strong>{{ relationship.toLabel }}</strong>
|
|
49
|
+
</li>
|
|
50
|
+
{% endfor %}
|
|
51
|
+
</ul>
|
|
52
|
+
</section>
|
|
53
|
+
{% endblock %}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
|
|
3
|
+
{% block pageTitle %}Relationship graph{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
|
|
7
|
+
|
|
8
|
+
<span class="nhsuk-caption-l">Knowledge graph</span>
|
|
9
|
+
<h1>Relationship graph</h1>
|
|
10
|
+
<p class="nhsuk-lede-text">Explicit relationships from the knowledge source, shown as entities and typed links.</p>
|
|
11
|
+
|
|
12
|
+
<div class="knowledge-graph-summary">
|
|
13
|
+
<div><strong>{{ graph.nodes.length }}</strong><span>Linked entities</span></div>
|
|
14
|
+
<div><strong>{{ graph.relationships.length }}</strong><span>Relationships</span></div>
|
|
15
|
+
<div><strong>{{ graph.relationshipTypes.length }}</strong><span>Relationship types</span></div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<section class="knowledge-section">
|
|
19
|
+
<h2>Entities</h2>
|
|
20
|
+
<div class="knowledge-graph">
|
|
21
|
+
{% for node in graph.nodes %}
|
|
22
|
+
<article class="knowledge-graph__node knowledge-graph__node--{{ node.type | lower }}">
|
|
23
|
+
<strong>{{ node.type }}</strong>
|
|
24
|
+
<span>{{ node.label }}</span>
|
|
25
|
+
</article>
|
|
26
|
+
{% endfor %}
|
|
27
|
+
</div>
|
|
28
|
+
</section>
|
|
29
|
+
|
|
30
|
+
<section class="knowledge-section">
|
|
31
|
+
<h2>Relationships</h2>
|
|
32
|
+
<ul class="nhsuk-list knowledge-edge-list">
|
|
33
|
+
{% for relationship in graph.relationships %}
|
|
34
|
+
<li>
|
|
35
|
+
<strong>{{ relationship.fromLabel }}</strong>
|
|
36
|
+
<span>{{ relationship.label }}</span>
|
|
37
|
+
<strong>
|
|
38
|
+
{% if relationship.toType == "Evidence" %}
|
|
39
|
+
<a href="{{ basePath }}/evidence/{{ relationship.to }}/impact">{{ relationship.toLabel }}</a>
|
|
40
|
+
{% else %}
|
|
41
|
+
{{ relationship.toLabel }}
|
|
42
|
+
{% endif %}
|
|
43
|
+
</strong>
|
|
44
|
+
</li>
|
|
45
|
+
{% endfor %}
|
|
46
|
+
</ul>
|
|
47
|
+
</section>
|
|
48
|
+
{% endblock %}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
{% from "hippocampus/components/_empty-state.njk" import emptyState %}
|
|
3
|
+
|
|
4
|
+
{% block pageTitle %}Handover{% endblock %}
|
|
5
|
+
|
|
6
|
+
{% block content %}
|
|
7
|
+
<a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
|
|
8
|
+
<h1>Handover</h1>
|
|
9
|
+
{{ emptyState("Nothing to hand over yet",
|
|
10
|
+
"Handover documentation is generated from a journey - its steps, the screens they touch and the needs and evidence behind them. There are no journeys in this knowledge base.",
|
|
11
|
+
"Add a scenario, then turn it into a journey with the create-journey-from-scenario skill.") }}
|
|
12
|
+
{% endblock %}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{% extends "hippocampus/_layout.html" %}
|
|
2
|
+
|
|
3
|
+
{% block pageTitle %}Handover - {{ blueprint.meta.journeyTitle }}{% endblock %}
|
|
4
|
+
|
|
5
|
+
{% block content %}
|
|
6
|
+
<a class="nhsuk-back-link" href="{{ basePath }}">Back to knowledge base</a>
|
|
7
|
+
<span class="nhsuk-caption-l">Generated documentation</span>
|
|
8
|
+
<h1>Handover summary</h1>
|
|
9
|
+
<p class="knowledge-card__meta">{{ blueprint.meta.journeyTitle }}</p>
|
|
10
|
+
<p class="nhsuk-lede-text">This page is rendered from the same structured source as the prototype screens, journey and blueprint.</p>
|
|
11
|
+
|
|
12
|
+
<h2>Artefacts</h2>
|
|
13
|
+
<ul class="nhsuk-list nhsuk-list--bullet">
|
|
14
|
+
<li><a href="{{ basePath }}/journeys/{{ blueprint.journey.id }}">Journey map</a></li>
|
|
15
|
+
<li><a href="{{ basePath }}/journeys/{{ blueprint.journey.id }}/blueprint">Stacked blueprint</a></li>
|
|
16
|
+
<li><a href="{{ basePath }}/journeys/{{ blueprint.journey.id }}/blueprint/classic">Classic matrix blueprint</a></li>
|
|
17
|
+
{% for screen in screens %}
|
|
18
|
+
<li><a href="{{ screen.route }}">Prototype screen: {{ screen.title }}</a></li>
|
|
19
|
+
{% endfor %}
|
|
20
|
+
</ul>
|
|
21
|
+
|
|
22
|
+
<h2>Scenario</h2>
|
|
23
|
+
<div class="knowledge-card">
|
|
24
|
+
<p class="knowledge-card__meta">{{ blueprint.scenario.riskLevel }} risk</p>
|
|
25
|
+
<h3 class="nhsuk-heading-s">{{ blueprint.scenario.title }}</h3>
|
|
26
|
+
<p>{{ blueprint.scenario.context }}</p>
|
|
27
|
+
<p><strong>Trigger:</strong> {{ blueprint.scenario.trigger }}</p>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<h2>Journey steps</h2>
|
|
31
|
+
<ol class="nhsuk-list nhsuk-list--number">
|
|
32
|
+
{% for step in blueprint.steps %}
|
|
33
|
+
<li>
|
|
34
|
+
<strong>{{ step.label }}</strong><br>
|
|
35
|
+
{{ step.userAction }}
|
|
36
|
+
</li>
|
|
37
|
+
{% endfor %}
|
|
38
|
+
</ol>
|
|
39
|
+
|
|
40
|
+
<h2>Decisions</h2>
|
|
41
|
+
{% for decision in knowledge.decisions %}
|
|
42
|
+
<div class="knowledge-card">
|
|
43
|
+
<p class="knowledge-card__meta">{{ decision.status }}</p>
|
|
44
|
+
<h3 class="nhsuk-heading-s">{{ decision.title }}</h3>
|
|
45
|
+
<p>{{ decision.decision }}</p>
|
|
46
|
+
<p><strong>Consequence:</strong> {{ decision.consequence }}</p>
|
|
47
|
+
</div>
|
|
48
|
+
{% endfor %}
|
|
49
|
+
|
|
50
|
+
<h2>Assumptions</h2>
|
|
51
|
+
<ul class="nhsuk-list nhsuk-list--bullet">
|
|
52
|
+
{% for assumption in knowledge.assumptions %}
|
|
53
|
+
<li><strong>{{ assumption.risk }} risk:</strong> {{ assumption.statement }}</li>
|
|
54
|
+
{% endfor %}
|
|
55
|
+
</ul>
|
|
56
|
+
{% endblock %}
|