fix(aidd-dev/plan): plan check hook reports false positives on a two-step plan and on a plan in progress

オープン
#1,190 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

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

調査の方向性

Start with plugins/aidd-dev/skills/01-plan/scripts/validate-plan.cjs and plugins/aidd-dev/skills/02-implement/actions/01-prepare.md; trace how the hook calls the validator at PostToolUse and Stop. Check the hook configuration and existing tests for these paths. Done means changed plans still in pending are checked, missing phase files are ignored while writing and required at Stop, and in-progress or done plans are not flagged.

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

説明

Description

A hook that checks plan.md with validate-plan.cjs (PostToolUse on plan.md plus Stop) reports false positives in two cases. Measured in a disposable test with claude -p (haiku).

  1. Plan written in two steps. After plan.md is written, the validator reports phase-1.md: listed in plan.md, file missing. The agent has not written the phase file yet, so the message is wrong mid-work.
  2. Plan already in progress. The validator requires status: pending. 02-implement (actions/01-prepare.md) sets status: in-progress, and a finished plan is done. A hook run at end of turn flags both as invalid.
Affected file(s)
  • plugins/aidd-dev/skills/01-plan/scripts/validate-plan.cjs
  • plugins/aidd-dev/skills/02-implement/actions/01-prepare.md
Expected behaviour

The hook is silent when the plan is valid or still being written. It only judges a plan created or modified during the turn. Phase files are required only at the end of the turn.

Observed behaviour
  • Case 1: message phase-1.md: listed in plan.md, file missing between the plan.md write and the phase-1.md write.
  • Case 2: a plan with status: in-progress or status: done is reported invalid.

Suggested fix, validated on a test hook:

  • Keep a baseline (sha1 of plan.md at SessionStart and at Stop) and judge only plans that changed in the turn.
  • Judge only plans still pending.
  • At PostToolUse, ignore "listed in plan.md, file missing". At Stop, require the phase files.
AI tool

Claude Code

aidd-cli version

Not applicable (reproduced with a standalone hook and the validate-plan.cjs script, not the CLI).

OS

macOS

Additional context
  • No bug label exists in the repo. The issue type is set to Bug.
  • Not applicable to the Code of Conduct checkbox of the form: left to the reporter.
主要言語
TypeScript
スター
481
フォーク
45
平均マージ
1日 13時間
マージ済み PR(30日)
91

環境構築

はじめの一歩

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

ai-driven-dev/framework のほかの issue

ai-driven-dev/framework の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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