feat(cli): add agk run command to close the run→observe loop#13
Open
kunalkushwaha wants to merge 2 commits into
Open
feat(cli): add agk run command to close the run→observe loop#13kunalkushwaha wants to merge 2 commits into
agk run command to close the run→observe loop#13kunalkushwaha wants to merge 2 commits into
Conversation
- CLAUDE.md: repository guide (architecture, commands, conventions). - FEATURES.md: prioritized DX/agent-building feature roadmap grounded in code. - .gitignore: exclude build artifacts and .agk/ runtime output. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a first-class `agk run [path]` that wraps `go run .` with tracing on by default and prints a trace summary on exit, welding scaffold → run → observe into a single tool. - Auto-sets AGK_TRACE=true + AGK_TRACE_EXPORTER=file and inherits stdio. - On exit, locates the run produced by this invocation and prints a compact summary (duration / spans / LLM calls / tokens / cost) plus a `agk trace view <run-id>` hint. Reuses existing trace helpers. - `--watch` / `-w` re-runs on .go changes (debounced); `--no-trace` and `--trace-level minimal|standard|detailed` flags. - Promotes fsnotify to a direct dependency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 21, 2026
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.
What
Adds a first-class
agk run [path]command — the missing center of the developer loop. Today AGK scaffolds and observes but never runs;agk initjust tells you togo run main.go. This welds scaffold → run → observe into a single tool.This is feature B1 from the new
FEATURES.mdroadmap (the #1 priority).Behavior
go run .in the target directory, inheriting stdio.AGK_TRACE=true+AGK_TRACE_EXPORTER=fileso the run is captured to.agk/runs/<run-id>/.→ agk trace view <run-id>hint. Reuses the existing trace helpers incmd/trace.go.Flags
--watch/-w.gochanges (debounced)--no-trace--trace-levelminimal|standard(default) |detailed→ setsAGK_TRACE_LEVELTesting
go build,go vet,go test ./...all green.--no-trace: tracing disabled, no summary;--watch: initial run → file change detected → clean re-run with a fresh trace.go.mod, invalid--trace-level.Also included
FEATURES.md— prioritized DX/agent-building roadmap (grounded in code references).CLAUDE.md— repository guide for future contributors/agents..gitignore— excludes build artifacts and.agk/runtime output.fsnotifyto a direct dependency (used by--watch).Follow-ups (noted in FEATURES.md)
agk devalias.agk tracepath-aware so summaries foragk run <subdir>link correctly from any CWD.🤖 Generated with Claude Code