dna

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package dna generates Project DNA — a structured summary of a project's key decisions, patterns, tech stack, and gotchas extracted from observations.

The DNA is auto-generated from high-importance observations and persisted as an observation with topic_key "project-dna/{project}".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EdgeCounter

type EdgeCounter interface {
	CountEdgesByObservation(ctx context.Context, obsID int64) (int, error)
}

EdgeCounter counts graph edges.

type ObservationLister

type ObservationLister interface {
	List(ctx context.Context, filter domain.ObservationFilter) ([]*domain.Observation, error)
}

ObservationLister lists observations with filters.

type ScoreProvider

type ScoreProvider interface {
	GetScore(ctx context.Context, obsID int64) (*domain.ImportanceScore, error)
}

ScoreProvider retrieves importance scores.

type Service

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

Service generates Project DNA from observations.

func NewService

func NewService(obs ObservationLister, scoring ScoreProvider, edges EdgeCounter) *Service

NewService creates a new DNA service.

func (*Service) Generate

func (s *Service) Generate(ctx context.Context, project string) (string, error)

Generate creates a Project DNA markdown summary for the given project.

Jump to

Keyboard shortcuts

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