一键导入
backfill-timing
Retrofit YAML frontmatter with pipeline timing metadata onto existing project documents that were created before timing was implemented.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Retrofit YAML frontmatter with pipeline timing metadata onto existing project documents that were created before timing was implemented.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | backfill-timing |
| description | Retrofit YAML frontmatter with pipeline timing metadata onto existing project documents that were created before timing was implemented. |
| argument-hint | <callsign> |
| allowed-tools | ["Read","Glob","Grep","Bash","mcp__wcp__wcp_get_artifact","mcp__wcp__wcp_attach","mcp__wcp__wcp_comment"] |
You retrofit YAML frontmatter with pipeline timing metadata onto existing project artifacts on a WCP work item. This is for projects that completed stages before the timing system was added.
$ARGUMENTSCLAUDE.md, AGENTS.md, or CONVENTIONS.md (use the first one found). Read it in full.wcp_get_artifact($ARGUMENTS, "prd.md")).| Document | Stage | Stage Name |
|---|---|---|
prd.md | 0 | prd |
discovery-report.md | 1 | discovery |
architecture-proposal.md | 2 | architecture |
gameplan.md | 3 | gameplan |
test-coverage-matrix.md | 4 | test-generation |
progress.md | 5 | implementation |
qa-plan.md | 7 | qa-plan |
Read each known artifact by filename via wcp_get_artifact($ARGUMENTS, filename):
prd.mddiscovery-report.mdarchitecture-proposal.mdgameplan.mdtest-coverage-matrix.mdprogress.mdqa-plan.mdFor each that returns content, check if it already has YAML frontmatter with pipeline_stage set. If so, skip it — it was created with live timing.
For each document that needs backfilling, try these data sources in priority order:
For progress.md, read its milestone sections. Each milestone section has a **Commit:** \SHORT_SHA`` field. For each commit SHA found:
git log -1 --format='%aI' <sha>
This gives the commit's author date in ISO 8601 format. Use this as pipeline_mN_completed_at for the corresponding milestone.
Most documents have a header like > **Date:** February 5, 2026. Parse the header from the artifact content and format as YYYY-MM-DDT00:00:00-0600 (use local timezone offset from date +%z).
Use this as pipeline_completed_at.
For architecture-proposal.md and gameplan.md, parse the Approval Checklist section from the artifact content. The ### Date: field contains the approval date. Parse and format as ISO 8601.
Use this as pipeline_approved_at.
Note: WCP artifacts don't have filesystem timestamps. If no other source is available (git commits, document header dates, or approval checklist dates), omit the timestamp.
For each document that needs backfilling:
wcp_attach(
id=$ARGUMENTS,
type="<type>",
title="<title>",
filename="<filename>",
content="<modified content with frontmatter>"
)
Type mapping:
| Filename | type | title |
|---|---|---|
prd.md | prd | PRD: [title from content] |
discovery-report.md | discovery | Discovery Report |
architecture-proposal.md | architecture | Architecture Proposal |
gameplan.md | gameplan | Gameplan |
test-coverage-matrix.md | test-matrix | Test Coverage Matrix |
progress.md | progress | Implementation Progress |
qa-plan.md | qa-plan | QA Plan |
Standard documents (prd.md, discovery-report.md, test-coverage-matrix.md, qa-plan.md):
---
pipeline_stage: <N>
pipeline_stage_name: "<name>"
pipeline_project: "$ARGUMENTS"
pipeline_completed_at: "<timestamp>"
pipeline_backfilled: true
pipeline_backfill_source: "<source description>"
---
Note: pipeline_started_at is omitted — it cannot be recovered from backfill sources.
Documents with approval (architecture-proposal.md, gameplan.md):
---
pipeline_stage: <N>
pipeline_stage_name: "<name>"
pipeline_project: "$ARGUMENTS"
pipeline_completed_at: "<timestamp>"
pipeline_approved_at: "<approval timestamp>"
pipeline_backfilled: true
pipeline_backfill_source: "<source description>"
---
progress.md (per-milestone timing):
---
pipeline_stage: 5
pipeline_stage_name: implementation
pipeline_project: "$ARGUMENTS"
pipeline_m1_completed_at: "<timestamp from commit>"
pipeline_m2_completed_at: "<timestamp from commit>"
pipeline_backfilled: true
pipeline_backfill_source: "git commit timestamps"
---
Use these descriptions for the pipeline_backfill_source field:
| Source | Description |
|---|---|
| Git commit | "git commit <short-sha>" |
| Document header date | "document header date" |
| Approval checklist date | "approval checklist date" |
If multiple sources were used for different fields, use the primary source.
pipeline_stage in their frontmatter.pipeline_started_at on backfilled documents. Start times are unrecoverable.Post a completion comment:
wcp_comment(
id=$ARGUMENTS,
author="pipeline/backfill-timing",
body="Timing frontmatter backfilled for [N] artifacts"
)
Tell the user:
pipeline_backfilled: true to distinguish them from live-captured timestamps. Run /metrics $ARGUMENTS to see the computed timing data."Run pipeline Stage 2 (Architecture) for a project. Designs data model, API endpoints, migrations, and security scoping based on Pipeline Configuration in the conventions file.
Run pipeline Stage 1 (Discovery) for a project. Explores the target codebase to understand current state before designing changes.
Run pipeline Stage 3 (Gameplan) for a project. Produces the engineering spec from PRD + Discovery Report + APPROVED Architecture.
Run pipeline Stage 5 (Implementation) for a project milestone. Writes code to make Stage 4's failing tests pass.
Detect the current pipeline stage for a work item and run the next stage. Handles approval gates by invoking /pipeline-approve.
Run the full pipeline autonomously for a work item. Chains stages with context isolation, handles approval gates via interactive interview or auto-approve.