NEXT temporary contract 3.7 — Source classification: ordinary Markdown, XML-data and foreign bridges
01Temporary normative staging unit. Its body is the accepted architecture from refined plan revision 4, section 3.7. Before production code cites this law, promote the relevant clauses into permanent specifications. This file is consumed only after semantic coverage, implemented behavior and retained evidence are accepted. The task/retirement checker cannot perform semantic acceptance.
02D-014 обязательна до public lookup/scan/conversion. Один SourceDescriptor несёт logical resource/export identity, source path/capture, media/syntax, interpretation, role/loading и provenance classification rule. Разрешённые interpretations: vibe-spec, commonmark, xml-data, opaque. Это interpretations существующих resources, не новые package kinds.
03Package/project author задаёт explicit file declaration или default для группы путей. Exact declaration может уточнять directory default; две conflicting equally applicable declarations → diagnostic, не last-wins. Suffix/namespace/content sniffing могут проверить заявленный syntax, но не включить Vibe semantics. Legacy source layout переносится через deterministic migration в M-06-A одновременно с новым reader; M-13 поставляет runnable migration engine/recovery, а не требует ещё не существующий SourceDescriptor implementation. Unknown/ambiguous intent не угадывается.
04Bridge default: imported foreign payload по умолчанию не знает VibeVM. Markdown получает ordinary structural interpretation либо explicit opaque; XML — data либо opaque. Только явно заявленная bridge-authored Vibe wrapper/spec или explicit admitted source declaration участвует в facts/directives. Resource closure целиком сохраняется, включая вспомогательные файлы, scripts/templates/data. Inert for Vibe parser не означает безопасный prompt для LLM или разрешённое выполнение script; activation trust отдельно.
05Requirement: - CommonMark: полноценный structural parse headings/sections/fences/links, literal Vibe annotations. Stable durable exports задаются manifest mapping к section selector и exact source witness; snapshot-local node IDs могут измениться при изменении структуры, но не притворяются persistent requirement IDs. Duplicate heading без однозначного export → ambiguity. - XML-data: raw encoding/comments/whitespace/bytes сохраняются при install/derive. Optional safe tree view не загружает внешние entities/resources и не transforms в Markdown. Opaque mode хранит даже intentionally invalid XML fixture; parse failure structured view не invalidates unrelated fact source. - Vibe XML/Markdown: existing fact/directive semantics и pure pivot применяются только после classification. Source/projection spans и hashes раздельны. - Same physical stem, например manual.md и manual.xml, не означает same identity. Pair collision применяется к competing representations одного declared logical spec; ordinary data и documentation могут сосуществовать. - Resource conversion, facts sync, requirements enumeration, source resolution, compiler closure, skills/bridge hydration и debugger потребляют один descriptor view. Нельзя оставить suffix-only fallback в одном из consumers. - Обычный ресурс не включается в boot из-за нахождения под spec root. Explicit loading определяет участие; embedding literal data не должен превращать его содержимое в compiler directives/managed markers. - Profile spec_format преобразует только declared Vibe representations. Foreign CommonMark/XML-data/opaque sources остаются source-exact; consumer-side projection — отдельный derived artifact с recipe/provenance.
06- CommonMark: полноценный structural parse headings/sections/fences/links, literal Vibe annotations. Stable durable exports задаются manifest mapping к section selector и exact source witness; snapshot-local node IDs могут измениться при изменении структуры, но не притворяются persistent requirement IDs. Duplicate heading без однозначного export → ambiguity.
- XML-data: raw encoding/comments/whitespace/bytes сохраняются при install/derive. Optional safe tree view не загружает внешние entities/resources и не transforms в Markdown. Opaque mode хранит даже intentionally invalid XML fixture; parse failure structured view не invalidates unrelated fact source.
- Vibe XML/Markdown: existing fact/directive semantics и pure pivot применяются только после classification. Source/projection spans и hashes раздельны.
- Same physical stem, например manual.md и manual.xml, не означает same identity. Pair collision применяется к competing representations одного declared logical spec; ordinary data и documentation могут сосуществовать.
- Resource conversion, facts sync, requirements enumeration, source resolution, compiler closure, skills/bridge hydration и debugger потребляют один descriptor view. Нельзя оставить suffix-only fallback в одном из consumers.
- Обычный ресурс не включается в boot из-за нахождения под spec root. Explicit loading определяет участие; embedding literal data не должен превращать его содержимое в compiler directives/managed markers.
- Profile spec_format преобразует только declared Vibe representations. Foreign CommonMark/XML-data/opaque sources остаются source-exact; consumer-side projection — отдельный derived artifact с recipe/provenance.