Edits engine
services/edits-engineChecked by automation only
still a draft
- 2026-09-10,
ktl-librarian(automation): no real review session has been run against this bundle yet with these functions - the smoke-test fixtures exercise them, but a live Obsidian vault has not.
Written 2026-10-17 by ktl-librarian (automation). Last checked 2026-10-15 by ktl-librarian (automation).
The full record
- Checks
- 2026-10-15 by
ktl-librarian(automation)
- 2026-10-15 by
- Sources
- Is part of
- Depends on
- Pointed to by
- Knowledge registrar gate (related to)
- KTL Curator plugin (derived from)
- Graph
- Open this concept in the knowledge graph
- IRI
https://w3id.org/ktl/curator/knowledge/services/edits-engine- Licence
- CC BY 4.0
- Files
- MarkdownJSON-LDSource on GitHubHistory on GitHub
Overview
Section titled “Overview”src/edits.ts has no Obsidian dependency. The caller (main.ts) reads the current frontmatter and body and passes them through one of these functions. It then writes the result back with processFrontMatter for the frontmatter and vault.process for the body and log.md.
applyConfirmappends the person’sverifiedevent. It normalizes a bare mapping to a list first, never touches a prior event, and removesstatus: draft.applyStaleAftersetsstale_after, in a separate call made only after the person accepts the proposed date.applySendBacksetsstatus: draft. The body edit is separate:appendOpenQuestioncreates the## Open questionsheading if absent, or appends under it.deleteOpenQuestionsSectionremoves the whole## Open questionssection, from its heading to the next heading of level two or above, and leaves one blank line where it was.applyCorrectedreplacesgenerated, appends averifiedevent, and removesstatus: draft. It replacesgeneratedrather than appending to it, becausegeneratedrecords who produced the current content.applyRetiresetsstatus: deprecatedand nothing else.applyLaterkeeps or setsstatus: draft, and setsstale_afteronly if a date was given.upsertCurationLinefinds or creates today’s## YYYY-MM-DDheading inlog.md, and updates the single**Curation**line for that curator that day.parseCurationTallyreads a line’s counts back, so the line round-trips: a later verb the same day reads the existing counts before incrementing.readCurationTallyreads this curator’s running tally for today back out oflog.md, bounded to today’s own heading, so the log rather than session state carries the count across a session boundary.appendDeprecationLineadds a**Deprecation**line right after the Curation line under today’s heading when a concept is retired.repeatedSendBackHintgives the repeated-mistake hint: two send-backs the same day whose notes share their first four words.renderCurationPolicyTemplate/renderMissingPlaceholderrender the two Step-3 command templates.
Open questions
Section titled “Open questions”- 2026-09-10, process:ktl-librarian: no real review session has been run against this bundle yet with these functions - the smoke-test fixtures exercise them, but a live Obsidian vault has not.