Skip to content

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
AgentWrapper:mainfrom
harshitsinghbhandari:ao/agent-orchestrator-23/using-ao-skill
Open

feat(skills): add using-ao skill, install it under the data dir, and wire it into session prompts#2365
harshitsinghbhandari wants to merge 4 commits into
AgentWrapper:mainfrom
harshitsinghbhandari:ao/agent-orchestrator-23/using-ao-skill

Conversation

@harshitsinghbhandari

@harshitsinghbhandari harshitsinghbhandari commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a using-ao skill documenting the ao CLI, 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 --help recursively 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 ao CLI (ao send, ao spawn, ao preview) regardless of which project they work on. A repo-relative skills/using-ao/SKILL.md path 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 boot skillassets.Install clobbers <dataDir>/skills/using-ao and 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 enhances ao --help, it is not load-bearing.

Install path is <dataDir>/skills/using-ao/ (default ~/.ao/data/skills/using-ao/), which stays self-consistent when AO_DATA_DIR is overridden, and satisfies the ~/.ao hard rule.

Changes

  • backend/internal/skillassets/ (new): embeds using-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-root skills/ so it lives inside the Go module and can be embedded; embed cannot reach above the module at backend/). 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 existing skills/bug-triage/SKILL.md style.
  • backend/internal/daemon/daemon.go: calls skillassets.Install(cfg.DataDir) right after the store opens; logs a warning and continues on failure.
  • backend/internal/session_manager/manager.go: aoSkillPointer is now a *Manager method that builds the absolute installed path from m.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-ao deliberately does not sit next to bug-triage under repo-root skills/, 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 ./... and go vet ./internal/{skillassets,daemon,session_manager} pass.
  • backend/internal/skillassets/skillassets_test.go (new): Install writes SKILL.md + commands/spawn.md and clobbers a stale file on reinstall.
  • TestSystemPrompt_AppendsConfidentialityGuard extended to assert the skills/using-ao/SKILL.md pointer is present for orchestrator and both worker variants.
  • 98 tests pass across skillassets, session_manager, and daemon.
  • No em/en dashes in any skill file.

🤖 Generated with Claude Code

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.
@harshitsinghbhandari harshitsinghbhandari changed the title docs(skills): add using-ao skill and wire it into session prompts feat(skills): add using-ao skill, install it under the data dir, and wire it into session prompts Jul 2, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant