Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

create-task.sh templating: name/description text containing a frontmatter key substring corrupts the file

オープン 初心者向け
#39 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, shell
領域
backend, cli

調査の方向性

agents/task-create/create-task.sh の495~510行付近から始め、Pythonのテンプレート処理ブロックとその置換を調査します。frontmatterフィールドの置換に対して name と description がどのように挿入されるかを確認し、提供されている owner:human または workflow_type: の例で再現します。呼び出し元のテキストが保持され、必須の frontmatter フィールドが設定され、タスクファイルがスキーマ検証に合格すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Context

  • Framework version: 1.6.768
  • Project: 1409-sprind (shared-tooling mode)
  • Reported: 2026-09-21T12:06:04Z

Description

Symptom

agents/task-create/create-task.sh can silently write a schema-invalid task file (required fields blank) and silently corrupt the caller-supplied name/description text, with no error raised, when the name or description happens to contain certain substrings.

Root cause

Around line 495-510, the Python templating block runs a sequence of t.replace(old, new, 1) calls in this order:

t = t.replace('name:', 'name: "' + name... , 1)
t = t.replace('description: >', 'description: >\n' + indent_block(desc), 1)
t = t.replace('status: captured', 'status: ' + e['TC_STATUS'])
t = t.replace('workflow_type:', 'workflow_type: ' + e['TC_WORKFLOW_TYPE'], 1)
t = t.replace('owner:', 'owner: ' + e['TC_OWNER'], 1)
t = t.replace('horizon: now', 'horizon: ' + e['TC_HORIZON'])
t = t.replace('tags: []', 'tags: ' + e['TC_TAGS_YAML'])
t = t.replace('related_tasks: []', 'related_tasks: ' + e['TC_RELATED_YAML'])
...

The name and description are spliced into t first. The subsequent replace(..., 1) calls for workflow_type:, owner:, tags: [], related_tasks: [], horizon: now, created:, last_update: all match the first literal occurrence anywhere in t — not the frontmatter key specifically. Since t now contains the caller's free-text name/description before the real frontmatter lines further down, any of those literal substrings appearing inside the caller-supplied text is matched instead of the intended frontmatter line.

Reproduction (both observed in one session against a real fw task create call)

  1. --name containing the literal text owner:human (as a natural-language description of an ownership condition) → written file: the name: frontmatter field reads "...owner: agenthuman..." (the string agent was spliced into the middle of the caller's own text), and the real owner: frontmatter line was left blank (a required field).
  2. --description containing the literal text workflow_type: → written file: the description text is corrupted with workflow_type: build spliced in mid-sentence, and the real workflow_type: frontmatter line was left blank (a required field).

Both corrupted files passed task creation with no warning or error — the schema-required fields being blank went undetected until a later gate (fw bvp estimate, in this case) refused to operate on the task.

Why it matters

This is a data-integrity bug in the framework's own primary task-creation entrypoint: required fields can end up silently blank, and free-text content the caller explicitly wrote is silently mangled, with zero error signal. Any task whose subject matter is about frontmatter fields (which is common for meta/tooling tasks, audit findings about the task schema itself, etc.) is at risk of triggering this.

Suggested fix

Anchor each frontmatter-field replace to the actual frontmatter line rather than a bare substring — e.g. a re.sub(r'^workflow_type:$', ..., t, count=1, flags=re.MULTILINE) (matching the empty-value template line specifically) instead of str.replace('workflow_type:', ..., 1). Alternatively, perform all frontmatter-field substitutions before splicing in the caller-supplied name/description text, so free text can never be a match target.

Scope note

Filed from a downstream project using .agentic-framework/ in shared-tooling (vendored, read-only) mode.


Reported via fw upstream report from field installation

主要言語
Shell
スター
16
フォーク
6
平均マージ
6時間 24分
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

DimitriGeelen/agentic-engineering-framework のほかの issue

DimitriGeelen/agentic-engineering-framework の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。