onboarding

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package onboarding inspects workspaces and builds first-run setup guidance.

Package onboarding inspects a workspace and reports setup gaps for first-run guidance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderJSON

func RenderJSON(out io.Writer, report Report) error

RenderJSON writes the structured onboarding report as indented JSON.

func RenderText

func RenderText(out io.Writer, report Report)

RenderText writes a human-readable onboarding report.

Types

type Check

type Check struct {
	Name    string `json:"name"`
	Status  string `json:"status"`
	Message string `json:"message"`
	Path    string `json:"path,omitempty"`
}

Check describes one onboarding prerequisite or recommendation signal.

type IgnoreBehavior

type IgnoreBehavior struct {
	File      string   `json:"file"`
	HonoredBy []string `json:"honored_by"`
	Notes     string   `json:"notes"`
}

IgnoreBehavior documents how one ignore-file family affects Codog surfaces.

type Language

type Language struct {
	Name  string `json:"name"`
	Files int    `json:"files"`
}

Language reports how many files were detected for one language family.

type Options

type Options struct {
	Workspace string
}

Options configures workspace onboarding analysis.

type Report

type Report struct {
	Kind             string        `json:"kind"`
	Action           string        `json:"action"`
	Status           string        `json:"status"`
	Workspace        string        `json:"workspace"`
	HasReadme        bool          `json:"has_readme"`
	HasTests         bool          `json:"has_tests"`
	PythonFirst      bool          `json:"python_first"`
	PrimaryLanguage  string        `json:"primary_language,omitempty"`
	Languages        []Language    `json:"languages"`
	ReadmeFiles      []string      `json:"readme_files,omitempty"`
	TestFiles        []string      `json:"test_files,omitempty"`
	InstructionFiles []string      `json:"instruction_files,omitempty"`
	ConfigFiles      []string      `json:"config_files,omitempty"`
	GitRepository    bool          `json:"git_repository"`
	Checks           []Check       `json:"checks"`
	Recommendations  []string      `json:"recommendations,omitempty"`
	ScopeGuidance    ScopeGuidance `json:"scope_guidance"`
}

Report is the stable JSON payload returned by workspace onboarding analysis.

func Analyze

func Analyze(options Options) (Report, error)

Analyze scans a workspace and reports repository, language, README, test, and instruction-file readiness.

type ScopeGuidance

type ScopeGuidance struct {
	Recommendation         string           `json:"recommendation"`
	RiskStatus             string           `json:"risk_status"`
	RiskLevel              string           `json:"risk_level"`
	RiskSummary            string           `json:"risk_summary"`
	HeavyDirectoryPatterns []string         `json:"heavy_directory_patterns"`
	IgnoreBehaviors        []IgnoreBehavior `json:"ignore_behaviors"`
	IgnoreFiles            []string         `json:"ignore_files,omitempty"`
	HeavyPaths             []string         `json:"heavy_paths,omitempty"`
}

ScopeGuidance explains how to keep repository context small before a first provider-backed run.

Jump to

Keyboard shortcuts

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