omniworkboard

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 9 Imported by: 0

README

OmniWorkboard

Go CI Go Lint Go SAST Go Report Card Docs Docs Visualization License

Project management workboard for AI agents. Provides a kanban-style board with cards, columns, priorities, and dependencies.

Features

  • 📋 Kanban Columns: Backlog, Todo, In Progress, Review, Done
  • 🗂️ Card Management: Create, update, move, and delete task cards
  • 🎯 Priorities: Low, Normal, High, Critical
  • 🔗 Dependencies: Link cards with dependency tracking and cycle detection
  • Workflow Validation: Enforces valid column transitions
  • 🤖 Agent Tools: JSON-schema validated tools for AI agent integration
  • 💾 Persistence: Optional storage via omnistorage-core

Installation

go get github.com/plexusone/omniworkboard

Usage

Standalone Board
package main

import (
    "context"
    "fmt"

    "github.com/plexusone/omniworkboard"
)

func main() {
    ctx := context.Background()

    // Create a board
    board := omniworkboard.NewBoard(omniworkboard.BoardConfig{
        Name: "My Project",
    })

    // Create a card
    card, _ := board.CreateCard(ctx, "Implement feature", "Description here", omniworkboard.PriorityHigh)
    fmt.Printf("Created card: %s\n", card.ID)

    // Move through workflow
    board.MoveCard(ctx, card.ID, omniworkboard.ColumnTodo)
    board.MoveCard(ctx, card.ID, omniworkboard.ColumnInProgress)
    board.MoveCard(ctx, card.ID, omniworkboard.ColumnDone)

    // Get stats
    stats := board.Stats()
    fmt.Printf("Total cards: %d\n", stats.TotalCards)
}
As an OmniSkill
package main

import (
    "context"

    "github.com/plexusone/omniworkboard"
)

func main() {
    ctx := context.Background()

    // Create skill for agent runtime
    skill := omniworkboard.NewSkill()
    skill.Init(ctx)
    defer skill.Close()

    // Get available tools
    tools := skill.Tools()
    for _, tool := range tools {
        fmt.Printf("Tool: %s\n", tool.Name())
    }
}

Tools

The workboard exposes these tools for agent integration:

Tool Description
create_card Create a new task card
move_card Move a card to a different column
list_cards List cards with optional filters
update_card Update card details
add_dependency Add a dependency between cards
get_card Get details of a specific card
delete_card Delete a card from the board
board_stats Get workboard statistics

Columns

Cards flow through these columns:

Backlog -> Todo -> In Progress -> Review -> Done

Backward transitions are allowed for rework (e.g., Review -> In Progress).

Dependencies

Cards can depend on other cards. A card is blocked until all its dependencies are in the Done column.

// card2 depends on card1
board.AddDependency(ctx, card2.ID, card1.ID)

// card2 cannot move forward until card1 is done
_, err := board.MoveCard(ctx, card2.ID, omniworkboard.ColumnInProgress)
// err: card is blocked

Circular dependencies are detected and rejected.

License

MIT License - see LICENSE for details.

Documentation

Overview

Package omniworkboard provides project management workboard functionality.

Index

Constants

View Source
const (
	// SkillName is the name of the workboard skill.
	SkillName = "workboard"

	// StorageKeyBoard is the key for persisting the board.
	StorageKeyBoard = "workboard:board"
)

Variables

This section is empty.

Functions

func CanTransition

func CanTransition(from, to ColumnType) bool

CanTransition checks if a transition between columns is allowed.

func ColumnIndex

func ColumnIndex(col ColumnType) int

ColumnIndex returns the position of a column in the workflow.

Types

type Board

type Board struct {
	// ID is the unique identifier.
	ID string `json:"id"`

	// Name is the board name.
	Name string `json:"name"`

	// Description is an optional description.
	Description string `json:"description,omitempty"`

	// Columns is the ordered list of columns.
	Columns []ColumnType `json:"columns"`

	// Cards is the map of card ID to card.
	Cards map[string]*Card `json:"cards"`

	// CreatedAt is when the board was created.
	CreatedAt time.Time `json:"created_at"`

	// UpdatedAt is when the board was last updated.
	UpdatedAt time.Time `json:"updated_at"`
	// contains filtered or unexported fields
}

Board represents a workboard with columns and cards.

func NewBoard

func NewBoard(cfg BoardConfig) *Board

NewBoard creates a new workboard.

func (*Board) AddDependency

func (b *Board) AddDependency(ctx context.Context, cardID, dependsOnID string) error

AddDependency adds a dependency between cards.

func (*Board) CreateCard

func (b *Board) CreateCard(ctx context.Context, title, description string, priority Priority) (*Card, error)

CreateCard creates a new card on the board.

func (*Board) DeleteCard

func (b *Board) DeleteCard(ctx context.Context, id string) error

DeleteCard removes a card from the board.

func (*Board) GetCard

func (b *Board) GetCard(ctx context.Context, id string) (*Card, error)

GetCard retrieves a card by ID.

func (*Board) ListCards

func (b *Board) ListCards(ctx context.Context, filter CardFilter) ([]*Card, error)

ListCards returns cards matching the filter.

func (*Board) MoveCard

func (b *Board) MoveCard(ctx context.Context, id string, toColumn ColumnType) (*Card, error)

MoveCard moves a card to a different column.

func (*Board) RemoveDependency

func (b *Board) RemoveDependency(ctx context.Context, cardID, dependsOnID string) error

RemoveDependency removes a dependency between cards.

func (*Board) Stats

func (b *Board) Stats() BoardStats

Stats returns statistics about the board.

func (*Board) UpdateCard

func (b *Board) UpdateCard(ctx context.Context, id string, updates CardUpdate) (*Card, error)

UpdateCard updates a card's fields.

type BoardConfig

type BoardConfig struct {
	// Name is the board name.
	Name string

	// Description is an optional description.
	Description string

	// Columns is the ordered list of columns (defaults to DefaultColumns).
	Columns []ColumnType
}

BoardConfig configures a new board.

type BoardStats

type BoardStats struct {
	TotalCards   int
	ByColumn     map[ColumnType]int
	ByPriority   map[Priority]int
	BlockedCards int
}

BoardStats contains board statistics.

type Card

type Card struct {
	// ID is the unique identifier.
	ID string `json:"id"`

	// Title is the card title.
	Title string `json:"title"`

	// Description provides detailed information.
	Description string `json:"description,omitempty"`

	// Column is the current column the card is in.
	Column ColumnType `json:"column"`

	// Priority is the card priority.
	Priority Priority `json:"priority"`

	// DependsOn is a list of card IDs this card depends on.
	DependsOn []string `json:"depends_on,omitempty"`

	// BlockedBy is computed from DependsOn - cards that block this one.
	// This is populated by the board when querying.
	BlockedBy []string `json:"blocked_by,omitempty"`

	// Labels are tags for categorization.
	Labels []string `json:"labels,omitempty"`

	// Assignee is the person or agent assigned to this card.
	Assignee string `json:"assignee,omitempty"`

	// Metadata contains additional key-value data.
	Metadata map[string]any `json:"metadata,omitempty"`

	// CreatedAt is when the card was created.
	CreatedAt time.Time `json:"created_at"`

	// UpdatedAt is when the card was last updated.
	UpdatedAt time.Time `json:"updated_at"`

	// CompletedAt is when the card was moved to done.
	CompletedAt *time.Time `json:"completed_at,omitempty"`
}

Card represents a task card on the workboard.

func (*Card) AddDependency

func (c *Card) AddDependency(cardID string)

AddDependency adds a dependency on another card.

func (*Card) AddLabel

func (c *Card) AddLabel(label string)

AddLabel adds a label if not already present.

func (*Card) HasLabel

func (c *Card) HasLabel(label string) bool

HasLabel returns true if the card has the given label.

func (*Card) IsBlocked

func (c *Card) IsBlocked() bool

IsBlocked returns true if the card has unfinished dependencies.

func (*Card) RemoveDependency

func (c *Card) RemoveDependency(cardID string)

RemoveDependency removes a dependency.

func (*Card) RemoveLabel

func (c *Card) RemoveLabel(label string)

RemoveLabel removes a label if present.

type CardFilter

type CardFilter struct {
	// Columns filters by column (any of these).
	Columns []ColumnType

	// Priorities filters by priority (any of these).
	Priorities []Priority

	// Labels filters by labels (all must match).
	Labels []string

	// Assignee filters by assignee.
	Assignee string

	// IncludeBlocked includes blocked cards (default true).
	IncludeBlocked *bool
}

CardFilter specifies criteria for listing cards.

type CardUpdate

type CardUpdate struct {
	Title       *string
	Description *string
	Priority    *Priority
	Assignee    *string
	Labels      []string
	Metadata    map[string]any
}

CardUpdate contains optional fields for updating a card.

type ColumnType

type ColumnType string

ColumnType represents the type of column on a workboard.

const (
	// ColumnBacklog is for items not yet planned.
	ColumnBacklog ColumnType = "backlog"

	// ColumnTodo is for planned items ready to start.
	ColumnTodo ColumnType = "todo"

	// ColumnInProgress is for items currently being worked on.
	ColumnInProgress ColumnType = "in_progress"

	// ColumnReview is for items awaiting review.
	ColumnReview ColumnType = "review"

	// ColumnDone is for completed items.
	ColumnDone ColumnType = "done"
)

func DefaultColumns

func DefaultColumns() []ColumnType

DefaultColumns returns the default set of columns in order.

func ParseColumnType

func ParseColumnType(s string) ColumnType

ParseColumnType parses a string into a ColumnType.

func (ColumnType) IsActive

func (c ColumnType) IsActive() bool

IsActive returns true if the column represents active work.

func (ColumnType) IsDone

func (c ColumnType) IsDone() bool

IsDone returns true if the column represents completion.

func (ColumnType) IsValid

func (c ColumnType) IsValid() bool

IsValid returns true if the column type is valid.

func (ColumnType) String

func (c ColumnType) String() string

String returns the string representation.

type Priority

type Priority int

Priority represents the priority level of a card.

const (
	// PriorityLow is for non-urgent tasks.
	PriorityLow Priority = iota
	// PriorityNormal is the default priority.
	PriorityNormal
	// PriorityHigh is for urgent tasks.
	PriorityHigh
	// PriorityCritical is for blocking or time-sensitive tasks.
	PriorityCritical
)

func ParsePriority

func ParsePriority(s string) Priority

ParsePriority parses a string into a Priority.

func (Priority) String

func (p Priority) String() string

String returns the string representation of the priority.

type Skill

type Skill struct {
	// contains filtered or unexported fields
}

Skill implements compiled.Skill for the workboard.

func NewSkill

func NewSkill() *Skill

NewSkill creates a new workboard skill.

func NewSkillWithBoard

func NewSkillWithBoard(board *Board) *Skill

NewSkillWithBoard creates a new workboard skill with an existing board.

func (*Skill) Board

func (s *Skill) Board() *Board

Board returns the current board.

func (*Skill) Close

func (s *Skill) Close() error

Close implements compiled.Skill.

func (*Skill) Description

func (s *Skill) Description() string

Description implements compiled.Skill.

func (*Skill) Init

func (s *Skill) Init(ctx context.Context) error

Init implements compiled.Skill.

func (*Skill) Name

func (s *Skill) Name() string

Name implements compiled.Skill.

func (*Skill) SetStorage

func (s *Skill) SetStorage(store kvs.Store)

SetStorage implements compiled.StorageAware.

func (*Skill) Tools

func (s *Skill) Tools() []skill.Tool

Tools implements compiled.Skill.

type Tool

type Tool struct {
	// Name is the tool name.
	Name string `json:"name"`

	// Description describes what the tool does.
	Description string `json:"description"`

	// InputSchema is the JSON schema for the tool's input.
	InputSchema map[string]any `json:"input_schema"`
}

Tool represents a tool that can be invoked by an agent.

type ToolHandler

type ToolHandler func(ctx context.Context, input json.RawMessage) (any, error)

ToolHandler handles tool invocations.

type WorkboardTools

type WorkboardTools struct {
	// contains filtered or unexported fields
}

WorkboardTools provides tools for interacting with a workboard.

func NewWorkboardTools

func NewWorkboardTools(board *Board) *WorkboardTools

NewWorkboardTools creates tools for the given board.

func (*WorkboardTools) Invoke

func (wt *WorkboardTools) Invoke(ctx context.Context, name string, input json.RawMessage) (any, error)

Invoke calls a tool with the given input.

func (*WorkboardTools) Tools

func (wt *WorkboardTools) Tools() []Tool

Tools returns the list of available tools.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL