qiusuo0226/chrono-pm-skill / governance-shared/baselines/3.11.0/ChronoPM-Project
chrono-pm-project
VerifiedMarkdown 驱动的单项目 AI 项目管理技能。覆盖需求、待办、进度、风险问题、里程碑、成本、日报周报、会议纪要、决策、复盘、初始化向导、计划、完整性巡检、历史计划导入、词库、PM 偏好。录入只发生在本项目 ai 目录。跨项目归集/检索请使用伴生技能 ChronoPM-Portfolio(只读)。触发:项目管理、日报、周报、风险登记册、需求追踪、里程碑、ChronoPM、记录/整理记录/补全/回填/更新/归档/入库/评审/验收、会议纪要、合同登记、初始化项目、倒排、待办、完整性巡检、词库、偏好。支持主动变更+人工确认:写入即标记待确认并登记 pm-decisions,确认后生效。需求只绑工作包,计划只绑工作包。
scripts/chronopm_init/template_renderer.py
View on GitHub#!/usr/bin/env python3
"""ChronoPM 模板渲染与基础文件辅助函数。
职责:模板目录定位、文件复制、目录创建、事实源与索引文件生成、
continuity 阶段衔接文件生成。函数体在 CR-20260810-001 中由
scripts/init_workspace.py 原样迁移,保证行为零变化。
"""
import shutil
from pathlib import Path
from .config import ALL_TEMPLATE_FILES # noqa: F401 (供外部按需引用)
def get_templates_dir():
"""获取 Skill 包中的模板目录"""
skill_root = Path(__file__).parent.parent.parent
return skill_root / "assets" / "templates"
def copy_template(src_dir: Path, target_path: Path, template_name: str):
"""从模板目录复制文件到目标路径"""
src = src_dir / template_name
if src.exists() and not target_path.exists():
target_path.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(src, target_path)
return True
return False
def create_dirs(base_dir: Path, dirs: list):
"""创建目录结构"""
for dir_path in dirs:
full_path = base_dir / dir_path
full_path.mkdir(parents=True, exist_ok=True)
def create_fact_sources(base_dir: Path, fact_files: dict, templates_dir: Path):
"""创建事实源文件"""
for target_path, template_name in fact_files.items():
dst = base_dir / target_path
copy_template(templates_dir, dst, template_name)
def create_indexes(base_dir: Path, index_templates: dict, name: str):
"""创建索引文件"""
for index_path, content_template in index_templates.items():
dst = base_dir / index_path
dst.parent.mkdir(parents=True, exist_ok=True)
content = content_template.format(name=name)
dst.write_text(content, encoding="utf-8")
def create_continuity_files(ai_dir: Path, project_name: str):
"""在 ai/context/ 下创建阶段衔接文件(v2.1.0:原 continuity/ 并入 context/,D-9)"""
continuity_dir = ai_dir / "context"
continuity_dir.mkdir(parents=True, exist_ok=True)
templates_dir = get_templates_dir()
# 创建阶段谱系
lineage_path = continuity_dir / "project-lineage.md"
if not lineage_path.exists():
copy_template(templates_dir, lineage_path, "project-lineage-template.md")
# 创建历史来源登记
legacy_path = continuity_dir / "legacy-sources.md"
if not legacy_path.exists():
copy_template(templates_dir, legacy_path, "legacy-sources-template.md")
# 结转登记册已删除(v2.0.0:结转/延期字段化到待办表)
# 创建导入日志
import_log_path = continuity_dir / "import-log.md"
if not import_log_path.exists():
copy_template(templates_dir, import_log_path, "import-log-template.md")
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 |