Documentation
¶
Index ¶
- Constants
- Variables
- func AttachDirRelPath(id string) (string, error)
- func CanonicalizeFrontmatter(fm map[string]any) []byte
- func ComputeSkillHash(fileContent []byte) string
- func DeriveBranchName(entryID, description string) string
- func FormatConfig(cfg Config) string
- func FormatFrontmatter(e *Entry) string
- func FormatSchemaMeta(m SchemaMeta) ([]byte, error)
- func FormatWIPMarker(m *WIPMarker) string
- func GenerateID(typ EntryType, layer Layer, suffix string) string
- func GenerateIDAt(typ EntryType, layer Layer, suffix string, t time.Time) string
- func GenerateWIPMarkerID(participant string) string
- func IDToRelPath(id string) (string, error)
- func IsDevVersion(v string) bool
- func IsValidKindForType(t EntryType, k Kind) bool
- func IsWIPDir(d fs.DirEntry) bool
- func RandomSuffix(n int) (string, error)
- func RelPathToID(rel string) (string, error)
- func RenderSkillFile(entry SkillBundleEntry, version, contentHash string) ([]byte, error)
- func ResolveAttachmentLinks(content, id string) string
- func RewriteID(id string, newType EntryType) (string, error)
- func SkillInstallDir(target AgentTarget, scope Scope, repoRoot, userHome string) (string, error)
- func ValidateEntry(e *Entry, g *Graph)
- func WIPDir(graphDir string) string
- func WIPMarkerPath(markerID string) string
- type AgentTarget
- type CompatibilityResult
- type Config
- type Entry
- type EntryType
- type Graph
- func (g *Graph) Activities() []*Entry
- func (g *Graph) Aspirations() []*Entry
- func (g *Graph) BuildShowTree(id string, maxDepth int, includeDownstream bool, ...) *ShowTree
- func (g *Graph) Contracts() []*Entry
- func (g *Graph) DerivedStatus(e *Entry) Status
- func (g *Graph) Directives() []*Entry
- func (g *Graph) Downstream(id string) []*Entry
- func (g *Graph) Filter(f GraphFilter) []*Entry
- func (g *Graph) GraphDir() string
- func (g *Graph) Lint() []*Entry
- func (g *Graph) OpenSignals() []*Entry
- func (g *Graph) Plans() []*Entry
- func (g *Graph) RecentDone(n int) []*Entry
- func (g *Graph) RecentInsights(n int) []*Entry
- func (g *Graph) RefChain(id string) []*Entry
- func (g *Graph) ResolveID(input string) (string, error)
- func (g *Graph) ResolveIDs(inputs []string) ([]string, error)
- func (g *Graph) SetGraphDir(dir string)
- func (g *Graph) TopologicalOrder() []*Entry
- type GraphFilter
- type IDParts
- type Kind
- type LLMConfig
- type Layer
- type SchemaMeta
- type Scope
- type ShowTree
- type ShowTreeItem
- type SkillBundle
- type SkillBundleEntry
- type SkillFile
- type SkillInstallStatus
- type Status
- type StatusKind
- type TruncatedRef
- type WIPMarker
- type Warning
Constants ¶
const ( // DefaultGraphDir is the conventional graph directory relative to repo root // when initialized with sdd init. DefaultGraphDir = ".sdd/graph" // SDDDirName is the metadata directory name at the repository root. SDDDirName = ".sdd" // DefaultLLMProvider is the provider used when none is configured. The // claude CLI bridge runs via the user's logged-in Claude Code session, so // no API key is required for first-run usage. DefaultLLMProvider = "claude-cli" // DefaultLLMModel is the claude model used when none is configured. DefaultLLMModel = "claude-haiku-4-5-20251001" // DefaultLLMConcurrency is the default worker count for concurrent // LLM calls (e.g. sdd summarize --all). DefaultLLMConcurrency = 4 )
const ( SkillStampVersion = "sdd-version" SkillStampHash = "sdd-content-hash" )
Stamp frontmatter keys injected into every installed skill file. Stripped before hashing so the stamps themselves don't pollute the content hash.
const CurrentGraphSchemaVersion = 1
CurrentGraphSchemaVersion is the schema version this binary knows how to read and write. Bumped only by an explicit schema migration.
const DefaultAgentTarget = AgentClaude
DefaultAgentTarget is the target used when nothing is specified. Only one agent is wired at MVP.
const DefaultScope = ScopeUser
DefaultScope is the scope used when nothing is specified.
const SchemaMetaFileName = "meta.json"
SchemaMetaFileName is the committed metadata file under .sdd/ that records graph schema version and the oldest binary permitted to write to the graph.
Variables ¶
var LayerAbbrev = map[Layer]string{ LayerStrategic: "stg", LayerConceptual: "cpt", LayerTactical: "tac", LayerOperational: "ops", LayerProcess: "prc", }
LayerAbbrev maps full layer names to abbreviations used in IDs.
var LayerFromAbbrev = map[string]Layer{ "stg": LayerStrategic, "cpt": LayerConceptual, "tac": LayerTactical, "ops": LayerOperational, "prc": LayerProcess, }
LayerFromAbbrev maps abbreviations to full layer names.
var TypeAbbrev = map[EntryType]string{ TypeSignal: "s", TypeDecision: "d", TypeAction: "a", }
TypeAbbrev maps full type names to abbreviations used in IDs.
var TypeFromAbbrev = map[string]EntryType{ "s": TypeSignal, "d": TypeDecision, "a": TypeAction, }
TypeFromAbbrev maps abbreviations to full type names.
Functions ¶
func AttachDirRelPath ¶
AttachDirRelPath returns the relative path to the attachment directory for an entry ID. This is the entry's file path without the .md extension.
func CanonicalizeFrontmatter ¶ added in v0.2.0
CanonicalizeFrontmatter returns a deterministic byte representation of fm suitable for hashing. The encoding is JSON with sorted keys; json.Marshal on map[string]any sorts keys alphabetically at every depth, giving a stable ordering across YAML read/write cycles that don't preserve order.
The output has no trailing newline. Callers embedding it in a larger hash stream must add their own separator.
func ComputeSkillHash ¶ added in v0.2.0
ComputeSkillHash returns the canonical content hash for a skill file. The hash is computed over the canonicalized frontmatter (with the sdd-version and sdd-content-hash keys stripped) concatenated with the body bytes. The result is a lowercase hex-encoded sha256 digest.
Embedded entries carry no stamps, so their hash equals a freshly-written file's computed hash — this is the equality that lets a previously-installed pristine file match its embedded source across version bumps.
func DeriveBranchName ¶
DeriveBranchName creates a branch name from an entry ID and description. Format: sdd/<entry-suffix>-<description-slug>
func FormatConfig ¶
FormatConfig returns a commented YAML config template with the given graph dir.
func FormatFrontmatter ¶
FormatFrontmatter creates the YAML frontmatter string for an entry.
func FormatSchemaMeta ¶ added in v0.2.0
func FormatSchemaMeta(m SchemaMeta) ([]byte, error)
FormatSchemaMeta returns a pretty-printed JSON representation with a trailing newline, suitable for writing to disk.
func FormatWIPMarker ¶
FormatWIPMarker creates the file content for a WIP marker.
func GenerateID ¶
GenerateID creates a new document ID with the current timestamp and a random suffix.
func GenerateIDAt ¶
GenerateIDAt creates a new document ID with the given timestamp and a random suffix. Accepts the time explicitly so callers can inject a clock for testability.
func GenerateWIPMarkerID ¶
GenerateWIPMarkerID creates a marker ID from the current timestamp and participant name.
func IDToRelPath ¶
IDToRelPath converts an entry ID to its relative file path in the hierarchical layout. ID format: YYYYMMDD-HHmmss-type-layer-suffix Path format: YYYY/MM/DD-HHmmss-type-layer-suffix.md
func IsDevVersion ¶ added in v0.2.0
IsDevVersion reports whether v is a non-release build. Dev builds (including the literal "dev", commit hashes, or any non-semver string) bypass write gates to avoid blocking local development against a released graph.
func IsValidKindForType ¶ added in v0.2.0
IsValidKindForType reports whether k is an allowed kind for the given type. Empty kind is allowed at this layer — defaults are applied separately during entry construction (see DefaultKindForType).
func RandomSuffix ¶
RandomSuffix returns an n-character lowercase alphanumeric string suitable for use as the trailing random portion of a document ID.
func RelPathToID ¶
RelPathToID converts a relative path (YYYY/MM/DD-HHmmss-type-layer-suffix.md) to a full entry ID.
func RenderSkillFile ¶ added in v0.2.0
func RenderSkillFile(entry SkillBundleEntry, version, contentHash string) ([]byte, error)
RenderSkillFile reassembles frontmatter and body into a skill file with the given install-time stamps injected. If the entry has no original frontmatter, a fresh block with just the stamps is written.
The returned bytes are what gets hashed by ComputeSkillHash once the stamps are stripped — callers writing new installations should compute the hash from the embedded entry content (which has no stamps) to populate the sdd-content-hash stamp itself.
func ResolveAttachmentLinks ¶
ResolveAttachmentLinks replaces {{attachments}} placeholders in content with the actual relative directory path for markdown links.
func RewriteID ¶ added in v0.2.0
RewriteID returns the id with its type abbreviation replaced by newType's abbreviation. Timestamp, layer, and suffix are preserved. Used by the sdd rewrite command when retyping a legacy action to signal+done, or any other mechanical type change.
func SkillInstallDir ¶ added in v0.2.0
func SkillInstallDir(target AgentTarget, scope Scope, repoRoot, userHome string) (string, error)
SkillInstallDir returns the absolute directory where skills install for a given agent target and scope.
Claude skills install at <home>/.claude/skills (user scope) or <repoRoot>/.claude/skills (project scope). The function errors if the required base path is empty for the chosen scope — callers should populate UserHome or RepoRoot before the query reaches the finder.
func ValidateEntry ¶
ValidateEntry checks a single entry for integrity issues and populates its Warnings field. Used both at lint time (all entries) and at write time (new entry before commit).
func WIPMarkerPath ¶
WIPMarkerPath returns the path to a marker file relative to the graph directory.
Types ¶
type AgentTarget ¶ added in v0.2.0
type AgentTarget string
AgentTarget identifies which agent a skill bundle installs for. Claude is the only supported target for MVP; the type exists so the install flow can grow additional agents (Codex, etc.) without structural change.
const ( // AgentClaude installs into Claude Code's skill directories // (~/.claude/skills or <repo>/.claude/skills). AgentClaude AgentTarget = "claude" )
type CompatibilityResult ¶ added in v0.2.0
type CompatibilityResult struct {
// Compatible is true when the binary may proceed. Dev builds are always
// compatible (see IsDevBuild).
Compatible bool
// IsDevBuild is true when the binary version is non-semver; both gates
// are bypassed.
IsDevBuild bool
// Reason is a human-readable explanation when !Compatible.
Reason string
}
CompatibilityResult reports whether a binary is permitted to write to a graph given its .sdd/meta.json contents.
func CheckCompatibility ¶ added in v0.2.0
func CheckCompatibility(meta SchemaMeta, binaryVersion string, binarySchemaVersion int) CompatibilityResult
CheckCompatibility evaluates meta against the binary's own version and declared schema version.
Dev builds (non-semver binary versions) are always compatible; both gates are bypassed so local development isn't blocked by a released graph's minimum_version or a bumped schema_version.
For released binaries: a schema_version mismatch errors with a pointer to sdd init / sdd migrate. A minimum_version higher than the binary errors with upgrade guidance. Either failure leaves Compatible = false.
type Config ¶
type Config struct {
GraphDir string `yaml:"graph_dir,omitempty"`
LLM LLMConfig `yaml:"llm,omitempty"`
}
Config represents the contents of .sdd/config.yaml (shared, committed) or .sdd/config.local.yaml (gitignored, per-machine). Both files unmarshal into the same struct; the local file overlays the shared file via MergeConfig. Empty / zero-valued fields in the local file mean "inherit from shared", so any subset of fields can appear in either file.
func MergeConfig ¶ added in v0.2.0
MergeConfig returns a new Config with fields from overlay overriding base wherever the overlay value is non-empty/non-zero. APIKeys are merged key-by-key so overlay entries replace individual providers without clobbering the full map. A nil overlay returns a copy of base.
func ParseConfig ¶
ParseConfig unmarshals YAML bytes into a Config struct. Empty input is valid and yields a zero-valued Config.
type Entry ¶
type Entry struct {
ID string
Type EntryType
Layer Layer
Kind Kind // only meaningful for decisions; empty = directive (default)
Refs []string
Supersedes []string
Closes []string
Participants []string
Confidence string
Content string
Time time.Time
Preflight string // "skipped" or "error" annotation from pre-flight validation
Attachments []string // filenames discovered from the co-located attachment directory
Summary string // LLM-generated summary: this entry + direct relationships
SummaryHash string // hex-encoded hash of the rendered summary prompt inputs
Warnings []Warning // validation issues found during graph construction
}
func ParseEntry ¶
ParseEntry parses a graph entry from its filename and file content.
func (*Entry) IsAspiration ¶ added in v0.2.0
IsAspiration returns true if this decision is a perpetual direction.
func (*Entry) IsContract ¶
IsContract returns true if this decision is a standing constraint.
func (*Entry) LayerLabel ¶
LayerLabel returns a display label for the layer.
func (*Entry) ShortContent ¶
ShortContent returns content truncated to maxLen, preferring sentence boundaries. Accumulates complete sentences up to the limit. If no sentence fits, accumulates words.
type Graph ¶
type Graph struct {
Entries []*Entry
ByID map[string]*Entry
RefsTo map[string][]string // reverse index: entry ID -> IDs that reference it
ClosedBy map[string][]string // reverse index: entry ID -> IDs that close it
SupersededBy map[string][]string // reverse index: entry ID -> IDs that supersede it
// contains filtered or unexported fields
}
Graph holds all entries and their reference indexes.
func (*Graph) Activities ¶ added in v0.2.0
Activities returns active activity decisions (not closed, not superseded). Activities are THAT-shaped commitments — capturing that specific work happens, independent of the directive-style choice of *what* to do.
func (*Graph) Aspirations ¶ added in v0.2.0
Aspirations returns active aspiration decisions (not superseded, not closed). Like contracts, aspirations are durable — they retire via supersede or close-by-directive with rationale (see dissolution/retirement calibration).
func (*Graph) BuildShowTree ¶
func (g *Graph) BuildShowTree(id string, maxDepth int, includeDownstream bool, rendered, primaries map[string]bool) *ShowTree
BuildShowTree constructs the upstream and optionally downstream traversal trees for a primary entry, respecting max depth, cross-group dedup (rendered), and future-primary dedup (primaries). Both directions use per-direction visited sets. The rendered map is updated with newly-shown entries.
func (*Graph) Contracts ¶
Contracts returns active contract decisions (not superseded, not closed). Contracts retire via a same-kind supersede or a directive-kind decision closing them with rationale (universal retirement rule).
func (*Graph) DerivedStatus ¶
DerivedStatus returns the computed lifecycle status for an entry, derived from graph relationships. Superseded is checked before closed so a superseded-then-closed entry (rare) surfaces as superseded. When multiple entries close or supersede the target, the first one (by graph insertion order) is reported.
func (*Graph) Directives ¶ added in v0.2.0
Directives returns active directive decisions (not closed, not superseded). Allow-list shape keeps future decision kinds from silently flooding this set — each kind gets surfaced deliberately with its own accessor.
func (*Graph) Downstream ¶
Downstream returns entries that reference, close, or supersede the given ID. Results are sorted by time (oldest first).
func (*Graph) Filter ¶
func (g *Graph) Filter(f GraphFilter) []*Entry
Filter returns entries matching the given filter criteria. Zero-value fields match all. Kind matches across both signal and decision kinds — the two sets are disjoint, so `Kind: KindGap` selects signals and `Kind: KindPlan` selects decisions without further narrowing.
func (*Graph) OpenSignals ¶
OpenSignals returns signals that are closure-gated attention items — gaps awaiting a decision/done and questions awaiting dissolution. Facts, insights, and done signals are deliberately excluded: facts and insights are stable observational records (retired via directive close, not resolved), and done signals are terminal facts of execution. The allow-list shape means new signal kinds default to "not an attention item" rather than silently flooding the open set.
func (*Graph) RecentDone ¶ added in v0.2.0
RecentDone returns the last n kind: done signals by timestamp — the activity stream of what was recently accomplished. Replaces the pre-two-type RecentActions; actions no longer exist in the two-type model.
func (*Graph) RecentInsights ¶ added in v0.2.0
RecentInsights returns the last n kind: insight signals by timestamp — observational records that inform current thinking. Insights have no closure gate (they're retired via directive-close, not resolved), so they surface as their own stream rather than mixing into the actionable Open Signals view.
func (*Graph) RefChain ¶
RefChain returns the entry and all entries it transitively references, in dependency order.
func (*Graph) ResolveID ¶
ResolveID resolves a user-supplied ID string (full or short form) to a full entry ID. Full IDs pass through unchanged. Short form {type}-{layer}-{suffix} is matched against entries; a unique match returns the full ID, ambiguous matches return an error listing all candidates (sorted). Inputs that do not recognize as either shape, that use unknown type or layer abbreviations, or that match zero entries pass through unchanged so the caller's existing "entry not found" surface fires against the user's original text.
func (*Graph) ResolveIDs ¶
ResolveIDs resolves a slice of user-supplied IDs. Ambiguous inputs stop resolution and return the error; other inputs pass through the same semantics as ResolveID.
func (*Graph) SetGraphDir ¶
SetGraphDir records the directory the graph was loaded from. Used by IO callers (e.g. sdd.LoadGraph) to attach provenance after constructing the in-memory graph.
func (*Graph) TopologicalOrder ¶
TopologicalOrder returns entries sorted so that every entry appears after all entries it references (refs, closes, supersedes). Entries with no references come first. This is a stable sort — entries at the same depth are ordered by time.
type GraphFilter ¶
type GraphFilter struct {
Type EntryType
Layer Layer
Kind Kind
MissingKind bool // when true, only include entries whose stored kind field is empty
OpenOnly bool // when true, exclude closed/superseded signals and decisions
}
GraphFilter specifies criteria for filtering graph entries.
type IDParts ¶
type IDParts struct {
Timestamp string
Time time.Time
TypeCode string // abbreviation: "s", "d", "a"
LayerCode string // abbreviation: "stg", "cpt", "tac", "ops", "prc"
Suffix string
}
IDParts holds the parsed components of a document ID.
type Kind ¶
type Kind string
Kind is a sub-type classifier carried on signals and decisions. Its allowed values depend on the entry's Type:
- Signal kinds: gap (default), fact, question, insight, done
- Decision kinds: directive (default), activity, plan, contract, aspiration
Empty Kind on a new entry is replaced by the type's default during capture.
const ( // Signal kinds. KindGap Kind = "gap" KindFact Kind = "fact" KindQuestion Kind = "question" KindInsight Kind = "insight" KindDone Kind = "done" // Decision kinds. KindDirective Kind = "directive" KindActivity Kind = "activity" KindPlan Kind = "plan" KindContract Kind = "contract" KindAspiration Kind = "aspiration" )
func DefaultKindForType ¶ added in v0.2.0
DefaultKindForType returns the kind applied when a new entry of type t is captured without an explicit --kind. Signals default to gap; decisions to directive. Other types have no default (empty).
type LLMConfig ¶ added in v0.2.0
type LLMConfig struct {
// Provider selects the runner implementation: "claude-cli" (default, uses
// the logged-in Claude Code session) or a gollm-supported provider name
// such as "anthropic", "openai", "ollama".
Provider string `yaml:"provider,omitempty"`
// Model is the provider-specific model identifier.
Model string `yaml:"model,omitempty"`
// Timeout is a Go duration string (e.g. "2m") applied per LLM call.
Timeout string `yaml:"timeout,omitempty"`
// Concurrency bounds the worker pool for batch operations. Zero means
// "use DefaultLLMConcurrency".
Concurrency int `yaml:"concurrency,omitempty"`
// OllamaEndpoint overrides the default Ollama URL for the gollm adapter.
OllamaEndpoint string `yaml:"ollama_endpoint,omitempty"`
// APIKeys maps provider name to API key. Typically lives in
// config.local.yaml so keys stay out of version control.
APIKeys map[string]string `yaml:"api_keys,omitempty"`
// RateLimitRPS caps remote-provider requests per second (0 = uncapped).
// The claude-cli and ollama providers ignore this.
RateLimitRPS float64 `yaml:"rate_limit_rps,omitempty"`
}
LLMConfig holds settings for LLM provider selection, model choice, and concurrency/rate-limit behavior. API keys and per-machine endpoints typically live in .sdd/config.local.yaml; defaults (provider, model, timeout, concurrency) are safe to commit in .sdd/config.yaml.
type SchemaMeta ¶ added in v0.2.0
type SchemaMeta struct {
GraphSchemaVersion int `json:"graph_schema_version"`
MinimumVersion *string `json:"minimum_version,omitempty"`
}
SchemaMeta is the decoded contents of .sdd/meta.json.
GraphSchemaVersion is required and advances through explicit migrations. MinimumVersion is written once at initial init (set to the binary's semver at creation time) and preserved thereafter; a nil pointer means the field is absent on disk.
func ParseSchemaMeta ¶ added in v0.2.0
func ParseSchemaMeta(data []byte) (*SchemaMeta, error)
ParseSchemaMeta decodes .sdd/meta.json bytes into a SchemaMeta.
type Scope ¶ added in v0.2.0
type Scope string
Scope selects where skills are installed for a given agent. User scope is shared across all projects for a given OS user; Project scope lives beside the repository.
type ShowTree ¶
type ShowTree struct {
Primary *Entry
Upstream []ShowTreeItem
Downstream []ShowTreeItem
}
ShowTree holds the upstream and downstream chains for a single primary entry.
type ShowTreeItem ¶
type ShowTreeItem struct {
Entry *Entry
Depth int
Relations []string // e.g. ["refs"], ["refs", "closes"], ["refd-by"]
ShownAbove bool // already rendered earlier — "(see above)" marker
ShownBelow bool // future primary — "(see below)" marker
SummaryOnly bool // true for depth > 0
Truncated []TruncatedRef // children hidden at max-depth boundary
}
ShowTreeItem represents an entry at a specific depth in a show tree. Depth 0 is the primary entry. Depth 1+ entries are summary-only.
type SkillBundle ¶ added in v0.2.0
type SkillBundle struct {
Target AgentTarget
Entries []SkillBundleEntry
}
SkillBundle is the set of files embedded in the binary for a single agent target.
type SkillBundleEntry ¶ added in v0.2.0
type SkillBundleEntry struct {
// Skill is the top-level skill directory (e.g. "sdd", "sdd-catchup").
Skill string
// RelPath is the path inside the skill directory (e.g. "SKILL.md",
// "references/framework-concepts.md"). Forward-slash separators.
RelPath string
// Content is the raw file bytes as embedded.
Content []byte
}
SkillBundleEntry is one file in the embedded skill bundle — the content as shipped inside the sdd binary, without install-time stamps.
type SkillFile ¶ added in v0.2.0
type SkillFile struct {
// AbsPath is the absolute path where the file lives on disk.
AbsPath string
// Content is the raw file bytes as read.
Content []byte
// StoredVersion is the value of the sdd-version frontmatter stamp, or
// empty if absent.
StoredVersion string
// StoredHash is the value of the sdd-content-hash frontmatter stamp, or
// empty if absent.
StoredHash string
}
SkillFile is a parsed on-disk skill file, carrying the install stamps read from its frontmatter plus the raw content needed to re-hash.
func ParseSkillFile ¶ added in v0.2.0
ParseSkillFile reads an on-disk skill file's raw bytes and extracts its install-time stamps.
type SkillInstallStatus ¶ added in v0.2.0
type SkillInstallStatus string
SkillInstallStatus describes the install state of a single skill file relative to the embedded bundle.
const ( // SkillStatusMissing means the file has no on-disk counterpart. SkillStatusMissing SkillInstallStatus = "missing" // SkillStatusCurrent means the on-disk file's stored hash matches the // embedded entry's hash and the user has not edited it. SkillStatusCurrent SkillInstallStatus = "current" // SkillStatusPristine means the on-disk file was produced by a previous // sdd init (user hasn't edited it) but its stored version differs from // the embedded bundle — safe to overwrite silently. SkillStatusPristine SkillInstallStatus = "pristine" // SkillStatusModified means the on-disk file's computed hash does not // match its stored hash — the user has edited it, overwrite requires // confirmation. SkillStatusModified SkillInstallStatus = "modified" )
func ComputeSkillStatus ¶ added in v0.2.0
func ComputeSkillStatus(embedded SkillBundleEntry, installed *SkillFile) SkillInstallStatus
ComputeSkillStatus classifies an installed file relative to its embedded counterpart. When installed is nil, the file is missing.
An unstamped installed file (empty StoredHash) is treated as Pristine when its content byte-matches the embedded entry — first-run adoption of a bundled skill shouldn't reflexively prompt the user about files they haven't touched. Unstamped files whose content doesn't match are Modified.
type Status ¶
type Status struct {
Kind StatusKind
By string
}
Status is the computed lifecycle status for an entry. By is populated only for compound states (ClosedBy, SupersededBy) and holds the full entry ID of the first closer/superseder.
type StatusKind ¶
type StatusKind string
StatusKind is the lifecycle state of an entry derived from graph relationships.
const ( StatusNone StatusKind = "" // actions — facts have no lifecycle state StatusActive StatusKind = "active" // decision (directive, plan, contract) not closed or superseded StatusOpen StatusKind = "open" // signal not closed or superseded StatusClosedBy StatusKind = "closed-by" // closed by another entry (By carries the full ID) StatusSupersededBy StatusKind = "superseded-by" // superseded by another entry )
type TruncatedRef ¶
TruncatedRef describes a child entry hidden at the max-depth boundary.
type WIPMarker ¶
type WIPMarker struct {
ID string // filename without .md: {YYYYMMDD}-{HHmmss}-{participant}
Entry string // graph entry ID being worked on
Participant string
Exclusive bool
Branch string // git branch name (empty if not a branched work stream)
Content string // free-text description
Time time.Time
}
WIPMarker represents an in-flight work marker.
func HasExclusiveMarker ¶
HasExclusiveMarker returns true if any marker for the given entry is exclusive.
func MarkersForEntry ¶
MarkersForEntry returns all markers that reference the given graph entry ID.
func ParseWIPMarker ¶
ParseWIPMarker parses a WIP marker from its filename and file content.
func (*WIPMarker) ShortContent ¶
ShortContent returns the first line of the marker content, truncated to maxLen.