ctx-launcher
AGENTS.md4 starsChanged 34 days agoMITView on GitHub
Docs: docs/reference.md (how wl works — keep it in sync with the code) and CHANGELOG.md. The finished v0.10 plan is in docs/design/v0.10-plan.md.
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository4 other files it gives its agents.
- publishSkill
- releaseSkill
- run-testsSkill
- sync-skillsSkill
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
No DI container — services instantiated in Program.cs
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ctx-launcher (wl)
Overview
A .NET 10 CLI tool that launches GitHub Copilot CLI sessions from workspace definitions. The binary is wl. Workspaces live under ~/.wl-workspaces/<name>/ (override with WL_WORKSPACES_ROOT) containing workspace.json, AGENTS.md, and .copilot/skills/. wl launch with no name runs folder mode in the current directory. Published on GitHub at fotis89/ctx-launcher and on npm as @ctx-launcher/wl.
Docs: docs/reference.md (how wl works — keep it in sync with the code) and CHANGELOG.md. The finished v0.10 plan is in docs/design/v0.10-plan.md.
Architecture
Program.cs— top-level statements, System.CommandLine wiring, tab completion,Run()maps expected exceptions to exit code 1. Services are created here (no DI container).Commands/— thin handlers: Launch, Which, Create, Clone (primary constructors, no base class).Program.cssplits args at the first--into Copilot pass-through; barewlprints help.Services/WorkspaceService— workspace discovery/load/save and validation (schemaVersion: 2, required fields).CopilotService— Copilot-specific launch logic:BuildArgs(LaunchSpec),PrepareLaunch(plugin.jsonmanifests),GetEnvironment(COPILOT_CUSTOM_INSTRUCTIONS_DIRS),DescribeLaunchPrep(non-mutating, used bywl which),InvokeCreateSkill. Accepts a workspace or folder mode.LaunchService— resolves paths from the workspace folder, prompts for undefined variables, builds args via CopilotService, reads/writes.last-sessionand.folder-sessions.json, spawns via CopilotRunner.CopilotRunner— resolves and spawnscopilot(virtualRunfor tests),TryGetVersion.PathsService(.paths.jsonvariables; refuses to save after a failed load, atomic writes),SetupService(installs embedded skills, merges.gitignore),VersionService.
Models/—Workspace(computed paths),LaunchSpec/LaunchArgs,WlJsonContext(source-gen JSON for AOT).Helpers/—WlPaths(single source of truth for the folder layout),PathHelper(ResolvePath, QuotePath, FindCommandOnPath, Slugify),ConsoleLabel.
Key decisions
- Sessions resume by default. Fresh launches pass
--name=<folder>-<8 hex>(-temp-for--temp) and--session-id=<uuid>; resume passes--resume=<saved id>. Argument order: wl args, thencopilotArgs, then pass-through. The UUID is saved to.last-session(plain text) only after Copilot exits 0, so/renamecan't break resume. - Args are raw, unquoted strings passed through
ProcessStartInfo.ArgumentList.QuotePathis display-only (wl which). - Each
.copilot/dir with skills is passed as--plugin-dir; wl generates itsplugin.json(workspace plugin namewl-<slug>-<hash>, shared pluginwl-shared). No implicit skill discovery. - The workspace
AGENTS.md(and optional.shared/AGENTS.md) are user-edited and loaded by Copilot because wl appends.shared(only when.shared/AGENTS.mdexists) and then the workspace folder toCOPILOT_CUSTOM_INSTRUCTIONS_DIRS(inherited entries preserved). wl never writes them. wl create [name]runs Copilot with the sharedwl-workspaceskill.- Skills are embedded resources in
src/wl/Resources/*.md(loaded viaGetManifestResourceStream).EnsureInstalledwriteswl-workspaceto~/.wl-workspaces/.shared/.copilot/skills/on first launch/create/clone after a version change. Keep them in sync with/sync-skills.
Conventions
- File-scoped namespaces, primary constructors for commands
- Official
dotnet new editorconfigtemplate, format withdotnet format - No DI container — services instantiated in Program.cs
- Unit tests (
tests/wl.tests) cover helpers and services; commands are covered by E2E tests (tests/wl.e2e.tests) that run the native binary against a fakecopilotshim. - Native AOT publishing (
PublishAot=true), ~4 MB binary
Build and test
- Build:
dotnet build - Unit tests:
dotnet test tests\wl.tests\wl.tests.csproj(must pass with 0 warnings) — see/run-tests - E2E: needs a published binary and an absolute
WL_BINARY_PATH - Local install:
.\scripts\install-local.ps1(builds HEAD in a clean worktree, runs both suites, installs to%LOCALAPPDATA%\Programs\wl\<version>behind acurrentjunction) — see/publish - Publish AOT manually: requires MSVC build tools; add
C:\Program Files (x86)\Microsoft Visual Studio\Installerto PATH sovswhereis found.
Release
/release: tagvX.Y.Zon master and push; CI builds all platforms, publishes the npm packages, and creates the GitHub release. Don't runnpm publishorgh release createby hand.- The tag must point at the pushed master commit — if you amend after tagging, re-tag.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

