roleperf

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package roleperf tracks how each specialist role performs, so the system can tell which of them is delivering.

A team that never notices which member does good work cannot improve. Every delegated task is a small trial: did the specialist finish cleanly, did it take forever, was its work kept or thrown away. Recording that gives a score that means something — not a vanity metric, but a signal the coordinator can weigh when it decides who to hand the next piece of work to.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Outcome

type Outcome struct {
	Role    string
	Success bool
	// Kept marks that the work was worth keeping.
	Kept  bool
	Turns int
}

Outcome is what a mission produced.

type Stats

type Stats struct {
	Role string `json:"role"`
	// Missions is how many tasks were delegated to this role.
	Missions int `json:"missions"`
	// Successes are the ones that finished cleanly.
	Successes int `json:"successes"`
	// Failures are the ones that errored or produced nothing.
	Failures int `json:"failures"`
	// Kept counts missions whose work was kept (a dirty worktree left for
	// review, a finding recorded) rather than discarded.
	Kept int `json:"kept"`
	// TotalTurns is the sum of turns across missions, for an efficiency measure.
	TotalTurns int `json:"total_turns"`
	// Score is the computed 0–100 rating, refreshed on every record.
	Score     float64   `json:"score"`
	UpdatedAt time.Time `json:"updated_at"`
}

Stats are one role's running record.

type Tracker

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

Tracker holds every role's stats, persisted to one JSON file.

func NewTracker

func NewTracker(path string) *Tracker

NewTracker loads or starts a tracker at path.

func (*Tracker) Get

func (t *Tracker) Get(role string) (Stats, bool)

Get returns one role's stats.

func (*Tracker) List

func (t *Tracker) List() []Stats

List returns every role's stats, best score first.

func (*Tracker) Record

func (t *Tracker) Record(o Outcome) float64

Record folds a mission outcome into a role's stats and returns the fresh score.

Jump to

Keyboard shortcuts

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