Skip to content

Enhance drift summaries and controls#116

Merged
lzehrung merged 2 commits into
mainfrom
drift-enhance
Jun 1, 2026
Merged

Enhance drift summaries and controls#116
lzehrung merged 2 commits into
mainfrom
drift-enhance

Conversation

@lzehrung
Copy link
Copy Markdown
Owner

@lzehrung lzehrung commented Jun 1, 2026

Summary

  • add drift graph-edge filtering, compact output, and public API controls
  • enrich duplicate drift details and logical ref reporting
  • update drift docs, skill guidance, and implementation plan checklist

Verification

  • npm run lint
  • npm run build
  • npm run test:ci
  • git diff --check

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Jun 1, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (13 files)
  • src/cli/drift.ts - CLI parsing for new drift flags; defaults for --pretty/--compact-json
  • src/cli/help.ts - Updated usage line with new flags
  • src/cli/options.ts - Registered --graph-edges and --public-api as value options
  • src/drift/compare.ts - Graph-edge summary/off modes, public API filtering, duplicate top-group diffs, compact format and summary counts
  • src/drift/git.ts - Logical ref reporting via withReportRefs; artifact and git root normalization
  • src/drift/index.ts - Re-exports new drift types
  • src/drift/report.ts - Pretty rendering for graph-edge summaries and duplicate top-group counts
  • src/drift/types.ts - New format, graphEdges, publicApi, summary types and fields
  • src/index.ts - Re-exports new public drift types
  • tests/cli-command-modules.test.ts - Help text assertions for new flags
  • tests/cli-regressions.test.ts - CLI integration tests for compact JSON, graph-edge filtering, public API filtering
  • tests/drift-artifact.test.ts - Artifact baseline logical ref assertions
  • tests/drift-git-provider.test.ts - Git provider logical ref assertions
  • tests/drift.test.ts - Unit tests for graph-edge summary/off, duplicate top-group diffs, compact mode defaults, public API filtering
  • docs/agent-workflows.md, docs/cli.md, docs/library-api.md - Usage examples and option documentation
  • docs/superpowers/plans/2026-06-01-drift-enhancements.md - Implementation plan checklist

Reviewed by kimi-k2.6-20260420 · 185,590 tokens

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the architecture drift reporting pipeline to reduce noise and improve CI / machine-consumption workflows by adding configurable drift “detail modes”, compact output metadata, and clearer base/head identity reporting across providers.

Changes:

  • Add drift controls for graph-edge verbosity (full|summary|off) and public API reporting (all|removals|off), including CLI flags and library options.
  • Enrich drift output with format metadata and summary counts (summary.byKind, summary.bySeverity), plus more actionable duplicate drift details.
  • Report logical base/head refs (and stable roots) for git/artifact comparisons, and update docs and regression tests accordingly.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/drift.test.ts Adds unit tests for graph-edge summary/off, public API filtering defaults, duplicate key diffs, and compact summary metadata.
tests/drift-git-provider.test.ts Asserts git provider drift reports stable root and logical base.ref / head.ref.
tests/drift-artifact.test.ts Asserts artifact baseline drift reports stable root and artifact identity in base.ref / base.root.
tests/cli-regressions.test.ts Adds CLI regression tests for --compact-json, --graph-edges, and --public-api.
tests/cli-command-modules.test.ts Verifies drift help output includes the new CLI flags.
src/index.ts Re-exports new drift public types from the root package entrypoint.
src/drift/types.ts Extends public drift/snapshot types with format/mode/summary controls and report metadata.
src/drift/report.ts Improves pretty-rendered subjects for duplicate and summarized graph-edge findings.
src/drift/index.ts Re-exports new drift public types from the drift module entrypoint.
src/drift/git.ts Adds logical ref/root normalization to drift reports and forwards new compare options.
src/drift/compare.ts Implements public API filtering, graph-edge summary/off, duplicate key diffs, and report-level summaries.
src/cli/options.ts Registers --graph-edges and --public-api as value-taking CLI options.
src/cli/help.ts Updates drift help text for new modes and --compact-json.
src/cli/drift.ts Adds parsing and forwarding of --graph-edges, --public-api, and --compact-json.
README.md Updates drift examples and recommends bounded output flags for CI/review usage.
docs/superpowers/plans/2026-06-01-drift-enhancements.md Adds an implementation plan/checklist documenting the intended drift enhancements.
docs/library-api.md Documents new drift options and logical ref reporting for library consumers.
docs/cli.md Documents new drift CLI flags and recommended usage patterns.
docs/agent-workflows.md Updates agent workflow guidance to prefer compact/bounded drift outputs.
codegraph-skill/codegraph/SKILL.md Updates skill guidance to include bounded drift flags and compact JSON usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cli/drift.ts Outdated
Comment on lines 121 to 127
if (pretty) {
for (const line of renderArchitectureDriftReport(report, { limit: maxFindings }).trimEnd().split("\n")) {
context.writeStdoutLine(line);
}
} else {
context.writeJSONLine(report);
}
Comment thread src/cli/drift.ts Outdated
}
if (!base && !baseArtifact) {
context.writeStderrLine("Usage: codegraph drift [roots...] --base <ref> [--head <ref>] [--json | --pretty]");
context.writeStderrLine("Usage: codegraph drift [roots...] [--root <path>] (--base <ref> | --base-artifact <dir>) [--head <ref>] [--json | --pretty]");
Comment thread src/drift/types.ts
Comment on lines 125 to 133
export interface ArchitectureDriftReport {
schemaVersion: 1;
format: ArchitectureDriftFormat;
root: string;
base: ArchitectureSnapshotSummary;
head: ArchitectureSnapshotSummary;
findings: ArchitectureDriftFinding[];
summary: ArchitectureDriftSummary;
policy: {
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.

@lzehrung lzehrung merged commit 693db61 into main Jun 1, 2026
4 checks passed
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.

2 participants