Skip to content

kb-edit --retag bumps updated for curatorial tag edits, conflating housekeeping with substantive change #813

Description

@williamthorsen

Problem

kb-edit --retag bumps updated: whenever it rewrites a note's tags. Retagging is a curatorial edit: it reorganizes how a record is found rather than what it asserts or its lifecycle state, so bumping updated: conflates housekeeping with substantive change.

updated: is defined as the timestamp of the last substantive change. Bumping it for a findability-only edit corrupts that contract for every consumer of the field: a human scanning frontmatter, audit tooling, or any future recall logic reads a curatorial touch as a substantive one.

The cost is concrete for event records. --retag runs on events too (events carry optional tags), and bumping an event's updated: past its captured-at falsely trips the "updated > captured-at means the event was addressed" reading that #809 establishes.

Context

The design already distinguishes bumping from non-bumping operations: --verify deliberately leaves updated: alone because it records re-verification, not a content change. This promotes that into a general principle so each operation is classified deliberately rather than in isolation.

The per-operation updated: semantics live only in kb-edit SKILL.md (the arguments table and the "Operations" section); no README documents them, so the principle is documented there.

Related: #809 (declares updated on the event type, bumped by addressed-by), #785 (the --add-addressed-by writer), #763 (the addressed-by relation).

Proposed solution

Reclassify --retag as a non-bumping (curatorial) operation, and write the classification down so future operations are placed deliberately.

  • --retag rewrites and canonicalizes tags without touching updated:, mirroring --verify.
  • Document the update-semantics principle in kb-edit SKILL.md, classifying every operation:
    • Bump updated: (substantive change to body, relations, or lifecycle state): --append, --add-addressed-by, --supersede-with; --bump-updated is the explicit-bump escape hatch.
    • Leave updated: unchanged (no substantive change): --retag (curatorial), --verify (re-verification).

Acceptance criteria

Must have

  • kb-edit --retag rewrites and canonicalizes tags without bumping updated:.
  • The update-semantics principle (curatorial and verification-only edits leave updated: unchanged; substantive edits bump it) is documented in kb-edit SKILL.md, with each operation classified.
  • New and modified behavior is covered by tests: --retag leaves updated: unchanged, and a substantive operation still bumps it.

Should have

  • Confirm via the documented classification that every other operation is in the right bucket (--append / --add-addressed-by / --supersede-with bump; --verify exempt; --bump-updated is the explicit escape hatch).

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions