ADR-0006 Phase 3: kaizen history command - #3
Closed
anthonyadame wants to merge 3 commits into
Closed
Conversation
Signed-off-by: anthonyadame <aadame.aa@gmail.com>
Signed-off-by: anthonyadame <aadame.aa@gmail.com>
…-0006) Signed-off-by: anthonyadame <aadame.aa@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds a new inspection/analysis subcommand, kaizen history, to render CD-AOR checkpoint metadata from git history (ADR-0006 Phase 3), including regression detection and optional JSON output.
Changes:
- Introduces
cli.commands.historywith--path,--json,--limit, and--tasksupport, plus schema-major compatibility handling. - Wires the new
historycommand into the CLI entrypoint. - Adds a dedicated pytest suite and updates user-facing docs/CHANGELOG.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/CLI_GUIDE.md | Documents the new kaizen history command and its flags/behavior. |
| cli/tests/test_history.py | Adds coverage for parsing, regression marking, limits, task scoping, and schema version handling. |
| cli/main.py | Registers and dispatches the new history subcommand. |
| cli/commands/history.py | Implements git log parsing, schema gating, rendering, and JSON output for checkpoint history. |
| CHANGELOG.md | Notes the new command under Unreleased. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+194
to
+196
| # A repo with no commits exits non-zero here — that is simply an | ||
| # empty trajectory, not an error. | ||
| raw = log.stdout if log.returncode == 0 else "" |
Comment on lines
+192
to
+193
| log = _git(str(root), ["log", "--reverse", | ||
| f"--format=%H{_FIELD_SEP}%B{_RECORD_SEP}"]) |
Comment on lines
+213
to
+215
| if args.json: | ||
| print(json.dumps(records, indent=2)) | ||
| return 0 |
Comment on lines
+202
to
+204
| except Exception as exc: # pragma: no cover - defensive | ||
| output.error(style, f"{exc.__class__.__name__}: {exc}") | ||
| return 1 |
Contributor
Author
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
Implements ADR-0006 Phase 3 — the
kaizen historyanalysis command (paired with the orchestrator-side checkpoint work inkaizen-staging).kaizen historyparsescd-aor: step Ncheckpoint commits and prints the denoising trajectory (confidence, delta, tests, files) with regression detection.--path,--json,--limit,--task(scope to one task id when a shared workspace interleaves multiple tasks' checkpoints).rl_signals, 1.2.0task_id); surfaces an unsupported MAJOR instead of mis-rendering.cli/commands/*conventions. Docs + CHANGELOG updated.3 DCO-signed commits.
Test plan
pytest cli/tests/test_history.py(14 passed)pytest cli/tests/full suite (137 passed, 7 skipped)ruff checkclean🤖 Generated with Claude Code