/pfd-skills:pjm-pfd-replanfrom pfd-skills
Replans execution timelines when progress slips: reads progress.tsv, triages end-date risk via critical path float, re-derives scenario tables with remaining work, and shows old-vs-new timeline diff.
Ships in pfd-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When a project planned with pjm-pfd-estimation-plan is delayed, reflect the progress table <project>/progress.tsv and redraw the plan. Do not change the master ap.tsv or the estimate boxes on the PFD (to preserve the original estimates and allow a retrospective on estimation accuracy). Ticket-system-specific processing (fetching progress, writing dates back) is not part of this skill.
This skill builds on the procedures and conventions of pjm-pfd-estimation-plan. Read pjm-pfd-estimation-plan/SKILL.md in the same plugin first.
-poor does not finish within 20 seconds, use -poorest; once you switch one, switch all of them from then on).-poorest (deterministic). Keep ticket updates to the minimum needed, based on the diff in Timeline Diff.optimistic in file and setting names as pessimistic.pfdhelp -short to see the descriptions of the pfd-tools tools.Confirm the following. If anything is missing, run pjm-pfd-estimation-plan first:
ap.tsv, scenario settings files project_optimistic.json / project_pessimistic.json, holidays_ja.txt)plan_optimistic.json / plan_pessimistic.json, and the timelines (timeline_*.tsv or plan_*.mmd)criticalpath_*.tsv (if the one for the basis scenario is missing, generate it at the start of Triage)<project>/progress.tsv is a ticket-system-independent intermediate format for progress, holding the remaining work volume per atomic process (残楽観作業量 = remaining optimistic work volume, 残悲観作業量 = remaining pessimistic work volume):
ID 残楽観作業量 残悲観作業量
P1 0 0
P2 0.5 1
P3
| Value | Meaning |
|---|---|
| Both columns blank, or no row | Not started (original estimate stays) |
0 | Completed |
| Positive number | Remaining work volume (business days; same unit as the estimate boxes) |
A missing <project>/progress.tsv is not a failed prerequisite. If it is missing, create it here (do not abort this skill). Create a new file with only the header row ID, 残楽観作業量, 残悲観作業量 (tab-separated), and, based on the ID set from pfdesttable <project>/pfd.drawio.png, fill in rows only for completed and in-progress processes. Processes without a row are treated as not started, so you do not need to list every ID. Ask the user for the remaining work volumes.
Validate before applying:
ID exists as an atomic process in the PFD (check against the ID set from pfdesttable <project>/pfd.drawio.png; warn about nonexistent IDs and confirm their exclusion)残楽観作業量 ≤ 残悲観作業量 (when both are filled in)Before replanning, determine and report first whether the planned end date of the basis scenario for deadlines (the foundation of ticket deadlines) moves. If a worker only wants to decide whether escalation is needed based on the expected delay of their own process, use pjm-pfd-delay-triage, which can run this triage on its own. Use the previous criticalpath_optimistic.tsv (the one for the scenario used as the basis for deadlines; see Conventions). If it is missing, generate it now, while the scenario tables are still the previous ones (this gives an analysis of the previous plan; if -poor does not finish within 20 seconds, use -poorest):
$ criticalpath -f <project>/project_optimistic.json -poor > <project>/criticalpath_optimistic.tsv
Count the delay in business days as the number of business days from "the process's scheduled end date in the old plan" to "the end date expected now (re-estimated from the remaining work volume)":
最大弾性値(全余裕) (maximum elasticity, i.e. total float) → the basis scenario's planned end date does not move (no full redraw of ticket deadlines is needed).criticalpath_pessimistic.tsv and report it as well (if exceeded, say that a date adjustment with stakeholders is likely to be needed).Also present the scope of impact (successor processes whose dates may move):
$ pfdquery -f <project>/project_optimistic.json -reachable <delayed process ID>
The REACHABLE rows list the delayed process itself and the successor processes reachable from it. Pass only process IDs to -reachable (there is a known issue where passing a deliverable ID causes a panic).
Triage caveats:
Before re-deriving and regenerating, copy whichever previous outputs exist into <project>/replan/<YYYYMMDD>/ as a backup (it becomes the comparison baseline for Timeline Diff):
$ mkdir -p <project>/replan/<YYYYMMDD>
$ cp <project>/ap_optimistic.tsv <project>/ap_pessimistic.tsv <project>/plan_optimistic.json <project>/plan_pessimistic.json <project>/timeline_*.tsv <project>/plan_*.mmd <project>/criticalpath_*.tsv <project>/replan/<YYYYMMDD>/ 2>/dev/null || true
If there is no old timeline TSV (mermaid workflow), generate one at this point from the previous plan-json and put it in the backup directory. It can only be reproduced correctly now, while the scenario tables and the scenario settings' start_day still hold the previous contents (override only the output format, and let the start date and business hours be read from the settings file):
$ plantimeline -f <project>/project_optimistic.json -out-format google-spreadsheet-tsv <project>/plan_optimistic.json > <project>/replan/<YYYYMMDD>/timeline_optimistic.tsv
Confirm the replan start date (the day planning of the remaining work begins; default: the next business day) with the user, and update start_day in all scenario settings files to the same date (the old value can be traced in git history). Subsequent timeline rendering uses this start_day, so there is no need to pass -start on the command line again.
Re-derive ap_optimistic.tsv / ap_pessimistic.tsv using the queries from estimation-plan's Derive Scenario Tables with the following two modifications (apply the other branches, such as the rework-edge format and the coarse-granularity resource default, unchanged):
LEFT JOIN <project>/progress.tsv AS t3 ON t1.ID = t3.ID to the end of the FROM clause予想作業量 expression with CASE WHEN LENGTH(t3."残楽観作業量") > 0 THEN t3."残楽観作業量" ELSE t1."楽観作業量" END (for pessimistic, 残悲観作業量 / 悲観作業量)For processes with no row in progress.tsv or with blank cells, the LEFT JOIN result is NULL or an empty string, so LENGTH(...) > 0 is false and the original estimate is used.
Example without rework edges at fine granularity (optimistic. For pessimistic, read 楽観→悲観 and 0.1→0.3. $(pfdres <count>) is handled the same as in estimation-plan):
$ pfdesttable <project>/pfd.drawio.png | qhs -H -O -t -T "SELECT t1.ID, t2.\"説明\", CASE WHEN LENGTH(t3.\"残楽観作業量\") > 0 THEN t3.\"残楽観作業量\" ELSE t1.\"楽観作業量\" END AS \"予想作業量\", 0.1 AS \"予想手戻り作業量割合\", CASE WHEN LENGTH(t2.\"楽観必要資源\") > 0 THEN t2.\"楽観必要資源\" ELSE '$(pfdres <optimistic worker_count>)' END AS \"必要資源\", '' AS \"開始条件\" FROM \"-\" AS t1 JOIN <project>/ap.tsv AS t2 ON t1.ID = t2.ID LEFT JOIN <project>/progress.tsv AS t3 ON t1.ID = t3.ID" > <project>/ap_optimistic.tsv
After deriving, Read a few lines to confirm the remaining work volumes were applied, and report to the user the counts of completed (0), started (remaining volume), and not-started (original value) processes.
Rerun estimation-plan's Project Files And Lint → Generate Plan JSON → output generation (GitHub + Mermaid or Google Sheets Timeline, plus Master Schedule if needed) with the same procedure. The only differences:
The start date for timeline rendering is read from the start_day updated in Replan Start (do not pass -start again)
Even when the output format is mermaid, also generate a timeline TSV for Timeline Diff (override only the output format):
$ plantimeline -f <project>/project_optimistic.json -out-format google-spreadsheet-tsv <project>/plan_optimistic.json > <project>/timeline_optimistic.tsv
Also rerun criticalpath for both scenarios to update criticalpath_optimistic.tsv / criticalpath_pessimistic.tsv (the one for the basis scenario becomes the baseline for the next triage)
Compare the old and new timeline TSVs and present the list of processes whose start or end changed. These are the candidates for reflecting dates into the ticket management system.
With feedback loops, the timeline TSV has multiple rows per (process, completion count), so first aggregate per process (start = first start, end = last end). Tickets are per process, so this granularity also fits the update (qhs does not support subqueries in the FROM clause, so split it into two steps):
$ qhs -H -O -t -T "SELECT \"AtomicProcess\", \"Description\", MIN(\"StartTime\") AS \"StartTime\", MAX(\"EndTime\") AS \"EndTime\" FROM <project>/timeline_optimistic.tsv GROUP BY \"AtomicProcess\"" > <project>/timeline_optimistic_agg.tsv
$ qhs -H -O -t -T "SELECT \"AtomicProcess\", \"Description\", MIN(\"StartTime\") AS \"StartTime\", MAX(\"EndTime\") AS \"EndTime\" FROM <project>/replan/<YYYYMMDD>/timeline_optimistic.tsv GROUP BY \"AtomicProcess\"" > <project>/replan/<YYYYMMDD>/timeline_optimistic_agg.tsv
JOIN the aggregated old and new tables and extract only the processes whose dates changed. Exclude completed processes (remaining = 0) (so as not to overwrite actual dates on tickets). The output columns 旧開始 / 新開始 / 旧終了 / 新終了 are old start / new start / old end / new end:
$ qhs -H -O -t -T "SELECT n.\"AtomicProcess\", n.\"Description\", o.\"StartTime\" AS \"旧開始\", n.\"StartTime\" AS \"新開始\", o.\"EndTime\" AS \"旧終了\", n.\"EndTime\" AS \"新終了\" FROM <project>/timeline_optimistic_agg.tsv AS n JOIN <project>/replan/<YYYYMMDD>/timeline_optimistic_agg.tsv AS o ON n.\"AtomicProcess\" = o.\"AtomicProcess\" LEFT JOIN <project>/progress.tsv AS p ON n.\"AtomicProcess\" = p.ID WHERE (n.\"StartTime\" <> o.\"StartTime\" OR n.\"EndTime\" <> o.\"EndTime\") AND (LENGTH(COALESCE(p.\"残楽観作業量\", '')) = 0 OR CAST(p.\"残楽観作業量\" AS REAL) <> 0)"
qhs reads blank cells as NULL. The completed-process exclusion absorbs NULL with COALESCE (the form NOT (LENGTH(...) > 0 AND ...) would make LENGTH(NULL) NULL and, under three-valued logic, drop not-started rows too).
Even for a delay within total float, serial successors (e.g., P3 following the delayed P1) appear in this diff and parallel processes that do not move do not, so ticket updates are kept to the minimum. If the diff is large (dates of non-delayed processes also moved widely), present it with a note that the global re-optimization rearranged the plan.
(Optional) For completed processes (remaining = 0), present the list of original estimates (the pfdesttable output) and encourage comparing them with actuals and reflecting on them. Actual durations are information on the ticket management system side, so this skill does not handle them.
予想作業量 of 0 in ap.tsv is rounded up internally by pfd-tools to a minimum of 0.001. Completed processes finish as "nearly instantaneous tasks" right after the new start date, and successors' starts shift later by 0.001 business days each (about 30 seconds with duration: 8). This is negligible for day-granularity ticket updates.What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/pjm-pfd-delay-triageA lightweight triage for when a worker (process owner) thinks "my process is going to be late". It uses the total float (maximum elasticity) from the critical path to judge the impact on the planned end date and decides whether escalation to the PjM/PMO is needed. If the delay is within the total float, no escalation is needed and the delay is OK; if it exceeds it, it generates an escalation report addressed to the PjM/PMO. Triggers when the user says things like "it's going to be late", "I might not make it", "how much can I delay", "I want to check whether escalation is needed" (or in Japanese, "遅れそう", "間に合わなそう", "どこまで遅らせていい", "エスカレーションが必要か確認したい"). It does not replan (redo the dates) itself; the PjM/PMO does that with pjm-pfd-replan.
/pjm-pfd-estimation-planA workflow that uses pfd-tools to produce a two-point optimistic/pessimistic estimate from the estimate boxes on the PFD and the ap.tsv of a bootstrapped project. It derives scenario tables, lints, runs pfdplan, analyzes the critical path, runs an improvement loop, and generates a Mermaid Gantt or Google Sheets Timeline. Triggers when the user says things like "run the estimate", "I want to build a Gantt", "check the critical path", "generate a timeline" (or in Japanese, "見積もりを実行", "Gantt を作りたい", "クリティカルパスを確認", "タイムラインを生成").
Other plugins' skills for the same job
npx claudepluginhub kuniwak/pfd-tools --plugin pfd-skills