Documentation
¶
Overview ¶
Package facts merges the declared project.md layers with detection and the contract's defaults. Only facts with a fixed vocabulary become structure, so the binary is incomplete but never wrong; scaffold.go writes the prose here too, so its words cannot drift from the readers' vocabulary.
Index ¶
- Constants
- Variables
- func BuiltinPaces() map[string]Pace
- func CheckAgentKey(key string, steps []string) error
- func CheckCeiling(c Ceiling) []string
- func CheckPace(name string, p Pace) []string
- func FlowSteps[F ~[]string](flows map[string]F) []string
- func ParseBundleMaxLines(value string) (int, error)
- func ParseDriverTimeout(value string) (time.Duration, error)
- func ParseStaleAfter(value string) (time.Duration, error)
- func ProjectPrefix(name string) string
- func ReadUserFile(dir, file string, cfg any) (string, bool, error)
- func ScopeVerify(cmds []VerifyDecl, changed []string) ([]VerifyPick, []VerifyDecl)
- type By
- type Ceiling
- type Declared
- type Dial
- type Dials
- type Draft
- type Effective
- type Fact
- type Field
- type Flow
- type Labels
- type Mark
- type Origin
- type OriginKind
- type Pace
- type PaceSet
- func (s *PaceSet) Capped(name string) (Pace, map[string]Dial)
- func (s *PaceSet) CeilingOrigin(key string) string
- func (s *PaceSet) Exempt(name string) bool
- func (s *PaceSet) Lookup(name string) (Pace, error)
- func (s *PaceSet) Names() []string
- func (s *PaceSet) Over(paces map[string]Pace, origin func(name, key string) Origin)
- func (s *PaceSet) PaceProblems(flows map[string]flow.Flow) []string
- func (s *PaceSet) ResolveFlow(flowName string, declared flow.Flow, pace string) (Resolved, error)
- type Problem
- type Resolved
- type ResolvedEntry
- type Review
- type ReviewDecl
- type StaleAfter
- type StandupDecl
- type TrackerDecl
- type TrackerKind
- type VerifyDecl
- type VerifyPick
Constants ¶
const ( ReviewerBot = "bot" ReviewerHuman = "human" ReviewerCheck = "check" ArrivesComment = "issue comment" ArrivesInline = "inline review" ArrivesCheck = "check run" TriggerAutomatic = "automatic" TriggerManual = "manual" DonePosted = "posted" DoneMarker = "marker" DoneSubmitted = "submitted" DoneConcluded = "concluded" HandledReaction = "reaction" HandledMarker = "marker" HandledCheckbox = "checkbox" HandledThread = "thread resolved" )
The vocabularies, as the words the parser looks for.
const ( ManualComment = "comment" ManualRequest = "request" )
The manual triggers `f10 review trigger` can perform: a comment on the request, or a review requested from a login.
const ( UserAgentsFile = "agents.md" // the user's default agent profiles; f10 only reads it UserPacesFile = "paces.md" // the user's paces and default pace; f10 only reads it )
The user's own files are the first layer under every project's, so a key a project sets wins over the user's, and the user's over the built-ins.
const AgentKeyDefault = "default"
AgentKeyDefault is the key the task's agent runs on.
const DefaultBundleMaxLines = 300
DefaultBundleMaxLines caps a proposed bundle: review quality falls as a diff grows, and a bad rider holds the whole PR.
const DefaultFlow = "plan implement pr finish"
DefaultFlow is the flow a project that declares none runs.
const DefaultPaceName = "medium"
DefaultPaceName is the pace an unnamed run takes when no layer names one.
Variables ¶
var PaceOriginBuiltin = OriginOf(OriginBuiltin)
PaceOriginBuiltin is the origin of a dial f10 ships.
var SpawnerReach = map[string]string{
"review": "the blind reviewer, a subagent",
"judge": "the blind judge (judge --blind), a subagent",
"cleanup": "the rules check, a subagent",
"audit": "the audit's reviewers, subagents",
}
SpawnerReach is what each step that spawns a subagent on its own key runs there. Each also runs as a skill outside any flow, so its key needs no flow entry.
var SpawningSteps = slices.Sorted(maps.Keys(SpawnerReach))
SpawningSteps are SpawnerReach's steps, sorted.
var StatusMoments = []string{"started", "shipped"}
StatusMoments are the moments tracker.status may name.
var TaskKinds = []string{"feature", "bug", "refactor", "spike"}
TaskKinds are the kinds a step key may be scoped by: `plan.bug` sets the plan step's profile for a bug. The words are the plan's Kind line.
var TrackerKinds = []TrackerKind{TrackerGitHub, TrackerGitLab, TrackerNotion, TrackerJira}
TrackerKinds lists the kinds in the order the vocabulary shows them.
Functions ¶
func BuiltinPaces ¶ added in v0.54.0
BuiltinPaces are the paces f10 ships. medium sets nothing: naming it runs every flow as declared, the way to switch a faster default off.
func CheckAgentKey ¶ added in v0.48.0
CheckAgentKey reports why key is no agents key: not `default`, not a step some flow names or a spawning step, or a kind scope outside TaskKinds. steps are the step names every flow names, merged; a map read outside a project (the user's file) passes nil and keeps any step word.
func CheckCeiling ¶ added in v0.54.0
CheckCeiling reports what is wrong with a ceiling, each line naming ceiling.<key>. A cap needs an order from fast to slow, so off and the dials without one are refused.
func CheckPace ¶ added in v0.54.0
CheckPace reports what is wrong with one pace, each line naming paces.<name>.<key>.
func ParseBundleMaxLines ¶ added in v0.61.0
ParseBundleMaxLines reads a bundle_max_lines value, a positive count of changed lines.
func ParseDriverTimeout ¶ added in v0.46.0
ParseDriverTimeout reads a driver_timeout value, a positive Go duration like `45s` or `2m`.
func ParseStaleAfter ¶ added in v0.43.0
ParseStaleAfter reads a stale_after value, `10d` or `3w`.
func ProjectPrefix ¶ added in v0.38.0
ProjectPrefix derives a task id prefix from the project's name, since the host's letters would name every GitLab project GL. A name yielding nothing usable derives none, so f10 init leaves the Tracker section to a human.
func ReadUserFile ¶ added in v0.58.0
ReadUserFile decodes the frontmatter of the user's file in dir into cfg, refusing an unknown key as project.md does; ok is false for a missing file or one with no frontmatter, which leaves cfg as it was.
func ScopeVerify ¶ added in v0.52.0
func ScopeVerify(cmds []VerifyDecl, changed []string) ([]VerifyPick, []VerifyDecl)
ScopeVerify splits the declared commands into those the changed files call for and those they do not, each in declared order.
Types ¶
type By ¶ added in v0.54.0
type By struct {
Local, CI, CIOptional bool
}
By is who a review entry runs: the local review, the CI review, or both. CIOptional is a `ci?`, which runs only where it can (Settle).
func ReviewBy ¶ added in v0.54.0
ReviewBy reads a review entry's argument: none, `local` or `host` the local review (`host` on the host's own code review), `ci` the CI review, `local+ci` both in either order, `ci?` marking the CI review optional. False for any other argument.
type Ceiling ¶ added in v0.54.0
type Ceiling struct {
Pace Pace `yaml:"-"` // read and written by the methods below
Except []string `yaml:"-"`
}
A Ceiling caps every pace but the ones Except names: a dial the pace sets faster than the ceiling's takes the ceiling's value. It is the project's alone, since a cap a user sets on themselves is just a pace.
func (Ceiling) MarshalYAML ¶ added in v0.54.0
MarshalYAML writes the dials and except side by side, as they are read.
type Declared ¶ added in v0.29.0
type Declared struct {
Visibility string `yaml:"visibility,omitempty"`
Storage string `yaml:"storage,omitempty"`
Layering string `yaml:"layering,omitempty"`
Tracker TrackerDecl `yaml:"tracker,omitempty"`
MergeMethod string `yaml:"merge_method,omitempty"`
Catchup string `yaml:"catchup,omitempty"`
CatchupStacked string `yaml:"catchup_stacked,omitempty"` // how a branch catches up with a base that is another task's branch
Traces string `yaml:"traces,omitempty"`
Lore string `yaml:"lore,omitempty"`
LoreGate string `yaml:"lore_gate,omitempty"` // what finish does with a failing lore check before a merge
StaleAfter string `yaml:"stale_after,omitempty"` // a task older than this is judged before it is planned
DriverTimeout string `yaml:"driver_timeout,omitempty"` // one driver verb's limit, a Go duration
BundleMaxLines string `yaml:"bundle_max_lines,omitempty"` // the changed lines a proposed bundle may reach
Flows map[string]Flow `yaml:"flows,omitempty"`
FlowByArea map[string]string `yaml:"flow_by_area,omitempty"` // an area, in Roles' plain words, to the flow its tasks run
BatchEnv []string `yaml:"batch_env,omitempty"` // environment keys a batch passes to its commands, beyond the built-in ones
OldBatchEnv []string `yaml:"drive_env,omitempty"` // batch_env's old key, read for one more release
Watch string `yaml:"watch,omitempty"` // what the daemon does for tasks no drive owns
WatchCatchup string `yaml:"watch_catchup,omitempty"` // the watcher also catches an undriven open PR up with its target
WatchCI string `yaml:"watch_ci,omitempty"` // the watcher also sends a red undriven PR to its agent to triage
ReportBack string `yaml:"report_back,omitempty"`
Debug string `yaml:"debug,omitempty"` // fetch runs the debug step on a bug task before it is planned
DebugCostly string `yaml:"debug_costly,omitempty"` // what a driven run does with a bug that is costly to reproduce
Review ReviewDecl `yaml:"review,omitempty"`
Standup StandupDecl `yaml:"standup,omitempty"`
Verify []VerifyDecl `yaml:"verify,omitempty"` // verify commands, each scoped to the paths it checks
Agents map[string]string `yaml:"agents,omitempty"` // a step, `default` or `step.kind` to the agent profile it runs on
Paces map[string]Pace `yaml:"paces,omitempty"` // a pace's name to its dials, laid over the built-ins key by key
Pace string `yaml:"pace,omitempty"` // the pace a run takes when it names none
Ceiling *Ceiling `yaml:"ceiling,omitempty"` // the cap on every pace but the ones it excepts
}
Declared is one layer's frontmatter.
type Dial ¶ added in v0.54.0
type Dial struct {
Name string `json:"name"`
Value string `json:"value"`
Origin string `json:"origin"`
Capped string `json:"capped,omitempty"` // what the pace had before the ceiling replaced it
}
A Dial is one resolved setting on an entry, with where it came from.
type Dials ¶ added in v0.54.0
type Dials struct {
Off bool `yaml:"-"`
On bool `yaml:"-"` // a ceiling's word: the step runs under every pace
By string `yaml:"by,omitempty"`
Rounds int `yaml:"rounds,omitempty"`
Depth string `yaml:"depth,omitempty"`
Effort string `yaml:"effort,omitempty"`
Marker string `yaml:"marker,omitempty"`
// contains filtered or unexported fields
}
Dials is one step's settings under a pace. Each field belongs to the step its row in dials names; a zero field sets nothing.
func (Dials) MarshalYAML ¶ added in v0.54.0
MarshalYAML writes the shorthand a word stands for, so an `off` read from a file is written back as it was written.
type Draft ¶
A Draft is one rendered project.md, with what it carries and the sections nothing detected.
type Effective ¶
type Effective struct {
Fields []Field `json:"fields"`
Unrecognized []Field `json:"unrecognized,omitempty"`
// The fixed-vocabulary sub-facts.
Layering string `json:"layering"`
Visibility string `json:"visibility"`
Storage string `json:"storage"`
TrackerKind TrackerKind `json:"trackerKind,omitempty"`
IDPrefix string `json:"idPrefix,omitempty"` // "ABC", "F10" - the task id format's letters
IDPrefixOrigin Origin `json:"idPrefixOrigin,omitzero"` // declared, or derived from the project's name
IDPrefixDerived bool `json:"idPrefixDerived,omitempty"` // the prefix came from the project's name, not a declaration
// PriorityLabels is tracker.priority inverted: a lower-cased host label
// to the level it carries; nil when none is declared.
PriorityLabels map[string]string `json:"priorityLabels,omitempty"`
// TitleTemplate is tracker.title, the template a task's title is written
// through on the tracker. Undeclared on the host's issues it is
// tasktitle.Default. It is "" for bare titles: declared none, or a driver.
TitleTemplate tasktitle.Template `json:"titleTemplate,omitempty"`
// TrackerStatus is tracker.status: `started` and `shipped` to the
// tracker's own word; nil when none is declared, and f10 moves no status.
TrackerStatus map[string]string `json:"trackerStatus,omitempty"`
// The remote review's four facts (review.go); zero when Review declares
// no remote reviewer.
Review Review `json:"review"`
// The rest of the typed facts (resolve.go). MergeMethod "" means none
// declared: finish asks the repo.
MergeMethod string `json:"mergeMethod,omitempty"`
Catchup string `json:"catchup"`
CatchupStacked string `json:"catchupStacked"` // catchup_stacked: the method for a base that is another task's branch
Traces bool `json:"traces"` // traces: on; a step's commits carry trailers, the squash commit keeps the task, a review or judge after the PR leaves a status and a comment
Lore string `json:"lore"` // local: lore under the storage root; committed: .lore/ at the checkout root
LoreGate string `json:"loreGate"` // lore_gate: warn or block, what f10 finish does with a failing lore check before a merge
StaleAfter StaleAfter `json:"staleAfter,omitzero"` // stale_after: a task older than this is judged before it is planned; zero is off
DriverTimeout time.Duration `json:"driverTimeout"` // driver_timeout: one driver verb's limit
BundleMaxLines int `json:"bundleMaxLines"` // bundle_max_lines: the changed lines a proposed bundle may reach
Flows map[string]flow.Flow `json:"flows"` // a flow's name to its entries, written as declared
FlowByArea map[string]string `json:"flowByArea,omitempty"` // flow_by_area: an area to the flow its tasks run
BatchEnv []string `json:"batchEnv,omitempty"` // batch_env: environment keys a batch passes on, beyond the built-in ones
Watch string `json:"watch"` // watch: report, finish or off, for tasks no drive owns; finish unless declared
WatchCatchup bool `json:"watchCatchup"` // watch_catchup: on; a watch pass also catches an undriven open PR up with its target and pushes it
WatchCI bool `json:"watchCI"` // watch_ci: on; a watch pass also sends a red undriven PR to its agent to triage
ReportBack bool `json:"reportBack"` // report_back: a ship run posts its shipment on the task; on unless declared off
Debug bool `json:"debug"` // debug: off skips investigate's debug pass on a bug task; on unless declared
DebugCostly string `json:"debugCostly"` // debug_costly: ask, skip or reproduce, a driven run's call on a costly reproduction; skip unless declared
UpkeepPaths []string `json:"upkeepPaths,omitempty"` // standup.upkeep: globs on top of the defaults
// Verify is the frontmatter's verify list, which f10 config verify
// scopes to the diff; VerifyOrigin names its layer. Nil when undeclared,
// and the Verify field is the whole of verify.
Verify []VerifyDecl `json:"verify,omitempty"`
VerifyOrigin Origin `json:"verifyOrigin,omitzero"`
// VerifyCommands are the commands detection picked for the Verify field,
// nil unless that field is detected; the field's Value is their display.
VerifyCommands []string `json:"-"`
// Agents is agents: a step, `default` or `step.kind` to the profile it
// runs on, the user's file and the project's layers merged key by key;
// AgentsOrigin names each key's layer. Nil when none is declared.
Agents map[string]string `json:"agents,omitempty"`
AgentsOrigin map[string]Origin `json:"agentsOrigin,omitempty"`
// Paces is the declared paces, the user's file under the project's
// layers, merged per pace and key, PacesOrigin naming each <pace> and
// <pace>.<key>'s layer; nil when none is declared. Pace is the declared
// default, "" for none.
Paces map[string]Pace `json:"paces,omitempty"`
PacesOrigin map[string]Origin `json:"pacesOrigin,omitempty"`
Pace string `json:"pace,omitempty"`
PaceOrigin Origin `json:"paceOrigin,omitzero"`
// Ceiling caps every pace but those CeilingExcept names, merged key by
// key across the layers; empty when none is declared.
Ceiling Pace `json:"ceiling,omitzero"`
CeilingOrigin map[string]Origin `json:"ceilingOrigin,omitempty"`
CeilingExcept []string `json:"ceilingExcept,omitempty"`
CeilingExceptOrigin Origin `json:"ceilingExceptOrigin,omitzero"`
// PaceSet is every pace a run can name: the built-ins, then the paces
// above, capped by the ceiling.
PaceSet *PaceSet `json:"-"`
// Facts is every typed value with its origin; Problems what is wrong
// with how they were declared.
Facts []Fact `json:"facts"`
Problems []Problem `json:"problems,omitempty"`
}
Effective is the merged, attributed view of a project's configuration.
func Build ¶
Build merges the declared layers with detection and the contract's defaults into one attributed view. userDir holds the user's own files, the first layer; "" is none.
func (*Effective) ErrorProblems ¶ added in v0.58.0
ErrorProblems are the problems that stop a command.
func (*Effective) Flow ¶ added in v0.43.0
Flow is the named flow, in any case, and whether it is declared.
type Fact ¶ added in v0.29.0
type Fact struct {
Key string `json:"key"`
Value string `json:"value"`
Origin Origin `json:"origin"`
}
A Fact is one typed value and where it came from.
type Field ¶
type Field struct {
Name string `json:"name"`
Value string `json:"value"`
Prose bool `json:"prose,omitempty"` // multi-line prose, not a scalar
Origin Origin `json:"origin"`
Source string `json:"source,omitempty"` // file for declared, evidence for detected
}
A Field is one effective configuration value with its provenance.
func VerifyFieldIn ¶ added in v0.58.0
type Flow ¶ added in v0.43.0
type Flow []string
Flow is one declared flow's entries as written, before flow.Of parses them: a list, or one string split on whitespace and arrows, never on commas, which an argument may hold.
func (Flow) MarshalYAML ¶ added in v0.43.0
MarshalYAML writes the flow as one space-separated string, the shape f10 init writes.
type Labels ¶ added in v0.38.0
type Labels []string
Labels is a list of label names, written as a YAML list or as one string.
type Mark ¶ added in v0.58.0
type Mark struct{ Kind, Text string }
A Mark is a sign f10 leaves on a host review: a kind from the handled vocabulary, and the reaction's emoji or the marker's text.
type Origin ¶ added in v0.58.0
type Origin struct {
Kind OriginKind
Layer string // declared: "main", "worktree", "user", or "main + worktree"
Detail string // declared: the file a user layer came from; derived: the project's name
Frontmatter bool // declared in project.md's frontmatter, not its prose
}
An Origin is an effective value's provenance. Readers ask it what it means; only String formats it, so printers and JSON show one wording.
func DeclaredByUser ¶ added in v0.58.0
DeclaredByUser is a value the user's own file at path set.
func DeclaredFrontmatter ¶ added in v0.58.0
DeclaredFrontmatter is a key a layer's frontmatter set.
func DeclaredIn ¶ added in v0.58.0
DeclaredIn is a prose section a layer's project.md wrote.
func DerivedFrom ¶ added in v0.58.0
DerivedFrom is a task id prefix the project's name gave.
func OriginOf ¶ added in v0.58.0
func OriginOf(kind OriginKind) Origin
OriginOf is an origin with no layer: detected, default, judgment, absent.
func (Origin) Declared ¶ added in v0.58.0
Declared says a project.md layer or the user's file set the value.
func (Origin) MarshalText ¶ added in v0.58.0
MarshalText keeps the JSON an origin's printed form.
func (*Origin) UnmarshalText ¶ added in v0.58.0
UnmarshalText reads String's form back, for JSON that f10 itself wrote.
type OriginKind ¶ added in v0.58.0
type OriginKind string
OriginKind is where an effective value came from.
const ( OriginDeclared OriginKind = "declared" OriginDetected OriginKind = "detected" OriginDefault OriginKind = "default" OriginAbsent OriginKind = "absent" // OriginJudgment is guidance the probe could not turn into commands OriginJudgment OriginKind = "judgment" // OriginDerived is a task id prefix taken from the project's name OriginDerived OriginKind = "derived" // OriginBuiltin is a pace dial f10 ships OriginBuiltin OriginKind = "built-in" )
The kinds an origin can have.
type Pace ¶ added in v0.54.0
Pace is one pace: dials by step.
func (Pace) MarshalYAML ¶ added in v0.58.0
MarshalYAML writes the steps as they are read.
type PaceSet ¶ added in v0.54.0
type PaceSet struct {
Remote bool // Review declares a remote reviewer, which an optional CI review needs
Paces map[string]Pace
Origins map[string]Origin // <pace> and <pace>.<key> to the layer that set it
Default string // pace: the pace a run takes when it names none; "" for none
DefaultOrigin Origin
Ceiling Pace // the project's cap on every pace Except does not name
CeilingOrigins map[string]Origin // <key> to the layer that set it
Except []string
ExceptOrigin Origin
}
PaceSet is every pace a run can name, merged key by key: the built-ins, the user's ~/.f10/paces.md, then the project's paces.
func (*PaceSet) Capped ¶ added in v0.54.0
Capped is the pace with the ceiling laid on, and each replaced dial keyed `<step>.<dial>`. A step the ceiling turns on or off is keyed `<step>.run`. Silence on rounds is the faster default, so it is capped. Silence on effort leaves the agents map alone.
func (*PaceSet) CeilingOrigin ¶ added in v0.54.0
CeilingOrigin is how a dial the ceiling set names its source.
func (*PaceSet) Exempt ¶ added in v0.54.0
Exempt says whether the ceiling leaves the named pace alone.
func (*PaceSet) Lookup ¶ added in v0.54.0
Lookup is the named pace, and an error listing the names when none is.
func (*PaceSet) Over ¶ added in v0.54.0
Over lays paces on the set, key by key: a layer tuning fast's review keeps the lower layer's judge. An empty pace still declares its name.
func (*PaceSet) PaceProblems ¶ added in v0.54.0
PaceProblems resolves every flow under every pace and reports each pace that breaks one, so a broken pace shows before a run picks it.
func (*PaceSet) ResolveFlow ¶ added in v0.54.0
ResolveFlow lays the named pace on a flow. An entry argument beats the pace for the dial it expresses (review:local fixes by), and the pace beats the step's own default. No pace ("") leaves the flow as declared, an optional CI review settled.
type Problem ¶ added in v0.29.0
type Problem struct {
Error bool `json:"error,omitempty"`
Message string `json:"message"`
// File is the user's file the problem is in, "" for the project's facts
File string `json:"-"`
}
A Problem is something wrong with the declaration. An error stops the commands that act on facts; a warning is shown and nothing else.
type Resolved ¶ added in v0.54.0
type Resolved struct {
Flow string `json:"flow"`
Pace string `json:"pace,omitempty"`
Entries []ResolvedEntry `json:"entries"`
}
Resolved is a flow under a pace.
func (Resolved) Changed ¶ added in v0.54.0
Changed reports a resolution that differs from the declared flow.
func (Resolved) Labeled ¶ added in v0.56.0
Labeled is the entries that run as written, each with its label. It is for display only, because ship runs the lines `f10 flow <name>` prints.
type ResolvedEntry ¶ added in v0.54.0
type ResolvedEntry struct {
Entry string `json:"entry"` // as it runs: review:local when the pace named who reviews
Declared string `json:"declared"`
Step string `json:"step"`
Label string `json:"label,omitempty"` // the entry's display name, from its [label]
Skipped string `json:"skipped,omitempty"` // why it does not run: the pace's off, or an optional CI review dropped; "" when it runs
Dials []Dial `json:"dials,omitempty"`
}
A ResolvedEntry is one flow entry as a pace leaves it.
func (ResolvedEntry) Parsed ¶ added in v0.58.0
func (e ResolvedEntry) Parsed() flow.Entry
Parsed is the entry as it runs, with its label.
type Review ¶ added in v0.26.0
type Review struct {
Reviewer string `json:"reviewer,omitempty"` // the identity: a login, or a check's name
ReviewerKind string `json:"reviewerKind,omitempty"` // bot | human | check
Arrives string `json:"arrives,omitempty"` // issue comment | inline review | check run
Trigger string `json:"trigger,omitempty"` // automatic | manual | automatic, manual
TriggerHow string `json:"triggerHow,omitempty"` // the rest of the line: how a human fires it
ManualHow string `json:"manualHow,omitempty"` // the manual part alone, when the line names both
Done string `json:"done,omitempty"` // posted | marker | submitted | concluded
DoneText string `json:"doneText,omitempty"` // the marker's text
Handled string `json:"handled,omitempty"` // reaction | marker | checkbox | thread resolved
HandledText string `json:"handledText,omitempty"` // the reaction's emoji, or the marker's text
Settled string `json:"settled,omitempty"` // reaction | marker
SettledText string `json:"settledText,omitempty"` // the reaction's emoji, or the marker's text
// contains filtered or unexported fields
}
A Review is the parsed remote-review contract. The zero value means the section declares no remote reviewer, which is the common case.
func (Review) HandledMark ¶ added in v0.58.0
HandledMark is the mark ack leaves: the review was read.
func (Review) Manual ¶ added in v0.43.0
Manual is how the manual trigger fires: the manual part of a line naming both, else the whole how, so a code span describing the automatic half is never posted.
func (Review) ManualAction ¶ added in v0.38.0
ManualAction is the manual how as a kind and its text: a comment posting the first code span, or a review requested from the span's login. Both need the span, since a word guessed from prose could reach a real account.
func (Review) Missing ¶ added in v0.26.0
Missing names the facts a remote review still lacks, in contract order, so a refusal can say which line to fix. Settled is optional: it is missing only when declared and unreadable.
func (Review) Remote ¶ added in v0.26.0
Remote reports whether the section names a remote reviewer at all.
func (Review) SettledMark ¶ added in v0.58.0
SettledMark is the mark settle leaves: every finding has a verdict.
type ReviewDecl ¶ added in v0.29.0
type ReviewDecl struct {
Reviewer string `yaml:"reviewer,omitempty"`
Arrives string `yaml:"arrives,omitempty"`
Trigger string `yaml:"trigger,omitempty"`
Done string `yaml:"done,omitempty"`
Settled string `yaml:"settled,omitempty"`
}
ReviewDecl is the remote review's facts in the prose items' vocabulary, so the same sub-parsers read both.
type StaleAfter ¶ added in v0.58.0
StaleAfter is the age past which a task is judged before it is planned, kept with the word that declared it, since the stale mark quotes the user's `14d` back rather than an equal `2w`. The zero value is off.
func NewStaleAfter ¶ added in v0.58.0
func NewStaleAfter(value string) (StaleAfter, error)
NewStaleAfter reads a stale_after value, `10d` or `3w`.
func (StaleAfter) MarshalText ¶ added in v0.58.0
func (s StaleAfter) MarshalText() ([]byte, error)
MarshalText keeps the JSON the declared form.
func (StaleAfter) On ¶ added in v0.58.0
func (s StaleAfter) On() bool
On says a stale_after is in force.
func (StaleAfter) String ¶ added in v0.58.0
func (s StaleAfter) String() string
String is the value as declared; "" when off.
func (*StaleAfter) UnmarshalText ¶ added in v0.58.0
func (s *StaleAfter) UnmarshalText(text []byte) error
UnmarshalText reads the declared form.
type StandupDecl ¶ added in v0.33.0
type StandupDecl struct {
Upkeep []string `yaml:"upkeep,omitempty"`
}
StandupDecl lists paths that, alone in a commit, make it upkeep, on top of the lockfiles and generated files standup already knows.
type TrackerDecl ¶ added in v0.29.0
type TrackerDecl struct {
Kind string `yaml:"kind,omitempty"`
ID string `yaml:"id,omitempty"`
Priority map[string]Labels `yaml:"priority,omitempty"`
Status map[string]string `yaml:"status,omitempty"`
Title string `yaml:"title,omitempty"`
}
TrackerDecl is the frontmatter's tracker key. Priority maps a contract level to host labels, since issues have no priority field of their own.
type TrackerKind ¶ added in v0.58.0
type TrackerKind string
TrackerKind is the tracker a project's tasks live in, as the frontmatter names it; String gives the name the rest of f10 shows.
const ( TrackerGitHub TrackerKind = "github" TrackerGitLab TrackerKind = "gitlab" TrackerNotion TrackerKind = "notion" TrackerJira TrackerKind = "jira" )
The trackers f10 knows.
func (TrackerKind) HostIssues ¶ added in v0.58.0
func (k TrackerKind) HostIssues() bool
HostIssues says the tasks are the code host's own issues, which the host CLI reads without a driver.
func (TrackerKind) MarshalText ¶ added in v0.58.0
func (k TrackerKind) MarshalText() ([]byte, error)
MarshalText keeps the JSON the shown name, as config and standup print it.
func (TrackerKind) String ¶ added in v0.58.0
func (k TrackerKind) String() string
func (*TrackerKind) UnmarshalText ¶ added in v0.58.0
func (k *TrackerKind) UnmarshalText(text []byte) error
UnmarshalText reads the shown name back, or the frontmatter word.
type VerifyDecl ¶ added in v0.52.0
type VerifyDecl struct {
Run string `json:"run" yaml:"run"`
Paths []string `json:"paths,omitempty" yaml:"paths,omitempty"`
}
VerifyDecl is one verify command and the paths it checks, in standup's glob syntax; a command with no paths runs on every diff.
type VerifyPick ¶ added in v0.52.0
type VerifyPick struct {
VerifyDecl
Pattern string
File string
}
A VerifyPick is a declared command the diff calls for, with the pattern and the changed file that matched; both are "" for a command with no paths.