Skip to content

refactor(decisions): migrate ADR mechanics to Python - #197

Merged
BjRo merged 1 commit into
mainfrom
refactor/179-python-decision-mechanics
Sep 18, 2026
Merged

BjRo merged 1 commit into
mainfrom
refactor/179-python-decision-mechanics

Conversation

@BjRo

@BjRo BjRo commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

Why

Closes #179. Run decision-management mechanics natively on Windows, Linux, and macOS while preserving the existing ADR and canonical-scope contracts.

What changed

Replace bin/decision with a contained, dependency-free Python package invoked through uv run --quiet --frozen --no-dev --project <plugin-root>/backend darrow-decision. Shared records, focused Markdown parsing, native paths, iterative supersession validation, and atomic catalog replacement replace shell pipelines and temporary inventory files; v2 catalog bytes, public records, diagnostics, and exit codes remain covered by regression comparisons. Update all callers, fixtures, specs, documentation, package registration, and matching 0.2.0 manifests, and add native platform matrices plus fresh copied-plugin checks.

Refine capture discovery for unresolved authority and listing's silent-filter report after observed Claude failures; preserve authority/refusal rules and add an ordinary-comparison non-activation case.

Verification

  • bun run check:python: all registered packages pass; decisions has 160 tests with 100% statement and branch coverage, including deterministic generated cases.
  • Saved pre-migration CLI comparison: 249 cases match exit code, stdout, and stderr; the retained shell regression suite passes with bash and /bin/bash (both resolve to Bash 3.2 locally).
  • Fresh copied-plugin execution passes locally with only locked runtime dependencies and without the removed entrypoint. CI passed: Python 3.10–3.13 on Windows/Linux/macOS, fresh copied installations on all three platforms, and Linux/macOS shell regression scenarios.
  • bun run lint, bun run lint:shell, bun run lint:ts, bun run typecheck, bun run check:decisions, bun run check:docs, and bun run check:docs:external pass; 7 documentation tests, both skill inspectors, and Claude manifest validation pass.
  • Native decision evals: all 16 cases pass task and activation checks on each host (32 single-trial records): Claude claude-sonnet-5 / medium and Codex gpt-5.6-terra / medium. The pre-migration Claude catalog-fallback case exposed excluded-result leakage; the corrected candidate passes. An unresolved-authority activation failure was repaired and passes on both hosts.

Review notes

The old runtime path is intentionally removed; the skills and repository callers use the frozen package entrypoint directly. Persisted catalog format and raw-worktree fingerprint semantics are preserved. Contextual authority remains in the skills. Independent fresh-context review found no material issues.

Live eval evidence uses one trial per case/host at the configured 80% threshold; it establishes bounded acceptance, not a reliability estimate. All 103 Python workflow jobs and documentation CI passed on the published head. Claude's manifest validator retains its pre-existing optional-author warning.

Checklist

  • I have read and followed CONTRIBUTING.md, including the contribution
    licensing terms.
  • I added or updated the applicable invariant before implementation, or
    this change does not affect a capability invariant.
  • I added or updated colocated evals, or this change does not affect skill
    behavior.
  • I confirmed that each changed plugin remains self-contained, or this
    change does not affect plugin content.
  • I ran bun run check:python, or this change does not affect registered
    Python packages or their repository quality infrastructure.

@BjRo
BjRo merged commit f6b299f into main Sep 18, 2026
105 checks passed
@BjRo
BjRo deleted the refactor/179-python-decision-mechanics branch September 18, 2026 11:24
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.

Migrate darrow-decisions mechanics to Python + uv

1 participant