Skip to content

Latest commit

 

History

History
329 lines (278 loc) · 16.1 KB

File metadata and controls

329 lines (278 loc) · 16.1 KB
  • post initial vision!
  • refine and clean up

More Cli stuff

  • for any "list" command, add arguments "--next " / "-n " show only the first entries of whatever is listed.

  • idem "--last" ...

  • add subcommand (alias) "agile list tasks" should do the same as "agile list"

  • data structures suitable for parsing

  • implement a proper parser for tasks

  • integrate the parser into existing functions

  • next task uses parser, "location" added to each task struct

small cli fixes

  • "tasks" is an alias for task subcommand

First basic checks

  • agile check subcommand created

  • Check for wrongly indented task (task that is surrounded by newlines but indented like a subtaks) any operation that parses tasks lists should immediately stop on encountering this error. The error should be printed, including file path and line number

  • iterate on the first error message

    • proper coloring
    • indenting
    • other highlighting Bottom Line: It should be a really ergonomic, nicely readable error message, but which could also be parsed (machine readable)

Fixes

  • clarify the command name - is it "agile" or "mdagile". The produced binary seems to be "mdagile". Check again what is says in the "vision" file, then fix accordingly Binary is now explicitly named "agile" via [[bin]] in Cargo.toml, matching vision.md

First Minimal Language Server

  • hello world language server mode implemented into cli tool, command agile
  • wrongly indented task check is working in lsp
  • testing for first lsp feature
  • refactor and understand

First Language Server Protocol (LSP) Features

  • LSP Phase 1: Core Foundation (Hello World) Entry point: agile lsp (stdin/stdout JSON-RPC)

    • Create src/lsp/protocol.rs — LSP message types (serde)
      • InitializeRequest/Response
      • DidOpenTextDocument / DidChangeTextDocument notifications
      • PublishDiagnosticsNotification
      • JsonRpc message wrapper
    • Create src/lsp/mod.rs — Main server loop
      • Read JSON-RPC from stdin
      • Dispatch to handlers
      • Write responses to stdout
    • Create src/lsp/handler.rs — Request handlers
      • handle_initialize() — respond with server capabilities
      • handle_did_open() — track opened documents
      • handle_did_change() — re-validate on content changes
      • handle_shutdown() — cleanup
    • Wire up Command::Lsp in src/main.rs
    • Create tests/lsp_basic.rs — acceptance tests
      • initialize request/response
      • document open/change/close tracking
    • All tests pass
  • LSP Phase 2: Real-time Validation

    • Create src/lsp/diagnostics.rs — Convert Issue → LSP Diagnostic
      • Map error codes to severity
      • Include error message, code, help text
    • Integrate with existing checker::run()
    • Validate on textDocument/didOpen and didChange
    • Publish diagnostics for all errors
    • Create tests/lsp_diagnostics.rs — validation tests
      • All error types generate correct diagnostics
      • Multiple errors aggregated
      • Clean files produce no diagnostics
    • Test with real .agile.md files

More basic Syntax Checks and Quick Fixes

  • wrongly indented task description task description starts exactly here, at the same location as the "[ ]". This applies to every line of the task description.
    • agile check Some more dummy subtask content to test the visual appearance of the indentation. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem.
    • agilels hint
    • agilels quickfix: fix indentation
  • missing space between task box and beginning of task title
    • agile check
    • agilels hint
    • agilels quickfix: Add space

Subtasks are Mandatory

  • detect parent task incorrectly marked as done, even though subtasks are not done
    • agile check
    • agilels hint Note: For now- no quickfix. Users should decide if subtasks can be deleted, cancelled or marked done

GUI prototype

  • overview of suitable GUI frameworks suitable framework must:

    • compile natively to windows and linux. Mobile not required atm
    • support nice animations for "moving post-its over a canvas"
    • be lightweight and performant
    • popular and well supported
    • styling with css
  • GUI framework selected: Dioxus

  • Hello world GUI app running

  • prototype runs: Empty canvas, divided into three rows, narrow top row, wide middle row, narrow bottom row. Separated by simple black lines.

  • load title of next task onto post-it

  • next task dynamically updated on file changes

  • make all information of task available on the frontend side of the UI

    • render subtasks as well in the post it just clip if not enough space. keep post-it side constant)
  • place post-it along top-left → bottom-right diagonal based on subtask completion progress (done in bottom-right corner)

  • task post-it can be opened by clicking

    • task modal then takes up most of the available screen and overlays all other elements
    • modal is made scrollable
    • all content can be viewed
  • load in backlog tasks along the top row load the ten next tasks in the backlog

    • backlog task post-its are a bit smaller than task in progress
  • handle all task post-its the same way in the code. Not different items This implies that multiple post its can be in the middle part of the view, moving over the screen- that's what we want!

    • [-] assign new css classes, when at least one sub-task is checked (larger box)
    • all post its are conceptually handled the same way
  • display the last ten tasks that were done along the bottom row

    • done task post-its are a bit smaller than task in progress
  • refactor: each TaskView lives in its own signal (vector of 50 pre-allocated slots; backend tasks beyond the limit are dropped)

  • z-ordering: Last changed task is moved to front

Additional (Simple) Syntax & Validations

  • no empty boxes "[]"
  • no boxes filled with anything else
  • refactor: "ParsingIssues" to Partial Item, to avoid adding more and more fields here
  • Quickfix for [X] --> "[x]"
  • Quickfix for other invalid boxes --> "[ ]"
  • indication for when quickfix available

Properties and first Settings

  • Create config module: parse property definitions from mdagile.toml Adds src/config/ with Config::from_str and Config::load. Reads [Properties.<name>] sections using the toml crate; validates the file is well-formed TOML.

  • BUG: board broken

  • BUG: language server not found by nvim (some config stuff?) --> cany needed update. Since we added the tty flag as default in devenv, cany needs to do --no-tty

  • post mortem: add some non-regression checks to the GUI Seems like we are kind of limited here, unit test, ok, otherwise best idea seems to be

    • add some UTs
    • [-] smoke test, that checks if warnings are issued. Will be slow and require playwright to find any actual issues (server dormant with no clients connected) -> don't do
  • some GUI fixes - for the fun of it!

    • tasks properly sized and positioned
      • scale size of task post-its (done and backlog) with viewport size. height should match exactly the height of the "separator" sections
      • post-its positions in backlog and progress exactly aligned with the separator sections
      • .. then make the post-its just a little bit smaller (like 5px or so)
  • GUI style improvements, red, green coloring, sepia tint, monospace

    • pastel green text color for done tasks
    • pastel red color for cancelled tasks
    • sepia tint of the board
    • use a monospace font
    • Problem: text on some tasks does not fit on the card. Don't render text all the way to the bottom of the task, but have a fade-out shadow gradually hide it (fading into the color of the task card). Make tasks with a lot of overflowing text more visually appealing
  • GUI: don't update (get tasks) while a task is maximized

GUI 1.0

  • test case / script:

    • launches a gui instance via dx pointing to a fixture directory
    • simulates tasks with subtasks being created (backlog)
    • lorem ipsum text in tasks
    • simulates tasks being marked done, so that they continuously progress over the board
    • multiple tasks are in progress at the same time
    • at least one task "overtakes" other tasks
    • plays the whole thing on repeat
  • Repel/spread: overlapping in-progress cards push each other apart Cards that would overlap negotiate their position along (or perpendicular to) the diagonal so none fully obscure another. Progress still determines the rough position; the spread is only the local adjustment needed to avoid overlap.

    • refactor the current code, to easily accomodate setting both x and y postion for each card explicitly.
    • the normal target position is the current diagonal postion
  • rework repel to be fully 2D (also spread left-right, not just perp to axis)

  • repel fixes

  • experiment with other designs for backlog and done sections Style with gradients

  • some installability improvements

  • #feature: Property & Assignment validation #foo Detect undefined #property markers and @user/@group assignments Note: property markers are only recognized in the task title (#here #they #are #ignored)

    • Read mdagile.toml config in checker; pass config to rules
    • Detect undefined '#property' markers in tasks
      • basic detection and errors "#foo" '#bar'
        • agile check
          • bug: diagnostic column indication is wrong (seems to be always at 0)
            • reproduce in a test case (failing)
            • fix (make test pass) #OPT
        • language server
          • quickfix to add a respective toml entry
          • dynamically update the diagnostics, after e.g. quickfix was applied
    • "go to definition" to toml entry
      • go to def in lsp
      • Implement fuzzy matching to suggest close matches (typo detection)
      • Test with common typos: '#Feature', '#feat', etc.
    • Detect undefined "@user" and "@group" assignments
      • basic implementation
      • bug: ("@bob") ("#someundefproperty") asdf"#anotherundefprop" -> Done
      • Suggest close matches for misspelled names
    • [-] Update error formatter for new error codes
    • GoTo for "@assignments"
      • basic implementation @alice
      • BUG: go to definition does not work if the assignment or feature marker is not separated by whitespace e.g. some#feature hernameis@alice -- the used assumption is that there will always be whitespace is wrong
        • fix
        • refactor: The detection logic of markers and properties in files should be centralized to avoid bugs like above
  • #feature syntax highlighting for #OPT

  • #feature syntax highlighting for '#MILESTONES'

    • basic implementation
    • double check details of #MILESTONE handling. AI did something weird here. Handled it a bit like a normal property
      • '#Milestone' --> undef property. OK
      • #MILESTONE not a highlighted as keyword here
    • #MDAGILE double check #MDAGILE special marker handling - should this be highlighted as keyword here? No! config keys still to be implemented - re-visit later. N.B. MDAGILE tag currently never highlighted, but that's ok since keys are not implemented anyways
  • #feature: syntax highlighting for assignments: asdf@alice

  • syntax highlighting for '#properties'

#MILESTONE: Some milestone

  • Missing required subtasks Detect when a task has a property (e.g. '#feature') but lacks required subtasks

    • Match quoted subtasks in tasks against property definitions from mdagile.toml
    • Handle multiple properties on same task
    • Handle nested properties (e.g., '#feature' that includes '#review')
    • Provide helpful error with list of missing subtasks
    • Tests: single property, multiple properties, nested properties
  • E010 acceptance test End-to-end CLI test for E010 in tests/check.rs (spawns real binary with a temp project). All other rules (E001, E008…) already have coverage at this level; E010 needs the same.

    • missing required subtasks → exit 1 + E010 in stdout
    • all required subtasks present → exit 0
  • LSP quickfix for E010 (insert missing required subtasks) The IssueData::MissingRequiredSubtasks { missing } payload is already in place. The vision explicitly calls out autofix: "use the autofix feature of your text editor to quickly add the required subtasks."

    • Add lsp/quickfix/missing_required_subtasks.rs builder
    • Insert each missing quoted subtask as a new child line after the last existing child (or after the task line if no children)
    • Register in the REGISTRY in lsp/quickfix/mod.rs
    • Tests for the quickfix builder
  • Allow cancelling required subtasks (subtasks_allow_cancel) When a property defines subtasks_allow_cancel, individual required subtasks may be cancelled without error

    • Extend PropertyConfig with subtasks_allow_cancel: Vec<bool> (parallel to subtasks)
    • Parse subtasks_allow_cancel array from [Properties.X] in mdagile.toml
    • Update E010 rule: treat a cancelled required subtask as satisfied only if its allow_cancel flag is true, otherwise report error
    • Tests: cancel allowed, cancel not allowed, mixed array
  • Invalid order markers Detect duplicate order numbers, gaps, or malformed ordering syntax

    • Validate no duplicate ranks (e.g., two "2." markers)
    • Detect gaps in sequence (1, 3, skip 2)
    • Ensure ordering is only at same sibling level
    • Tests for various invalid orderings
  • Data integrity: Incomplete parent tasks warning Warn when a parent marked done [x] still has [ ] children

    • this is an error (exit 1)?
    • [-] #OPT Consider: add --strict flag to promote warnings to errors Note: everything is an error, no warnings for now

Events

  • Think about "events" as a separate /parallel concept to tasks. Use: Appear on the board as a sort of blocker, indicating that tasks are not worked on (because the people are "blocked")
    • formulate "vision"

Agile Fix

  • Apply existing quick fixes via agile fix on the command line

More CLI features

  • create a global overview of the planned CLI structure as some markdown file, with a tree-like view
    • list of subcommands and their functions
    • most important flags to each subcommand
    • let human review and adjust the overview
  • introduce a logging library for the CLI crate and replace raw eprintln! calls with structured log calls (uses tracing, controlled by AGILE_LOG)

LSP documentation

  • LSP Phase 3: IDE Integration
    • Document VS Code setup (.vscode/settings.json)
    • Document Vim/Neovim setup (init.lua example)
    • Add LSP section to README.md
    • Provide troubleshooting guide

More LSP features

  • LSP Phase 4: Enhanced Features (Optional)
    • textDocument/hover — show property definitions
      • properties: Add optional help texts / descriptions to properties that can be shown on hover
      • idem "@assignments" relevant, e.g. for groups
    • textDocument/completion — suggest properties, users, groups
    • File diagnostics on save with agile check --fix

GUI 2.0

  • find tasks by search string - list with done state, rank, full name
  • mark tasks done from CLI
    • tasks
      • by rank
      • directly by search term
    • subtasks
      • by rank (34.1.3 etc, where subtasks get a nested rank)
      • directly by search term

Writing back to file from GUI

  • Mark task as done from GUI