GoalBuddy

repository·main·Indexed 21 days ago

https://github.com/tolibear/goalbuddy

A local goal-management system for AI coding agents like Codex and Claude Code. It provides a structured workspace consisting of charters, boards, notes, and receipts stored within a repository to maintain orientation during long-running tasks. Features include a local web-based Goal Board with live updates via SSE, cross-harness support for seamless handoffs between agents, and a machine-readable YAML format (state.yaml) for tracking task status, objectives, and verification.

Tokens
21.7K
Snippets
66
Records
98
Agent score
71%

What's inside goalbuddy

  1. Understand the GoalBuddy Receipt and Task-Card Format (v1)

    main

    GoalBuddy uses a machine-readable YAML format to record delegated agent work. This format is harness-neutral (works with Codex, Claude Code, etc.) and is stored directly in your repository.

    A goal is organized within a directory docs/goals/<slug>/ containing:

    • goal.md: The human-readable charter (outcome, oracle, constraints).
    • state.yaml: The authoritative machine truth (the board).
    • notes/: Long-form receipts that don't fit on a task card.

    Note: state.yaml is the source of truth. If other artifacts disagree, state.yaml wins for task status, active tasks, receipts, and completion truth.

  2. Understand Local Goal Board mapping and live updates

    main

    Live Updates

    The server automatically pushes fresh payloads to the browser over /events when any of the following files change:

    • docs/goals/<slug>/state.yaml
    • docs/goals/<slug>/notes/
    • Linked sub-goal state: docs/goals/<slug>/subgoals/**/state.yaml
    • Linked sub-goal notes: docs/goals/<slug>/subgoals/**/notes/

    Board Mapping

    Tasks are categorized into columns based on their status:

    • Todo: queued tasks
    • In Progress: active tasks
    • Blocked: blocked tasks
    • Completed: done tasks (right-most column)

    Card Details

    Clicking a card opens a modal containing:

    • Task objective, status, assignee, inputs, constraints, expected output, verify commands, allowed files, stop conditions, and receipt details.
    • Sub-goals: If the task links a sub-goal, a read-only child board is displayed.
    • Notes: If a receipt points to a note, the content is rendered as plain text.
  3. Understand Local Goal Board mapping and UI

    main

    The Local Goal Board maps task statuses from your files to visual columns:

    • queued tasks $\rightarrow$ Todo
    • active tasks $\rightarrow$ In Progress
    • blocked tasks $\rightarrow$ Blocked
    • done tasks $\rightarrow$ Completed (right-most column)

    Card Details: Clicking a card opens a detail modal containing:

    • Task objective, status, assignee, inputs, constraints, expected output, verify commands, allowed files, stop conditions, and receipt details.
    • Sub-goals: If the task links a sub-goal, the modal displays a read-only child board.
    • Notes: If a receipt points to a note, the note content is displayed as plain text.
  4. How the Guided Intake Surface works for vague goals

    main

    When you provide vague, strategic, or improvement-oriented input, $goal-prep triggers a diagnostic intake instead of immediately creating a board. This process asks questions one at a time to resolve ambiguity.

    The Diagnostic Ladder:

    1. Goal surface: Decides whether to use a local GoalBuddy board.
    2. Intent target: Identifies the primary improvement or outcome.
    3. Success proof: Determines what evidence proves the goal was met.
    4. Scope and non-goals: Defines what is explicitly out of scope.
    5. Goal handling: Decides whether to reuse, create, or inspect an existing goal.

    Interaction Pattern: The skill will present a single interpreted outcome, a potential blind spot, and one material question. It will then offer recommended directions. It stops after each question and will not create files or run /goal until the intake is complete.

    I read this as: [one-sentence interpreted outcome].
    
    One possible blind spot: [a risk, unstated choice, or success dimension the user may not have named].
    
    [One material question?]
    
    1. [Recommended direction] (Recommended) - [when it wins]
    2. [Second direction] - [when it wins]
    3. [Third direction, only if genuinely useful] - [when it wins]
    
    My default would be [option] because [short reason].
  5. Apply the Slice Sizing Policy for tasks

    main

    When defining tasks for a Worker, follow the Slice Sizing Policy. The goal is to create the largest safe useful slice, not the smallest possible task.

    What is a good Worker task?

    • A working screen or API path.
    • A working data pipeline step.
    • A working backend vertical slice.
    • A real bug fix.
    • A milestone review.

    What is a bad Worker task?

    • Tiny helpers, projection functions, or contract files (unless they are strictly blocking).
    • Read-only proofs or doc notes.
    • Tasks that only add wrappers/contracts without changing behavior.

    Safety Definition: 'Safe' does not mean 'small'. A safe task is one that is bounded, explicit, verified, and reversible.

  6. Understand Scout, Worker, and Judge Agent Roles

    main

    GoalBuddy utilizes three specific agent types to execute tasks. The assignee field in a task card determines which agent is used. The task card acts as the order, and the receipt serves as the return format.

    AgentThinking levelWrite accessUse for
    Scoutlownotargeted source/spec/repo evidence mapping
    Workermediumyes, boundedone coherent bounded useful slice
    Judgehighnophase/risk/final review, ambiguity, scope, completion skepticism
  7. Understand the sub-goal lifecycle and authority

    main

    The sub-goal model follows a strict hierarchy to prevent uncontrolled recursion:

    1. Discovery: An agent identifies a bounded uncertainty loop in an active task.
    2. Proposal: The agent returns a receipt containing proposed_subgoals.
    3. Gating: The PM evaluates the proposal against scope, files, and depth.
    4. Activation: If accepted, the PM creates the child board in the subgoals/ directory and links it in the parent task.
    5. Execution: The child board operates as a standard GoalBuddy board within its approved envelope.
    6. Roll-up: When child work is finished, the PM writes a parent roll-up receipt.

    Critical Rule on Completion: A child board cannot mark its parent task as done. Completion of a parent task requires a valid parent receipt, regardless of the child's status.

  8. Understand the Four Primitives of GoalBuddy

    main

    GoalBuddy operates using four core abstractions:

    1. Charter (goal.md): Defines what the current tranche is trying to accomplish and the relevant constraints.
    2. Board (state.yaml): The rolling task list and the single source of machine truth.
    3. Task: The unit of work. Exactly one active task may be worked on at a time.
    4. Receipt: A compact, durable result left on a task card when a task is completed, blocked, or escalated.

    Note: Agents (Scout, Judge, Worker, PM) are not primitives; they are the assignee type assigned to a Task.

  9. Propose sub-goals via agent receipts

    main

    Agent roles (Scout, Judge, Worker) can suggest new sub-goals by including a proposed_subgoals list within a task's receipt.

    Important: Proposals are advisory only. They do not automatically create a subgoal block in the parent task or change the execution state. The Project Manager (PM) must manually review the proposal and decide whether to:

    1. Reject it.
    2. Convert it into normal parent tasks.
    3. Promote it by creating the child state.yaml file and adding the subgoal block to the parent task.
    receipt:
      result: done
      summary: "The implementation split exposes a separate board-rendering loop."
      proposed_subgoals:
        - title: "Build sub-goal board rendering"
          reason: "Parser, modal rendering, and tests form a bounded loop."
          suggested_owner: Worker
          suggested_path: subgoals/T004-board-view/state.yaml
          scope:
            allowed_files:
              - extend/local-goal-board/scripts/lib/goal-board.mjs
              - extend/local-goal-board/test/local-goal-board.test.mjs
            verify:
              - node --test extend/local-goal-board/test/*.test.mjs
            stop_if:
              - "Need broader state-schema changes."
  10. Understand the Diagnostic Intake process

    main

    When a goal is vague, strategic, or improvement-oriented, $goal-prep uses a Diagnostic Intake to prevent creating poorly defined boards. The tool follows a 'minimum diagnostic ladder' to gather material answers:

    1. Goal surface: Determining if a local GoalBuddy board should be used.
    2. Intent target: Identifying the specific type of improvement or outcome desired.
    3. Success proof: Defining what evidence would convince the user the goal was met.
    4. Scope and non-goals: Defining what should remain untouched or be explicitly out of scope.
    5. Goal handling: Deciding whether to reuse, create, or inspect an existing goal.

    Interaction Pattern: The tool asks these questions one at a time. It will not create files, repair boards, or print the /goal command until the intake is complete. It presents a structured response for each turn:

    I read this as: [one-sentence interpreted outcome].
    
    One possible blind spot: [a risk, unstated choice, or success dimension].
    
    [One material question?]
    
    1. [Recommended direction] (Recommended) - [when it wins]
    2. [Second direction] - [when it wins]
    3. [Third direction] - [when it wins]
    
    My default would be [option] because [short reason].
  11. Follow the Continuation Rule for task transitions

    main

    To maintain momentum, follow these rules for task completion and activation:

    1. Immediate Transition: After a task completes, write its receipt and immediately select the next active task unless a final audit proves the original outcome is complete.
    2. Avoid Premature Stopping: Do not stop at "ready for implementation" if a safe Worker task exists. Do not stop after one verified package if broader follow-up work is available.
    3. Judge Task Usage: Do not create a Judge task after every Worker by default. Use Judge only for phase boundaries, high-risk changes, unclear scope, rejected verification, or final completion.
    4. Handling Blockers: If a slice needs user input or credentials, mark it blocked, spawn the smallest safe local task that can proceed, and continue.
    5. Completion Integrity: Do not mark a goal or tranche done while queued or active Worker tasks are still required for the user's outcome. Never end a session with an active task marked done.
  12. Identify Scout, Worker, and Judge Agent Roles

    main

    GoalBuddy utilizes three specialized agent types to execute tasks. The assignee field in a task card determines which agent is used. The task card acts as the order, and the receipt acts as the return format.

    AgentThinking levelWrite accessUse for
    Scoutlownotargeted source/spec/repo evidence mapping
    Workermediumyes, boundedone coherent bounded useful slice
    Judgehighnophase/risk/final review, ambiguity, scope, completion skepticism