feat(seeder): context-file skills index for providers without native skill discovery (ADR-0035) #86
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab!86
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/79"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Seeds the SAME embedded skills bundle for every provider and, for a provider whose CLI has no native skill discovery, appends a generated skills index to its context file so the playbooks are discoverable through the one channel every agent reads. Also documents the lab-owned context-file-name hard rule.
Closes #79
What changed
SeedMeta.NativeSkillDiscovery bool(internal/provider/provider.go) — claude-code declarestrue(pinned inseedmeta_test.go; the providertestFakemirrors it,NoLinkFake's zero-valuefalsealready models the skills-less shape).internal/seeder/contextfile.go) — when a provider declaresfalsewith a non-emptySkillsDir,renderContextFileappends a## Seeded skillssection: one bullet per bundled skill from its frontmatter (name+description, which already carries the "use when…" trigger), pointing at<SkillsDir>/<name>/SKILL.mdunder THAT provider's declared dir. Appended in Go after the untouched template render, so a native-discovery provider's output can't drift structurally.internal/seeder/skillsindex.go) — strict parse of every bundled skill at package init (name must equal the bundle dir, description non-empty, folded scalars flattened to one line); a malformed bundle panics at init, caught by any test run and binary boot — never a silent partial index at seed time.go.yaml.in/yaml/v2promoted indirect → direct (the bundle really contains a folded-scalar description).internal/seeder/testdata/contextfile-claude-*.golden); tests assert the claude render and the on-disk seededCLAUDE.local.mdequal them byte-for-byte.ContextFileNamedoc comment + ADR-0035: the name must be lab-owned and never repo-tracked (.local-suffixed convention); making the CLI read it is the adapter'sSeedWorkspacejob (ADR-0008 bar); conformance enforcement is #80. CONTEXT.md's skills-bundle glossary entry updated.Acceptance (issue #79)
AGENTS.local.md+.codex/skills) seeds the full bundle and its context file lists every bundled skill with correct per-provider paths, worktree still clean undergit status—TestSeedWorkspace_nonNativeAppendsSkillsIndex.TestRenderContextFile_claudeGoldenByteIdentity(+ on-disk variant), goldens captured pre-change.SkillsDir→ no index regardless of flag —TestRenderContextFile_noIndexWithoutSkillsDir.skillsindex_test.go.go:embedsource untouched; no curation list.Verification
gofmtclean,go build ./...,go vet ./...,go test ./... -count=1all green exceptinternal/tmuxxintegration tests, which fail identically at pristine HEAD in this sandbox (no usable tmux server) — pre-existing and unrelated.🤖 Generated with Claude Code
https://claude.ai/code/session_01JEHz335VrpFWsstLFoTePB