create-plan-tests-and-docs
Deliver the /create-plan-side twin of tests-and-docs, sharing ONE combined probe with the bug side so the plan-wide functional criterion (sc-c49969b115) proves BOTH halves of the reground mission in a single run.
Work Items
- Extend scripts/add_bug_runtime/tests/probe_graph_native_dedup.py (the plan-wide functional criterion’s SAME probe) to ALSO propose a plan whose scope text duplicates an existing plan/bug through the REAL /create-plan Phase 0 path (fixture plan corpus + fake/live graph) and assert exit_reason in {duplicate_plan, redirected_existing_plan}, alongside the existing bug-side assertion — one probe proving both entry-point halves of the north-star gate.
- Audit the plan-dedup matrix (exact-plan-duplicate / related-plan / distinct-plan / plan-that-is-really-a-bug-fix / empty-corpus / graph-down fail-open) against the existing test_plan_dedup.py + test_plan_dedup_calibration.py inventory before authoring anything, mirroring twin section s-4c8c5a6c’s w-cde15e21 audit-first discipline. All six cells are already covered at module level (module + live-calibration + gate-mapping + self-test) — do not re-pin them. Author ONLY the genuinely-missing coverage: a test driving the plan-dedup-check CLI (scripts/create_plan_runtime/main.py:394 _cmd_plan_dedup_check) end-to-end against a fixture corpus, asserting the emitted verdict JSON shape (verdict/matched_id/matched_kind/score/shared_symbols/rationale/gate), the —repo-root fixture path, and the exit-0-always contract — currently zero test references exist for that CLI anywhere in the repo. Record which cells were pre-covered vs newly added in the section’s close evidence, matching the twin’s traceability pattern; re-pinning an already-covered cell is LEAK:algorithmic-duplication.
- Run the full create_plan_runtime + plan_corpus test suites + python -m scripts.create_plan_runtime —self-test; all green.
- Update the design log .claude/skills/improve-tooling/create-plan-design.md Section 6 Improvement Log with the graph-native plan-dedup change.
- Update .claude/skills/improve-tooling/create-plan-design.md: (1) add a plan_dedup.py row to Section 3 File Inventory (currently absent), and (2) add a Section 6 Improvement Log entry describing the graph-native plan-dedup change, mirroring the twin entry at add-bug-design.md:125 (2026-07-14) and closing out its ‘plan side pends s-0d66b1c0/s-2ec02902. Commit: pending’ note now that both sections have landed.
Fresh intel (regenerated)
{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “graph-native-bug-relatedness/s-2ec02902” }, “generated_at”: “2026-07-14T08:24:42.633135+00:00”, “graph_state”: { “head_sha”: “d281786e3”, “last_code_import_at”: “2026-07-14T07:24:06.622000000+00:00”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:graph-native-bug-relatedness/s-2ec02902] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “constrained_symbols”: [ “PLAN_DEDUP_RELATED_BAND”, “PLAN_DEDUP_EXACT_OVERLAP_MIN”, “PLAN_DEDUP_EXACT_MIN_TOKENS”, “_extract_symbols”, “_extract_paths”, “_tokenize_words”, “append_bug_entry”, “enhance_bug_entry”, “run_intel_query” ], “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/graph-native-bug-relatedness” } }
(full dossier: create-plan-tests-and-docs—s-2ec02902.intel.json)