feat: rm guards (scope widening, merge targets), lint --clean and --suggest, v0.1.3
ci / release (push) Successful in 1m21s

This commit is contained in:
2026-11-22 19:29:33 +01:00
parent 7d1b6aed5f
commit dae7313e14
3 changed files with 244 additions and 7 deletions
+9 -1
View File
@@ -22,7 +22,15 @@ Data dir: `schema.md` (types and verbs), `relations.tsv` (sorted, one direction)
Build: `devbox run build`, test: `devbox run test`. See AGENTS.md.
`rm <id>` refuses while the entity has relations (listed); `--cascade` removes them too and prints each one.
A merge tombstone is never removed while relations or other redirects still point to it.
A merge tombstone is never removed while relations or other redirects still point to it, and `rm` refuses to
delete an entity that tombstones point to, or one that is the only `applies-to` target of a preference (it would
silently become "everywhere"); the offending preferences/tombstones are listed.
`sirmem lint --clean` applies structural fixes only and prints each change: removes unreferenced redirect
tombstones, `relates-to` lines whose pair is also linked by a typed verb, and `part-of` lines implied by a
longer `part-of` chain. `sirmem lint --suggest` is read-only and prints numbered candidates (superseded,
contradicted, duplicate by normalised label/alias, orphan) with a suggested action for an LLM to review with the
user. Both flags can be combined (clean first, then lint, then suggest).
Extra over the spec: `init` command; env `SIRMEM_MACHINE` overrides the detected hostname.
MIT licensed.