Documentation
¶
Overview ¶
Package onboard analyzes a codebase that has few or no CANARY tokens and produces the agent hand-off needed to begin adoption: a language histogram, top-level directory layout, best-effort entry-point detection, any existing CANARY tokens, pre-seeded CANARY:MIGRATE guidance, the configured requirement-ID sources, the next available flatfile ID, and a next_steps checklist. Read-only — onboard never writes to the target repo. CANARY: REQ=CP-276; FEATURE="Onboard"; ASPECT=CLI; STATUS=TESTED; TEST=TestCANARY_CBIN_303_Analyze,TestCANARY_CBIN_303_Analyze_LimitBounds,TestCANARY_CBIN_303_Analyze_DefaultRootAndLimit,TestCANARY_CBIN_303_CreateOnboardCommand_JSON,TestCANARY_CBIN_303_CreateOnboardCommand_Human; UPDATED=2026-08-29
Index ¶
Constants ¶
const DefaultLimit = 20
DefaultLimit bounds every list section by default; agents raise it with --limit when they need more.
Variables ¶
This section is empty.
Functions ¶
func CreateOnboardCommand ¶
CreateOnboardCommand returns the `canary onboard` command.
Types ¶
type LanguageCount ¶
LanguageCount is one file extension's share of the histogram.
type MigrateNote ¶
type MigrateNote struct {
File string `json:"file"`
Line int `json:"line"`
Text string `json:"text"`
}
MigrateNote is one pre-seeded CANARY:MIGRATE guidance line.
type OnboardReport ¶
type OnboardReport struct {
Root string `json:"root"`
Languages []LanguageCount `json:"languages"`
LanguagesTotal int `json:"languages_total"`
Directories []DirCount `json:"directories"`
DirectoriesTotal int `json:"directories_total"`
EntryPoints []string `json:"entry_points"`
EntryPointsTotal int `json:"entry_points_total"`
TokenCount int `json:"token_count"`
MigrateNotes []MigrateNote `json:"migrate_notes"`
MigrateNotesTotal int `json:"migrate_notes_total"`
ProjectKey string `json:"project_key"`
Sources []SourceInfo `json:"sources"`
NextID string `json:"next_id"`
NextSteps []string `json:"next_steps"`
}
OnboardReport is the full adoption-analysis answer for one codebase.
type SourceInfo ¶
type SourceInfo struct {
Name string `json:"name"`
Type string `json:"type"`
Key string `json:"key"`
}
SourceInfo is one configured requirement-ID source.