Prompt file imported from ntgovernment/eoi-metadata-editor (
.github/prompts/update-docs.prompt.md). Copyright stays with the author.
Update Docs — EOI Metadata Editor
Update all documentation to reflect the changes made in this session.
Files to update
| File | What to update |
|---|---|
DEVELOPER_NOTES.md |
Update the relevant section(s) AND prepend a Change History entry. |
/memories/repo/eoi-metadata-editor.md |
Update concise bullet points when a key fact changes. |
.github/prompts/*.prompt.md |
Update if a workflow, pattern, or constraint changes. |
DEVELOPER_NOTES.md structure
The file has these major sections (in order). Update the section(s) that the change touches:
- Overview — high-level description of the tool
- File Structure — table of files and their roles/editability
- Local Dev Environment — how to start Vite, what works/doesn't locally
- Agency–Advertise Cross-Field Rule — sync logic between
job.agency(445640) andjob.advertise(446182) - Auto Rename Button — how the Auto button derives File Name and Document Title
- Accessibility and Interaction Behaviour — keyboard nav, focus traps, save-result toast
- Status Column Colour System —
data-statusattribute and CSS - Architecture — edit control types (makeEditable, single-select, multiselect, datepicker), HTML structure, jQuery triple-load, saving
- DataTables Integration — init config, column indices, column filters
- Interaction Behaviour and Editing Guidelines — field-specific UX rules
- Hover Edit Tooltip — CSS/JS implementation
- Metadata Field ID Reference — table of all field IDs and types
- Squiz Matrix Template Reference — row-template.html and server-functions.html patterns
- Squiz Matrix JS API Field Value Formats — what each field type expects from setMetadata
- HTML Sanitisation Checklist — steps to run after every production re-save
- Quick Start and Decision Guide — the fast path for developers and agents
- Troubleshooting — common errors and their causes
- Tooling Configuration — Vite, Prettier, VS Code settings
- Change History — reverse-chronological log of all changes
Change History entries
Prepend a new ### YYYY-MM-DD: <Short title> entry at the top of the Change History section (before any existing entries). Each entry must include:
- Problem / goal — what was broken or what the user asked for
- Solution — what was changed and why
- Files changed — list each file with the function/line area affected
Use today's date. Example:
### 2026-04-01: Agency save now syncs advertise field to backend
- **Problem:** When agency was changed, the "where to advertise" display updated correctly but nothing was saved to the metadata backend — the user had to manually open and save that field too.
- **Solution:** The `.single-dropdown-actions [data-action='save']` handler in `editor.js` now calls `submit()` for advertise (field 446182) immediately after saving agency (445640), using the preserve-WoG / replace-agency logic.
- **Files changed:** `src/editor.js` — agency save handler in `$(document).on("click", ".single-dropdown-actions [data-action='save']", ...)`.
Repo memory (/memories/repo/eoi-metadata-editor.md)
Keep this file to concise bullet points — it is loaded automatically into the agent's context window on every conversation. Guidelines:
- One bullet per fact; max two lines each
- State what changed and what the old behaviour was if relevant
- Include field IDs for any metadata-related facts
- Do not copy full code blocks — just describe the pattern
Cross-field rules section (Agency–Advertise)
When the agency/advertise sync logic changes, update all three of:
- The prose description in
## Agency and advertise behaviour (2026 updates) - The truth table (four rows: WoG+agency, agency-only, WoG-only, blank-agency)
- The repo memory bullet
What NOT to document
- Internal variable names that are obvious from the code
- Third-party library internals (
update-metadata.js, DataTables, Bootstrap) - Changes already enforced by linters or formatters
- The contents of
EOI metadata editor _ NTG Central.html— this file is re-saved from production periodically; document the sanitisation checklist steps instead