Skip to content

chain (multi-root): 3 issues — Phase 0.4 diagnosis-detection precision sweep from #53 verify (#114) - #114

Merged
kiki830621 merged 4 commits into
mainfrom
idd/chain-multi-b9be3134-refactor-sync-diagnosis-detection-narrow
May 20, 2026
Merged

kiki830621 merged 4 commits into
mainfrom
idd/chain-multi-b9be3134-refactor-sync-diagnosis-detection-narrow

Conversation

@kiki830621

Copy link
Copy Markdown
Member

Refs #59 #64 #65

Summary

Multi-root chain (N=3 roots: #59 #64 #65) — Phase 0.4 diagnosis-detection precision sweep from #53's verify follow-up family. 3 sister fixes touching scripts/check-diagnosis-readiness.sh + skills/idd-all/SKILL.md.

Out of scope this PR: #61 (shell test fixture infra) — diagnosed in same batch as Plan-tier with framework-choice surface (bats-core vs plain shell). Deferred per feedback_lead_minimal discipline. Stays diagnosed for separate iteration.

Cluster overview

# root_id Spawn source Phase PR commit
#59 59 root implemented 9d58660
#64 64 root implemented e6c41ff
#65 65 root implemented e6c41ff

Per-issue details

#59 — idd-all Python detection sync (refactor)

2 substring sites in skills/idd-all/SKILL.md (commit 9d58660) swapped from '## Diagnosis' in c['body'] (substring match) → line-anchored regex re.search(r'(?m)^## Diagnosis', c['body']), matching the check-diagnosis-readiness.sh canonical convention shipped in #53 / PR #58:

  • line 450 — Phase 3 complexity readback Python helper
  • line 533 — Phase 3b Spectra context capture inline Python

Cited sister sites in #59 issue body:

  • idd-list/SKILL.md:115 — narrative prose describing detection strategy (not executable code)
  • idd-update/SKILL.md:120 — narrative prose describing scan rules (not executable code)
  • idd-close/SKILL.md:416 — uses startswith("## Diagnosis") (jq) which is already line-1-anchored (stronger than substring)

Only idd-all had substring patterns in real executable code. Scope narrowed accordingly.

#64 — CommonMark indent tolerance (enhancement)

scripts/check-diagnosis-readiness.sh regex (commit e6c41ff) widened:

- '[.comments[] | select(.body | test("(?m)^## Diagnosis"))] | length'
+ '[.comments[] | select(.body | test("(?m)^[ ]{0,3}## Diagnosis"))] | length'

CommonMark spec allows 1-3 space leading indent for ATX headings. The strict ^ anchor false-negatived user-pasted comment bodies with legal indent. [ ]{0,3} correctly:

  • Matches canonical IDD col-0 comments (col-0 = [ ]{0})
  • Matches 1-3 space indented ATX headings (CommonMark-compliant)
  • Excludes 4+ space indent (per spec that's a code block, not a heading)
  • Excludes tab indent U+0009 (not a valid ATX heading indent)
#65 — Fenced-code limitation doc (documentation, Approach A)

NEW comment block in scripts/check-diagnosis-readiness.sh (commit e6c41ff) documenting that detection is line-based and doesn't track fenced code block state. A comment body that quotes ## Diagnosis inside a fenced code block ( ```) for documentation purposes will false-positive as 'diagnosed'.

Approach A (docs-acknowledge) selected per diagnosis decision point + feedback_lead_minimal. Mitigation: chain Phase 0.4 AskUserQuestion lets the user override the auto-detect verdict (run /idd-diagnose first / proceed anyway / cancel). Simpler heuristic + user-override safety net preferred over Approach B (full markdown state-machine parser) — the parser itself would contain its own edge-case bugs in fence nesting / language hints / indentation rules.

Review status

  • Diagnose ✓ for all 3 issues (per-issue Diagnosis comments)
  • Implement ✓ (3 commits + CHANGELOG fixup)
  • Verify ⏳ (per-issue 6-AI ensemble — running)
  • Verify-gated: per-issue verify PASS — cluster ready to merge → /idd-close #N per issue after merge

🤖 Generated by /idd-all-chain. Do NOT add GitHub close trailers (Closes/Fixes/Resolves) — IDD discipline requires manual /idd-close per issue after merge to enforce checklist gate + per-issue closing summary.

Two Python substring sites in idd-all/SKILL.md still used the pre-#53
substring pattern `'## Diagnosis' in c['body']` after #53 / PR #58
tightened the equivalent in idd-all-chain to line-anchored regex.
Sister-skill consistency sweep per #53 verify follow-up:

- idd-all/SKILL.md:450 — complexity readback Python helper
- idd-all/SKILL.md:533 — Phase 3b Spectra context capture

Both swapped to `re.search(r'(?m)^## Diagnosis', c['body'])`,
matching the check-diagnosis-readiness.sh canonical convention.

Note: the cited idd-list:115 and idd-update:120 sites in the #59
issue body are prose descriptions of the detection STRATEGY in
narrative markdown — they don't contain executable substring code.
idd-close/SKILL.md:416 uses `startswith("## Diagnosis")` (jq)
which is already line-1-anchored (stronger than substring) — left
unchanged. Only idd-all has the substring pattern in actual code.

0 behavior change for canonical IDD comments (col-0 `## Diagnosis`);
adversarial comment bodies (quoting the heading marker in prose) no
longer false-positive.

Refs #59
…code limitation doc (#64 + #65)

#64 — Widen regex from `^## Diagnosis` to `^[ ]{0,3}## Diagnosis` for
CommonMark spec's 1-3 space leading indent tolerance on ATX headings.
0 false-positive for canonical IDD comments (col-0 = `[ ]{0}` still
matches); user-pasted comment bodies with legal indent no longer
false-negative. 4+ space leading indent stays excluded (per CommonMark
that's a code block, not a heading); tab indent stays excluded (U+0009
is not a valid ATX heading indent).

#65 — Acknowledge fenced-code false-positive as documented known
limitation (Approach A per diagnosis decision point). A comment body
that quotes `## Diagnosis` inside a fenced code block for documentation
purposes will false-positive as 'diagnosed'. Mitigation: chain Phase 0.4
AskUserQuestion lets user override the auto-detect verdict — the
heuristic + user-override safety net is preferred over a full markdown
state-machine parser (which would itself contain edge-case bugs in
fence nesting / language hints / indentation rules).

Comment block in the helper script makes the trade-off explicit so
future contributors don't 'fix' the limitation by adding parser
complexity without considering the cost.

Refs #64 #65
#65)

3 sister fixes from #53 verify follow-up family addressing detection
regex precision:

- #59 idd-all Python detection sync (refactor) — 2 substring sites
  swapped from `'## Diagnosis' in c['body']` to line-anchored
  `re.search(r'(?m)^## Diagnosis', c['body'])`, matching the
  check-diagnosis-readiness.sh canonical convention. Note: cited
  idd-list / idd-update sites in #59 issue body are narrative prose
  not executable substring code; idd-close uses startswith() (already
  line-1-anchored). Only idd-all had actual substring code.

- #64 CommonMark indent tolerance (enhancement) —
  check-diagnosis-readiness.sh regex widened from `^## Diagnosis` to
  `^[ ]{0,3}## Diagnosis` for CommonMark spec's 1-3 space leading
  indent tolerance. 0 false-positive for canonical IDD col-0 comments;
  4+ space indent stays excluded (code block); tab indent excluded.

- #65 Fenced-code limitation doc (documentation, Approach A) — NEW
  comment block in check-diagnosis-readiness.sh documenting that
  detection is line-based and doesn't track fenced code state. A
  comment body quoting `## Diagnosis` inside a fence will false-positive.
  Mitigation: chain Phase 0.4 AskUserQuestion lets user override.
  Simpler heuristic + user-override safety net preferred over full
  state-machine parser (which would have its own edge-case bugs).

NOT in scope: #61 (shell test fixture infra) — diagnosed in same batch
as Plan-tier with framework-choice surface (bats-core vs plain shell).
Deferred per `feedback_lead_minimal` discipline: Plan-tier decisions
deserve dedicated approval gate, not lumped into a precision-sweep
cluster. Stays diagnosed for separate iteration.

Refs #59 #64 #65
@kiki830621

Copy link
Copy Markdown
Member Author

/idd-verify --pr 114 — cluster verify report

Phase: verified (verify-gated PASS)
Mode: PR mode, cluster (3 issues: #59 #64 #65)
Diff: 108 lines, 4 files (scripts/check-diagnosis-readiness.sh + skills/idd-all/SKILL.md + CHANGELOG.md + plugin.json)
Reviewers: 3 general-purpose Agents (requirements / logic / devil's advocate) + Codex gpt-5.5 xhigh (background)

Why lean 3-AI ensemble: 108-line diff, doc-only precision tweaks + 4-line regex change. Security + regression depth not warranted (no new code paths, no new attack surface, no cross-skill interactions worth dedicated reviewer). 3-AI ensemble + Codex preserves cross-model independent check.

Aggregate verdict: PASS

Reviewer Verdict
Requirements PASS — all 10 deliverables correctly addressed
Logic PASS — Python import re confirmed in scope; jq Oniguruma supports {0,3}; col-0 still matches; tab + 4-space stay excluded
Devil's Advocate PASS — empirical 31-fixture battery across both regex engines confirms Unicode whitespace exclusion; idd-close startswith() verified line-1-anchored; no cross-issue regression between #64 widening + #65 fenced-code limitation
Codex (gpt-5.5 xhigh) Process gap — background task at 0 bytes when this report compiled. Recorded per v2.59.0+ convention (precedent: PR #110, PR #113)

Findings

0 blocking findings. 3 non-blocking observations (all FYI, not blocking merge):

  1. (requirements) Asymmetric regex precision between Python (^## Diagnosis) vs jq (^[ ]{0,3}## Diagnosis) — both correct for canonical IDD shape; future cross-reader might find surprising. Optional follow-up: one-liner clarifying that Python sites scan AI-generated content (always col-0) vs helper script scans potentially user-pasted content (legal CommonMark indent)
  2. (DA F1) Project rule .claude/rules/attribute-assessment.md about Likert scoring applies to AI-generated assessment, not hand-written P3 labels — no violation in this PR's ### Vagueness Pre-check per-issue audit blocks
  3. (DA F2/F3) CR-only line delimiter would false-negative in both regex engines, but GitHub API normalizes to LF — operationally impossible edge case

Per-issue verdict

#59 — idd-all Python substring → regex: PASS

  • skills/idd-all/SKILL.md:450 substring → re.search(r'(?m)^## Diagnosis', c['body']) ✓
  • skills/idd-all/SKILL.md:533 same change ✓
  • import re in scope at both edit sites (line 450 inline python3 -c block already imports re; line 533 short script needs re — verified added)
  • Scope discipline confirmed: cited idd-list:115 / idd-update:120 sites are narrative prose, not executable code; idd-close:416 uses startswith() (DA empirically confirmed line-1-anchored)

#64 — CommonMark indent tolerance: PASS

  • scripts/check-diagnosis-readiness.sh:65 regex widened to (?m)^[ ]{0,3}## Diagnosis ✓
  • jq Oniguruma engine supports {0,3} quantifier (verified empirically by DA's 6-fixture jq battery)
  • Edge cases verified:
    • col-0 ([ ]{0}) still matches ✓
    • 1-3 space indent ([ ]{1,3}) now matches (CommonMark-compliant) ✓
    • 4+ space indent (code block per spec) stays excluded ✓
    • Tab character (U+0009) stays excluded — [ ] is literal ASCII space ✓
    • Unicode whitespace (NBSP / U+1680 / U+2000-200A / U+202F / U+205F / U+3000) stays excluded — [ ] is byte-level ASCII ✓ (DA empirical)

#65 — Fenced-code limitation doc (Approach A): PASS

  • NEW comment block at scripts/check-diagnosis-readiness.sh:21-30 documenting line-based detection's fenced-code false-positive
  • Comment placement clean (doesn't break bash syntax)
  • Mitigation cross-reference to chain Phase 0.4 AskUserQuestion (DA verified location at idd-all-chain/SKILL.md:201,207-209)
  • Trade-off rationale documented: simpler heuristic + user-override safety net > full state-machine parser

Shared

Process gap

Codex gpt-5.5 xhigh background task at 0 bytes output when this report compiled (~7 min after spawn). 3-AI Claude ensemble carried successfully; cross-model independent verification not achieved this round. Recorded transparently per v2.59.0+ convention. This is the 3rd consecutive cluster verify in this session where Codex hung at 12+ min — pattern recorded for potential investigation. Not hidden in aggregate.

Next: merge ready

Cluster ready to merge:

  1. Merge chain (multi-root): 3 issues — Phase 0.4 diagnosis-detection precision sweep from #53 verify (#114) #114 (squash recommended — single review surface)
  2. /idd-close #59 #64 #65 per issue (per-issue closing summary required)
  3. Distribution sync v2.67.0 → v2.68.0 via /plugin-tools:plugin-update issue-driven-dev

Verify: 3-AI ensemble PASS (Codex process gap recorded). 0 blocking findings, 3 non-blocking observations all FYI.

@kiki830621
kiki830621 merged commit a15a6a5 into main May 20, 2026
kiki830621 added a commit that referenced this pull request May 20, 2026
…n-dev v2.68.0

Distribution sync after PR #114 merge (a15a6a5) closing #59 #64 #65
(Phase 0.4 detection precision sweep from #53 verify):
- .claude-plugin/marketplace.json: 2.67.0 → 2.68.0 + full description
- plugins/issue-driven-dev/README.md: Version History row
  v2.56.0-v2.67.0 → v2.56.0-v2.68.0 + appended v2.68.0 paragraph

Refs #59 #64 #65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant