qiusuo0226/chrono-pm-skill / governance-shared/baselines/3.15.0/ChronoPM-Project
chrono-pm-project
VerifiedMarkdown 驱动的单项目 AI 项目管理技能。覆盖需求、待办、进度、风险问题、里程碑、成本、日报周报、会议纪要、决策、复盘、初始化向导、计划、完整性巡检、历史计划导入、词库、PM 偏好。录入只发生在本项目 ai 目录。跨项目归集/检索请使用伴生技能 ChronoPM-Portfolio(只读)。触发:项目管理、日报、周报、风险登记册、需求追踪、里程碑、ChronoPM、记录/整理记录/补全/回填/更新/归档/入库/评审/验收、会议纪要、合同登记、初始化项目、倒排、待办、完整性巡检、词库、偏好。支持主动变更+人工确认:写入即标记待确认并登记 pm-decisions,确认后生效。需求只绑工作包,计划只绑工作包。
scripts/verify_requirement_wp.py
View on GitHub#!/usr/bin/env python3
"""只读:D-REQ-WP-01/02 + D-SOURCE-01。退出 0/1/2。"""
import argparse
import re
import sys
from pathlib import Path
def _ai(root: Path) -> Path:
ai = root / "ai"
return ai if ai.exists() else root
def _front(text: str) -> dict:
m = re.match(r"^---\n(.*?)\n---", text, re.S)
if not m:
return {}
out = {}
for line in m.group(1).splitlines():
if ":" in line:
k, v = line.split(":", 1)
out[k.strip()] = v.strip()
return out
def wp_reqs(text: str):
ids = []
in_s2 = False
for line in text.splitlines():
if line.startswith("## 2.") and "关联需求" in line:
in_s2 = True
continue
if in_s2 and line.startswith("## "):
break
if in_s2 and line.startswith("|") and "---" not in line:
cells = [c.strip() for c in line.strip("|").split("|")]
if cells and cells[0].startswith("REQ"):
ids.append(cells[0].split()[0])
return ids
def main():
p = argparse.ArgumentParser()
p.add_argument("--root", required=True)
args = p.parse_args()
ai = _ai(Path(args.root))
diffs = []
reg = ai / "requirements" / "requirement-register.md"
req_wps = {}
if reg.exists():
for line in reg.read_text(encoding="utf-8").splitlines():
if line.startswith("|") and "REQ" in line:
cells = [c.strip() for c in line.strip("|").split("|")]
if cells and cells[0].startswith("REQ"):
wcol = cells[4] if len(cells) > 4 else ""
req_wps[cells[0]] = [x.strip() for x in re.split(r"[,,]", wcol) if x.strip().startswith("WP")]
wpdir = ai / "wps"
wp_files = set()
wp_to_req = {}
if wpdir.exists():
for f in wpdir.glob("WP-*.md"):
wp_files.add(f.stem)
t = f.read_text(encoding="utf-8")
fm = _front(t)
wpid = fm.get("wp_id") or f.stem
wp_to_req[wpid] = wp_reqs(t)
for rid, wlist in req_wps.items():
for w in wlist:
if w not in wp_files and not any(x.startswith(w) for x in wp_files):
diffs.append(f"D-REQ-WP-01 {rid} 工作包 {w} 无文件")
for wpid, rlist in wp_to_req.items():
for r in rlist:
if r not in req_wps:
diffs.append(f"D-REQ-WP-02 {wpid} 需求 {r} 不在登记册")
src = ai / "requirements" / "sources"
sidx = src / "_index.md" if src.exists() else None
if src and src.exists():
metas = {d.name for d in src.iterdir() if d.is_dir() and (d / "meta.md").exists()}
idx_ids = set()
if sidx and sidx.exists():
for line in sidx.read_text(encoding="utf-8").splitlines():
if line.startswith("|"):
cells = [c.strip() for c in line.strip("|").split("|")]
if cells and cells[0] not in ("编号", "SRC", ""):
idx_ids.add(cells[0])
for m in metas - idx_ids:
diffs.append(f"D-SOURCE-01 {m} 有 meta 无索引行")
for i in idx_ids - metas:
if i not in ("编号", "ID"):
diffs.append(f"D-SOURCE-01 索引有 {i} 无 meta.md")
for d in diffs:
print("DIFF", d)
if diffs:
return 1
print("OK")
return 0
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |