From plan-interview
Process multiple plan files in a directory — analyze codebase evidence and add/update YAML frontmatter in bulk with summary-first approval
npx claudepluginhub shawn-sandy/agentics --plugin plan-interview[directory-path] [--force] — omit directory to use plansDirectory setting; --force re-analyzes files with existing status# Update Plan Status Process multiple plan files in a directory — analyze codebase evidence for each file and add/update YAML frontmatter in bulk. Uses a summary-first, bulk-approval UX instead of per-file confirmation. ## Instructions ### Step 0 — Create progress todos Before doing anything else, use `TodoWrite` to create todos for each step: - Step 1: Resolve directory and discover files - Step 2: Triage files into processing groups - Step 3: Get git dates (batch) - Step 4: Analyze codebase evidence (batch) - Step 5: Type classification (batch) - Step 6: Present summary and get appro...
/update-plan-statusVerifies plan completion status by checking issues, PRs, codebase implementation, and tests; generates report and updates plan file.
Process multiple plan files in a directory — analyze codebase evidence for each file and add/update YAML frontmatter in bulk. Uses a summary-first, bulk-approval UX instead of per-file confirmation.
Before doing anything else, use TodoWrite to create todos for each step:
Mark each todo status: "completed" as you finish that step.
Resolve which directory to scan using this priority order:
$ARGUMENTS contains a directory path (not --force),
use it..claude/settings.json. If a
"plansDirectory" key exists, use that path.~/.claude/settings.json. Same logic as above.docs/plans/ relative to $PWD.Also check $ARGUMENTS for the --force flag. When present, re-analyze all
files including those with existing status fields.
Glob all *.md files in the resolved directory. Announce:
"Found N plan files in [directory]"
If zero files found, tell the user and stop.
Read the first 10 lines of each file to check for YAML frontmatter. Classify every file into one of five groups:
| Group | Condition | Default action |
|---|---|---|
| A | No frontmatter | Analyze and add frontmatter |
| B | Frontmatter, no status field | Analyze and add status |
| C | status: todo or status: in-progress | Skip (unless --force) |
| D | status: completed | Skip (unless --force) |
| E | status: artifact (legacy) | Always process — normalize |
Present a triage summary:
Plan file triage (N files in docs/plans/):
Group Count Action
────────────────────────── ───── ──────────────────────────────────
A No frontmatter 80 Will analyze + add frontmatter
B Frontmatter, no status 1 Will analyze + add status
C Has status (todo/wip) 0 Skip (use --force to re-analyze)
D Completed 3 Skip (use --force to re-analyze)
E Legacy artifact 0 Will normalize to completed + type
Processing: 81 files
Skipping: 3 files
Then ask via AskUserQuestion:
"Proceed with analyzing N files? No files will be modified until you approve the results."
Options: "Yes, proceed" / "Cancel"
If cancelled, stop.
Run git date commands for all files in the processing set using a single Bash shell loop (not one call per file):
for f in file1.md file2.md ...; do
created=$(git log --follow --diff-filter=A --format="%Y-%m-%d" -- "$f" 2>/dev/null | tail -1)
modified=$(git log -1 --format="%Y-%m-%d" -- "$f" 2>/dev/null)
echo "$f|${created}|${modified}"
done
Apply the same rules as single-file plan-status:
created is empty (file not tracked by git), use today's datemodified equals created, treat modified as absent (omit from
frontmatter)Store all results in memory for use in Steps 5–7.
For each file in the processing set:
``` delimiters).Stricter token filter (batch-specific): Unlike single-file plan-status,
batch mode uses a tighter filter to avoid noisy scores across many files:
plugins/, src/,
.claude/, docs/, tests/) or known code extensions (.ts, .tsx,
.md, .json, .py, .js, .css, .scss)"1.0.0", 1.2.3)"license": "MIT")GET /api/..., DELETE /api/...)HEAD~1, origin/main)For each qualifying token, check:
Glob to test whether it matches an existing file pathGrep to test whether it appears as an identifier in the codebaseScore the results:
todoin-progresscompletedZero-signal files (batch-specific): If a file has no qualifying tokens
after filtering, assign provisional status todo and flag as no signals.
Do NOT prompt per-file — the user can override in Step 6.
Run this step for all files that scored completed in Step 4, including
legacy status: artifact files from Group E.
type: artifact in its existing frontmatter, keep it
and skip.modified date (use created if modified is
absent).type: artifact
(flag as 30d+ old in summary)type: standardstatus: artifact files (Group E) → type: artifact automaticallyAll type assignments are overridable in Step 6.
Output a results table:
Batch Status Analysis — 81 files processed
# File Status Type Tokens Evidence Created Modified Flags
── ──────────────────────────────────── ──────────── ──────── ────── ──────── ────────── ────────── ────────────
1 add-allowed-tools-recommendation.md completed standard 8/8 100% 2026-03-26 —
2 add-argument-support.md in-progress — 3/7 43% 2026-02-15 2026-03-01
3 implement-marketplace-api.md todo — 0/5 0% 2026-01-20 —
4 document-plugin-version-bump.md completed standard 5/5 100% 2026-03-15 — docs plan
5 agent-creator-plugin.md completed artifact 6/6 100% 2026-01-10 — 30d+ old
...
Flags:
30d+ old — completed plan modified 30+ days ago; auto-classified as
type: artifactno signals — no qualifying tokens found after filtering; defaulted to
tododocs plan — plan title contains "document", "readme", "guide", "enhance",
or similar documentation terms; token-based scoring may be inaccurate —
review recommendedAfter the table, output aggregated stats:
Summary:
completed: 52 files (38 standard, 14 artifact)
in-progress: 18 files
todo: 11 files (6 no-signals)
Flags:
30d+ old (auto-artifact): 14 files
docs plan (review): 6 files
no signals (defaulted todo): 6 files
Ask via AskUserQuestion:
"How would you like to proceed?"
Options:
If "Override some, then write":
Ask: "Which group would you like to override?"
Options:
type: artifact
(30d+ old flag); set each to standard or artifactdocs plan flag; set status manuallyFor group overrides, ask one question per group covering all flagged files. For specific-file overrides, ask for the number(s) and the desired status (and type, if completed).
After all overrides are collected, confirm the final count before writing:
"Ready to write frontmatter to N files. Confirm?"
Only on user confirmation.
Apply the same field rules as single-file plan-status:
type only when status is completed. Valid values: standard,
artifact. Omit type for todo and in-progress.modified if it equals created.status: artifact, write status: completed +
type: artifact.Hybrid write strategy:
Files without existing frontmatter: use Bash to prepend the YAML
block. Run all inserts in a single shell loop:
insert_frontmatter() {
local file="$1" header="$2"
{ printf '%s\n\n' "$header"; cat "$file"; } > "$file.tmp" && mv "$file.tmp" "$file"
echo "Updated: $file"
}
insert_frontmatter "docs/plans/file1.md" "---
status: todo
created: 2026-01-15
---"
insert_frontmatter "docs/plans/file2.md" "---
status: completed
type: standard
created: 2026-03-01
---"
# ... one call per file
Files with existing frontmatter: use Edit tool to update/add only the
status, type (when completed), created, and modified fields.
Preserve all other fields.
Output a progress message every 10 files. Final summary:
Batch status complete:
81 files updated
0 files skipped
0 errors
After writing, confirm: "Batch frontmatter update complete."
/plan-interview:update-plan-status # uses plansDirectory setting or docs/plans/
/plan-interview:update-plan-status docs/plans/ # specific directory
/plan-interview:update-plan-status ~/.claude/plans/ # absolute path
/plan-interview:update-plan-status docs/plans/ --force # re-analyze files with existing status