# Pm Init

> Initialize local .pm governance workbench; detect new vs existing project; discover Spec Kit constitution; optional outline from intent.

- **Type:** Skill
- **Install:** `agentstack add skill-wei63w-pm-manager-pm-init`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [wei63w](https://agentstack.voostack.com/s/wei63w)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [wei63w](https://github.com/wei63w)
- **Source:** https://github.com/wei63w/pm-manager/tree/main/adapters/cursor/skills/pm-init

## Install

```sh
agentstack add skill-wei63w-pm-manager-pm-init
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding (if not empty). User input may include: process mode, project intent one-liner, or `skip` charter.

## Outline

You are running `/pm-init` for the **current workspace project root**.

1. **Detect lifecycle**
   - `new`: empty or scaffold-only (README/.git only, no pom/gradle/src business code)
   - `existing`: build files, source tree, or app config present
   - If `.specify/` exists, mark Spec Kit project and prioritize constitution/specs.

2. **Run scaffold** (preferred):
   - CLI: `pm init ` (also runs non-interactive `npx skills add wei63w/pm-manager -y` unless `--no-skills-sh` / `--scaffold-only`)
   - PowerShell: `scripts/powershell/create-pm-scaffold.ps1 -ProjectRoot `
   - Or Python: `python scripts/python/create_pm_scaffold.py `
   - If scripts unavailable, create the same directory tree manually from `templates/pm/`.

3. **Ensure git exclude** (not `.gitignore`):
   - Append `.pm/` to `/.git/info/exclude` if git repo and not already present.

4. **Process mode**
   - Ask if missing: `agile` | `kanban` | `waterfall` | `custom` (default agile, iteration `2w`).

5. **Charter discovery** (scan in order from `charter_candidates` in project.yaml template):
   - `.specify/memory/constitution.md` → map into `.pm/charter/charter.md` + dod hints
   - `.specify/specs/**/spec.md` → requirements REQ-xxx
   - `CONSTITUTION.md`, `docs/prd.md`, `docs/requirements.md`, `docs/nfr.md`
   - `README.md` only as last-resort fallback
   - Write `.pm/charter/sources.md`; set `charter.status=draft`, `source=discovered`
   - Do **not** overwrite `approved` charter; only notify if external source changed.

6. **If new and no charter candidates**
   - If user provided intent → run outline generation (same as `/pm-outline`)
   - Else offer: paste intent | `/pm-charter` | `skip` (`charter.status=absent`)

7. **Do NOT deep-scan** all modules (leave to `/pm-discover` or `/pm-all`).

8. Write initial `state/overview.md` and summarize:
   - lifecycle, process.mode, charter status, recommended next: `/pm-status` or `/pm-all`

## Done When

- [ ] `.pm/` tree exists with config/state/charter/outline/inbox/evidence
- [ ] `.git/info/exclude` contains `.pm/` when git is present
- [ ] User told next command clearly

## Shared Workflow (all /pm-* commands)

Follow this order when the command mutates `.pm/` state:

1. Read `.pm/config/project.yaml` and `.pm/config/local.yaml` (if missing and command is not init → recommend `/pm-init`).
2. On-demand scan using `sources` + `extra_scan_roots` + `--path` + **conversation paste** (highest priority for `/pm-fix`).
3. Desensitize evidence → `.pm/evidence/scans/{command}-{timestamp}.json` (secrets → `***`).
4. Optional charter compare when `charter.status != absent` (attach `confidence`).
5. Incremental merge into module `findings.md` / `todo.md`; sync authoritative `state/todo.md`.
6. Refresh `state/overview.md` (include **Today's Top3**, max 3, blocking+high by default).
7. Output risk summary + recommended next step (≤20 lines). Never auto-write source/SQL/cloud without confirmation.

9. **Closing (required):** end the user-facing reply with Summary + Open these links per `templates/commands/_closing.md` (dashboard and/or architecture overviews). Ask the user to open them.

Design baseline: repo root `pm-manager-v2.md` (or packaged copy under `memory/`).

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [wei63w](https://github.com/wei63w)
- **Source:** [wei63w/pm-manager](https://github.com/wei63w/pm-manager)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-wei63w-pm-manager-pm-init
- Seller: https://agentstack.voostack.com/s/wei63w
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
