sdlc

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package sdlc provides SDLC phase awareness and quality mode profiles. This file contains the Manager — the stateful component that persists phase and quality mode to brain.sqlite via the store.

Package sdlc provides SDLC phase awareness and quality mode profiles for the synapses-intelligence Context Packet builder.

This file contains only static lookup tables — pure functions with no side effects, no SQLite, no LLM, no external imports. Phase and mode values are plain strings that match the SDLCPhase / QualityMode constants defined in pkg/brain.

Index

Constants

View Source
const (
	PhasePlanning    = "planning"
	PhaseDevelopment = "development"
	PhaseTesting     = "testing"
	PhaseReview      = "review"
	PhaseDeployment  = "deployment"
)

Phase constants — string values mirror brain.SDLCPhase constants.

View Source
const (
	ModeQuick      = "quick"
	ModeStandard   = "standard"
	ModeEnterprise = "enterprise"
)

Mode constants — string values mirror brain.QualityMode constants.

Variables

This section is empty.

Functions

func PhaseGuidance

func PhaseGuidance(phase, mode string) string

PhaseGuidance returns a plain-English guidance string for an agent in the given phase. These strings are injected directly into the ContextPacket — no LLM call needed.

Types

type Gate

type Gate struct {
	RequireTests   bool
	RequireDocs    bool
	RequirePRCheck bool
	Checklist      []string
}

Gate is the SDLC-internal quality gate representation. pkg/brain converts this to brain.QualityGate for the public API.

func GateForMode

func GateForMode(mode, phase string) Gate

GateForMode returns the quality Gate requirements for a mode+phase combination. The gate is only meaningful in development, testing, and review phases.

type Manager

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

Manager reads and writes the project SDLC state in brain.sqlite. There is exactly one row in sdlc_config per project database (id='default'). All values are plain strings; pkg/brain converts them to typed SDLCPhase/QualityMode.

func NewManager

func NewManager(s *store.Store) *Manager

NewManager creates a Manager backed by the given store.

func (*Manager) GetConfig

func (m *Manager) GetConfig() store.SDLCConfigRow

GetConfig returns the current project SDLC config as a store row. Falls back to {phase: development, mode: standard} if no row exists.

func (*Manager) ResolveMode

func (m *Manager) ResolveMode(override string) string

ResolveMode returns the effective quality mode: uses override if non-empty and valid, otherwise falls back to the stored project mode.

func (*Manager) ResolvePhase

func (m *Manager) ResolvePhase(override string) string

ResolvePhase returns the effective phase: uses override if non-empty and valid, otherwise falls back to the stored project phase.

func (*Manager) SetPhase

func (m *Manager) SetPhase(phase, agentID string) error

SetPhase updates the current project SDLC phase. Returns an error if phase is not one of the five valid phases.

func (*Manager) SetQualityMode

func (m *Manager) SetQualityMode(mode, agentID string) error

SetQualityMode updates the current project quality mode. Returns an error if mode is not one of quick / standard / enterprise.

type SectionFlags

type SectionFlags struct {
	RootSummary         bool
	DependencySummaries bool
	LLMInsight          bool
	ActiveConstraints   bool
	TeamStatus          bool
	QualityGate         bool
	PatternHints        bool
	PhaseGuidance       bool
}

SectionFlags controls which ContextPacket sections are assembled for a given phase. Sections disabled by phase are simply omitted from the packet (zero-value).

func SectionsForPhase

func SectionsForPhase(phase string) SectionFlags

SectionsForPhase returns the active section flags for a given SDLC phase string. The matrix encodes what context is relevant for each phase:

Section         | planning | development | testing | review | deployment
RootSummary     |    ✓     |      ✓      |    ✓    |   ✓    |     ✓
DepSummaries    |    ✓     |      ✓      |    —    |   ✓    |     —
LLMInsight      |    ✓     |      ✓      |    —    |   ✓    |     —
Constraints     |    —     |      ✓      |    ✓    |   ✓    |     —
TeamStatus      |    ✓     |      ✓      |    ✓    |   ✓    |     ✓
QualityGate     |    —     |      ✓      |    ✓    |   ✓    |     —
PatternHints    |    —     |      ✓      |    —    |   ✓    |     —
PhaseGuidance   |    ✓     |      ✓      |    ✓    |   ✓    |     ✓

Jump to

Keyboard shortcuts

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