Skip to content

Release/0.5.0#4

Merged
mash-97 merged 4 commits intomasterfrom
release/0.5.0
May 1, 2026
Merged

Release/0.5.0#4
mash-97 merged 4 commits intomasterfrom
release/0.5.0

Conversation

@mash-97
Copy link
Copy Markdown
Owner

@mash-97 mash-97 commented May 1, 2026

Release 0.5.0 includes changes to make it ready to use

itzmashz and others added 4 commits April 29, 2026 21:40
## Parser (lib/mps/engines/mps.rb)
- Replace brittle flip-flop at_first/scan_until algorithm with a correct
  position-based stack parser using Regexp#match(str, pos) per iteration.
  Stack frames carry sign, args, body_start, child_counter, ref_path —
  refs are built naturally from parent path, no mutation bugs.
- Make element brackets optional in AT_REGEXP so @task{ } and @task[]{ }
  are both valid. Previously bracketless syntax was invisible to the parser,
  causing lost elements and premature root closure.
- Rename class Engines::MPS → Engines::Parser; MPS alias kept for compat.
- Replace eval()/instance_eval() with const_get and a plain Struct for
  Unknown elements.
- Fix typo: parse_mps_file_to_elments_hash → parse_mps_file_to_elements_hash
  (old name aliased).

## Constants (lib/mps/constants.rb)
- Fix AT_REGEXP sign char class (was [a-zA-Z0-9_,:\s]+? — wrongly matched
  spaces/commas); now [a-zA-Z0-9_]+.
- Fix MPS_FILE_NAME_CLIPPER to guard against non-matching filenames (was
  $~[1] which crashed; now uses match() with a safe fallback).

## Element types (lib/mps/elements/)
- Add Element.split_args module method: parses "work, status: done" into
  { attrs: { status: "done" }, tags: ["work"] }.
- All elements: add parse_args, parsed_args, raw_args, tags accessors.
- Fix SIGNATURE_REGEX from partial /task/ to exact /\Atask\z/ on all types.
- Fix frozen_string_literal magic comment typo (space → underscore).
- Task: add done?/open?, status arg (default "open").
- Log: add duration_minutes, duration_str from start/end args.
- Reminder: expose at arg.

## Store (lib/mps/store.rb — new)
- Library layer that owns all filesystem work: find_file, find_files,
  find_or_create_path, parse_date, append, all_files, files_since, search.
- CLI delegates entirely to Store; no direct file I/O in lib/cli/mps.rb.
- Fix Dir.glob().grep(regexp) → .select { File.basename(f) =~ regexp }
  (grep was matching full paths against a basename-anchored regexp).

## CLI (lib/cli/mps.rb — full rewrite)
- New commands: list (nested tree with --type/-t, --tag/-g, --status/-s,
  --since/-S), append (--tags, --status, --at, --start-time, --end-time),
  search (--type, --tag, --since), stats (--since), export (--format json|csv,
  --type, --since).
- list renders elements as an indented tree ordered by ref path; @mps group
  headers shown only when they have visible children.
- --status filter correctly excludes elements that carry no status field.
- colorized type badges (green/cyan/magenta/yellow), status/duration/time extras.
- Fix git pull orign → configurable git_remote/git_branch from config.
- rescue Exception → rescue StandardError throughout.

## Tests
- engine_test.rb: updated for new API; added sibling refs, deep nesting,
  args capture, Unknown struct tests.
- element_test.rb (new): 20 tests — split_args, parse_args, done?,
  duration_str, reminder at, note tags.
- store_test.rb (new): 19 FakeFS tests — find_file, parse_date, append,
  search, files_since.
- assets_test.rb (new): 13 regression tests against real fixture files
  exercising bracketless syntax, mixed files, and 3-level nesting.

## Docs
- GETTING_STARTED.md: rewritten as comprehensive day-in-the-life narrative
  covering every command and option with examples.
- README.md: updated command list, architecture overview, before/after
  table comparing pre-Claude baseline (66ac095) to current state.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mash-97 mash-97 merged commit 70caef4 into master May 1, 2026
0 of 3 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