fix: comparison and source pages accept the sources: cite add writes; sources may cite sources (#173)
Files changed: - CHANGES.md - VERSION - instructions/wiki-ingest/SKILL.md - kb/CONTRACT.md - tools/CONTRACT.md - tools/chemenu/commands/cite_cmd.py - tools/chemenu/commands/xref.py - tools/chemenu/tests/test_cite_cmd.py - tools/chemenu/tests/test_page_ops.py - tools/chemenu/tests/test_type_resolver.py - tools/chemenu/tests/test_xref.py - types/comparison.md - types/comparison.schema.yaml - types/source.md - types/source.schema.yaml Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
1 parent
662a844cf1
commit
862bc04d9c
15 files changed
+310
-19
No files matched your search
+11
-4
@@ -300,7 +300,8 @@ Every claim is either traceable to a raw file or explicitly marked as not.
|
||||
[--file <qualifier>]` mints the id, upserts its `[[Source - X]]` (or
|
||||
`[[Source - X|storage-model.md]]` for a multi-file source) definition in the page's trailing
|
||||
Footnotes block (named per [Section headings](#section-headings)), and adds `Source - X` to
|
||||
`sources:` - it prints the marker to paste at
|
||||
`sources:` - unless the page *is* `Source - X`, citing one of its own raw files, since a page
|
||||
never lists its own title there. It prints the marker to paste at
|
||||
the fact; placing it is still manual. Never hand-type a cite-id (AGENTS.md invariant 1). This
|
||||
differs from a plain `[[Source - X]]` link, which only means "related to".
|
||||
- **Notation inside code is notation, not a reference.** A `[^cite-id]` or a `[[wikilink]]`
|
||||
@@ -309,13 +310,19 @@ Every claim is either traceable to a raw file or explicitly marked as not.
|
||||
means a marker appended to a line *inside* a fence cites nothing - put it on a source line
|
||||
under the block (`<source-word>: [^cite-id]`, in the KB language), where it renders as a
|
||||
footnote instead of travelling with the command when someone copies it.
|
||||
- A source cited inline must also appear in the page's frontmatter `sources:` list;
|
||||
`wikitool lint` checks this in both directions, and hard-errors on a leftover pre-migration
|
||||
- **A source page may cite another source page**, the same way any page does: `cite add --page
|
||||
"Source - A" --source "Source - B"` writes `Source - B` into A's `sources:` and leaves B
|
||||
untouched. A citation between two sources has a direction, and `cite add` is the only command
|
||||
that records it - `xref link-source` refuses a target that is itself a source page.
|
||||
- A source cited inline must also appear in the page's frontmatter `sources:` list - except a
|
||||
source page's citation of itself, which never does; `wikitool lint` checks this in both
|
||||
directions, and hard-errors on a leftover pre-migration
|
||||
`^[[...]]` marker, an undefined `[^cite-id]` reference, or an orphaned Footnotes definition.
|
||||
`tools/wikitool cite sync` reconciles a page's block after a prose edit changes which ids are
|
||||
actually referenced.
|
||||
- `tools/wikitool xref link-source --source "Source - X" --entities A,B,C` adds a new source
|
||||
to every page it backs in one pass.
|
||||
to every page it backs in one pass. Its targets are the pages the source *mentions*, never
|
||||
another source page.
|
||||
- Every raw file is expected to be claimed by some source page;
|
||||
`tools/wikitool sources coverage` lists the ones that are not.
|
||||
|
||||
|
||||
Reference in new issue
Block a user