80000x · 00 — Overview: MARK → REVIEW → CUT → VERIFY operational package
00 — Overview: MARK → REVIEW → CUT → VERIFY operational package
Macro:
IU_CORE_80000X_MARK_REVIEW_CUT_OPERATIONAL_GUIDE_AND_AGENT_MARK_PACKAGEDate: 2026-05-25 Effort: high · Target runtime: 45–60 min Scope: documentation only. No code authored. No migration applied. No production data mutated. No CUT performed in this macro.
1. Why this package exists
The team has historically conflated two operations:
- The user gives a link/source for an article;
- The system "cuts" the article into pieces immediately.
That single-step model is wrong for governed data. The correct operating model is four discrete stages, each with its own gate:
MARK → REVIEW / APPROVE → CUT → VERIFY
│ │ │ │
│ │ │ └── reconstruct + axis checks + rollback report
│ │ └────────── durable IU rows, manifest-driven, atomic
│ └─────────────────────────── human / DOT approval of a manifest hash
└────────────────────────────────────────── proposal only; no DB write
Substrate work over 12000x → 70000x has made the technical pieces (auto-cut, three-axis filter, fn_iu_compose, fn_iu_piece_emit_event, fn_iu_reconstruct_source, iu_sql_link, lifecycle DOT, product factory, event runtime) LIVE_READY. What was missing was a clear written procedure that lets a fresh Agent perform MARK correctly without inventing source, fabricating IDs, or claiming a CUT was done when it was not.
This package supplies that procedure.
2. Critical distinction — MARK is not CUT
| Stage | Output | Mutates production? | Authority needed |
|---|---|---|---|
| MARK | proposed cut_manifest |
no | Agent (LLM) may produce |
| REVIEW | annotated/approved manifest | no | Operator / DOT signs |
| CUT | durable IU rows + memberships | yes (one atomic TX) | Approved manifest hash |
| VERIFY | reconstruction + axis report | no | Auto, on CUT completion |
A fresh Agent that has read this package must never say "cut completed", "IU created", "production updated" after running MARK. The Agent's output is a proposal. Until the CUT stage actually runs against an approved manifest hash, nothing is durable.
3. Package contents
| File | Purpose |
|---|---|
00-overview.md |
This file. |
01-operational-flow-mark-review-cut-verify.md |
The four stages in detail with gates and IO contracts. |
02-agent-mark-instructions.md |
Step-by-step procedure a fresh Agent follows to perform MARK. |
03-cut-manifest-schema.md |
YAML/JSON schema for cut_manifest (required & optional fields, validation rules). |
04-review-approval-checklist.md |
What the operator/DOT checks before approving a manifest. |
05-dot-cut-from-approved-manifest-contract.md |
The DOT/CUT command contract that consumes an approved manifest. |
06-three-axis-requirements.md |
Axis A (source order) / B (professional) / C (parent-child) field & invariant rules. |
07-examples-dieu-37-38-39-mark-request.md |
Example user request + example MARK proposal for Điều 37/38/39 (placeholder source). |
08-agent-mark-output-template.md |
Copy-pasteable template the Agent fills in for its MARK output. |
09-test-plan-codex-mark-then-claude-verify.md |
Validation: Codex/new-Agent reads only this package, produces MARK; Claude Code reviews. |
10-carry-forward-to-implementation.md |
What still needs to be built (DOT dot_iu_cut_from_manifest, MARK harness, etc.) — packaged for the next macro. |
4. System rules this package preserves
- No hardcode. All identifiers (article labels, doc codes, IDs) flow through the manifest.
- DOT 100%. Every irreversible step has a DOT command contract with explicit guards.
- MARK before CUT. MARK without an approved manifest never advances to CUT.
- Review/approval gate. A manifest's
approval.statusmust beapproved(withapproved_by+approved_at+ KB doc id) before the CUT command will accept it. - No fake PASS. The Agent reports
uncertainty_flagshonestly; an empty manifest is preferred over a fabricated one. - No source invention. If the source link does not contain the requested article, the Agent reports the gap and stops.
- No production mutation during MARK. MARK writes only to scratch directories and KB report paths.
- No cross-IU vector. Vector indexing is gated separately and never bundled into CUT.
- PG → Directus → Nuxt is the data flow direction. CUT writes to Postgres; downstream layers reflect it.
- production_documents UNTOUCHED. No CUT writes to
production_documents(the historic raw store). - Rollback / compensation required for CUT. Every CUT command produces a rollback package keyed on
manifest_id.
5. Substrate this package builds on (from 70000x final readiness matrix)
| Capability | Code path | State |
|---|---|---|
| Auto-cut documents | upstream piecing complete; manifest consumes existing pieces | LIVE_READY |
| Reconstruct by original source order | fn_iu_reconstruct_source (Axis A, dense monotonic source_position) |
LIVE_READY |
| Axis B (professional) filter | iu_metadata_tag × iu_metadata_tag_registry (kinds: legal_document, section_type, unit_kind) |
LIVE_READY |
| Parent / child / grandchild filter | fn_iu_subtree (relative_depth ∈ {0,1,2}), iu_tree_path |
LIVE_READY |
| Create new document from pieces | fn_iu_compose (with new_piece minting) |
LIVE_READY |
| Add / remove / merge / split piece | fn_iu_collection_add_piece / _remove_piece / fn_iu_piece_merge / fn_iu_piece_split |
LIVE_READY |
| Piece event in/out | fn_iu_piece_emit_event + lifecycle trigger |
LIVE_READY (dry_run); live flag exists |
| Bridge piece ↔ DB SQL | iu_sql_link (link_role='represents', 11-role vocab) + validator |
LIVE_READY (outbound) |
All six user flows PASS at the test runner level: ops/iu-core-six-flow-test-readiness/run_six_flow_tests.sh (6/6 PASS, run 20260525T081115Z).
6. What the next macro will do (carry-forward sketch)
After this documentation macro:
- Codex / a fresh Agent reads only this package.
- User sends a real MARK request for Điều 37 (with exact URL).
- Codex emits a
cut_manifest.jsonwith proposed pieces, axes A/B/C drafts, reconstruction preview. - Claude Code / operator reviews the manifest against
04-review-approval-checklist.md. - If approved: the next macro runs
dot_iu_cut_from_manifestagainst the approved hash, durably creates IUs, runs VERIFY. - If not approved: gaps are documented in the manifest's
uncertainty_flags, the Agent re-marks; loop until approval.
That sequence is the validation of this package.
7. Tags & search anchors
The KB upload of this package will be indexed; the following phrases are placed verbatim so semantic search returns this package:
- "MARK is not CUT"
- "MARK → REVIEW → CUT → VERIFY"
- "cut_manifest_schema"
- "Agent MARK Instructions"
- "Axis A original source reconstruction"
- "Axis B professional content axis"
- "Axis C parent child grandchild"
- "approved manifest"
- "dot_iu_cut_from_manifest"