raw accept: Stem-Eindeutigkeit im Typverzeichnis erzwingen, --replaces als einziger Weg daran vorbei (schliesst #64)
Files changed: - CHANGES.md - VERSION - instructions/wiki-ingest/SKILL.md - raw/CONTRACT.md - tools/CONTRACT.md - tools/chemenu/commands/raw_cmd.py - tools/chemenu/tests/test_raw_cmd.py
This commit is contained in:
@@ -56,6 +56,26 @@ A bundle's type directory is the **source's** type, not any one file's - a diagr
|
||||
a `documents/` source is promoted from `incoming/documents/`, not `incoming/assets/`; `assets/` is
|
||||
for a source that is itself an asset.
|
||||
|
||||
**The names occupied at `raw/<type>/` level - file stems and bundle directory names alike - are
|
||||
unique** (Gitea #64). Within a bundle, `handbuch.pdf` and `handbuch.md` sit side by side as always;
|
||||
the rule bites one level up, so a second, unrelated source cannot promote quietly into a bundle it
|
||||
does not belong to just because its own filename happens not to collide. A promote whose target
|
||||
name is already occupied is refused, naming both sanctioned ways past it without recommending
|
||||
either:
|
||||
|
||||
```
|
||||
ERROR raw/documents/cluster.md already claims the stem "cluster" in raw/documents/.
|
||||
These are two different intents and only you can tell them apart:
|
||||
Same source, new edition -> tools/wikitool raw accept --replaces raw/documents/cluster.md incoming/documents/cluster.md
|
||||
A second, separate source -> rename it in incoming/ (cluster-netzplan.md, cluster-2026-09.md) and accept it normally
|
||||
raw accept does not guess which one this is.
|
||||
```
|
||||
|
||||
An agent that gets this message does not pick a route on its own initiative - it shows the message
|
||||
to the human and waits, the same way it would for an exit-42 gate (AGENTS.md invariant 6), even
|
||||
though no gate fires here: the tool cannot ask the question itself, so the session passes it on
|
||||
instead of answering it.
|
||||
|
||||
`tools/wikitool raw accept --page "Source - X" ...` additionally extends an existing source page's
|
||||
`raw_files:` in the same call. If that raises the page past one file, its already-promoted file is
|
||||
folded into the new bundle alongside the one(s) just accepted - the file that started single does
|
||||
@@ -70,6 +90,15 @@ moment its immutability under the rules below begins, not the moment it was drop
|
||||
|
||||
- **Immutable.** Never edit, reformat, summarize, or "clean up" a file after it lands here.
|
||||
Corrections belong in the `kb/` page that covers it, not in the source.
|
||||
- **Replaceable as a whole, never in part.** A source that gets a later edition is replaced
|
||||
wholesale by `raw accept --replaces`, in one commit together with the update of every `kb/`
|
||||
page compiled from it. Whether a new file is a later edition of an existing source or a
|
||||
second, separate source is a human's decision and never the tool's or an agent's - `raw
|
||||
accept` refuses and names both routes rather than choosing one (see above). The previous
|
||||
edition is not kept as a file: it is overwritten, and `git log --follow <path>` is the
|
||||
archive - no `-2026-09-05` suffix, no content-hash filename, no version field, because
|
||||
`raw_files:` is an identifier (invariant 2) and Git already answers "what did this used to
|
||||
say" losslessly (Gitea #64).
|
||||
- **Binary and image files still get ingested**, noting their presence and what they show,
|
||||
even when their content cannot be read directly.
|
||||
- **Every file is expected to be covered** by some source page, and one source page may cover
|
||||
|
||||
Reference in New Issue
Block a user