Skip to Content
agore-skill
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

FileOwns
main.goEntry point: builds the App, executes the command tree via fang.
main_test.goEntry-point wiring tests.

internal/cli

FileOwns
root.goThe App struct (all injected dependencies), NewRootCmdWithApp, config path resolution, git helper wrappers (ChangedFiles, DescribeTag, WorkingTreeClean, RemoteURL), target selection helpers.
init.goThe init command: detection, interactive form, config writing, .gitignore and workflow generation (--force overwrite, --no-ci to skip the workflow).
create.goThe create command: template rendering, placement, validation.
inspect.goThe inspect command: targets, --changed, --json, rendering.
lint.goThe lint command: rule execution, strictness, exit codes, --json.
eval.goThe eval passthrough to agore-eval.
release.goThe release command: tag resolution (--tag, CI ref env vars, tags pointing at HEAD, describe fallback), lint gate, bundle, publish.
cli_test.goCommand tests with a fully fake App.

internal/config

FileOwns
config.goThe agore.yaml model (Config, ProjectConfig, WorkspaceConfig, SkillConfig, LintConfig, BudgetConfig, ReleaseConfig, PublisherConfig), default filling, loader, publisher-type validation.
config_test.goDefault filling, custom parsing, unknown-key tolerance.

internal/workspace

FileOwns
discover.goDiscover (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.goDiscovery and changed-skill mapping tests.

internal/skill

FileOwns
parser.goThe Skill and Frontmatter types, frontmatter/body splitting, local reference extraction (./ prefixes, trailing punctuation stripped, unknown frontmatter fields collected for SPEC-001).
templates.goThe three embedded scaffold templates rendered via text/template.
templates/minimal/, progressive/, scripted/ static template files (go:embed).
parser_test.goParser and reference-extraction tests.
templates_test.goTemplate rendering tests.

internal/filefilter

FileOwns
filefilter.goThe 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.goFunnel tests: dotfiles, .gitignore dialects, exclude globs.

internal/inspect

FileOwns
analyzer.goEstimateTokens (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.goToken estimation, dead links, orphans, multi-hop references, binary files, shebang and executable-bit detection.

internal/lint

FileOwns
linter.goThe Diagnostic type and the rule execution engine (fixed order, ignore list).
rules.goThe 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.goTable-driven rule tests plus the invariant that all three templates lint clean.

internal/release

FileOwns
tag.goParseReleaseTag, IsSemver, PreviousTag, ChangelogCommits, RepoSlug.
bundle.goBuildBundle, file collection through the filefilter funnel (MatchExclude delegates to filefilter.MatchAny), zip/tar.gz writers, checksums, changelog writing.
github.goThe GitHub publisher (gh CLI first, REST API with GITHUB_TOKEN as fallback).
*_test.go, *_more_test.goTag parsing, exclusion matching, archive contents, publisher behavior.

internal/ui

FileOwns
theme.goThe lipgloss palette and shared styles.
render.goRenderReports (inspect panels, progress bars, L3 tree), RenderLint (table + summary), RenderEvalHint.
render_test.goRenderer tests.

On this page