Skip to content

Park: consider extracting notes core from shell #104

Description

@brownie-ricon

Context

This came up while discussing whether notes should be ported from shell/mise tasks to Python, Node/TypeScript, Go, or Rust.

Current take: do not big-bang port notes right now. The language is not the hard part; preserving accumulated safety behavior is.

Assessment

notes is mostly:

  • git / git-crypt / rudi subprocess orchestration
  • manifest and local state-file logic
  • hook templates
  • dirty-worktree and post-merge safety behavior
  • BATS coverage around odd repository states

That can be ported, but the risk is recreating all the small edge-case protections without regressions.

Rough fit by language:

  • Python: easiest port; good subprocess/file handling, but still needs a runtime.
  • Node/TypeScript: workable, but no obvious advantage unless future UI/TSX integration matters.
  • Go: best simple compiled-binary candidate.
  • Rust: strongest correctness story, but likely overkill unless the core grows substantially.

Parked recommendation

If this becomes worth doing, prefer incremental extraction:

  1. keep current mise tasks as the CLI/wrapper surface;
  2. extract one small core executable/library for manifest/state/conflict logic;
  3. keep existing BATS as black-box behavior tests;
  4. port task-by-task only where shell complexity is actively costing us.

Do not start with a full rewrite. The current shell implementation has hard-won behavior around encrypted notes and dirty readables, and that behavior matters more than implementation language.

When to revisit

Reopen this as active work if we repeatedly lose time to shell complexity in:

  • manifest/state-file conflict logic;
  • post-merge/post-rebase safety behavior;
  • cross-platform bash limitations;
  • test harness fragility;
  • packaging/runtime friction for users or agents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions