Skip to content

Retire hardcoded stdout execute markers; render server run guidance#51

Merged
rhiever merged 4 commits into
mainfrom
retire-stdout-execute-markers
Jun 28, 2026
Merged

Retire hardcoded stdout execute markers; render server run guidance#51
rhiever merged 4 commits into
mainfrom
retire-stdout-execute-markers

Conversation

@rhiever

@rhiever rhiever commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

What and why

The server now provides run-framing guidance in-band at the start of the markdown response when an agent fetches a workflow or template. That makes the CLI's own hardcoded execute-framing markers around get stdout redundant and a source of drift, so this removes them: the CLI prints the server payload as-is and the run framing comes from a single server-owned source.

What changed

  • workflows get and templates get stdout: removed the hardcoded prefix line ("# Goodeye workflow - execute the instructions below ...") and the suffix boundary marker ("# End of Goodeye workflow."). The command now writes the server markdown body directly (the trailing-newline behavior is unchanged).
  • --json and --output modes are unchanged.
  • Tests updated to assert the markers are absent and that stdout begins with the server-provided guidance from the mocked response.

Testing

Full suite green: uv run pre-commit run --all-files && uv run pytest (826 passed).

Release ordering (important)

Do not cut a release of this until the server change that adds the in-band guidance is live on production. If this ships first, goodeye workflows get / templates get would print a bare body with neither the old markers nor the new guidance. The CLI changelog entry (with the released version) is added at release time per the maintainer release runbook.

🤖 Generated with Claude Code

rhiever and others added 4 commits June 27, 2026 19:47
The server text/markdown response now begins with a standing run-guidance
directive composed in-band, so the CLI no longer prepends
"# Goodeye workflow - execute the instructions below as the user's agent."
or appends "# End of Goodeye workflow." around the body. The markdown
payload is printed as-is (trailing-newline guard kept). Both the
workflows get and templates get stdout paths are updated.

Tests: updated the existing markdown-default tests for both commands to
use a mock body that begins with the server directive, and added
test_workflows_get_stdout_has_no_execute_markers and
test_templates_get_stdout_has_no_execute_markers to assert the old
markers are absent and the directive is the first thing on stdout.
The old name described the retired execute markers being present; the test
body now asserts they are absent plus that the server body renders in stdout.
Renamed to test_templates_get_stdout_renders_server_body and updated the
docstring to match.
The workflow/template 'get' commands no longer wrap stdout with execute
markers, so the help docstrings claiming the markdown is 'wrapped with
agent-facing markers' were inaccurate. State plainly that the markdown
prints to stdout by default.
The text/markdown fetch now carries the run-guidance directive in-band
(prepended by the server), so writing that text to a file with --output
put the directive ahead of the YAML front-matter. A later `publish` of
the saved file would then fail to parse its front-matter and reject the
missing name/description/outcome.

Make `workflows get --output` and `templates get --output` fetch the
structured record and write the directive-free body instead, so the
saved file stays editable and re-publishable. Stdout (no --output) keeps
streaming the server markdown verbatim, directive included, which is the
intended runbook path. Correct the --output help text and add round-trip
tests for both commands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rhiever rhiever merged commit 3232f7d into main Jun 28, 2026
1 check passed
@rhiever rhiever deleted the retire-stdout-execute-markers branch June 28, 2026 03:39
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