YakShave

NAME

YakShave - Parse and analyze yak shaving stories

SYNOPSIS

use YakShave;
my $story = q:to/END/;
  I want to deploy my app.
  But first I need to fix tests.
  Which requires updating the test framework.
  So now I'm reading about Jest internals.
  END
# Simple visualization
  say visualize-story($story);
# More control
  my $actions = parse-story($story, debug => True);
  say "Root task: ", $actions.root-task;
  say "Current task: ", $actions.current-task;
  say "All tasks: ", $actions.all-tasks;
  say $actions.visualize;

DESCRIPTION

YakShave is a module for parsing and analyzing "yak shaving" stories - narratives that describe how a simple task spirals into a series of dependent subtasks.

The module uses Raku's grammar system to transform natural language stories into structured dependency trees, helping visualize how far you've strayed from your original goal.

EXPORTED FUNCTIONS

sub parse-story(Str $story, Bool :$debug = False)

Parses a yak shaving story and returns the YakShave::Actions object that contains the parsed information and dependency tree.

sub visualize-story(Str $story, Bool :$debug = False)

Parses a story and returns a string visualization of the dependency tree.

COMPONENTS

EXAMPLES

Creating a custom visualization:

my $actions = parse-story($story);
  my $yakstack = $actions.yakstack;
for $yakstack.all-tasks -> $task {
    say "$task depends on: ", $yakstack.dependencies-of($task).join(", ");
  }

YakShave v0.0.1

Parse and analyze yak shaving stories

Authors

  • Danslav Slavenskoj

License

Artistic-2.0

Dependencies

Test Dependencies

Provides

  • YakShave
  • YakShave::Actions
  • YakShave::Grammar
  • YakShave::YakStack

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.