feat(skills): add using-ao skill, install it under the data dir, and wire it into session prompts#2365
Open
harshitsinghbhandari wants to merge 4 commits into
Conversation
Append a short standing-prompt pointer to skills/using-ao/SKILL.md so orchestrator and worker sessions read the skill catalog before using the ao CLI, instead of inlining the whole command surface.
Full command catalog sourced verbatim from 'ao --help' recursively: SKILL.md (top-level catalog), commands/*.md (one per command with every subcommand, flag, and examples), and references.md (natural-language to command table).
A repo-relative skills/ path only resolves when a worker's project is the AO repo itself; the ao CLI is used in every session regardless of project. Move the skill into the Go module, embed it, and clobber-install it into <dataDir>/skills/using-ao at daemon boot (before any session spawns, so no locking is needed). The embedded copy is the single source of truth: a new daemon build always refreshes it, so there is no version marker to drift. Flip the session-prompt pointer to the absolute installed path so it resolves from any project's worktree.
golangci-lint gosec flagged G301 (dir perms) and G306 (file perms). Use 0o750 for dirs and 0o600 for files, matching the repo convention for daemon-owned single-user state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
using-aoskill documenting theaoCLI, installs it into the AO data dir on daemon boot, and points every session's system prompt at it.Every command, subcommand, flag, and default was enumerated by running
ao --helprecursively against a freshly built rewrite binary. Nothing is hallucinated; the docs mirror the help text verbatim.Why install into the data dir (not just the repo)
The system prompt is injected into orchestrator and worker sessions in any registered project, and those agents use the
aoCLI (ao send,ao spawn,ao preview) regardless of which project they work on. A repo-relativeskills/using-ao/SKILL.mdpath only resolves when the worker's project happens to be the AO repo itself; in every other project it is a dead path.So the skill is installed to a stable, project-independent location under the AO data dir, and the prompt cites the absolute path.
How it stays fresh (no hash, no version marker)
The skill is
go:embedded into the daemon binary and is the single source of truth. On bootskillassets.Installclobbers<dataDir>/skills/using-aoand rewrites it from the embed. A new daemon build always refreshes it, so the on-disk copy can never drift from the shipped one. There is no content hash or ship-date marker to maintain: the daemon binary already is the version. Install runs once at boot, before any session spawns, so the plain clobber needs no locking (no concurrent readers yet). It is non-fatal: the skill enhancesao --help, it is not load-bearing.Install path is
<dataDir>/skills/using-ao/(default~/.ao/data/skills/using-ao/), which stays self-consistent whenAO_DATA_DIRis overridden, and satisfies the~/.aohard rule.Changes
backend/internal/skillassets/(new): embedsusing-ao/and installs it.Dir(dataDir)is shared by the installer and the prompt builder so the cited path always matches where files land.backend/internal/skillassets/using-ao/: the skill itself (moved from repo-rootskills/so it lives inside the Go module and can be embedded; embed cannot reach above the module atbackend/).SKILL.md(top-level catalog),commands/*.md(one per command with every subcommand, flag, and examples),references.md(natural-language to command table). Frontmatter mirrors the existingskills/bug-triage/SKILL.mdstyle.backend/internal/daemon/daemon.go: callsskillassets.Install(cfg.DataDir)right after the store opens; logs a warning and continues on failure.backend/internal/session_manager/manager.go:aoSkillPointeris now a*Managermethod that builds the absolute installed path fromm.dataDir, appended (as before) to every non-empty system prompt just before the confidentiality guard. Single pointer for all three prompt variants (orchestrator, worker-with-orchestrator, worker-without-orchestrator), no duplication.Note:
using-aodeliberately does not sit next tobug-triageunder repo-rootskills/, because it is now a runtime-shipped asset embedded in the binary, a different kind of thing from a repo-local dev skill.Test
cd backend && go build ./...andgo vet ./internal/{skillassets,daemon,session_manager}pass.backend/internal/skillassets/skillassets_test.go(new): Install writesSKILL.md+commands/spawn.mdand clobbers a stale file on reinstall.TestSystemPrompt_AppendsConfidentialityGuardextended to assert theskills/using-ao/SKILL.mdpointer is present for orchestrator and both worker variants.skillassets,session_manager, anddaemon.🤖 Generated with Claude Code