feat: make the rendered prompt a reviewable artifact #92

Merged
coilysiren merged 1 commit from feat/prompt-snapshots into main 2026-08-11 00:02:26 +00:00
Member

Stacked on #85. Merge that first.

Problem

The model's instruction surface is assembled from internal/community/prompt.go, the tracked definition, and every SKILL.md under the selected policy roots. Nothing printed the result. A one-line edit to a SKILL.md could move several hundred bytes of model context with no reviewable diff, and policy-check reported only a byte count.

What this adds

cmd/sirens-echo-prompt renders each tracked definition to agent/rendered/<name>.prompt.txt:

  • header with definition path, identity, response style, policy roots, and system-prompt byte count
  • the system prompt exactly as the model receives it
  • a user prompt rendered from a fixed sample, so that section moves only when the transcript framing changes
ward exec prompt-dump    # rewrite
ward exec prompt-check   # fail on drift

The check runs as a pre-commit hook scoped to agent/, .agents/skills/, prompt.go, skillpack.go, and the dumper, so a prompt change cannot land without its rendered diff. Verified both directions: appending a line to coilyco-general/SKILL.md fails the check, and reverting it passes.

The snapshots are byte-exact, so trailing-whitespace and end-of-file-fixer skip agent/rendered/. Hand-editing one is pointless because the hook regenerates from source.

Current state, now visible

  • sirens-echo: 5717 bytes of system prompt from two policy roots
  • sirens-deep: 3091 bytes from one

Those numbers are the cheapest signal that a reference file pulled in more than intended, which matters more once a role bundle composes in.

Also here

docs/sirens-echo-prompt.md documents the assembly and how to review a diff. Knowledge gaps and corrections split out of sirens-echo-config.md, which had grown past the documentation size cap.

Verification

pre-commit run --all-files exit 0, go vet, go test -count=1 -race ./..., and sirens-echo-policy-check all pass.

Stacked on #85. Merge that first. ## Problem The model's instruction surface is assembled from `internal/community/prompt.go`, the tracked definition, and every `SKILL.md` under the selected policy roots. Nothing printed the result. A one-line edit to a `SKILL.md` could move several hundred bytes of model context with no reviewable diff, and `policy-check` reported only a byte count. ## What this adds `cmd/sirens-echo-prompt` renders each tracked definition to `agent/rendered/<name>.prompt.txt`: * header with definition path, identity, response style, policy roots, and system-prompt byte count * the system prompt exactly as the model receives it * a user prompt rendered from a fixed sample, so that section moves only when the transcript framing changes ```sh ward exec prompt-dump # rewrite ward exec prompt-check # fail on drift ``` The check runs as a pre-commit hook scoped to `agent/`, `.agents/skills/`, `prompt.go`, `skillpack.go`, and the dumper, so a prompt change cannot land without its rendered diff. Verified both directions: appending a line to `coilyco-general/SKILL.md` fails the check, and reverting it passes. The snapshots are byte-exact, so `trailing-whitespace` and `end-of-file-fixer` skip `agent/rendered/`. Hand-editing one is pointless because the hook regenerates from source. ## Current state, now visible * sirens-echo: 5717 bytes of system prompt from two policy roots * sirens-deep: 3091 bytes from one Those numbers are the cheapest signal that a reference file pulled in more than intended, which matters more once a role bundle composes in. ## Also here `docs/sirens-echo-prompt.md` documents the assembly and how to review a diff. Knowledge gaps and corrections split out of `sirens-echo-config.md`, which had grown past the documentation size cap. ## Verification `pre-commit run --all-files` exit 0, `go vet`, `go test -count=1 -race ./...`, and `sirens-echo-policy-check` all pass.
feat: make the rendered prompt a reviewable artifact
All checks were successful
ci / test (pull_request) Successful in 35s
ci / publish-echo-image (pull_request) Has been skipped
12967c462f
The model's instruction surface is assembled from prompt.go, the tracked
definition, and every SKILL.md under the selected policy roots. Nothing
printed the result, so a change to any of those landed with no visible
diff of what the model was actually told.

Adds cmd/sirens-echo-prompt, which renders each tracked definition to
agent/rendered/<name>.prompt.txt: header with identity, style, policy
roots, and byte count, then the system prompt, then a user prompt from a
fixed sample so that section only moves when the transcript framing does.

`ward exec prompt-dump` rewrites the snapshots and `ward exec
prompt-check` fails on drift. A pre-commit hook runs the check over
agent/, .agents/skills/, prompt.go, skillpack.go, and the dumper, so a
prompt change cannot land without its rendered diff. The snapshots are
byte-exact, so the whitespace fixers skip agent/rendered.

Current sizes: sirens-echo 5717 bytes of system prompt from two policy
roots, sirens-deep 3091 from one. Those numbers are the cheapest signal
that a reference file pulled in more than intended.

Also splits knowledge gaps and corrections out of the configuration page,
which had grown past the documentation size cap.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo!92
No description provided.