@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.
Files changed (116) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/LICENSE +21 -0
  3. package/README.md +153 -0
  4. package/assets/dist/hippocampus.css +1 -0
  5. package/assets/hippocampus.scss +896 -0
  6. package/assets/javascript/blueprint.js +123 -0
  7. package/bin/hippocampus.js +106 -0
  8. package/docs/agent-roadmap.md +217 -0
  9. package/docs/agent-workflow.md +56 -0
  10. package/docs/agentic-patterns-to-port.md +273 -0
  11. package/docs/colour-pairings.md +41 -0
  12. package/docs/components.md +52 -0
  13. package/docs/copilot-ncrs-research-curator-agent.md +298 -0
  14. package/docs/custom-agents-usage.md +95 -0
  15. package/docs/design-actions-and-decisions.md +95 -0
  16. package/docs/gp-connect-real-data-to-production.md +66 -0
  17. package/docs/hippocampus-for-designers-and-researchers.md +261 -0
  18. package/docs/hippocampus-technical.md +373 -0
  19. package/docs/prompt-architecture-guardrails.md +39 -0
  20. package/docs/repeatable-research-round-ingestion.md +239 -0
  21. package/docs/research-knowledge-graph.md +552 -0
  22. package/docs/research-source-file-conventions.md +121 -0
  23. package/docs/source-model.md +252 -0
  24. package/index.js +47 -0
  25. package/lib/config.js +46 -0
  26. package/lib/context.js +59 -0
  27. package/lib/create-router.js +187 -0
  28. package/lib/discover-projects.js +45 -0
  29. package/lib/docs.js +72 -0
  30. package/lib/host-edit.js +151 -0
  31. package/lib/lint-knowledge.js +133 -0
  32. package/lib/load-knowledge.js +629 -0
  33. package/lib/package-paths.js +32 -0
  34. package/lib/paths.js +33 -0
  35. package/lib/resolve-root.js +84 -0
  36. package/lib/schema-version.js +96 -0
  37. package/lib/schema.js +346 -0
  38. package/package.json +70 -0
  39. package/scripts/audit-provenance.js +147 -0
  40. package/scripts/doctor.js +114 -0
  41. package/scripts/eject.js +51 -0
  42. package/scripts/import-blueprint-spreadsheet.js +242 -0
  43. package/scripts/import-design-actions.js +230 -0
  44. package/scripts/import-project-context.js +427 -0
  45. package/scripts/import-research-batch.js +160 -0
  46. package/scripts/import-research-deck.js +448 -0
  47. package/scripts/index-source-artefacts.js +261 -0
  48. package/scripts/init.js +232 -0
  49. package/scripts/install-skills.js +160 -0
  50. package/scripts/lib/artefact-text.js +347 -0
  51. package/scripts/lib/xlsx-grid.js +114 -0
  52. package/scripts/link-insights-to-needs.js +209 -0
  53. package/scripts/migrate-knowledge.js +73 -0
  54. package/scripts/promote-project-context-draft.js +125 -0
  55. package/scripts/promote-research-draft.js +236 -0
  56. package/scripts/smoke-routes.js +157 -0
  57. package/scripts/sync-project-context.js +236 -0
  58. package/scripts/sync-research-artefacts.js +294 -0
  59. package/scripts/triage-research-corpus.js +274 -0
  60. package/scripts/validate-knowledge.js +49 -0
  61. package/scripts/validate-skills.js +247 -0
  62. package/skills/COVERAGE-MATRIX.md +39 -0
  63. package/skills/README.md +77 -0
  64. package/skills/SKILL-FORMAT.md +100 -0
  65. package/skills/add-prototype-screen.skill.md +54 -0
  66. package/skills/add-scenario.skill.md +47 -0
  67. package/skills/add-user-needs.skill.md +51 -0
  68. package/skills/audit-knowledge-source.skill.md +47 -0
  69. package/skills/capture-route-review-pack.skill.md +52 -0
  70. package/skills/create-journey-from-scenario.skill.md +50 -0
  71. package/skills/deliver-service-slice.skill.md +65 -0
  72. package/skills/examples/README.md +15 -0
  73. package/skills/examples/non-copilot-research-ingestion.md +68 -0
  74. package/skills/examples/non-copilot-service-slice.md +64 -0
  75. package/skills/generate-service-slice.skill.md +57 -0
  76. package/skills/ingest-project-context.skill.md +58 -0
  77. package/skills/ingest-research-round.skill.md +60 -0
  78. package/skills/map-research-to-graph.skill.md +58 -0
  79. package/skills/record-accessibility-review.skill.md +52 -0
  80. package/skills/record-design-decision.skill.md +53 -0
  81. package/skills/review-research-import-draft.skill.md +45 -0
  82. package/skills/skills.json +464 -0
  83. package/skills/skills.schema.json +111 -0
  84. package/skills/structure-project-context-draft.skill.md +51 -0
  85. package/skills/structure-research-draft.skill.md +51 -0
  86. package/skills/triage-research-corpus.skill.md +51 -0
  87. package/skills/write-delivery-summary.skill.md +51 -0
  88. package/skills/write-route-review-summary.skill.md +55 -0
  89. package/views/hippocampus/_layout.html +45 -0
  90. package/views/hippocampus/blueprint-classic.html +39 -0
  91. package/views/hippocampus/blueprint.html +52 -0
  92. package/views/hippocampus/components/_blueprint-cell.njk +42 -0
  93. package/views/hippocampus/components/_blueprint-controls.njk +20 -0
  94. package/views/hippocampus/components/_blueprint-minimap.njk +14 -0
  95. package/views/hippocampus/components/_empty-state.njk +12 -0
  96. package/views/hippocampus/components/_journey-step.njk +21 -0
  97. package/views/hippocampus/components/_list.njk +23 -0
  98. package/views/hippocampus/components/_summary-card.njk +15 -0
  99. package/views/hippocampus/doc.html +11 -0
  100. package/views/hippocampus/docs.html +19 -0
  101. package/views/hippocampus/evidence-impact.html +53 -0
  102. package/views/hippocampus/graph.html +48 -0
  103. package/views/hippocampus/handover-empty.html +12 -0
  104. package/views/hippocampus/handover.html +56 -0
  105. package/views/hippocampus/index.html +46 -0
  106. package/views/hippocampus/journey-flow.html +31 -0
  107. package/views/hippocampus/journey.html +23 -0
  108. package/views/hippocampus/not-found.html +10 -0
  109. package/views/hippocampus/project.html +102 -0
  110. package/views/hippocampus/research.html +68 -0
  111. package/views/hippocampus/route-review.html +83 -0
  112. package/views/hippocampus/scenarios.html +56 -0
  113. package/views/hippocampus/trace.html +113 -0
  114. package/views/hippocampus/user-needs.html +32 -0
  115. package/views/hippocampus/user.html +157 -0
  116. package/views/hippocampus/users.html +32 -0
@@ -0,0 +1,123 @@
1
+ const controls = document.querySelector('[data-blueprint-controls]')
2
+
3
+ if (controls) {
4
+ const lensButtons = Array.from(controls.querySelectorAll('[data-lens]'))
5
+ const laneToggles = Array.from(controls.querySelectorAll('[data-lane-toggle]'))
6
+ const laneGroups = new Map()
7
+
8
+ for (const lane of document.querySelectorAll('[data-lane]')) {
9
+ const key = lane.dataset.lane
10
+ if (!laneGroups.has(key)) laneGroups.set(key, [])
11
+ laneGroups.get(key).push(lane)
12
+ }
13
+
14
+ const lensLaneKeys = new Map()
15
+ for (const button of lensButtons) {
16
+ const lens = button.dataset.lens
17
+ if (lens === 'all') continue
18
+ const keys = new Set()
19
+ for (const [key, lanes] of laneGroups) {
20
+ const lenses = (lanes[0].dataset.lenses || '').split(' ').filter(Boolean)
21
+ if (lenses.includes(lens)) keys.add(key)
22
+ }
23
+ lensLaneKeys.set(lens, keys)
24
+ }
25
+
26
+ const setLaneVisibility = (key, visible) => {
27
+ for (const lane of laneGroups.get(key) || []) {
28
+ lane.hidden = !visible
29
+ }
30
+ const toggle = laneToggles.find((input) => input.dataset.laneToggle === key)
31
+ if (toggle) toggle.checked = visible
32
+ }
33
+
34
+ const setActiveLens = (lens) => {
35
+ for (const button of lensButtons) {
36
+ button.setAttribute('aria-pressed', String(button.dataset.lens === lens))
37
+ }
38
+ }
39
+
40
+ const syncActiveLensFromToggles = () => {
41
+ const visibleKeys = new Set(
42
+ laneToggles.filter((input) => input.checked).map((input) => input.dataset.laneToggle)
43
+ )
44
+
45
+ if (visibleKeys.size === laneGroups.size) {
46
+ setActiveLens('all')
47
+ return
48
+ }
49
+
50
+ for (const [lens, keys] of lensLaneKeys) {
51
+ if (keys.size === visibleKeys.size && [...keys].every((key) => visibleKeys.has(key))) {
52
+ setActiveLens(lens)
53
+ return
54
+ }
55
+ }
56
+
57
+ setActiveLens(null)
58
+ }
59
+
60
+ for (const button of lensButtons) {
61
+ button.addEventListener('click', () => {
62
+ const lens = button.dataset.lens
63
+
64
+ for (const key of laneGroups.keys()) {
65
+ const visible = lens === 'all' || (lensLaneKeys.get(lens) || new Set()).has(key)
66
+ setLaneVisibility(key, visible)
67
+ }
68
+
69
+ setActiveLens(lens)
70
+ })
71
+ }
72
+
73
+ for (const toggle of laneToggles) {
74
+ toggle.addEventListener('change', () => {
75
+ setLaneVisibility(toggle.dataset.laneToggle, toggle.checked)
76
+ syncActiveLensFromToggles()
77
+ })
78
+ }
79
+ }
80
+
81
+ const minimap = document.querySelector('[data-blueprint-minimap]')
82
+
83
+ if (minimap) {
84
+ const steps = Array.from(document.querySelectorAll('[data-step-id]'))
85
+ const links = new Map(
86
+ Array.from(minimap.querySelectorAll('[data-minimap-step]')).map((link) => [link.dataset.minimapStep, link])
87
+ )
88
+ const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches
89
+
90
+ const setActiveStep = (stepId) => {
91
+ for (const [id, link] of links) {
92
+ link.classList.toggle('is-active', id === stepId)
93
+ }
94
+ }
95
+
96
+ for (const [stepId, link] of links) {
97
+ link.addEventListener('click', (event) => {
98
+ const target = document.getElementById(`step-${stepId}`)
99
+ if (!target) return
100
+ event.preventDefault()
101
+ target.scrollIntoView({ behavior: prefersReducedMotion ? 'auto' : 'smooth', block: 'start' })
102
+ history.replaceState(null, '', `#step-${stepId}`)
103
+ setActiveStep(stepId)
104
+ })
105
+ }
106
+
107
+ if (steps.length) {
108
+ const observer = new IntersectionObserver(
109
+ (entries) => {
110
+ const visible = entries
111
+ .filter((entry) => entry.isIntersecting)
112
+ .sort((a, b) => a.boundingClientRect.top - b.boundingClientRect.top)
113
+
114
+ if (visible.length) {
115
+ setActiveStep(visible[0].target.dataset.stepId)
116
+ }
117
+ },
118
+ { rootMargin: '-20% 0px -60% 0px' }
119
+ )
120
+
121
+ for (const step of steps) observer.observe(step)
122
+ }
123
+ }
@@ -0,0 +1,106 @@
1
+ #!/usr/bin/env node
2
+ const path = require('path')
3
+ const { spawnSync } = require('child_process')
4
+ const packagePaths = require('../lib/package-paths')
5
+
6
+ // Every public command is a compatibility promise, so this list is deliberately
7
+ // shorter than the scripts directory. Things that are internal (the blueprint
8
+ // spreadsheet importer) or better folded into another command (smoke routes,
9
+ // which belongs inside doctor) are not exposed here.
10
+ const COMMANDS = {
11
+ init: 'init.js',
12
+ doctor: 'doctor.js',
13
+ eject: 'eject.js',
14
+ validate: 'validate-knowledge.js',
15
+ migrate: 'migrate-knowledge.js',
16
+ 'research sync': 'sync-research-artefacts.js',
17
+ 'research triage': 'triage-research-corpus.js',
18
+ 'research batch': 'import-research-batch.js',
19
+ 'import research-deck': 'import-research-deck.js',
20
+ 'import project-context': 'import-project-context.js',
21
+ 'import design-actions': 'import-design-actions.js',
22
+ 'promote research': 'promote-research-draft.js',
23
+ 'promote project-context': 'promote-project-context-draft.js',
24
+ 'link insight-needs': 'link-insights-to-needs.js',
25
+ 'source index': 'index-source-artefacts.js',
26
+ 'source audit': 'audit-provenance.js',
27
+ 'skills install': 'install-skills.js',
28
+ 'skills validate': 'validate-skills.js'
29
+ }
30
+
31
+ const { version } = require('../package.json')
32
+
33
+ function usage () {
34
+ console.log(`hippocampus ${version}\n`)
35
+ console.log('hippocampus <command> [options]\n')
36
+ console.log('Commands:')
37
+ for (const name of Object.keys(COMMANDS)) console.log(` ${name}`)
38
+ console.log('\nOptions:')
39
+ console.log(' --root <dir> the project to act on (default: nearest project above the cwd)')
40
+ console.log(' --version print the installed version')
41
+ console.log(' --help this message')
42
+ console.log('\nEvery command resolves a project root the same way; run `hippocampus validate`')
43
+ console.log('from anywhere with --root to check a project you are not standing in.')
44
+ }
45
+
46
+ function main (argv) {
47
+ if (!argv.length || argv[0] === '--help' || argv[0] === '-h') {
48
+ usage()
49
+ process.exit(0)
50
+ }
51
+
52
+ if (argv[0] === '--version' || argv[0] === '-v') {
53
+ console.log(version)
54
+ process.exit(0)
55
+ }
56
+
57
+ // Two-word commands first, so `research sync` wins over a bare `research`.
58
+ const twoWord = argv.slice(0, 2).join(' ')
59
+ const name = COMMANDS[twoWord] ? twoWord : argv[0]
60
+ const script = COMMANDS[name]
61
+
62
+ if (!script) {
63
+ console.error(`Unknown command: ${argv.slice(0, 2).join(' ')}\n`)
64
+ const suggestion = closest(argv[0])
65
+ if (suggestion) console.error(`Did you mean \`hippocampus ${suggestion}\`?\n`)
66
+ usage()
67
+ process.exit(1)
68
+ }
69
+
70
+ const rest = argv.slice(name.split(' ').length)
71
+ const result = spawnSync(
72
+ process.execPath,
73
+ [path.join(packagePaths.scriptsDir, script), ...rest],
74
+ { stdio: 'inherit' }
75
+ )
76
+
77
+ process.exit(result.status === null ? 1 : result.status)
78
+ }
79
+
80
+ // A mistyped command should point at the right one rather than just listing
81
+ // everything and leaving the reader to spot the difference.
82
+ function closest (input) {
83
+ if (!input) return null
84
+ const names = Object.keys(COMMANDS)
85
+ const scored = names
86
+ .map((name) => ({ name, distance: distance(input, name.split(' ')[0]) }))
87
+ .sort((a, b) => a.distance - b.distance)
88
+ return scored[0] && scored[0].distance <= 3 ? scored[0].name : null
89
+ }
90
+
91
+ function distance (a, b) {
92
+ const rows = Array.from({ length: a.length + 1 }, (_, i) => [i, ...Array(b.length).fill(0)])
93
+ for (let j = 0; j <= b.length; j++) rows[0][j] = j
94
+ for (let i = 1; i <= a.length; i++) {
95
+ for (let j = 1; j <= b.length; j++) {
96
+ rows[i][j] = Math.min(
97
+ rows[i - 1][j] + 1,
98
+ rows[i][j - 1] + 1,
99
+ rows[i - 1][j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1)
100
+ )
101
+ }
102
+ }
103
+ return rows[a.length][b.length]
104
+ }
105
+
106
+ main(process.argv.slice(2))
@@ -0,0 +1,217 @@
1
+ # Agent Roadmap
2
+
3
+ This roadmap keeps future AI-workflow improvements aligned with the project's original intent.
4
+
5
+ ## Intent Sources
6
+
7
+ Use these as the baseline before changing the agent model:
8
+
9
+ - `README.md`
10
+ - `docs/agentic-patterns-to-port.md`
11
+ - `docs/research-knowledge-graph.md`
12
+ - `docs/repeatable-research-round-ingestion.md`
13
+ - `docs/prompt-architecture-guardrails.md`
14
+ - `docs/agent-workflow.md`
15
+ - `docs/source-model.md`
16
+ - `.github/legacy/prompts/`
17
+
18
+ ## Intended End State
19
+
20
+ - Copilot-first discovery through `.github/copilot-instructions.md`, `.github/instructions/` and `.github/agents/`.
21
+ - Portable task recipes through `.github/skills/skills.json` and `*.skill.md` files.
22
+ - Review-first ingestion: script extracts -> skill structures -> human reviews -> promotion validates.
23
+ - Source-first editing: `hippocampus/source/` stays canonical and `artefacts/` stays generated only.
24
+ - Traceability stays visible from research and project context through needs, journeys, screens and decisions.
25
+
26
+ ## Current Baseline
27
+
28
+ Already in place:
29
+
30
+ - repo-level Copilot instructions and concise auto-attached instruction files
31
+ - focused role agents under `.github/agents/`
32
+ - portable skill catalog under `.github/skills/`
33
+ - archived prompt history under `.github/legacy/prompts/`
34
+ - delivery summary pattern under `artefacts/delivery-summaries/`
35
+ - smoke-tested research and project-context ingestion lanes using dry-run promotion
36
+ - documentation-first screenshot, accessibility, and route-review workflows under `.github/skills/` and `artefacts/`
37
+
38
+ ## Priority Roadmap
39
+
40
+ ### Phase 1: Close skill coverage gaps
41
+
42
+ **Why**
43
+
44
+ The original prompt guardrails describe staged workflows that are still slightly fragmented across low-level skills.
45
+
46
+ **Work**
47
+
48
+ - Add higher-level orchestration skills for:
49
+ - full research round ingestion
50
+ - full project-context ingestion
51
+ - service-slice delivery from source records through prototype screens
52
+ - delivery-summary production
53
+ - Add a coverage matrix mapping original prompt intent -> current skill -> role agent.
54
+
55
+ **Likely files**
56
+
57
+ - `.github/skills/skills.json`
58
+ - new `*.skill.md` files in `.github/skills/`
59
+ - `.github/skills/README.md`
60
+ - `docs/custom-agents-usage.md`
61
+
62
+ **Acceptance signals**
63
+
64
+ - Common multi-step workflows have a single entrypoint skill.
65
+ - Active docs no longer require users to manually chain low-level skills for routine tasks.
66
+ - The old prompt archive is historical only, not needed to complete normal work.
67
+
68
+ ### Phase 2: Tighten skill portability
69
+
70
+ **Status:** baseline complete
71
+
72
+ **Why**
73
+
74
+ The project goal is Copilot-first but not Copilot-only.
75
+
76
+ **Work**
77
+
78
+ - Freeze the skill card contract around explicit fields such as:
79
+ - `id`
80
+ - `title`
81
+ - `purpose`
82
+ - `reads`
83
+ - `edits`
84
+ - `runs`
85
+ - `outputs`
86
+ - `guardrails`
87
+ - `acceptance`
88
+ - Keep `skills.json` as the discovery layer and validate it with `skills.schema.json`.
89
+ - Add one or two worked examples showing how a non-Copilot agent should consume a skill.
90
+ - Keep `npx hippocampus skills validate` as the shared check after changing skill cards, the catalog, schema, or examples.
91
+
92
+ **Likely files**
93
+
94
+ - `.github/skills/SKILL-FORMAT.md`
95
+ - `.github/skills/skills.schema.json`
96
+ - `.github/skills/skills.json`
97
+ - `.github/skills/README.md`
98
+ - `docs/custom-agents-usage.md`
99
+
100
+ **Acceptance signals**
101
+
102
+ - A non-Copilot agent can resolve a task from `skills.json` without reading Copilot-only docs.
103
+ - All skill files use the same required metadata fields.
104
+ - Schema validation catches missing or malformed skill metadata.
105
+ - Worked examples show the catalog-first path for non-Copilot agents.
106
+
107
+ ### Phase 3: Restore review loops as first-class workflows
108
+
109
+ **Status:** baseline complete
110
+
111
+ **Why**
112
+
113
+ `docs/agentic-patterns-to-port.md` explicitly called out screenshots, accessibility checks and delivery summaries as review artefacts, not optional extras.
114
+
115
+ **Work**
116
+
117
+ - Define the active workflow for `screenshot-runner` and `accessibility-tester`.
118
+ - Add documentation-first or script-backed skills for:
119
+ - screenshot capture packs
120
+ - accessibility review notes
121
+ - route-review summaries
122
+ - Standardise artefact paths and filenames.
123
+ - Optionally add script-backed capture or audit tooling later if repeated manual steps become painful.
124
+
125
+ **Likely files**
126
+
127
+ - `.github/agents/screenshot-runner.md`
128
+ - `.github/agents/accessibility-tester.md`
129
+ - new skills in `.github/skills/`
130
+ - `artefacts/screenshots/README.md`
131
+ - `artefacts/accessibility/README.md`
132
+ - `artefacts/delivery-summaries/README.md`
133
+
134
+ **Acceptance signals**
135
+
136
+ - Visible prototype changes can produce review artefacts without inventing a one-off process.
137
+ - Orchestrated work leaves evidence in `artefacts/`, not just in commit history.
138
+ - Review packs can honestly distinguish between screenshots and notes-only evidence.
139
+
140
+ ### Phase 4: Prove the source-authoring lane end to end
141
+
142
+ **Status:** baseline complete
143
+
144
+ **Why**
145
+
146
+ The ingestion lanes are proven. The source-authoring workflow still needs one full skills-first exercise.
147
+
148
+ **Work**
149
+
150
+ - Run one fictional service-slice exercise using:
151
+ - `generate-service-slice`
152
+ - `add-user-needs`
153
+ - `add-scenario`
154
+ - `create-journey-from-scenario`
155
+ - `add-prototype-screen`
156
+ - Capture a delivery summary under `artefacts/delivery-summaries/`.
157
+ - Validate with `npx hippocampus validate` and `npx hippocampus doctor`.
158
+ - Keep the proof slice small and source-backed; the current baseline proof is `route-review-workflow` plus `/hippocampus/route-review`.
159
+
160
+ **Likely files**
161
+
162
+ - `hippocampus/source/*.json`
163
+ - `app/routes.js`
164
+ - `app/views/**/*.html`
165
+ - `artefacts/delivery-summaries/*.md`
166
+
167
+ **Acceptance signals**
168
+
169
+ - A new slice can be added without consulting archived prompts.
170
+ - Validation passes and the smoke test covers the new routes.
171
+ - A delivery summary records the records, route, validation results and follow-up notes for the proof slice.
172
+ - The graph and trace views show meaningful links from need -> scenario -> journey -> screen -> evidence or decision.
173
+
174
+ ### Phase 5: Reduce documentation drift
175
+
176
+ **Status:** baseline complete
177
+
178
+ **Why**
179
+
180
+ The repo now has enough agent-facing documentation that overlap will become a maintenance problem.
181
+
182
+ **Work**
183
+
184
+ - Keep one canonical explanation of the staged ingestion model.
185
+ - Keep one canonical explanation of the skill format.
186
+ - Use `README.md` and `AGENTS.md` as navigation docs, not full duplicates of deeper guidance.
187
+ - Make overlapping docs say explicitly which deeper file wins.
188
+
189
+ **Likely files**
190
+
191
+ - `README.md`
192
+ - `AGENTS.md`
193
+ - `.github/copilot-instructions.md`
194
+ - `.github/skills/README.md`
195
+ - `docs/research-knowledge-graph.md`
196
+ - `docs/repeatable-research-round-ingestion.md`
197
+
198
+ **Acceptance signals**
199
+
200
+ - No active docs disagree about where to start or which files are canonical.
201
+ - Shallow docs link to deep docs instead of duplicating them.
202
+ - The staged ingestion and skill contract each have one named source-of-truth doc.
203
+
204
+ ## Do Not Regress
205
+
206
+ - Do not make skills promote drafts automatically.
207
+ - Do not treat generated artefacts as canonical source data.
208
+ - Do not reintroduce active prompt-first workflows.
209
+ - Do not port NCRS clinical content or FHIR-heavy workflows unless Hippocampus actually needs them.
210
+ - Do not add a huge NHS component reference unless repeated component mistakes justify it.
211
+
212
+ ## Recommended Next Commits
213
+
214
+ 1. Add orchestration skills and a coverage matrix.
215
+ 2. Add screenshot and accessibility review workflows.
216
+ 3. Prove the source-authoring lane with a small fictional slice and a delivery summary.
217
+
@@ -0,0 +1,56 @@
1
+ # Agent Workflow
2
+
3
+ Use this workflow when making material changes to the knowledge base.
4
+
5
+ ## 1. Understand The Request
6
+
7
+ - Identify whether the change is a source-model change, prototype change, documentation change or generated artefact.
8
+ - Read `docs/source-model.md` for source-model work.
9
+ - Read the relevant files under `hippocampus/source` before editing linked records.
10
+
11
+ ## 2. Edit The Source First
12
+
13
+ For service-design content, update `hippocampus/source` before views.
14
+
15
+ Use this order:
16
+
17
+ 1. Users
18
+ 2. User needs
19
+ 3. Evidence or assumptions
20
+ 4. Scenarios
21
+ 5. Journeys and journey steps
22
+ 6. Screens
23
+ 7. Decisions
24
+
25
+ ## 3. Render Or Extend Views
26
+
27
+ Only edit routes or Nunjucks views when the existing renderer cannot show the source model.
28
+
29
+ Keep route handlers small and reuse knowledge helpers.
30
+
31
+ Read `docs/components.md` before adding repeated Nunjucks markup.
32
+
33
+ ## 4. Validate
34
+
35
+ Run:
36
+
37
+ ```bash
38
+ npx hippocampus validate
39
+ npx hippocampus doctor
40
+ ```
41
+
42
+ Validation failures are blockers for source-model work.
43
+ Route smoke-test failures are blockers for view, route and component work.
44
+
45
+ ## 5. Review
46
+
47
+ For visible prototype changes, smoke-test affected routes. For larger journeys, capture screenshots or notes under `artefacts/`.
48
+
49
+ ## 6. Summarise
50
+
51
+ Finish with:
52
+
53
+ - records, routes or docs changed
54
+ - validation result
55
+ - assumptions added
56
+ - remaining risks or follow-up work