Skip to content

feat(spec): switch interpolation off with interpolate: false - #623

Open
holmboe wants to merge 1 commit into
mainfrom
spec-interpolate
Open

holmboe wants to merge 1 commit into
mainfrom
spec-interpolate

Conversation

@holmboe

@holmboe holmboe commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Summary

First of three stacked pull requests that let a task be exported to a spec, edited and applied back. This one stands alone.

Every string in a spec is a Jinja2 template. A description or a paste that only quotes one, such as {{ .Values.tag }} in a Helm example, was refused as undefined-variable, and no escape survived both the offline check and the render.

  • interpolate: false in the envelope sends every string exactly as written. It applies to create and search specs alike.
  • Such a spec takes no variables. A variables: section or a --set is the new problem code interpolation-off.
  • A value that is not true or false is wrong-type and leaves interpolation on.
  • Documents of a multi-document file that disagree about it are refused, like any other envelope key.
  • The JSON Schema, the generated tables in docs/phorge-spec.md and phabfive/SKILL.md describe the key.

There is deliberately no per-string escape: {% raw %} is outside the portable subset.

Test plan

  • tests/test_spec_interpolate.py pins the old refusal and covers the new key: offline validation, rendering, to_data(), the schema, multi-document files, and --set against a literal spec.
  • Full unit suite, ruff, ruff format, mypy, scripts/gen_spec_docs.py --check and mkdocs build --strict.
  • make test-e2e against a local Phorge stable: 153 passed, 2 skipped.

🤖 Generated with Claude Code

Every string in a spec is a Jinja2 template, so a description or a paste
that only quotes one - `{{ .Values.tag }}` in a Helm example - was refused
as an undefined variable, and no escape survived both the offline check
and the render.

`interpolate: false` in the envelope sends every string exactly as
written, for every kind. Such a spec takes no variables: a `variables:`
section or a `--set` is the new problem code `interpolation-off`, and a
value that is not true or false is `wrong-type`.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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