Skip to content

Align README/GRAMMAR docs with current YAML versioning and Jinja templating syntax#220

Merged
p- merged 2 commits intomainfrom
copilot/fix-version-numbers-in-readme-and-docs
Apr 16, 2026
Merged

Align README/GRAMMAR docs with current YAML versioning and Jinja templating syntax#220
p- merged 2 commits intomainfrom
copilot/fix-version-numbers-in-readme-and-docs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

Documentation examples were out of sync with the current grammar and migration guidance: several snippets still used version: 1, legacy {{ RESULT }}, and legacy prompt macro syntax. This PR updates README and GRAMMAR examples to match the canonical runtime/documented syntax.

  • Version header consistency ("1.0" as string)

    • Updated outdated YAML snippets in README.md and doc/GRAMMAR.md from version: 1 to version: "1.0".
    • Revised README header guidance text to describe "1.0" as the current version and to specify string format as the expected representation.
  • Repeat prompt variable syntax

    • Updated README taskflow example from legacy {{ RESULT }} to {{ result }}.
  • Reusable prompt inclusion syntax

    • Reworked README “Prompts” section from legacy {{ PROMPT... }} / {{ PROMPTS... }} wording and examples to Jinja include syntax:
      • {% include '<import-path>' %}
    • Updated concrete example references to match current import/include style.

Example of the syntax normalization applied:

seclab-taskflow-agent:
  version: "1.0"
  filetype: prompt

prompt: |
  Tell me more about bananas as well.

# in taskflow user_prompt:
{% include 'examples.prompts.example_prompt' %}
# and repeat_prompt templates use:
{{ result }}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • unsupported.example.com
    • Triggering command: /usr/bin/python python -m pytest (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

The documentation in README.md and doc/GRAMMAR.md contains several outdated references that are inconsistent with the current codebase (Pydantic models in models.py, template engine in template_utils.py, actual example YAML files, and the migration guide in doc/MIGRATION.md).

Issues to fix

1. Version numbers should be strings "1.0" — not bare integers 1

The Pydantic model in src/seclab_taskflow_agent/models.py defines SUPPORTED_VERSION = "1.0". All actual YAML example files in examples/ already use version: "1.0". The migration guide (doc/MIGRATION.md) explicitly says: "Update YAML version to "1.0" (string format, e.g., version: "1.0")".

In README.md, fix these YAML snippets that still show version: 1 (bare integer):

  • Line ~321 (Personality example): version: 1version: "1.0"
  • Line ~389 (Toolbox example): version: 1version: "1.0"
  • Line ~438 (Taskflow example): version: 1version: "1.0"
  • Line ~524 (Prompt example): version: 1version: "1.0"
  • Line ~561 (Model config example): version: 1version: "1.0"

Also fix the description text at lines ~293-297. It currently says:

"The version number in the header is currently 1. It means that the file uses version 1 of the seclab-taskflow-agent syntax. If we ever need to make a major change to the syntax, then we'll update the version number. This will hopefully enable us to make changes without breaking backwards compatibility. Version can be specified as an integer, float, or string."

This should be updated to say the version is "1.0" and should be specified as a string. Something like:

"The version in the header is currently "1.0". It means that the file uses version 1.0 of the seclab-taskflow-agent syntax. If we ever need to make a major change to the syntax, then we'll update the version number. This will hopefully enable us to make changes without breaking backwards compatibility. The version should be specified as a string (e.g. "1.0")."

In doc/GRAMMAR.md, fix these YAML snippets:

  • Line ~39 (Personality example): version: 1version: "1.0"
  • Line ~459 (Prompt example): version: 1version: "1.0"
  • Line ~484 (Model config taskflow header): version: 1version: "1.0"
  • Line ~493 (Model config file header): version: 1version: "1.0"

2. {{ RESULT }} is legacy syntax — should be {{ result }} (lowercase)

In README.md line ~502, the taskflow example uses the old uppercase syntax:

What kind of fruit is {{ RESULT }}?

This should be changed to:

What kind of fruit is {{ result }}?

The current Jinja2 template engine (template_utils.py) and all actual example YAML files use lowercase {{ result }}. The migration guide (doc/MIGRATION.md) explicitly documents this as old→new syntax.

3. {{ PROMPTS_... }} is legacy syntax — should be {% include '...' %}

In README.md lines ~516-553, the "Prompts" section documents reusable prompts using the legacy {{ PROMPTS_... }} / {{ PROMPT_... }} syntax. This entire section needs to be updated to use the current {% include '...' %} Jinja2 syntax, matching what GRAMMAR.md already documents correctly.

Specifically:

  • Line ~520: Change the description text from referencing {{ PROMPT_<import-path> }} to {% include '<import-path>' %}
  • Line ~531: Change {{ PROMPT_examples.prompts.example_prompt }} to the correct reference
  • Line ~540: Change {{ PROMPTS_examples.prompts.example_prompt }} to {% include 'examples.prompts.example_prompt' %}

The updated section should match the style shown in doc/GRAMMAR.md lines 438-476 which already uses the correct {% include '...' %} syntax.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Compare the documentation in README.md and GRAMMAR.md. Find outdated information. Especially the versions. should now be represented as strings.

Assistant:

I'll start by loading the current contents of both files to compare them.

Assistant: Now let me check the actual Pydantic models to see how version is currently defined:

Assistant: Now let me also check some of the example YAML files to see how version is actually used:

Assistant: Now I have a comprehensive picture. Let me also check the template variable naming for RESULT vs result mentioned in the README vs GRAMMAR:

Assistant: Now I have a clear picture. Let me summarize my findings by also checking how result vs RESULT is used in the actual YAML examples and the template rendering code to confirm the discrepancies.

Here's a comparison of the documentation in README.md and GRAMMAR.md, with the outdated information identified:


Outdated Information in README.md

1. Version numbers should be strings — README uses bare integers

The Pydantic model in [models.py](https://github.com/GitHubSecurityLab/seclab-taskflow-agent/blob/c08ad8c5bac9fd13028dcd6b4296a5894f82cfc8/src/s...

This pull request was created from Copilot chat.

Copilot AI assigned Copilot and p- Apr 15, 2026
Copilot AI requested review from Copilot and removed request for Copilot April 15, 2026 11:38
Copilot AI requested review from Copilot and removed request for Copilot April 15, 2026 11:41
Copilot AI changed the title [WIP] Fix version numbers in README and documentation Align README/GRAMMAR docs with current YAML versioning and Jinja templating syntax Apr 15, 2026
Copilot finished work on behalf of p- April 15, 2026 11:43
Copilot AI requested a review from p- April 15, 2026 11:43
@p- p- marked this pull request as ready for review April 15, 2026 14:01
Copilot AI review requested due to automatic review settings April 15, 2026 14:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates documentation examples to match the repository’s current YAML header versioning and Jinja2 templating syntax used by the taskflow engine.

Changes:

  • Update YAML header examples to use version: "1.0" (string form) in README.md and doc/GRAMMAR.md.
  • Update repeat prompt variable example from {{ RESULT }} to {{ result }} in README.md.
  • Replace legacy reusable prompt macro examples with Jinja {% include '...' %} syntax in README.md.
Show a summary per file
File Description
doc/GRAMMAR.md Updates example headers to use version: "1.0" consistently.
README.md Aligns header guidance and examples with version: "1.0" and current Jinja2 template/include syntax.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

Comment thread README.md
Prompts are configured through YAML files of `filetype` `prompt`. They define a reusable prompt that can be referenced in `taskflow` files.

They contain only one field, the `prompt` field, which is used to replace any `{{ PROMPT_<import-path> }}` template parameter in a taskflow. For example, the following `prompt`.
They contain only one field, the `prompt` field. Reusable prompts can be referenced in tasks using Jinja2's `{% include '<import-path>' %}` directive. For example, the following `prompt`.
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text says prompt files "contain only one field" but the example (and the general header requirement above) shows a required seclab-taskflow-agent header plus the prompt key. Consider clarifying this as "only one additional top-level field besides the required header" to avoid confusing readers.

Suggested change
They contain only one field, the `prompt` field. Reusable prompts can be referenced in tasks using Jinja2's `{% include '<import-path>' %}` directive. For example, the following `prompt`.
Besides the required `seclab-taskflow-agent` header, they contain only one additional top-level field: `prompt`. Reusable prompts can be referenced in tasks using Jinja2's `{% include '<import-path>' %}` directive. For example, the following `prompt`.

Copilot uses AI. Check for mistakes.
@p- p- merged commit 7f64c4e into main Apr 16, 2026
13 checks passed
@p- p- deleted the copilot/fix-version-numbers-in-readme-and-docs branch April 16, 2026 08:06
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.

4 participants