One job handles one source URL/domain. User sees preflight plan before full crawl.
01 / Канонический переход из планирования в разработку
SP-03 пока является готовым discovery-контрактом, а не выполненным инфраструктурным исследованием. Поэтому repo/root, runtime, queue, DB, logging и deploy stack нельзя выдумывать в финальном merge.
02 / Принятые решения проекта
Collect first up to 30 valid articles, freeze preview, wait for explicit Continue.
After Continue, process the entire defensible source corpus until traversal plan is exhausted.
Standalone written content + meaningful prose + at least one qualifying content image.
Video-only, category/archive/service/forum/uncertain pages are excluded.
Uncertain never auto-includes. Do not fill batches with doubtful records.
Execute approved crawl_plan; HTTP-first; browser fallback only where proven necessary.
Same-source public web only; no private network, auth/CAPTCHA bypass or silent host expansion.
Mechanism chooses best deterministic source-specific ordering and records method/evidence/confidence.
Resolve logical article identity before numbering. Same title alone never merges records.
Use redirect/canonical/source evidence; external canonical conflicts are never silently accepted.
Per-source stable public IDs assigned only after dedup + ordering are frozen.
Maximum 30 records per full batch; final partial batch is valid.
Canonical persistent job state + checkpoints; logs are not execution state.
WAITING_FOR_OWNER survives restart. Continue is durable and idempotent.
Operator sees current status, phase, counters, crawl plan, live logs and diagnostic packet.
Human-visible records remain minimal; machine layer contains full graph/IDs/navigation/versioning.
MASTER INDEX + linked batch pages generated from one frozen dataset model.
Visible HTML and machine manifest must agree exactly; failed validation blocks deploy.
Validated immutable build only; stage → publish → verify live → catalog register → DONE.
Admin/operator controls private; public datasets may be public according to Work policy.
Fine Woodworking / WOOD is the primary reference corpus for quality comparison.
Post-MVP updates preserve public IDs; no silent renumbering of deployed records.
Do not build crawler/browser/queue/template infrastructure from scratch if existing Work/runtime solutions fit.
GPT-5.6 Luna / Medium receives bounded tasks with explicit verification and rollback.
03 / Source registry
| ID | Source | Artifact | Status |
|---|---|---|---|
| SRC-PLAN-01 | SP-01 Product Scope & Acceptance | Statiya_poluchatel_1_01_PRODUCT_SCOPE_AND_ACCEPTANCE.html | ACCEPTED |
| SRC-PLAN-02 | SP-02 Reuse / Skills Research | Statiya_poluchatel_1_02_REUSE_SKILLS_RESEARCH.html | ACCEPTED_WITH_RUNTIME_DEPENDENCIES |
| SRC-PLAN-03 | SP-03 Live Discovery Work Infra | Statiya_poluchatel_1_03_LIVE_DISCOVERY_WORK_INFRA.html | EXECUTION_REQUIRED |
| SRC-PLAN-04 | SP-04 Source Preflight & Crawl Plan | Statiya_poluchatel_1_04_SOURCE_PREFLIGHT_AND_CRAWL_PLAN.html | ACCEPTED |
| SRC-PLAN-05 | SP-05 URL Discovery Crawler | Statiya_poluchatel_1_05_URL_DISCOVERY_CRAWLER.html | ACCEPTED |
| SRC-PLAN-06 | SP-06 Article Detection & Filtering | Statiya_poluchatel_1_06_ARTICLE_DETECTION_FILTERING.html | ACCEPTED |
| SRC-PLAN-07 | SP-07 Ordering / Dedup / Canonical / IDs | Statiya_poluchatel_1_07_ORDERING_DEDUP_CANONICAL_IDS.html | ACCEPTED |
| SRC-PLAN-08 | SP-08 Job State / Checkpoint / Resume | Statiya_poluchatel_1_08_JOB_STATE_CHECKPOINT_RESUME.html | ACCEPTED |
| SRC-PLAN-09 | SP-09 Operator UI / Live Logs | Statiya_poluchatel_1_09_OPERATOR_UI_LIVE_LOGS.html | ACCEPTED |
| SRC-PLAN-10 | SP-10 AI-Readable Dataset Schema | Statiya_poluchatel_1_10_AI_READABLE_DATASET_SCHEMA.html | ACCEPTED |
| SRC-PLAN-11 | SP-11 Batch HTML & Master Index | Statiya_poluchatel_1_11_BATCH_HTML_AND_MASTER_INDEX.html | ACCEPTED |
| SRC-PLAN-12 | SP-12 Work Deploy & Catalog Integration | Statiya_poluchatel_1_12_WORK_DEPLOY_AND_CATALOG_INTEGRATION.html | ACCEPTED_WITH_RUNTIME_DEPENDENCIES |
| SRC-PLAN-13 | SP-13 Security / Robots / Rate Limits | Statiya_poluchatel_1_13_SECURITY_ROBOTS_RATE_LIMITS.html | ACCEPTED |
| SRC-PLAN-14 | SP-14 Validation / Tests / Benchmark | Statiya_poluchatel_1_14_VALIDATION_TESTS_BENCHMARK.html | ACCEPTED |
| SRC-PLAN-15 | SP-15 Update Existing Dataset | Statiya_poluchatel_1_15_UPDATE_EXISTING_DATASET.html | POST_MVP_READY |
04 / Runtime gate: что ещё нельзя считать фактом
| ID | Must be verified live |
|---|---|
| RUNTIME-01 | Actual Work repository/project_root |
| RUNTIME-02 | Active branch/commit and deploy ownership |
| RUNTIME-03 | Python/Node/runtime versions |
| RUNTIME-04 | Existing backend/web framework |
| RUNTIME-05 | Existing worker/queue model |
| RUNTIME-06 | Redis/Valkey/PostgreSQL/SQLite or other stateful services |
| RUNTIME-07 | Existing structured logging/live stream mechanism |
| RUNTIME-08 | Nginx/reverse-proxy/public document-root conventions |
| RUNTIME-09 | Existing Work authentication/admin model |
| RUNTIME-10 | Existing deployment/rollback mechanism |
| RUNTIME-11 | Services catalog source and update mechanism |
| RUNTIME-12 | work-ai-index source/generator/update mechanism |
Coding-AI сначала запускает read-only discovery D-01…D-11, сохраняет evidence, потом обновляет technology decisions. Ни одного production install до этого.
05 / Architecture freeze slots
| ID | Decision area | Provisional direction | Status |
|---|---|---|---|
| A-CORE-01 | Application host | server2 / actual Work host | VERIFY SP-03 |
| A-CORE-02 | Implementation language | Prefer existing Work runtime | VERIFY SP-03 |
| A-CORE-03 | Crawler core | Crawlee Python OR Scrapy | DECIDE after equal spike |
| A-CORE-04 | Browser fallback | Playwright | APPROVED CONCEPT; install only if required |
| A-CORE-05 | Article text signal | DOM rules + optional Trafilatura spike | CONDITIONAL |
| A-CORE-06 | Job queue | Existing Work queue first; RQ only if Redis/Valkey fit; Celery only if already justified | OPEN |
| A-CORE-07 | State store | Existing DB/state system preferred | OPEN |
| A-CORE-08 | Structured logging | Existing Work logging preferred; structlog conditional | OPEN |
| A-CORE-09 | HTML renderer | Existing renderer or Jinja2 if Python | OPEN |
| A-CORE-10 | Deploy adapter | Existing Work deploy mechanism only | VERIFY SP-03 |
| Gate | Required before freeze |
|---|---|
| FREEZE-01 | SP-03 runtime facts VERIFIED. |
| FREEZE-02 | Crawler candidate comparison completed. |
| FREEZE-03 | State/queue/logging/deploy choices have ADRs. |
| FREEZE-04 | No unresolved conflict between planning and runtime facts. |
| FREEZE-05 | Security boundaries compatible with selected runtime. |
| FREEZE-06 | START_PROJECT contains exact repo/root/branch/runtime references. |
| FREEZE-07 | Active Window tasks point to real modules/paths after repo discovery. |
06 / START_PROJECT bootstrap snapshot
После начала разработки этот файл не превращается в рабочий журнал и не переписывается каждый день. Он остаётся исторической точкой старта. Текущее состояние живёт отдельно.
| # | Section | Required content |
|---|---|---|
| 01 | Project identity | Name, purpose, canonical repo/root, runtime host, owner. |
| 02 | Accepted product contract | Merged immutable decisions M-01…M-25. |
| 03 | Verified runtime passport | Only SP-03 VERIFIED facts. |
| 04 | Architecture decisions | Chosen crawler/state/logging/render/deploy stack + ADR refs. |
| 05 | Security boundaries | Admin/private controls, public crawling scope, SSRF/robots/rate policies. |
| 06 | Canonical schemas | Job state, crawl_plan, classifier result, dataset manifest, build/deploy result. |
| 07 | Source registry | SP-01…SP-16 + runtime evidence + benchmark reference. |
| 08 | Project structure | Repo folders/modules, /razraba, tests, fixtures, docs. |
| 09 | Verification contract | Quality gates and release blockers. |
| 10 | Active Window 01 | Only nearest bounded Luna tasks. |
| 11 | Rollback strategy | How to revert code/config/deploy safely. |
| 12 | Open runtime-dependent items | Explicit remaining unknowns; no guesses. |
07 / Canonical live project state
| Field | Purpose |
|---|---|
| project_id | Stable project identity. |
| project_status | PLANNING / IMPLEMENTING / BLOCKED / RELEASE_CANDIDATE / LIVE. |
| active_branch | Verified Git branch. |
| active_commit | Current implementation commit. |
| architecture_version | Current accepted architecture revision. |
| active_window_id | Current bounded task window. |
| active_task_id | Current/next task. |
| completed_tasks[] | Task IDs + verification refs. |
| blocked_tasks[] | Task IDs + blocker reasons. |
| open_decisions[] | Unresolved ADRs. |
| runtime_facts_version | SP-03 evidence snapshot version. |
| test_gate_status | Current GATE-01…GATE-10 state. |
| last_checkpoint | Project-level checkpoint. |
| next_exact_action | One next action. |
08 / /razraba structure
| Path | Role |
|---|---|
| /razraba/README.html | Human + AI entry point to current implementation state. |
| /razraba/project_state.json | Canonical live project state. |
| /razraba/active_window.json | Only current bounded tasks. |
| /razraba/tasks/ | One self-contained task contract per active/completed task. |
| /razraba/evidence/ | Test outputs, screenshots/refs, discovery evidence. |
| /razraba/adr/ | Architecture decision records. |
| /razraba/checkpoints/ | Project-level checkpoint snapshots. |
| /razraba/fixtures/ | Controlled crawler/classifier/security test fixtures if project convention permits. |
Новая AI-сессия должна открыть README/project_state/active_window и быстро понять, где проект находится сейчас, не перечитывая весь чат.
09 / Обязательный contract каждого Luna-task
| Field | Required meaning |
|---|---|
| TASK_ID | Stable task identifier. |
| TITLE | One bounded capability/change. |
| STATUS | READY / IN_PROGRESS / BLOCKED / DONE. |
| INPUT | Exact files/modules/state/evidence required. |
| PROCESS / COMPONENT | What component is changed. |
| WHAT IT DOES | Plain-language behavior. |
| WHAT IT READS | Inputs/state/config. |
| WHAT IT WRITES / STORES | Files/tables/state/artifacts. |
| OUTPUT | Concrete deliverable. |
| NEXT CONSUMER | Who/what uses output. |
| ACCEPTANCE | Executable success criteria. |
| VERIFICATION | Exact test/command/browser check. |
| ROLLBACK / RISK | How to undo and principal risk. |
| DEPENDENCIES | Only real prior task IDs. |
| SOURCE REFS | SP/ADR/runtime evidence references. |
10 / ACTIVE WINDOW 01 — GPT-5.6 Luna / Medium
| Task | Scope | Done when | |
|---|---|---|---|
| AW01-01 | Execute SP-03 discovery | Run D-01…D-11 read-only on verified Work/server2 environment; sanitize evidence. | GATE-01 evidence complete. |
| AW01-02 | Create runtime passport | Compile verified repo/root/runtime/services/deploy/auth/logging facts; mark conflicts. | Runtime passport JSON/HTML. |
| AW01-03 | Reconcile SP-02 shortlist | Decide which candidate spikes are compatible with actual Work runtime. | Updated candidate matrix. |
| AW01-04 | Crawler spike A | Implement isolated Crawlee OR first compatible candidate spike on fixtures; include forced-stop/resume. | Evidence packet A. |
| AW01-05 | Crawler spike B | Implement isolated Scrapy OR alternate compatible candidate spike under same benchmark. | Evidence packet B. |
| AW01-06 | Architecture ADR: crawler core | Compare A/B evidence and choose one production crawler framework. | ADR approved. |
| AW01-07 | Architecture ADR: persistence/queue | Choose state store + queue/worker using existing Work infrastructure first. | ADR approved. |
| AW01-08 | Architecture ADR: logging/UI transport | Choose existing logging + SSE/WebSocket/polling transport based on runtime. | ADR approved. |
| AW01-09 | Create START_PROJECT snapshot | Write immutable bootstrap from merged planning + verified runtime + accepted ADRs. | START_PROJECT_<PROJECT>_<DATE>.html. |
| AW01-10 | Create canonical /razraba state | Initialize project_state.json, active_window.json, ADR/evidence/checkpoint folders. | Canonical live state exists. |
| AW01-11 | Implement core data contracts | Job state, crawl_plan, request, classifier result, article identity, dataset manifest schemas. | Schema tests pass. |
| AW01-12 | Implement URL/security guard | Scheme/DNS/IP/redirect/scope checks with SSRF fixtures. | Security unit suite passes. |
| AW01-13 | Implement preflight v1 | URL scope + robots + sitemap topology + bounded evidence output. | Preflight fixtures pass. |
| AW01-14 | Implement persistent crawl queue | Request normalization/dedup/status/checkpoint layer. | Queue unit/integration tests pass. |
| AW01-15 | Implement HTTP fetch worker | Retries/timeouts/rate/content limits; no browser yet. | Crawler core fixture suite passes. |
| AW01-16 | Implement candidate discovery | Approved traversal surfaces → idempotent candidate emission. | Discovery integration passes. |
| AW01-17 | Implement classifier v1 | Hard exclusions + text/image/title/canonical extraction + uncertain→exclude. | Classifier fixture suite passes. |
| AW01-18 | Implement identity/order/batch compiler | Dedup/canonical/order/IDs/batch ranges on frozen corpus. | 29/30/31/60/61/65 fixtures pass. |
| AW01-19 | Implement renderer v1 | MASTER + batch HTML + embedded manifest from frozen model. | SP-10/11 validators pass. |
| AW01-20 | Checkpoint / Active Window review | Run gates, record evidence, split next window based on actual code state. | Window 02 compiled from evidence, not speculation. |
Каждый пункт превращается в отдельный bounded TASK/CR. После AW01-20 следующий Active Window компилируется по реальному состоянию кода и evidence.
11 / Что намеренно не тащим в первое окно
| Capability | Reason |
|---|---|
| UI integration | Operator UI/live logs after core state/events are stable. |
| Browser fallback | Only after HTTP-first benchmark proves a real need. |
| Fine Woodworking full benchmark | After end-to-end local pipeline is runnable. |
| Deploy adapter | After renderer/validation + Work deploy ADR are proven. |
| Catalog integration | After verified deploy path. |
| Post-MVP update mode | After MVP dataset lifecycle is stable. |
12 / Conflict rules
| ID | Rule |
|---|---|
| C-16-01 | Runtime overrides stale documentation, but conflict must be recorded. |
| C-16-02 | Accepted product requirement outranks a convenient library default. |
| C-16-03 | Security boundary is not weakened to make a candidate library easier to use. |
| C-16-04 | If Work already has an equivalent subsystem, reuse it unless an ADR justifies replacement. |
| C-16-05 | If a planned path/module does not exist, update plan references; do not create duplicate architecture blindly. |
| C-16-06 | If Luna task grows beyond one coherent capability, split before implementation. |
13 / Definition of Done для всего planning package
| ID | Criterion |
|---|---|
| A-16-01 | SP-01…SP-15 are represented in one merged source registry. |
| A-16-02 | Accepted product decisions are separated from runtime-dependent decisions. |
| A-16-03 | Architecture freeze is explicitly blocked until SP-03 live discovery is executed. |
| A-16-04 | START_PROJECT template is self-contained for a new AI session. |
| A-16-05 | START_PROJECT is immutable after coding begins. |
| A-16-06 | Live implementation progress is stored in canonical project state + /razraba. |
| A-16-07 | Active Window contains no more than 30 bounded tasks. |
| A-16-08 | Each implementation task uses the full INPUT→PROCESS→OUTPUT→ACCEPTANCE→VERIFICATION→ROLLBACK contract. |
| A-16-09 | First active window starts with runtime evidence, not speculative coding. |
| A-16-10 | Crawler/state/logging choices have evidence-backed ADRs before production implementation. |
| A-16-11 | No third-party component is installed into production before its compatibility/security review. |
| A-16-12 | Next windows are generated from completed evidence/current code state, not prewritten hundreds of tasks. |
| A-16-13 | Fine Woodworking remains benchmark evidence, not hardcoded source logic. |
| A-16-14 | MVP remains focused; post-MVP update mode stays deferred until release core is stable. |