pma
npx skills add https://github.com/zzci/skills --skill pma
Agent 安装分布
Skill 文档
PMA â Project Management Assistant / 项ç®å¼å婿
Run delivery work with clear gates, minimal diffs, and explicit task/plan tracking. éè¿æ¸ æ°é¨ç¦ãæå°æ¹å¨ãæ¾å¼ä»»å¡/æ¹æ¡è·è¸ªæ¨è¿äº¤ä»ã
Hard Rules / 硬æ§è§å
- Use one project language for docs, task files, and commit messages (follow user preference, otherwise follow existing project language). å ¨é¡¹ç®ä» 使ç¨ä¸ç§è¯è¨ï¼ç¨æ·æå®ä¼å ï¼å¦å沿ç¨é¡¹ç®ç°æè¯è¨ã
- Read before write: inspect call chains, related config/tests, and recent changelog context before editing logic. å è¯»åæ¹ï¼ä¿®æ¹é»è¾åå æ¢³çè°ç¨é¾ãé ç½®/æµè¯ä¸æè¿æ¥å¿ã
- Make minimal requested changes only; do not add unrequested refactors or features. åªåè¢«è¦æ±çæå°æ¹å¨ï¼ä¸æ©å±éæ±ã
- Never use plan mode (
EnterPlanMode,mode: "plan"). Manage plans indocs/plan/files only. ç¦æ¢ plan 模å¼ï¼æ¹æ¡ä» ç¨docs/plan/æä»¶ç®¡çã - Do not implement before explicit confirmation (
proceed/å¼å§å®ç°). æ¶å°æç¡®âå¼å§å®ç°âåï¼ä¸è¿å ¥å®ç°é¶æ®µã - Use English filenames only, even for Chinese content (for example:
architecture.md,changelog.md). æä»¶åå¿ é¡»ä½¿ç¨è±æï¼å³ä½¿å 容æ¯ä¸æï¼ä¾å¦åºå®ä½¿ç¨architecture.mdãchangelog.mdï¼ã
Three-Phase Workflow / ä¸é¶æ®µå·¥ä½æµ
Phase 1: Investigation / 第ä¸é¶æ®µï¼è°æ¥
- Trace upstream/downstream call chains, symbol references, and types.
- Search related code, config, tests, migrations, and docs.
- Read the tail of
docs/changelog.mdfor recent context. - Find or create the matching task in
docs/task/index.mdand claim it ([-]).
Non-trivial task rule / éå¹³å¡ä»»å¡å¤å®ï¼
- If the change touches
>=3files or crosses modules, createdocs/plan/PLAN-NNN.mdand write findings to## Context/## ç°ç¶. - è¥æ¹å¨æ¶å
>=3æä»¶æè·¨æ¨¡åï¼åå»ºæ¹æ¡æä»¶å¹¶å åâç°ç¶âã
Phase 2: Proposal / 第äºé¶æ®µï¼æ¹æ¡
Output these items, then stop for approval: è¾åºä»¥ä¸å 容åå¿ é¡»çå¾ å®¡æ¹ï¼
- Current state / ç°ç¶
- Proposal / æ¹æ¡
- Risks / é£é©
- Scope / å·¥ä½é
- Alternatives (if multiple approaches exist) / å¤éæ¹æ¡ï¼å¦æï¼
For non-trivial tasks:
- Complete remaining sections in
PLAN-NNN.md. - Append one line to
docs/plan/index.mdwith[ ]. - Wait for user annotations and address all of them before implementation.
Phase 3: Implement -> Verify -> Record / 第ä¸é¶æ®µï¼å®ç° -> éªè¯ -> è®°å½
Only after approval: ä» å¨å®¡æ¹éè¿åæ§è¡ï¼
- If a plan exists, set plan index marker to
[-]and detailstatustoimplementing. - Implement step by step according to proposal.
- Run focused self-verification.
- Set task index marker to
[x]and task detailstatustocompleted. - If a plan exists, set plan index marker to
[x]and plan detailstatustocompleted. - Update changelog as needed.
Task and Plan Files / ä»»å¡ä¸æ¹æ¡æä»¶
Use these canonical references instead of redefining formats in-place: ç»ä¸æ ¼å¼ä»¥ä¸åææ¡£ä¸ºåï¼ä¸å¨æ¬æä»¶éå¤å®ä¹ï¼
- Task format: docs/task-format.md
- Plan format: docs/plan-format.md
Required structure:
docs/task/index.md: one-line task entriesdocs/task/PREFIX-NNN.md: task detail filesdocs/plan/index.md: one-line plan entriesdocs/plan/PLAN-NNN.md: plan detail files
Claim-Before-Work (Multi-Agent Safety) / è®¤é¢æºå¶ï¼å¤ Agent å®å ¨ï¼
Before writing any implementation code: åä»»ä½å®ç°ä»£ç åå¿ é¡»å®æï¼
- Read
docs/task/index.md; for[-]items, read detailowner. - If another agent owns the in-progress task, skip it.
- Claim atomically:
- Update task index
[ ] -> [-] - Update task detail
status -> in_progress, setowner - Call
TaskUpdate(status: "in_progress", owner: "<agent>")if task tools are available
- Update task index
- Start implementation only after the claim is fully written.
On completion:
- Set task index
[-] -> [x] - Set task detail
status -> completed - Call
TaskUpdate(status: "completed")if task tools are available
On close/won’t do:
- Set task index to
[~] - Set task detail
status -> closedand record reason - Call
TaskUpdate(status: "deleted")if task tools are available
Sync Rules / 忥è§å
Task status updates are immediate, never deferred. ä»»å¡ç¶æå¿ 须峿¶åå ¥ï¼ä¸å¯å»¶è¿ã
- Primary source is files in
docs/task/anddocs/plan/. - If
TaskCreate/TaskUpdatetools are available, keep tool state in sync with file state. - If task tools are unavailable, continue with file-only sync and state this in the progress update.
Session checklist / ä¼è¯æ£æ¥æ¸ åï¼
- Session start: read
docs/task/index.md, active task details, anddocs/plan/index.md. - New task: create detail file first, then append index line.
- Before work: complete Claim-Before-Work.
- Session end: verify statuses are written and update index header date.
Documentation System / ææ¡£ç³»ç»
English project:
docs/
âââ task/
â âââ index.md
â âââ PREFIX-NNN.md
âââ plan/
â âââ index.md
â âââ PLAN-NNN.md
âââ architecture.md
âââ changelog.md
䏿项ç®ï¼ä» å å®¹ä¸æï¼æä»¶åä¿æè±æï¼ï¼
docs/
âââ task/
â âââ index.md
â âââ PREFIX-NNN.md
âââ plan/
â âââ index.md
â âââ PLAN-NNN.md
âââ architecture.md
âââ changelog.md
Write investigation findings into plan ## Context / ## ç°ç¶.
Do not create extra report files; temporary files go to ./tmp/.
Changelog Conventions / å¼åæ¥å¿çº¦å®
Entry format:
## YYYY-MM-DD HH:MM [tag]
[content]
Recommended tags:
- EN:
[progress],[BUG-P0],[BUG-P1],[pitfall],[decision] - 䏿:
[è¿åº¦],[BUG-P0],[BUG-P1],[踩å],[å³ç]
Project Initialization / 项ç®åå§å
On first use in a project: 馿¬¡æ¥å ¥é¡¹ç®æ¶æ§è¡ï¼
- Ensure
CLAUDE.mdcontains a## Project Development/## 项ç®å¼å管çsection that references/pmaand the three-phase workflow. - Ensure
AGENTS.mdcontains the same section. - Ensure
docs/task/index.mdexists (initialize from docs/task-format.md). - Ensure
docs/plan/index.mdexists (initialize from docs/plan-format.md). - Ensure core docs exist (
architecture.md+changelog.md), and keep content language aligned with the project.
Tools and Security / å·¥å ·ä¸å®å ¨
- Prefer semantic code navigation tools for architecture understanding.
- Check official docs (e.g., Context7) before using third-party APIs.
- Use code/web search tools for examples and troubleshooting when needed.
- Verify UI behavior after UI edits.
- Keep secrets in
.env; never hardcode or log secrets. - Mark risky commands with an explicit warning comment.