Help us shape the future of Go! Take the 2026 Go Developer Survey

project

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package project auto-detects the pieces of work a life is organised around and assembles a dossier for each — its notes, the people involved, the files it touches, its goals, and recent progress — without the user filing anything.

Detection needs no manual step: the rollup pipeline already distils captured activity into project notes in the vault, and this package treats every such note as a project, then pulls together everything connected to it from the same index the rest of the system uses — the note graph, the memory store, and the raw event log. The result is the "what's going on with X" view a good chief-of-staff keeps in their head.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Age

func Age(ts int64) string

Age renders a timestamp as a human "how long ago", for the CLI.

"just now" used to cover the whole first hour, which is the one place in this product that granularity is not a detail: the line it produces is "Last checkpoint by claude, just now", and an agent reading that about a handoff fifty minutes and one context-switch old is being told something false about how current the plan is. `brain doctor` said "20 minutes ago" for the same checkpoint at the same moment, so the two disagreed in front of the user.

func AutoScope

func AutoScope(db *sql.DB) (int, error)

AutoScope tags each memory that names exactly one project with that project's slug, so project-scoped recall works without the user classifying anything. A memory naming several projects is left global (ambiguous ownership).

Types

type FileRef

type FileRef struct {
	Path   string `json:"path"`
	Count  int    `json:"count"`
	LastTS int64  `json:"last_ts"`
}

FileRef is a file the project has touched, aggregated from the event log.

type ProgressItem

type ProgressItem struct {
	TS   int64  `json:"ts"`
	Kind string `json:"kind"` // event | note | memory
	Text string `json:"text"`
}

ProgressItem is one recent sign of life on the project.

type Project

type Project struct {
	Slug       string          `json:"slug"`
	Name       string          `json:"name"`
	Aliases    []string        `json:"aliases,omitempty"`
	Notes      []Ref           `json:"notes"`
	People     []Ref           `json:"people"`
	Files      []FileRef       `json:"files"`
	Goals      []string        `json:"goals"`
	Progress   []ProgressItem  `json:"progress"`
	Memories   []memory.Memory `json:"memories"`
	Convos     int             `json:"conversations"` // learned-from conversations touching this project
	LastActive int64           `json:"last_active"`
}

Project is the assembled dossier.

func Detect

func Detect(db *sql.DB) ([]Project, error)

Detect returns every project with its dossier, most-recently-active first.

func Get

func Get(db *sql.DB, slug string) (Project, bool, error)

Get returns one project's dossier by slug (or trailing segment).

type Ref

type Ref struct {
	Slug  string `json:"slug"`
	Title string `json:"title"`
	Kind  string `json:"kind"`
}

Ref is a lightweight pointer to a note.

Jump to

Keyboard shortcuts

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