Repository navigation
feat: Phase 5 — repo-markdown destination + git context (CLI check/repair) - #5
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eshold Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…arators Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ummary Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…; cover flag_comment edge cases Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…y-run) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…6 TODOs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…un PR plan Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pairs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…/json-string from OSS models) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 5 wires the verifier/repairer (previously eval-only) into the real
docpulse check/docpulse repairCLI, sourcing change intent from git, and turns verdicts + repairs into an honest CI exit code, a human report, and a dry-run companion-PR plan. Livegit push/gh pr createare deferred to Phase 6.New modules
pipeline.py— CI-agnostic orchestrator: diff → suspects → verify → (repair) →RunResult, with the stale-index warning and per-suspect bundle seeding.context/—ContextProviderprotocol +GitContext(PR env vars → commit-message fallback → ticket IDs).destinations/—Destinationprotocol +RepoMarkdownDestination: bottom-up section replacement, flag-tier comment, and the dry-run companion-PRFixPlan(branch/commit/PR-body + emittedgh/gitcommands), confidence-routed via Phase 4'sroute().report/summary.py—compute_exit_code+render_summary.command_runner.py— single shared injectable subprocess runner.Changed
diffing/git_diff.py— default three-dotbase...head(merge-base) with--two-dotopt-in and auto-fallback when no common ancestor.cli.py—checknow verifies + reports (exit 1 on drift);--suspects-onlypreserves the keyless suspect list; newrepaircommand prints unified diffs + the dry-run PR plan,--writeapplies edits locally.Locked decisions honored
check/repair);--suspects-onlykeyless path.stalewith confidence ≥flag_threshold;unverifiednever fails; exit 2 = tool/setup error.Deferred items closed:
RunResult.exit_codeconstruction, stale-index warning, two-dot→three-dot, standalonerepair --base.Executed subagent-driven (per-task spec + quality review + a final integrated review). The review loop caught real bugs in plan-prescribed code: a
splitlines()round-trip bug that silently deleted blank separators between doc sections (file-mutating core), a ticket-regex false-positive (UTF-8), a duplicated command-runner, and arender_summary"fixed" over-count (counted validation-failed repairs). All fixed.Test Plan
uv run pytest -q→ 179 passed (from 137 baseline; +42 Phase 5 tests)uv run ruff check→ cleangh/GitHub outsidecli.py+destinations/), exit-code paths audited,replace_sectionsround-trips real multi-section docs, end-to-end section-id wiring consistent🤖 Generated with Claude Code