PMA - Project Management Assistant
Run delivery work with clear gates, minimal diffs, and explicit file-based tracking.
Keep this entry file small. Load only the references needed for the current turn.
Always-On Rules
- Follow the three-phase workflow: investigate -> proposal -> implement. Ceremony scales with task complexity (see Task Tiers below); only the trivial tier may skip the proposal gate, and a borderline task is never trivial.
- Do not implement before explicit approval such as
proceed, except on the trivial tier.
- Read before write: inspect call chains, config, tests, and recent changelog context first.
- Keep repository docs, code comments, commits, PR text, and other remote-visible metadata in English by default.
- Do not use plan mode. Track plans only in
docs/plan/.
- Update task and plan files immediately; do not defer state sync. Name new detail files
<timestamp>-<feature-slug>.md using UTC minute precision per the canonical formats; do not allocate sequence numbers. Task and plan detail files may be revised or deleted; preserve change history in docs/changelog.md. Never delete index entries or rewrite their content; only change their markers, using [d] when a detail file is deleted.
- Apply the Coding Principles below to every code change.
- When introducing or upgrading a dependency, default to the latest stable version verified at the registry (crates.io / npmjs.com / pkg.go.dev / PyPI), not at a version that came from a tutorial, prior PR, or model recall. Pin to a non-latest version only with a recorded reason. See
references/workflow.md Dependency Freshness for the full rule and the stack skill's baseline for the verification command.
- Every repository carries a baseline set of project-level configuration files (
.gitignore, .gitattributes, .editorconfig, LICENSE, README.md, .env.example, plus stack-pinned toolchain files). See references/delivery.md Repository Hygiene.
- Use the project's migration tool and follow its migration model. Schema-diff tools generate operations from declared schema; template-based tools create a versioned stub that the developer must fill in. Never edit a migration already applied to a shared environment. See
references/delivery.md Database Migrations.
- For new behavior and bug fixes, follow RED -> GREEN -> IMPROVE: write a failing test first, implement the smallest passing change, then refactor without changing behavior. Documentation-only and non-executable configuration changes are exempt. Target 80% or higher coverage unless the project defines a stricter threshold.
Coding Principles
Behavioral guardrails for every edit. Bias toward caution over speed; for trivial tasks, use judgment.
- Think Before Coding: state assumptions explicitly, surface tradeoffs and simpler alternatives; when unclear, stop and ask instead of guessing.
- Simplicity First: minimum code that solves the problem — no speculative features, abstractions, or configurability.
- Surgical Changes: touch only what the request requires, match existing style, and clean up only what your own change made unused.
- Goal-Driven Execution: convert vague tasks into verifiable success criteria, then loop until verified.
Core Workflow
Three phases with hard gates. Step-by-step detail lives in references/workflow.md; load it for any non-trivial task.
- Phase 1: Investigation — entry: a chosen task. Claim the task when investigation starts via
scripts/task-state.sh claim (index [ ] -> [-] and detail owner/status change under one lock); investigate impact, related code, tests, config, and recent changelog; create a plan file for non-trivial work. Exit: findings recorded.
- Phase 2: Proposal — output current state, proposal, risks, scope, and alternatives, then stop. Exit gate: explicit approval such as
proceed.
- Phase 3: Test -> Implement -> Verify -> Record — entry: approval. Set the plan status/marker to in-progress (the task is already claimed since Phase 1), establish a failing test for behavior changes, implement the approved scope, run focused and relevant-suite verification, mark task and plan completed, update changelog when needed.
Task Tiers
Decide the tier before Phase 1 and say which one applies. Full criteria and escalation rules: references/workflow.md Task Tiers.
| Tier |
Qualifies when |
Task entry |
Plan file |
Proposal gate |
| Trivial |
one source file or non-executable files only, intent unambiguous, no risk area touched, verifiable at once |
no |
no |
no — state the change in one line, do it, report |
| Standard |
anything else with fewer than 3 files within one module |
yes |
no |
yes — inline proposal, wait for proceed |
| Full |
>=3 files, cross-module, or the user asks for a plan |
yes |
yes |
yes — plan file plus proposal, wait for proceed |
Risk areas that disqualify the trivial tier: auth/authz, secrets and env, DB schema or migrations, dependencies, CI/build config, public API contracts, concurrency, persistence semantics. If a trivial change grows past its criteria mid-way, stop and re-enter at the standard tier before touching anything else. The user or the project's AGENTS.md can disable the fast path; the user can also grant approval up front, which satisfies the gate but not the tracking.
Reference Packs
Load only what the current task needs:
references/workflow.md
Use for the detailed three-phase flow, claim-before-work, sync rules, and session checklist.
references/docs-and-tracking.md
Use for task and plan file structure, canonical docs layout, changelog format, and project initialization.
references/delivery.md
Use for shell and tmux rules, git and PR workflow, CI expectations, and security/tooling constraints.
references/dev-environment.md
Use for nsl-based dev URL routing — install, mental model, run patterns, --strip semantics, NSL_PORT placeholder, fallback. Cross-cutting; loaded alongside any stack skill that needs to wire up dev-time URLs.
Canonical Format References
Use these format files instead of redefining schemas inline:
- docs/task-format.md
- docs/plan-format.md
- docs/monorepo-example.md — concrete Bun workspaces + nsl walkthrough; consult when laying out (or auditing) a multi-app repo.
- docs/project-injection.md —
AGENTS.md template (with CLAUDE.md as a symlink) for activating PMA in a new (or audited) project. Load when bootstrapping a repo or when an existing project's AGENTS.md looks thin compared to the current rule set.
Quick Routing
Choose references by intent:
- New feature, bug fix, or refactor: load
references/workflow.md and references/docs-and-tracking.md.
- Unsure whether a change is trivial: it is not; use the standard tier. Criteria live in
references/workflow.md Task Tiers.
- Task claiming, ownership, or status sync: load
references/workflow.md.
- Task or plan file creation: load
references/docs-and-tracking.md.
- PR preparation, CI, shell usage, or security review: load
references/delivery.md.
- Repository initialization or hygiene audit (
.gitignore, .gitattributes, .editorconfig, LICENSE, README.md, .env.example, toolchain pinning): load references/delivery.md Repository Hygiene.
- Any database schema change or migration: load
references/delivery.md Database Migrations.
- Bootstrapping a new project, or auditing an existing project's
AGENTS.md injection (and verifying CLAUDE.md is a symlink to it): load docs/project-injection.md.
- Introducing or upgrading a dependency: load
references/workflow.md Dependency Freshness, then the stack skill's baseline for the registry-check command.
- Dev URL routing setup, debugging nsl behavior, or wiring a new app into the local URL map: load
references/dev-environment.md.
- Designing or restructuring a multi-app repo: read
docs/monorepo-example.md together with the relevant stack skill's Monorepo section.
If the repository also uses a stack skill such as /pma-web, /pma-bun, /pma-go, or /pma-rust, load /pma first for workflow control, then load only the relevant stack references for implementation details.
1---2name: pma3description: Project development lifecycle management with a complexity-tiered three-phase workflow (investigate, proposal, implement; trivial changes take a fast path, everything else waits for approval), file-based plan tracking in docs/plan/, task tracking in docs/task/, and claim-before-work multi-agent coordination. Use when handling feature development, bug fixes, refactors, planning, progress tracking, or multi-agent execution in an existing codebase. English-first for repository docs and remote-visible metadata; use Chinese docs only when the user explicitly requests a specific document in Chinese.4---5
6# PMA - Project Management Assistant
7
8Run delivery work with clear gates, minimal diffs, and explicit file-based tracking.
9
10Keep this entry file small. Load only the references needed for the current turn.
11
12## Always-On Rules
13
141. Follow the three-phase workflow: investigate -> proposal -> implement. Ceremony scales with task complexity (see *Task Tiers* below); only the trivial tier may skip the proposal gate, and a borderline task is never trivial.
152. Do not implement before explicit approval such as `proceed`, except on the trivial tier.
163. Read before write: inspect call chains, config, tests, and recent changelog context first.
174. Keep repository docs, code comments, commits, PR text, and other remote-visible metadata in English by default.
185. Do not use plan mode. Track plans only in `docs/plan/`.
196. Update task and plan files immediately; do not defer state sync. Name new detail files `<timestamp>-<feature-slug>.md` using UTC minute precision per the canonical formats; do not allocate sequence numbers. Task and plan detail files may be revised or deleted; preserve change history in `docs/changelog.md`. Never delete index entries or rewrite their content; only change their markers, using `[d]` when a detail file is deleted.
207. Apply the Coding Principles below to every code change.
218. When introducing or upgrading a dependency, default to the latest stable version verified at the registry (crates.io / npmjs.com / pkg.go.dev / PyPI), not at a version that came from a tutorial, prior PR, or model recall. Pin to a non-latest version only with a recorded reason. See `references/workflow.md` *Dependency Freshness* for the full rule and the stack skill's baseline for the verification command.
229. Every repository carries a baseline set of project-level configuration files (`.gitignore`, `.gitattributes`, `.editorconfig`, `LICENSE`, `README.md`, `.env.example`, plus stack-pinned toolchain files). See `references/delivery.md` *Repository Hygiene*.
2310. Use the project's migration tool and follow its migration model. Schema-diff tools generate operations from declared schema; template-based tools create a versioned stub that the developer must fill in. Never edit a migration already applied to a shared environment. See `references/delivery.md` *Database Migrations*.
2411. For new behavior and bug fixes, follow RED -> GREEN -> IMPROVE: write a failing test first, implement the smallest passing change, then refactor without changing behavior. Documentation-only and non-executable configuration changes are exempt. Target 80% or higher coverage unless the project defines a stricter threshold.
25
26## Coding Principles
27
28Behavioral guardrails for every edit. Bias toward caution over speed; for trivial tasks, use judgment.
29
301. **Think Before Coding**: state assumptions explicitly, surface tradeoffs and simpler alternatives; when unclear, stop and ask instead of guessing.
312. **Simplicity First**: minimum code that solves the problem — no speculative features, abstractions, or configurability.
323. **Surgical Changes**: touch only what the request requires, match existing style, and clean up only what your own change made unused.
334. **Goal-Driven Execution**: convert vague tasks into verifiable success criteria, then loop until verified.
34
35## Core Workflow
36
37Three phases with hard gates. Step-by-step detail lives in `references/workflow.md`; load it for any non-trivial task.
38
391. **Phase 1: Investigation** — entry: a chosen task. Claim the task when investigation starts via `scripts/task-state.sh claim` (index `[ ]` -> `[-]` and detail owner/status change under one lock); investigate impact, related code, tests, config, and recent changelog; create a plan file for non-trivial work. Exit: findings recorded.
402. **Phase 2: Proposal** — output current state, proposal, risks, scope, and alternatives, then stop. Exit gate: explicit approval such as `proceed`.
413. **Phase 3: Test -> Implement -> Verify -> Record** — entry: approval. Set the plan status/marker to in-progress (the task is already claimed since Phase 1), establish a failing test for behavior changes, implement the approved scope, run focused and relevant-suite verification, mark task and plan completed, update changelog when needed.
42
43## Task Tiers
44
45Decide the tier before Phase 1 and say which one applies. Full criteria and escalation rules: `references/workflow.md` *Task Tiers*.
46
47| Tier | Qualifies when | Task entry | Plan file | Proposal gate |
48|---|---|---|---|---|
49| Trivial | one source file or non-executable files only, intent unambiguous, no risk area touched, verifiable at once | no | no | no — state the change in one line, do it, report |
50| Standard | anything else with fewer than 3 files within one module | yes | no | yes — inline proposal, wait for `proceed` |
51| Full | `>=3` files, cross-module, or the user asks for a plan | yes | yes | yes — plan file plus proposal, wait for `proceed` |
52
53Risk areas that disqualify the trivial tier: auth/authz, secrets and env, DB schema or migrations, dependencies, CI/build config, public API contracts, concurrency, persistence semantics. If a trivial change grows past its criteria mid-way, stop and re-enter at the standard tier before touching anything else. The user or the project's `AGENTS.md` can disable the fast path; the user can also grant approval up front, which satisfies the gate but not the tracking.
54
55## Reference Packs
56
57Load only what the current task needs:
58
59- `references/workflow.md`
60 Use for the detailed three-phase flow, claim-before-work, sync rules, and session checklist.
61- `references/docs-and-tracking.md`
62 Use for task and plan file structure, canonical docs layout, changelog format, and project initialization.
63- `references/delivery.md`
64 Use for shell and tmux rules, git and PR workflow, CI expectations, and security/tooling constraints.
65- `references/dev-environment.md`
66 Use for nsl-based dev URL routing — install, mental model, run patterns, `--strip` semantics, `NSL_PORT` placeholder, fallback. Cross-cutting; loaded alongside any stack skill that needs to wire up dev-time URLs.
67
68## Canonical Format References
69
70Use these format files instead of redefining schemas inline:
71
72- [docs/task-format.md](docs/task-format.md)
73- [docs/plan-format.md](docs/plan-format.md)
74- [docs/monorepo-example.md](docs/monorepo-example.md) — concrete Bun workspaces + nsl walkthrough; consult when laying out (or auditing) a multi-app repo.
75- [docs/project-injection.md](docs/project-injection.md) — `AGENTS.md` template (with `CLAUDE.md` as a symlink) for activating PMA in a new (or audited) project. Load when bootstrapping a repo or when an existing project's `AGENTS.md` looks thin compared to the current rule set.
76
77## Quick Routing
78
79Choose references by intent:
80
81- New feature, bug fix, or refactor: load `references/workflow.md` and `references/docs-and-tracking.md`.
82- Unsure whether a change is trivial: it is not; use the standard tier. Criteria live in `references/workflow.md` *Task Tiers*.
83- Task claiming, ownership, or status sync: load `references/workflow.md`.
84- Task or plan file creation: load `references/docs-and-tracking.md`.
85- PR preparation, CI, shell usage, or security review: load `references/delivery.md`.
86- Repository initialization or hygiene audit (`.gitignore`, `.gitattributes`, `.editorconfig`, `LICENSE`, `README.md`, `.env.example`, toolchain pinning): load `references/delivery.md` *Repository Hygiene*.
87- Any database schema change or migration: load `references/delivery.md` *Database Migrations*.
88- Bootstrapping a new project, or auditing an existing project's `AGENTS.md` injection (and verifying `CLAUDE.md` is a symlink to it): load `docs/project-injection.md`.
89- Introducing or upgrading a dependency: load `references/workflow.md` *Dependency Freshness*, then the stack skill's baseline for the registry-check command.
90- Dev URL routing setup, debugging nsl behavior, or wiring a new app into the local URL map: load `references/dev-environment.md`.
91- Designing or restructuring a multi-app repo: read `docs/monorepo-example.md` together with the relevant stack skill's *Monorepo* section.
92
93If the repository also uses a stack skill such as `/pma-web`, `/pma-bun`, `/pma-go`, or `/pma-rust`, load `/pma` first for workflow control, then load only the relevant stack references for implementation details.