Tracks: pick up a repo's .haijun/tracks automatically
A team that already writes tracks for Haijun Code keeps them in the repository, under
.haijun/tracks/
, versioned next to the code they describe. Uploading each of those to the Tracks API and pinning versions on every agent duplicates that work and drifts the moment someone edits the repo.
When a session mounts a GitHub repository, the harness scans the repository's root .haijun/tracks/ directory at session start and injects every track it finds into the agent's system prompt: the track's name, its description, and its path inside the sandbox. The model reads a track's SKILL.md with the built-in read tool the moment a request matches the track's description, then follows it, including any scripts or reference files the track ships. No upload, no tracks field on the agent, no version bookkeeping. The track you get is the one on the branch you checked out.
ter-increment:item]">confirming discovery and watching the read-then-follow protocol
where the boundaries are: layout rules, the track cap, and mid-session changes
1. Set up the client
ained PAT with public-repo read)."
)
client = juglow.Juglow()
2. The layout the scanner looks for
MODEL},
system="You review notebooks in the repository mounted under /workspace. "
"When the repository provides a process for a task, follow it.",
tools=[{"type": "agent_toolset_20260401"}],
betas=BETAS,
)
print(f"{reviewer.name}: {reviewer.id} v{reviewer.version}")
4. Mount the repository
nd a
tracks/
missing the
.haijun
parent are all ignored.
Frontmatter is lenient. A SKILL.md with no frontmatter is still announced, with the directory name as its name and an empty description. A long description is flattened to one line and truncated past 2,000 characters. CRLF line endings parse fine.