One entry point for one source dataset. Knows source identity, dataset status, all batches, total article count and traversal order.
01 / Output topology
One HTML page with up to 30 article records. Knows its range, previous/next batch, root index and article IDs.
One logical record inside a batch. Visible payload is title+URL; machine layer adds stable ID, sequence and graph links.
Build input is frozen.
Renderer не ходит на исходный сайт и не меняет article set. Он только отображает уже принятый dataset graph.
02 / File tree
| Artifact | Role |
|---|---|
| index.html | MASTER INDEX — source identity, corpus stats, batch directory, AI manifest, validation summary. |
| articles-001-030.html | Batch 1. |
| articles-031-060.html | Batch 2. |
| articles-061-090.html | Batch 3, etc. |
| articles-XXX-YYY.html | Final partial batch if record count is not divisible by 30. |
datasets/example-source/
├── index.html
├── articles-001-030.html
├── articles-031-060.html
└── articles-061-065.html
03 / MASTER INDEX
| Section | Content |
|---|---|
| Dataset header | Source name, original source URL, source code, dataset status, article count. |
| Quick stats | Total articles, total batches, ordering method/confidence, generated date. |
| Batch directory | One row/card per batch with range, count and OPEN link. |
| AI instructions | Short deterministic traversal guidance. |
| Validation summary | PASS/PARTIAL plus checks/build/version. |
| Machine manifest | Embedded STATIYA_ARTICLE_DATABASE JSON for the entire dataset map. |
04 / Batch page
| Section | Content |
|---|---|
| Batch header | Source name, batch range, record count, position X / total batches. |
| Root navigation | Back to MASTER INDEX. |
| Previous / next batch | Adjacent file navigation when present. |
| Article list | Exactly 30 visible records except final partial batch. |
| Machine manifest | Self-contained dataset/batch/article JSON. |
| Footer navigation | Repeat root and prev/next controls after long list. |
05 / Article markup contract
| Element | Rule |
|---|---|
| Container | <article> or equivalent semantic block with id=article_id. |
| data-article-id | Stable public article ID. |
| data-sequence | Sequence number. |
| data-source-id | Source identity. |
| data-batch-id | Batch identity. |
| data-url | Canonical original-source URL. |
| Visible number | Sequence formatted consistently. |
| Visible title | Escaped original title. |
| Visible link | OPEN ↗ to original source; target behavior consistent across all batches. |
<article
id="EXAMPLE_000031"
data-article-id="EXAMPLE_000031"
data-sequence="31"
data-source-id="SRC_EXAMPLE"
data-batch-id="EXAMPLE_BATCH_002"
data-url="https://example.com/article">
<span class="seq">031</span>
<a href="https://example.com/article">Original article title</a>
</article>
06 / Filename rules
| ID | Rule |
|---|---|
| F-11-01 | MASTER file is always index.html inside source dataset folder. |
| F-11-02 | Batch filenames derive only from actual sequence range. |
| F-11-03 | Pad ranges to at least 3 digits for normal datasets: articles-001-030.html. |
| F-11-04 | For >999 articles, width expands consistently for all batch files in that build if needed. |
| F-11-05 | Do not encode article titles in filenames. |
| F-11-06 | Filename generation is deterministic from frozen dataset model. |
07 / Rendering rules
| ID | Rule |
|---|---|
| R-11-01 | Renderer consumes frozen dataset model; it must not query/crawl source pages. |
| R-11-02 | Visible HTML and embedded JSON are generated in one render pass from the same objects. |
| R-11-03 | All external titles/URLs are escaped safely. |
| R-11-04 | No runtime JavaScript is required to read core dataset content. |
| R-11-05 | Search/filter JavaScript, if added, is progressive enhancement only. |
| R-11-06 | Batch content remains readable with JS disabled. |
| R-11-07 | No external font/build dependency is required to open generated HTML. |
| R-11-08 | No server-local paths, secrets, job diagnostics or private state enter public HTML. |
| R-11-09 | Every build writes to isolated staging directory first. |
| R-11-10 | Only fully rendered + validated build is eligible for deploy. |
09 / Visual contract
| Rule | Contract |
|---|---|
| Editorial technical dossier | Light paper background, dark text, restrained green/olive accent; no purple/lilac. |
| Minimal article rows | Do not turn each record into a large marketing card. |
| Large source header | Source and dataset identity immediately visible. |
| Readable density | 30 rows should fit in a reasonably compact page. |
| Stable row geometry | Long titles wrap but do not break number/link alignment. |
| Mobile | Rows collapse gracefully; link remains tappable. |
| Accessibility | Semantic headings/links, visible focus states, adequate contrast. |
| No decorative bloat | Dataset is primarily a working research index. |
| Optional enhancement | Rule |
|---|---|
| Optional local filter | Filter current batch by title/ID/URL without server request. |
| MASTER filter | May filter batch directory by range/ID, but not necessary for MVP. |
| No global full-text search | Not needed because records contain only title+URL. |
| No hidden dataset mutation | Filtering changes presentation only. |
| No dependency | Generated files remain useful if search JS fails. |
10 / Build flow
| Step | Action |
|---|---|
| 1 | Load frozen dataset model/build_id. |
| 2 | Validate sequence and batch assignment preconditions. |
| 3 | Create isolated staging output directory. |
| 4 | Render MASTER INDEX from root manifest. |
| 5 | Render batches in sequence from shared template/model. |
| 6 | Embed JSON manifests and navigation metadata. |
| 7 | Run structural validator against generated files. |
| 8 | Open representative pages in browser acceptance test. |
| 9 | Compute build manifest/checksums if adopted. |
| 10 | Mark build VALIDATED and hand to SP-12 deploy layer. |
| Build field | Meaning |
|---|---|
| build_id | Immutable render build. |
| dataset_id | Dataset identity. |
| output_dir | Staging directory reference, internal only. |
| master_file | index.html. |
| batch_files[] | Ordered generated batch files. |
| article_count | Total. |
| batch_count | Total. |
| template_version | Renderer template version. |
| schema_version | STATIYA_ARTICLE_DATABASE version. |
| validation_status | PASS / FAIL. |
| validation_report_ref | Evidence/report path. |
| generated_at | Timestamp. |
11 / Structural validators
| ID | Check | Contract |
|---|---|---|
| V-11-01 | HTML parse | Every output file parses as HTML and contains required head/body structure. |
| V-11-02 | Master manifest | MASTER embedded JSON parses and document_type=MASTER_INDEX. |
| V-11-03 | Batch manifest | Every batch embedded JSON parses and document_type=ARTICLE_BATCH. |
| V-11-04 | Counts | MASTER article_count equals batch records sum. |
| V-11-05 | Batch sizes | All non-final batches exactly 30; final 1–30. |
| V-11-06 | Visible/JSON equality | Every visible title/URL/sequence matches manifest record. |
| V-11-07 | IDs | No duplicate article IDs or DOM element IDs. |
| V-11-08 | Ranges | Batch filename/range/manifest/visible range all agree. |
| V-11-09 | Internal links | MASTER↔batch and batch prev/next hrefs resolve in staging output. |
| V-11-10 | External link format | Original article URLs are valid http/https URLs. |
| V-11-11 | Graph | Article prev/next chain reciprocal across all records. |
| V-11-12 | Escaping | Hostile title fixture cannot inject markup/script. |
| V-11-13 | No secrets | Known internal path/env/token patterns absent from output. |
| V-11-14 | No source fetch | Rendering test proves no network dependency required. |
12 / Browser acceptance
| ID | Scenario |
|---|---|
| BROWSER-01 | Open MASTER with JS enabled; batch links visible and clickable. |
| BROWSER-02 | Open MASTER with JS disabled; core dataset still readable. |
| BROWSER-03 | Open first batch; MASTER and next navigation work. |
| BROWSER-04 | Open middle batch; prev and next work. |
| BROWSER-05 | Open final partial batch; no invalid next link. |
| BROWSER-06 | Long title fixture wraps without destroying layout. |
| BROWSER-07 | Mobile viewport preserves title/link usability. |
| BROWSER-08 | Hostile escaped title renders as text, not executable HTML. |
13 / Failure modes
| ID | Failure | Behavior |
|---|---|---|
| F-11-01 | Render interrupted halfway | Staging build remains incomplete; never deploy. |
| F-11-02 | One batch template fails | Whole build FAIL; do not publish partial files. |
| F-11-03 | Visible/JSON mismatch | Validation FAIL. |
| F-11-04 | MASTER points to missing batch | Validation FAIL. |
| F-11-05 | Article count changes during render | Frozen build input prevents this; otherwise abort. |
| F-11-06 | Title contains HTML/script | Escape; regression fixture required. |
| F-11-07 | Final batch filename wrong after total changes | Rebuild staging from frozen dataset; no manual rename. |
| F-11-08 | JS filter breaks | Core content unaffected; progressive enhancement only. |
| F-11-09 | Template version changes mid-build | Forbidden; one build pins one template version. |
14 / Definition of Done
| ID | Criterion |
|---|---|
| A-11-01 | Given N records, generator creates index.html plus ceil(N/30) batches. |
| A-11-02 | 0 records does not produce a fake empty completed dataset. |
| A-11-03 | 1/29/30/31/60/61/65 fixtures produce correct ranges and file counts. |
| A-11-04 | Every non-final batch contains exactly 30 visible and machine records. |
| A-11-05 | MASTER links to all generated batches exactly once. |
| A-11-06 | Every batch links back to MASTER. |
| A-11-07 | Prev/next batch navigation is correct. |
| A-11-08 | Visible title/link/sequence exactly match embedded JSON. |
| A-11-09 | Generated files are useful with JavaScript disabled. |
| A-11-10 | External source strings cannot inject executable markup. |
| A-11-11 | Renderer performs no source-site fetches. |
| A-11-12 | Failed validation prevents build from reaching deploy-ready state. |
| A-11-13 | Browser acceptance passes for first/middle/final batch and mobile viewport. |
| A-11-14 | Build manifest records schema/template/build versions. |
| A-11-15 | No secrets or server-local paths exist in public output. |
15 / Luna Medium bounded blocks
| Block | Scope | Expected result |
|---|---|---|
| LUNA-11-A | Template skeletons | MASTER + batch static templates from mock data. |
| LUNA-11-B | Batch partitioner | N→30-sized ranges and deterministic filenames. |
| LUNA-11-C | Renderer | Generate visible rows and embedded manifests from same objects. |
| LUNA-11-D | Navigation compiler | MASTER/batch prev-next and article graph binding. |
| LUNA-11-E | Escaping/security | Hostile title/URL fixtures and no-secret public output. |
| LUNA-11-F | Structural validator | Counts/ranges/JSON/links/graph consistency. |
| LUNA-11-G | Browser acceptance | JS-on/off, desktop/mobile, first/middle/final pages. |
| LUNA-11-H | Build artifact contract | Immutable build_id + validated staging output for SP-12. |
16 / Handoff
NEXT PLANNING ARTIFACT
Statiya_poluchatel_1_12_WORK_DEPLOY_AND_CATALOG_INTEGRATION.html
SP-12 receives:
- VALIDATED immutable build_id
- staging output directory
- index.html
- ordered batch_files[]
- validation report
- dataset/source identity
- target public route from SP-03
SP-12 must:
stage → publish atomically → verify live → register dataset in Work.