Skip to content

docs(examples): make gymcoach example runnable end-to-end#47

Open
iliassjabali wants to merge 1 commit intomainfrom
docs/gymcoach-example-starter
Open

docs(examples): make gymcoach example runnable end-to-end#47
iliassjabali wants to merge 1 commit intomainfrom
docs/gymcoach-example-starter

Conversation

@iliassjabali
Copy link
Copy Markdown
Collaborator

@iliassjabali iliassjabali commented Apr 12, 2026

Closes #23.

Summary

The gymcoach example shipped a 280-line agent.yaml with no README, no env-var reference, no services to back its memory/health declarations, and two dangling sub-agent refs (./agents/observer.yaml and ./agents/reflector.yaml) that did not exist. GitHub browsers clicking examples/ first had no way to know what this was or how to run it.

This PR goes a bit beyond issue #23 (which only asked for a README) so the example actually delivers the "2 minutes from clone to running code" promise. Files added:

File Purpose
examples/gymcoach/README.md Walk-through: prerequisites, one-shell-session quick start, file layout, required/optional env vars, links to migration guide and concept docs
examples/gymcoach/.env.example Every $env: / $secret: reference in the manifest with comments on their own lines (inline comments break docker compose's env-file parser, and that bit me during verification)
examples/gymcoach/docker-compose.yml Postgres 16 + Redis 7 with healthchecks, matching the style of packages/control-plane/docker-compose.yml
examples/gymcoach/agents/observer.yaml Minimal but fully schema-valid sub-agent (parallel monitor for injury risk / scope drift)
examples/gymcoach/agents/reflector.yaml Minimal but fully schema-valid sub-agent (sequential post-session retrospective)

No changes to agent.yaml itself, no changes to tool_implementations.py (the existing file docstring already flags the stubs clearly, and the README now links to it with the same warning).

Verification

From a clean worktree, I ran the exact README quick start end-to-end:

cd examples/gymcoach
cp .env.example .env          # placeholder GROQ_API_KEY
set -a; . ./.env; set +a
docker compose up -d          # postgres + redis healthy
agentspec validate agent.yaml # ok
agentspec health agent.yaml   # groq reachable 254ms, both sub-agents ok

Total elapsed: 6 seconds from clean state to passing health report. Sub-agents that previously failed with "manifest not found" now pass.

Also verified:

  • All 13 relative links in the README resolve to existing files
  • Both new sub-agent manifests pass agentspec validate
  • docker compose config is clean (no interpolation warnings after moving inline comments off value lines)
  • docker compose down -v leaves no leftover volumes
  • agentspec audit agent.yaml still runs and returns the same score as before (no regression from the new files)

Out of scope (deliberately)

  • Replacing the 10 stub tool implementations with real code. Would require real domain logic.
  • Committing a pre-generated LangGraph ./agent/ output tree. agentspec generate is the source of truth for that, and committing its output would defeat the "manifest is the spec" principle in CLAUDE.md.
  • Adding a Dockerfile for the agent itself. The example is about the manifest, not containerizing a LangGraph app.

Follow-ups spotted during verification (not in this PR)

  • memory.longTerm:postgres and memory.shortTerm:redis report "connection string not resolved ($env:DATABASE_URL)" from the memory health check even though env:DATABASE_URL checks pass in the same run. Looks like a second resolver path in the memory check that does not see process.env. Worth a separate issue.
  • service.check.ts explicitly skips loopback addresses with "loopback address is not probed from service checks", which is the right default but should probably be documented somewhere visible.

Closes #23.

The gymcoach example shipped a 280-line agent.yaml with no README, no
env-var reference, no services to back its memory/health declarations,
and two dangling subagent refs (./agents/observer.yaml and
./agents/reflector.yaml) that did not exist. GitHub browsers clicking
examples/ first had no way to know what this was or how to run it.

This PR adds:

- README.md walking through prerequisites, a one-shell-session quick
  start (cp .env.example, source env, docker compose up, validate,
  health, generate), the full file layout, required vs. optional env
  vars, and links to the migration guide / concept docs.
- .env.example covering every $env: and $secret: reference in the
  manifest with comments on their own lines (inline comments break
  docker compose's env-file parser).
- docker-compose.yml starting Postgres 16 + Redis 7 with healthchecks,
  matching the existing style of packages/control-plane/docker-compose.yml.
- agents/observer.yaml and agents/reflector.yaml as minimal but fully
  schema-valid sub-agent manifests, so `agentspec health` no longer
  reports two missing-file failures out of the box.

Verified locally: from a clean clone, `cp .env.example .env && docker
compose up -d && agentspec validate && agentspec health` completes in
6 seconds and reports the Groq endpoint reachable and both sub-agents
resolved. `agentspec audit` still runs and returns the same score.
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.

Add README to examples/gymcoach

1 participant