use-pmc

majiayu000 的头像作者 majiayu000

使用 PMC(项目经理 Claude)CLI 进行工作流程编排。在运行工作流程、创建新项目、将文档与实施同步或管理项目规划时,请使用此技能。

📖 中文导读:使用 PMC(项目经理 Claude)CLI 进行工作流程编排。在运行工作流程、创建新项目、将文档与实施同步或管理项目规划时,请使用此技能。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: use-pmc description: Use PMC (Project Manager Claude) CLI for workflow orchestration. Use this skill when running workflows, creating new projects, syncing docs with implementation, or managing project planning.

Use PMC

PMC is a workflow orchestration CLI for Claude Code. It manages project planning, ticket implementation, and documentation sync.

Reference Documentation

Reference When to Read
references/how-to-use-pmc.md Running workflows, CLI commands, available workflows
references/how-to-create-workflow.md Creating custom workflow definitions

Prerequisites

PMC must be available from the repository root:

cd <repo-root>  # Parent directory of .claude/
uv sync

Quick Reference

List Available Workflows

pmc list

Run a Workflow

# By registry name (working_dir defaults to current directory)
pmc run <workflow-name>

# Explicit working_dir (if running from different location)
pmc run <workflow-name> -i working_dir=/path/to/project

# With verbose output
pmc run <workflow-name> -v

# Dry run (preview without executing)
pmc run <workflow-name> --dry-run

Note: working_dir defaults to . (current directory) when not specified.

Common Workflows

Workflow Purpose Command
pm.init-project Initialize planning from PRD pmc run pm.init-project
pm.analyze-gaps Compare codebase vs PRD pmc run pm.analyze-gaps
pm.sync-prd Update PRD from implementation pmc run pm.sync-prd
pm.sync-planning Create tickets for unbuilt features pmc run pm.sync-planning
scaffold.workflow Bootstrap new projects pmc run scaffold.workflow -i project_name=... -i target_dir=...

Typical Workflows

Initialize New Project

# 1. Create project structure
pmc new my-project --stack python-uv

# 2. Add PRD documents to docs/1-prd/

# 3. Initialize planning from PRD
pmc run pm.init-project -i working_dir=./my-project

Sync Documentation with Implementation

# 1. Analyze gaps between code and PRD
pmc run pm.analyze-gaps

# 2. Review docs/1-prd/99-discrepancies.md

# 3. Update PRD for implemented features (optional)
pmc run pm.sync-prd

# 4. Create tickets for unbuilt features (optional)
pmc run pm.sync-planning

Project Management

pmc projects list              # List registered projects
pmc projects info my-project   # Show project details
pmc projects switch my-project # Print cd command
pmc projects stacks            # List available tech stacks

Check Status

pmc status                     # Current execution status
pmc status --ticket T00001     # Status for specific ticket
pmc tasks                      # List running agents

Workflow Validation

Before running a new or modified workflow:

pmc validate <workflow-name>
pmc validate <workflow-name> --check-deps  # Check sub-workflow dependencies

CLI Options

Option Description
-i, --input KEY=VALUE Pass input variables
--dry-run Preview without executing
-v, --verbose Show detailed output
-q, --quiet Minimal output
--log-file PATH Write logs to file
--workflows-dir PATH Override workflows directory

When to Use PMC

Use PMC workflows when:

  • Initializing a project - pm.init-project sets up docs structure from PRD
  • Documentation drift - pm.analyze-gaps finds discrepancies
  • Updating docs - pm.sync-prd and pm.sync-planning fix documentation
  • Creating new projects - pmc new scaffolds with templates
  • Orchestrating ticket work - Supervisor/ticket workflows automate implementation

Troubleshooting

Workflow Not Found

pmc list                              # Check available workflows
pmc validate path/to/workflow.json    # Verify specific file

Missing Inputs

If running from a different directory, specify working_dir:

pmc run pm.init-project -i working_dir=/path/to/project

Dependency Errors

Check sub-workflow dependencies exist:

pmc validate my.workflow --check-deps

View Detailed Logs

pmc run my.workflow -v --log-file ./pmc.log

Critical Rules

  1. Run from repo root - PMC defaults working_dir to current directory
  2. Check PRD first - Ensure docs/1-prd/ has requirements before pm.init-project
  3. Validate before running - Use pmc validate for custom workflows
  4. Review discrepancies - Check 99-discrepancies.md after pm.analyze-gaps
  5. Specify working_dir explicitly - Only needed when running from a different location