Skip to content

ADR-0006 Phase 3: kaizen history command - #3

Closed
anthonyadame wants to merge 3 commits into
mainfrom
feat/adr-0006-history
Closed

ADR-0006 Phase 3: kaizen history command#3
anthonyadame wants to merge 3 commits into
mainfrom
feat/adr-0006-history

Conversation

@anthonyadame

Copy link
Copy Markdown
Contributor

Summary

Implements ADR-0006 Phase 3 — the kaizen history analysis command (paired with the orchestrator-side checkpoint work in kaizen-staging).

  • kaizen history parses cd-aor: step N checkpoint commits and prints the denoising trajectory (confidence, delta, tests, files) with regression detection.
  • Flags: --path, --json, --limit, --task (scope to one task id when a shared workspace interleaves multiple tasks' checkpoints).
  • Schema-version-aware: tolerates additive 1.x minors (1.1.0 rl_signals, 1.2.0 task_id); surfaces an unsupported MAJOR instead of mis-rendering.
  • Stdlib-only; follows the existing 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 check clean

🤖 Generated with Claude Code

aaadame added 3 commits May 16, 2026 03:57
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.history with --path, --json, --limit, and --task support, plus schema-major compatibility handling.
  • Wires the new history command 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 thread cli/commands/history.py
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 thread cli/commands/history.py
Comment on lines +192 to +193
log = _git(str(root), ["log", "--reverse",
f"--format=%H{_FIELD_SEP}%B{_RECORD_SEP}"])
Comment thread cli/commands/history.py
Comment on lines +213 to +215
if args.json:
print(json.dumps(records, indent=2))
return 0
Comment thread cli/commands/history.py
Comment on lines +202 to +204
except Exception as exc: # pragma: no cover - defensive
output.error(style, f"{exc.__class__.__name__}: {exc}")
return 1
@anthonyadame

Copy link
Copy Markdown
Contributor Author

Moving this work to feat/cli-adr-0006 to accumulate further CLI changes before review. Same 3 commits (6923f33, cff396b, 7d492f9) are now on that branch. A fresh PR will be opened once the additional changes land. Closing this; deleting feat/adr-0006-history.

@anthonyadame
anthonyadame deleted the feat/adr-0006-history branch May 18, 2026 13:27
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.

3 participants