provenance

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package provenance answers "why is this here?" for a file, directory or subsystem — the question humans constantly ask and agents are bad at. It is a deterministic query over what the engine already stores (git history, topology, objectives, doctrine) plus a test-file heuristic. No model.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Goal

type Goal struct {
	ID     string `json:"id"`
	Title  string `json:"title"`
	Status string `json:"status"`
}

Goal is an objective this target serves.

type Provenance

type Provenance struct {
	Target        string          `json:"target"`
	Subsystem     string          `json:"subsystem,omitempty"`
	Introduced    *gitlog.Commit  `json:"introduced,omitempty"`
	Evolved       []gitlog.Commit `json:"evolved"`
	Serves        []Goal          `json:"serves"`
	ConstrainedBy []string        `json:"constrained_by"`
	TestedBy      []string        `json:"tested_by"`
	DependsOn     []string        `json:"depends_on"`
	DependedBy    []string        `json:"depended_by"`
	Notes         []string        `json:"notes"`
}

Provenance is the structured "why" for a target.

func Why

func Why(ctx context.Context, st store.Store, root, target string) (Provenance, error)

Why builds the provenance for a target, which may be a path or a subsystem name/key.

Jump to

Keyboard shortcuts

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