raw accept: Datums-Shard statt Typverzeichnis, fidelity/authority am Drop-Punkt (Teil 1/3, #67)
CI / verify (push) Successful in 52s
Release / release (push) Successful in 35s

Files changed:
- .gitignore
- CHANGES.md
- VERSION
- instructions/bootstrap.md
- instructions/wiki-ingest/SKILL.md
- kb/CONTRACT.md
- raw/CONTRACT.md
- tools/CONTRACT.md
- tools/chemenu/commands/dist_cmd.py
- tools/chemenu/commands/docs_verify.py
- tools/chemenu/commands/new_page.py
- tools/chemenu/commands/raw_cmd.py
- tools/chemenu/commands/touch.py
- tools/chemenu/lint_core.py
- tools/chemenu/tests/test_dist_cmd.py
- tools/chemenu/tests/test_docs_verify.py
- tools/chemenu/tests/test_lint.py
- tools/chemenu/tests/test_new_page.py
- tools/chemenu/tests/test_provenance.py
- tools/chemenu/tests/test_raw_cmd.py
- tools/chemenu/tests/test_touch.py
- tools/chemenu/tests/test_type_resolver.py
- tools/chemenu/type_resolver.py
- types/source.md
- types/source.schema.yaml
This commit is contained in:
2026-09-08 21:42:27 +02:00
parent f2a093bc8b
commit f4353ccfb3
25 changed files with 1167 additions and 344 deletions
+3 -3
View File
@@ -29,11 +29,11 @@ they are published: the agent harness will not offer `wiki-ingest`, `wiki-query`
```
2. **Create the ingest inbox.** `incoming/` (raw/CONTRACT.md "Getting a file in") is gitignored,
so a fresh clone has none of its type subdirectories - unlike `raw/` itself, which is
committed and present immediately:
so a fresh clone does not have it at all - unlike `raw/` itself, which is committed and
present immediately. It is flat since Gitea #67 (no type subdirectory to create):
```bash
mkdir -p incoming/{articles,documents,notes,assets}
mkdir -p incoming
```
`tools/wikitool doctor` only reports a missing one; it never creates it, so this is a one-off
+27 -6
View File
@@ -19,20 +19,32 @@ pages should never have cost the concept contract. Field-level requirements alwa
## Steps
1. **Promote from `incoming/` if that is where the file sits.** Read
[raw/CONTRACT.md](../../raw/CONTRACT.md) "Getting a file in" if you have not this session -
the directory and any bundling are computed, never chosen by hand:
[raw/CONTRACT.md](../../raw/CONTRACT.md) "Getting a file in" and "Capture fields" if you have
not this session - the directory and any bundling are computed, never chosen by hand, but the
two capture flags are not: `raw accept` refuses without them.
**Ask the user for `--fidelity` and `--authority` before this call, rather than guessing from
a quick look at the file.** This is the one place in the whole skill where the asymmetry from
`source_type` (step 6 below) does not hold: a wrong `source_type` sits in a visible,
correctable catalog slot (`unclassified`), but a guessed capture value is not "unknown" - it
is a claim about the capture that cannot be corrected later, because the knowledge exists only
at this drop point. If it is genuinely unclear how faithful the capture is or what the
material may claim about its subject, say so to the user and ask directly - do not fall back
to a plausible-looking default.
```bash
tools/wikitool raw accept incoming/<type>/<file> [incoming/<type>/<other-file> ...]
tools/wikitool raw accept --fidelity <value> --authority <value> \
incoming/<file> [incoming/<other-file> ...]
```
List every file this one source produced (e.g. an uploaded PDF plus its converted Markdown)
in the same call, so they land bundled together rather than as two independent promotions. A
file already in `raw/` skips this step entirely.
file already in `raw/` skips this step entirely. A subdirectory under `incoming/` (an old
`incoming/<type>/` habit) is tolerated and ignored - it carries no meaning any more.
**If this refuses because the name is already claimed** (a file stem or a bundle directory
already occupies it at `raw/<type>/` level, Gitea #64), that is not this session's call to
make: whether the incoming file is a later edition of the existing source or a second,
already occupies the name anywhere under `raw/`, Gitea #64/#67), that is not this session's
call to make: whether the incoming file is a later edition of the existing source or a second,
separate one is a judgment about the world, and the command's message names both routes -
`--replaces` and renaming in `incoming/` - without recommending either. Show the message to
the human and wait, the same way a session halts at an exit-42 gate (AGENTS.md invariant 6),
@@ -73,6 +85,7 @@ pages should never have cost the concept contract. Field-level requirements alwa
tools/wikitool new source --name "<Title>" \
--set source_type=<category> \
--set raw_files=<path1>,<path2>,... \
--set fidelity=<value> --set authority=<value> \
--set source_language=<ISO 639-1 code of the raw material> \
--set entities=A,B,C --set concepts=D,E
```
@@ -85,6 +98,14 @@ pages should never have cost the concept contract. Field-level requirements alwa
`lint` finding, not a silent default, and `wikitool touch --set source_type=<value>` corrects
it later without moving or renaming the page.
`fidelity` and `authority` have no default either, and `new source` refuses without them the
same way (Gitea #67) - but unlike `source_type` there is no catalog slot to fall back on. If
step 1 already ran `raw accept` without `--page`, its success message printed the exact
`--set fidelity=... --set authority=...` pair to reuse here verbatim; if it did not (the file
was already in `raw/`), ask the user the same question step 1 asks before promoting, rather
than inferring an answer from the file's content now. Never pass `unknown` here - that value
is backfill-only, written only by `wikitool touch` on a page predating this rule.
List **every** raw file this ingest covers - a folder of related documents becomes one
source page with all its files in `raw_files:`, not one page per file. For an external
article also pass `--set source_url=<upstream URL>`; `raw_files:` must still point at the