Documentation
¶
Overview ¶
Package planning handles technical plan creation and review workflows.
Index ¶
- Constants
- type Approval
- type Plan
- func (p *Plan) AddStep(repo, description string)
- func (p *Plan) AllComplete() bool
- func (p *Plan) Approve(reviewer string, minApprovals int) error
- func (p *Plan) BlockStep(index int, reason string) error
- func (p *Plan) CompleteStep(index int, prNumber int) error
- func (p *Plan) CurrentStep() *Step
- func (p *Plan) HasSteps() bool
- func (p *Plan) IsReviewApproved() bool
- func (p *Plan) IsReviewChangesRequested() bool
- func (p *Plan) IsReviewPending() bool
- func (p *Plan) NeedsReview() bool
- func (p *Plan) Progress() (int, int)
- func (p *Plan) ProgressString() string
- func (p *Plan) RequestChanges(reviewer string, feedback string) error
- func (p *Plan) RequestReview(reviewers []string) error
- func (p *Plan) StartStep(index int, branch string) error
- func (p *Plan) Summary() string
- func (p *Plan) ToFrontmatter() ([]markdown.BuildStep, *markdown.ReviewState)
- func (p *Plan) UnblockStep(index int) error
- func (p *Plan) Validate() []string
- type ReviewState
- type Step
Constants ¶
const ( StatusPending = "pending" StatusInProgress = "in_progress" StatusComplete = "complete" StatusBlocked = "blocked" )
StepStatus constants.
const ( ReviewPending = "pending" ReviewApproved = "approved" ReviewChangesRequested = "changes_requested" )
ReviewStatus constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plan ¶
type Plan struct {
SpecID string
Steps []Step
Review *ReviewState
}
Plan represents a technical build plan for a spec.
func (*Plan) AllComplete ¶
AllComplete returns true if all steps are complete.
func (*Plan) CompleteStep ¶
CompleteStep marks a step as complete and sets its PR number.
func (*Plan) CurrentStep ¶
CurrentStep returns the first non-complete step, or nil if all done.
func (*Plan) IsReviewApproved ¶
IsReviewApproved returns true if plan review is approved.
func (*Plan) IsReviewChangesRequested ¶
IsReviewChangesRequested returns true if reviewer requested changes.
func (*Plan) IsReviewPending ¶
IsReviewPending returns true if review is requested but not yet approved.
func (*Plan) NeedsReview ¶
NeedsReview returns true if plan exists but has no review state.
func (*Plan) ProgressString ¶
ProgressString returns a progress string like "3/7 steps".
func (*Plan) RequestChanges ¶
RequestChanges marks the review as needing changes.
func (*Plan) RequestReview ¶
RequestReview initializes the review state.
func (*Plan) ToFrontmatter ¶
func (p *Plan) ToFrontmatter() ([]markdown.BuildStep, *markdown.ReviewState)
ToFrontmatter converts a Plan back to frontmatter types.
func (*Plan) UnblockStep ¶
UnblockStep removes the blocked status from a step.