Documentation
¶
Index ¶
Constants ¶
const ( SeverityBlock = "BLOCK" SeverityWarn = "WARN" SeverityInfo = "INFO" )
Variables ¶
This section is empty.
Functions ¶
func WriteLockRoot ¶
WriteLockRoot replaces a lock through an already-opened filesystem root. documentDirectory is relative to root and never converted to an absolute path after the security boundary is established.
Types ¶
type DerivedStatus ¶
type DerivedStatus struct {
TasksTotal int
TasksDone int
TasksDoing int
Blocks int
ChangedPaths int
}
DerivedStatus is intentionally assembled from generated lock data and live repository state. It never trusts the hand-written task checkbox as status.
func DeriveStatusWithLock ¶
func DeriveStatusWithLock(directory string, document, content []byte) (DerivedStatus, error)
DeriveStatusWithLock derives status from bytes read through an already-opened root. It keeps CLI status free of absolute-path SDD reads after confinement.
type Document ¶
type Document struct {
FrontMatter map[string]string
Sections []Section
Requirements []Requirement
AllowedPaths []string
ForbiddenPaths []string
Raw []byte
}
Document is the structural view of one hand-authored sdd.md. It deliberately keeps prose as text; the linter, not the parser, decides whether prose is complete or normative.
type Finding ¶
type Finding struct {
Code string `json:"code"`
Severity string `json:"severity"`
Target string `json:"target"`
Message string `json:"message"`
}
func LintSDDContentWithLock ¶
LintSDDContentWithLock lints document and lock bytes that were obtained by one already-confined filesystem boundary. It deliberately never opens a path, so a caller cannot validate one lock and then follow a swapped symlink.
func LintSelectedSDDContentWithLock ¶
LintSelectedSDDContentWithLock lints an SDD explicitly selected by the caller. Unlike repository-wide lint, selection is an assertion that this SDD owns the working-tree change, so its write scope is checked even when the SDD document itself was committed before the implementation changes.
type Lock ¶
type Lock struct {
SDDID string `json:"sdd_id"`
ContentSHA256 string `json:"content_sha256"`
Requirements []LockedRequirement `json:"requirements"`
Tasks []LockedTask `json:"tasks"`
}