Reference
Packages
What every internal package owns, file by file.
Nine packages under internal/, plus the cmd/agore-skill entry point.
Domain packages never import cli.
cmd/agore-skill
| File | Owns |
|---|---|
main.go | Entry point: builds the App, executes the command tree via fang. |
main_test.go | Entry-point wiring tests. |
internal/cli
| File | Owns |
|---|---|
root.go | The App struct (all injected dependencies), NewRootCmdWithApp, config path resolution, git helper wrappers (ChangedFiles, DescribeTag, WorkingTreeClean, RemoteURL), target selection helpers. |
init.go | The init command: detection, interactive form, config writing, .gitignore and workflow generation (--force overwrite, --no-ci to skip the workflow). |
create.go | The create command: template rendering, placement, validation. |
inspect.go | The inspect command: targets, --changed, --json, rendering. |
lint.go | The lint command: rule execution, strictness, exit codes, --json. |
eval.go | The eval passthrough to agore-eval. |
release.go | The release command: tag resolution (--tag, CI ref env vars, tags pointing at HEAD, describe fallback), lint gate, bundle, publish. |
cli_test.go | Command tests with a fully fake App. |
internal/config
| File | Owns |
|---|---|
config.go | The agore.yaml model (Config, ProjectConfig, WorkspaceConfig, SkillConfig, LintConfig, BudgetConfig, ReleaseConfig, PublisherConfig), default filling, loader, publisher-type validation. |
config_test.go | Default filling, custom parsing, unknown-key tolerance. |
internal/workspace
| File | Owns |
|---|---|
discover.go | Discover (glob patterns → directories with a direct SKILL.md), the Target type (Name, Dir, RelPath), deterministic ordering, ChangedFiles (diff plus git status --porcelain merged and deduped, renames as destination). |
discover_test.go | Discovery and changed-skill mapping tests. |
internal/skill
| File | Owns |
|---|---|
parser.go | The Skill and Frontmatter types, frontmatter/body splitting, local reference extraction (./ prefixes, trailing punctuation stripped, unknown frontmatter fields collected for SPEC-001). |
templates.go | The three embedded scaffold templates rendered via text/template. |
templates/ | minimal/, progressive/, scripted/ static template files (go:embed). |
parser_test.go | Parser and reference-extraction tests. |
templates_test.go | Template rendering tests. |
internal/filefilter
| File | Owns |
|---|---|
filefilter.go | The layered file funnel shared by inspect and release: hidden paths and dot-directories at any depth, the root dist/, agore.yaml, .gitignore rules (root + skill dir, ! negation unsupported), then the configured exclude globs. |
filefilter_test.go | Funnel tests: dotfiles, .gitignore dialects, exclude globs. |
internal/inspect
| File | Owns |
|---|---|
analyzer.go | EstimateTokens (deterministic offline estimator), Analyze/AnalyzeWithOptions, the Report and FileStat types (including Binary, LatestVersion, UnreleasedCommits), category classification, the breadth-first reference-reachability walk, binary detection (NUL byte in the first 512 bytes), tag lookup for the version badge. |
analyzer_test.go | Token estimation, dead links, orphans, multi-hop references, binary files, shebang and executable-bit detection. |
internal/lint
| File | Owns |
|---|---|
linter.go | The Diagnostic type and the rule execution engine (fixed order, ignore list). |
rules.go | The ten rules SPEC-001 … SEC-002 with their exact message templates (SPEC-001 also rejects unknown frontmatter fields; SEC-001 skips binary files). |
rules_test.go | Table-driven rule tests plus the invariant that all three templates lint clean. |
internal/release
| File | Owns |
|---|---|
tag.go | ParseReleaseTag, IsSemver, PreviousTag, ChangelogCommits, RepoSlug. |
bundle.go | BuildBundle, file collection through the filefilter funnel (MatchExclude delegates to filefilter.MatchAny), zip/tar.gz writers, checksums, changelog writing. |
github.go | The GitHub publisher (gh CLI first, REST API with GITHUB_TOKEN as fallback). |
*_test.go, *_more_test.go | Tag parsing, exclusion matching, archive contents, publisher behavior. |
internal/ui
| File | Owns |
|---|---|
theme.go | The lipgloss palette and shared styles. |
render.go | RenderReports (inspect panels, progress bars, L3 tree), RenderLint (table + summary), RenderEvalHint. |
render_test.go | Renderer tests. |
Related
- How these compose at runtime: Architecture
- The user-facing behavior each implements: CLI overview