Skip to content

fix(cli): resolve charter drift/audit adopter friction (closes #207, closes #208)#299

Merged
montfort merged 1 commit into
mainfrom
fix/charter-drift-audit-adopter-207-208
Jun 20, 2026
Merged

fix(cli): resolve charter drift/audit adopter friction (closes #207, closes #208)#299
montfort merged 1 commit into
mainfrom
fix/charter-drift-audit-adopter-207-208

Conversation

@montfort

Copy link
Copy Markdown
Contributor

Adopter feedback from lnxdrive (CHARTER-01-road-to-v0-1-0-alpha-1). Both verified unaddressed against current code before fixing. Consolidating before the combined release that already carries #215.

#207charter drift

Part Fix
Template ships a rejected command The Charter template's ## Verification block instructed the positional range charter drift CHARTER-NN origin/main..HEAD (the CLI rejects it) wrapped in stale "when Phase 2 ships" language. Now --range origin/main..HEAD, Phase-2 conditionals dropped (EN/es/zh-CN).
charter status lists drift as unavailable Removed the "Phase 2 features (not yet available)… (planned cli-3.7.0)" block — both charter drift and charter close shipped ~16 versions ago.

#208charter audit --prepare silent under-coverage

On a multi-batch Charter whose earlier phases already merged to the base branch, the default range origin/main..HEAD silently excludes the merged commits, so a phase-scoped audit prompt under-covers.

  • Warning (the core fix): --prepare now detects completed batches in the Charter body / referenced AILOGs' Batch Ledgers (reusing cli::ailog::{parse_batch_ledger, BatchEntry}) and, when no explicit --range was given, warns that the audit may under-cover and to pass an explicit range. With --range the warning is suppressed.
  • Docs: the pitfall is documented in charter audit --help, CLI-REFERENCE (EN/es/zh-CN), and the straymark-audit-prompt skill (4 variants, codex regenerated).

The issue's alternative — defaulting the lower bound to the Charter's first commit — was not taken (it would change the default for all audits and needs Charter metadata); the warning + docs make the silent case loud without that risk.

Scope

Verification

  • cargo test — full workspace green (348 lib + integration; 2 new tests: status omits stale block; audit warns on multi-batch without --range and stays silent with it).
  • cargo build --release clean; cargo clippy no new warnings in touched files; gen_codex_skills --check in sync.
  • Dogfood on a temp project: charter status no longer prints "not yet available"; charter drift … --range HEAD~1..HEAD accepted; charter audit --prepare on a Charter with a completed batch warns without --range, silent with it.

🤖 Generated with Claude Code

…loses #208)

Adopter feedback from lnxdrive (CHARTER-01-road-to-v0-1-0-alpha-1):

#207 — charter drift:
- The Charter template's ## Verification block instructed the positional-range
  syntax `charter drift CHARTER-NN origin/main..HEAD` (rejected by the CLI) and
  wrapped it in stale "when Phase 2 ships" language. Fixed to `--range
  origin/main..HEAD` and dropped the Phase-2 conditionals (EN/es/zh-CN).
- `charter status` no longer advertises drift-check and telemetry as "Phase 2
  features (not yet available)… (planned cli-3.7.0)" — both shipped long ago.

#208 — charter audit --prepare under-coverage:
- On a multi-batch Charter whose earlier phases already merged to the base
  branch, the default range origin/main..HEAD silently excludes the merged
  commits. `--prepare` now detects completed batches in the Charter body /
  referenced AILOGs' Batch Ledgers and, when no explicit --range was given,
  warns that a phase-scoped audit may under-cover and to pass an explicit range.
- Documented the pitfall in `charter audit --help`, CLI-REFERENCE (EN/es/zh-CN),
  and the straymark-audit-prompt skill (4 variants, codex regenerated).

Reuses cli::ailog::{parse_batch_ledger, BatchEntry}. No version bumps or tags
(combined release with #215 prepared separately).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@montfort montfort merged commit f5ac75a into main Jun 20, 2026
2 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.

1 participant