Checkpoint — Text-as-Code Reuse / Anti-Duplication Audit (2026-06-09)
Checkpoint — Text-as-Code Reuse / Anti-Duplication Audit
Date: 2026-06-09 · Status:
REUSE_AUDIT_READY· Production mutation: NO Nature: read-only reuse/anti-duplication audit before any Implementation Package DOT design.
1. Why this ran
The User corrected the first feasibility plan: this work is fundamentally Text-as-Code, the system already spent weeks building the miếng-thông-tin / Information Unit / TAC foundation, and the first plan found only a small part of it. Mandate: deeply audit what already exists and maximize reuse BEFORE any new tool design — to avoid wasted rework and system conflict.
2. Method
Five parallel READ-ONLY auditors swept: (1) TAC/IU foundation + completed-state; (2) Đ44 construction/lifecycle/checker tree; (3) tools/checker/dry-run patterns (KB + local dot-iu-cutter repo); (4) Đ39 KG / orphan / impact / duplicate; (5) Đ43 Context Pack + paired-DOT. KB = agent-data MCP (SSOT for knowledge/dev/…).
3. Decisive findings (correcting the first plan)
- The first plan's "PARTIAL / mostly design-only" framing understated the foundation. Live PG holds ~117
fn_iu_*functions + ~45 IU/TAC tables; edit/apply/save, supersede/enact/retire, merge/split, structure-ops (plan/apply/verify/rollback), three-axis envelope, vector-sync, event-outbox + routing worker + dead-letter, notification, birth/gateway write-guards, and a MARK→CUT→VERIFY pipeline are deployed (fn_iu_op_*, schemaiu_core). - A runnable fail-closed Article-14 verifier already exists:
cutter_agent/dryrun.py+cli.py selftest+ AST isolation tests. fn_tac_log_checker_issue(checker logger →system_issues) is deployed in production (S183).- A 19-gate preflight runner already RAN (86-unit migration, all PASS) with Validation Contract + exact-key rollback.
- Đ43 paired-DOT is deployed (build rev 11 / verify rev 5, VPS, cron) — the exact template (no-fallback
dot_config_get, §5.8 5-guard, genericexecutor_typedispatch, dual-checksum, staging→promote). - Graph/orphan/impact/duplicate machinery mostly deployed:
universal_edges(CAT-130, ~2,199 rows) +v_kg_edges_all, Đ8entity_dependencies, Đ19 orphan scanners, Đ14 3-tier (engine TD-083 pending), One-Roofisland_detected/double-owner. Single sink =system_issues.
4. Conflicts / overlaps that BOUND scope (pre-existing, not created here)
- Two cutting/verify/manifest lineages:
iu_corePG-native (fn_iu_op_*) ↔cutter_governanceexternal code-agent (/opt/incomex/dot, HEADe93424b). Building a third = triplication. - TAC↔IU duality unresolved:
tac_logical_unit(86 rows, real corpus) ↔information_unit. - Two
checker_run_statusnamespaces (P11EAP-CHECKER-*proof-layer vs P6 real-DOT) — keep separate. - Two dry-run lineages (P9-G6 DB-schema/bash vs dot-iu-cutter Python/artifact-only) — don't import DB-write assumptions into an artifact-only verifier.
- Duplicate-authority detection already exists (Art.14/Đ14/One-Roof/FIX7) — the tool's duplicate-authority check must INTEGRATE, not fork (else it self-violates).
- Data-quality caveat: audit sweeps reported conflicting
information_unitcounts (175 vs 98) — a single fresh read-only baseline is required; treat all counts as indicative.
5. True new work (narrow, after reuse)
(1) command-runner that captures exit codes (dryrun.py refuses to run anything); (2) prose-claim↔executable-test binding; (3) document-level path-alias/canonical-id + duplicate-authority resolver that executes; (4) generic package_manifest.json envelope + schema; (5) --selftest N/N + module_sha256 self-pin; (6) audit_dead_links() over declared refs. Everything else = reuse.
6. Recommendation
REUSE_EXTRACTION_FIRST (not PROCEED_TO_SCOPE_SPEC, not BLOCKED). Next: R0 owner decisions (canonical cutting lane; TAC↔IU authority) → R1 one fresh read-only baseline → R2 Extraction Map (each asset: copy/call/adapt + what-not-to-touch; tool = generic Đ23 Inspector DOT calling deployed engines, no new authority) → R3 gap-only mini-spec → R4 FIX7 pilot via reuse.
7. Documents
- Created:
reports/text-as-code-reuse-anti-duplication-audit-2026-06-09.md(the audit). - Created: this checkpoint.
- Updated:
00-index.md(added report + checkpoint rows; noted the first plan's maturity correction).
8. NOT done (hard constraints honored)
❌ no implement · ❌ no install · ❌ no production mutation (read-only only) · ❌ no FIX7 resume · ❌ no new law · ❌ no v0.1 scope-lock spec · ❌ no verifier code · ❌ no schema files · ❌ no PG/system_issues wiring · ❌ no standalone Safety Kit.
9. Next step
User / GPT / Codex answer the six §9 questions (esp. Q1 canonical cutting lane + Q2 TAC↔IU authority). Then R1→R3. The scope-lock spec stays deferred until the Extraction Map exists.