cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "0.2.0-dev"
	Commit    = ""
	BuildDate = ""
)

Version, Commit, and BuildDate describe the running binary. Release builds overwrite them with -ldflags -X; local builds keep the -dev default.

Functions

func AddChapter

func AddChapter(ctx context.Context, args []string, out io.Writer) error

func AddClaim added in v0.0.2

func AddClaim(_ context.Context, args []string, out io.Writer) error

AddClaim records one falsifiable assertion without changing coverage. The evidence is intentionally repeated here as an assertion boundary: query can then prove whether those exact atoms are current and already mapped to the claim's narrative target.

func AddDeck added in v0.1.0

func AddDeck(_ context.Context, args []string, out io.Writer) error

func AddFragment

func AddFragment(ctx context.Context, args []string, out io.Writer) error

func AddItem added in v0.1.0

func AddItem(_ context.Context, args []string, out io.Writer) error

func AddLandmark added in v0.0.2

func AddLandmark(_ context.Context, args []string, out io.Writer) error

AddLandmark creates an addressable place inside a fragment. Coverage can then target the returned path or URN with the ordinary cover command.

func AddSection

func AddSection(ctx context.Context, args []string, out io.Writer) error

func AddSlide added in v0.1.0

func AddSlide(_ context.Context, args []string, out io.Writer) error

func Citation added in v0.1.0

func Citation(ctx context.Context, args []string, out io.Writer) error

func Compare added in v0.0.6

func Compare(ctx context.Context, args []string, out io.Writer) error

Compare projects an incoming source comparison onto an existing Saga's evidence graph. Authored fragment bytes are never read for comparison.

func Cover

func Cover(ctx context.Context, args []string, out io.Writer) error

Cover attaches diff evidence to a narrative target. os.Stdin is bound here rather than read inside the command so tests drive --batch deterministically.

func Design added in v0.1.0

func Design(ctx context.Context, args []string, out io.Writer) error

Design dispatches the v3 technical-design authoring family. Each operation calls the same implementation used by root narrative authoring with a different physical hierarchy root.

func Init

func Init(ctx context.Context, args []string, out io.Writer) error

func InstallSkill

func InstallSkill(args []string, out io.Writer) error

InstallSkill prints an agent-agnostic bootstrap prompt. The active coding agent owns the platform-specific skill location and format; the saga binary supplies the behavior contract without mutating the user's repository.

func Plan added in v0.1.0

func Plan(ctx context.Context, args []string, out io.Writer) error

func PrintHelp

func PrintHelp(out io.Writer)

func Query

func Query(ctx context.Context, args []string, out io.Writer) error

Query executes one read-only application query and writes exactly one JSON value for every ordinary outcome, including help and invalid input. The returned StatusError only communicates the already-rendered exit status to the process entrypoint; callers must not print it.

func RebaseEvidence added in v0.1.0

func RebaseEvidence(ctx context.Context, args []string, out io.Writer) error

RebaseEvidence refreshes selector base identities only after the current comparison proves that its base-independent product identity is unchanged.

func Relation added in v0.1.0

func Relation(ctx context.Context, args []string, out io.Writer) error

func RemoveCoverage added in v0.0.4

func RemoveCoverage(ctx context.Context, args []string, out io.Writer) error

func ReplaceCoverage added in v0.0.4

func ReplaceCoverage(ctx context.Context, args []string, out io.Writer) error

func Reply

func Reply(_ context.Context, args []string, out io.Writer) error

func Review

func Review(_ context.Context, args []string, out io.Writer) error

func Serve

func Serve(ctx context.Context, args []string, out io.Writer, openByDefault ...bool) error

Serve runs the loopback reviewer. It is reached as both "serve" and "open": open launches a managed background reviewer and browser, while serve stays attached by default. The flag set is named after the command the user typed so its help describes that public behavior.

func SetFragmentContent added in v0.0.4

func SetFragmentContent(ctx context.Context, args []string, out io.Writer) error

SetFragmentContent replaces a fragment entrypoint without asking authors to depend on the on-disk package layout. stdin is bound at this boundary so the implementation remains deterministic in tests.

func SetSlideContent added in v0.1.0

func SetSlideContent(_ context.Context, args []string, out io.Writer) error

func Spec

func Spec(args []string, out io.Writer) error

func Status

func Status(ctx context.Context, args []string, out io.Writer) error

func Story added in v0.1.0

func Story(ctx context.Context, args []string, out io.Writer) error

func Thread

func Thread(_ context.Context, args []string, out io.Writer) error

func Upgrade added in v0.1.0

func Upgrade(_ context.Context, args []string, out io.Writer) error

func Validate

func Validate(_ context.Context, args []string, out io.Writer) error

func VerifyClaim added in v0.0.2

func VerifyClaim(_ context.Context, args []string, out io.Writer) error

VerifyClaim appends one independent result. It never edits the claim or an earlier verification, so disagreement and changing evidence remain visible in Git history and through the query API.

func VersionString

func VersionString() string

VersionString renders the version plus whatever build metadata was injected.

Types

type AnchorFix added in v0.0.2

type AnchorFix struct {
	Path    string `json:"path"`
	Line    int    `json:"line"`
	Heading string `json:"heading"`
	Anchor  string `json:"anchor"`
}

AnchorFix is one heading that --fix gave a stable anchor.

type StatusError

type StatusError struct{ Code int }

func (*StatusError) Error

func (e *StatusError) Error() string

Jump to

Keyboard shortcuts

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