feat: raw accept - incoming/ als abgeleiteter Rohablage-Eingang (schliesst #58)
CI / verify (push) Successful in 56s
Release / release (push) Successful in 36s

Files changed:
- .gitignore
- CHANGES.md
- README.md
- VERSION
- docs/pipeline-rationale.md
- instructions/bootstrap.md
- instructions/wiki-ingest/SKILL.md
- raw/CONTRACT.md
- tools/CONTRACT.md
- tools/chemenu/cli.py
- tools/chemenu/commands/dist_cmd.py
- tools/chemenu/commands/docs_verify.py
- tools/chemenu/commands/raw_cmd.py
- tools/chemenu/tests/test_dist_cmd.py
- tools/chemenu/tests/test_docs_verify.py
- tools/chemenu/tests/test_raw_cmd.py
This commit is contained in:
2026-09-05 07:43:43 +02:00
parent 1f0ad7f9f3
commit 36d2128f29
16 changed files with 753 additions and 46 deletions
+46
View File
@@ -20,6 +20,52 @@ from `kb/` is what makes that boundary visible.
| `notes/` | Personal notes, meeting notes, conversation transcripts |
| `assets/` | Images, diagrams, configuration files, and other binaries |
This table is read by `tools/wikitool docs verify` against `dist_cmd.RAW_SUBDIRS`, the single
place the four names are declared in code - the two are kept in sync mechanically rather than by
convention (Gitea #58).
## Getting a file in: `incoming/`
`raw/` is never chosen by hand. A file to be ingested is dropped into the gitignored top-level
`incoming/`, under the subdirectory naming its type - `incoming/articles/`, `incoming/documents/`,
`incoming/notes/`, `incoming/assets/`, mirroring the table above. That placement is the only
classification a human makes: **what kind of document this is**, not where it ends up on disk.
Everything past it - the target directory, whether a bundle directory is needed, its name, the
move itself - is computed by `tools/wikitool raw accept`.
```bash
tools/wikitool raw accept incoming/documents/handbuch.pdf
# -> raw/documents/handbuch.pdf
```
**A bundle directory is created only from the second file onward.** One file promoted alone needs
no directory of its own and lands as `raw/<type>/<name>`; promoting several files of one source in
the same call nests them under `raw/<type>/<stem>/`, named after the first file's stem:
```bash
tools/wikitool raw accept incoming/documents/handbuch.pdf incoming/documents/handbuch.md
# -> raw/documents/handbuch/handbuch.pdf
# -> raw/documents/handbuch/handbuch.md
```
This is why the 29 files already in `raw/` sit directly under their type directory rather than
each in its own bundle: an eindateiige Quelle is already in the form the rule produces, not an
exception to it - nothing was reorganised to reach this state.
A bundle's type directory is the **source's** type, not any one file's - a diagram that belongs to
a `documents/` source is promoted from `incoming/documents/`, not `incoming/assets/`; `assets/` is
for a source that is itself an asset.
`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
not stay single once a second one belongs beside it.
`incoming/` is read by an ingest session, never by `sources coverage` or `lint`: both walk `raw/`
only, so a file waiting there is not yet a finding. It is also never committed - proven, not
merely asserted, by `docs verify`'s ignore-rule canaries - which is what makes accepting a file the
moment its immutability under the rules below begins, not the moment it was dropped.
## Rules
- **Immutable.** Never edit, reformat, summarize, or "clean up" a file after it lands here.