# C9 Project-Management Tooling Integration Implementation Plan

> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.

**Goal:** Populate the empty `C9 «Управление проектами»` map section with a conflict-minimal project-management toolset — reuse the existing GitHub MCP (Projects v2) + Superpowers planning skills, vendor **CCPM** (PRD→epic→issue→code traceability), and conditionally install the Anthropic **product-management** plugin — so C9 becomes a working playbook.

**Architecture:** C9 is an **empty** functional section — `NODE_SECTION` in `docs/automation-graph.html` tags zero nodes `C9`. Variant А (chosen 2026-05-17): a **reuse core** (GitHub MCP `projects` toolset + `issue`/`sub_issue` tools, Superpowers `writing-plans`/`executing-plans`/`subagent-driven-development`, the `q-item-add` skill + `Открытые_вопросы` registry, ruflo task layer) plus **one verified-clean install** — CCPM, vendored as a standalone skill into `.claude/skills/ccpm/` (no plugin, no marketplace, no hooks — the A6 mermaid pattern). The Anthropic **product-management** plugin is a **conditional** add (Task 5, severable) — installed only if Task 1 confirms Claude Code installability. The three conflict-heavy candidates (`task-tracker-plugin` 🔴 hook collision, `claude-kanban` 🔴 lefthook + CLAUDE.md collision, `pm-skills` sprawl) are **dropped**. All C9 tools are non-UI → **project-management** category, outside the PSR_v1 UI-pool. C9 artifacts live in `docs/projects/`; CCPM's PRD/epic store lives under `.claude/prds/` and `.claude/epics/` (CCPM's hardcoded convention).

**Tech Stack:** CCPM (`automazeio/ccpm`, standalone skill, MIT); the official GitHub MCP Server (`github/github-mcp-server`, already installed — `projects` toolset enabled here); Anthropic **product-management** plugin (conditional); adr-kit v0.13.1 (reused from the A6 plan, if landed); project normative docs; `docs/automation-graph.html` (vis.js).

**Sequencing (locked 2026-05-17):** the A6 plan (`2026-05-17-a6-architecture-tooling-integration.md`) and the D3 plan (`2026-05-17-d3-audit-risk-tooling-integration.md`) run to completion and push **first**, in that order; C9 Task 1 then forks from the updated `origin/main`. Rationale: all three epics touch shared files (the map, 4 normative docs, the Tooling counter). C9's seed ADR (Task 4) reuses A6's adr-kit + `docs/adr/ADR-000`. Run strictly sequentially, never interleaved. C9 numbers are runtime-resolved (NUM1) — never hard-coded before reading the live counter.

---

## Tool Identity (verified 2026-05-17 via WebFetch/WebSearch)

| # | Tool | Install mode | Source / License | Hooks? |
|---|---|---|---|---|
| 1 | **CCPM** (Claude Code PM) — `skill/ccpm/`: `SKILL.md` + `references/` (`plan.md`, `structure.md`, `sync.md`, `execute.md`, `track.md`, `conventions.md`) + `references/scripts/` (14 bash scripts: `status.sh`, `standup.sh`, `epic-list.sh`, `search.sh`, …). PRD→epic→GitHub-issue→code, 5 phases. | Standalone skill — vendored copy into `.claude/skills/ccpm/` (no plugin, no marketplace) | GitHub `automazeio/ccpm`, **MIT**; a preserved `v1` branch holds the original system | None disclosed (skills-only; "activates when the agent detects PM intent") — **verify on install** |
| 2 | **product-management** (Anthropic) — `/write-spec`, `/roadmap-update`, `/stakeholder-update`, `/synthesize-research`, `/competitive-brief`, `/metrics-review` | Marketplace plugin (Anthropic-verified) — **conditional** (Task 5) | Anthropic; marketplace name "Product Management" | Unknown — **verify on install** (expected none — skills/commands plugin) |
| — | **GitHub MCP `projects` toolset** (`projects_get` / `projects_list` / `projects_write`) + `issue_read`/`issue_write`/`sub_issue_write` | **Reuse** — already-installed official server; enable the `projects` toolset | `github/github-mcp-server`, official | n/a (MCP server, no CC lifecycle hooks) |

**Verification status:** CCPM — repo, MIT, skill structure, no-`install.sh` (manual symlink/vendor) confirmed via WebFetch. product-management — Anthropic publisher + command list confirmed; **Claude Code (vs Cowork) installability NOT confirmed** — Task 1 Step 5 resolves it. GitHub MCP `projects` toolset — confirmed to exist in the official server; **NOT currently exposed in this project** (the `mcp__github__*` tool set lacks `projects_*`) → Task 2 enables it.

**Dropped (with reason — no tasks):**

- **`task-tracker-plugin`** (`victor-software-house`) — 🔴 registers 5 lifecycle hooks incl. its own `Stop` + `SessionStart`, colliding with the economy/skill-discipline/ruflo hook stack. Compaction context-loss is already mitigated by the ruflo recall hook + memory files.
- **`claude-kanban`** (`alessiocol`) — 🔴 registers git pre-commit hooks (collides with lefthook) and writes its own `CLAUDE.md` (violates CLAUDE.md §5 п.10); 5 commits / no releases (very high bus-factor). Sprint-board need is met by GitHub Projects v2.
- **`pm-skills`** (`phuryn`) — 100+ skills = sprawl; a material library, not a решатель.
- **Separate GitHub Projects v2 MCP** (Arclio / kunwarVivek) — redundant with the official server's `projects` toolset (§5 п.6).
- **`feature-dev`** (Anthropic official) — 7-phase feature workflow + code-explorer/architect/reviewer agents overlap Superpowers (brainstorming→writing-plans→subagent-driven-development) (§5 п.6).

---

## Design Decisions & Conflict Audit

Pattern follows the K1–K8 / AK1–CC1 audits used for claude-mem, the A6 plan, and the D3 plan. Verified against the CCPM repo, the product-management plugin page, project `.claude/settings.json`, `~/.claude/settings.json`, `.mcp.json`, `lefthook.yml`, `cspell.json`, `.markdownlintignore`, and the A6/D3 plans.

| # | Tool | Sev | Conflict | Resolution (locked) |
|---|---|---|---|---|
| CP1 | CCPM | 🟡 | Vendored `.claude/skills/ccpm/**/*.md` (third-party English skill files) gets caught by the cspell + markdownlint pre-commit jobs. | Add `.claude/skills/ccpm/**` to `cspell.json` `ignorePaths` and `.markdownlintignore` (Task 3). The project's own skills (`q-item-add`, `rls-check`, `regression`, `mermaid`) stay linted. Same as A6 MK1. |
| CP2 | CCPM | 🟡 | CCPM "activates automatically when the agent detects PM intent" — could collide with Superpowers `brainstorming`/`writing-plans` auto-activation and the §12.2 task-map. | Boundary in `docs/projects/README.md` (Task 4): **CCPM** = the PRD→epic→GitHub-issue→code *traceability* layer (explicit `/pm` flow); **Superpowers `writing-plans`** = authoring execution plan-files in `docs/superpowers/plans/`. CCPM's auto-intent is advisory; the §12.2 map is **unchanged** — CCPM is not added to it. |
| CP3 | CCPM | 🟡 | CCPM uses GitHub Issues as source-of-truth; the project currently barely uses issues (FF-push pattern, `git push origin <branch>:main`). | This is the **deliberate architecture decision of Variant А** — adopt GitHub-issue-backed PM. It is an architectural choice, not a technical clash. Documented as an ADR (Task 4 Step 4, adr-kit from A6). Issues created via the reused GitHub MCP `issue_write` / `sub_issue_write`. |
| CP4 | CCPM | 🟢 | Lifecycle-hook collision with the 6 economy + skill-discipline + 2 ruflo hooks. | Expected none — CCPM is skills-only. Re-verify Task 1 Step 4 + Task 3 Step 4. If CCPM ships a `hooks` block → **stop** and re-audit. |
| CP5 | CCPM | 🟡 | CCPM's scripts hard-code `.claude/prds/` and `.claude/epics/` as the PRD/epic store — `.claude/` is config, not docs; the project keeps docs under `docs/`. | Accept CCPM's hard-coded store (do not patch its 14 scripts — YAGNI). `.claude/prds/` + `.claude/epics/` are committed project content and **stay linted** (NOT covered by the CP1 skill-only lint-ignore). Documented in `docs/projects/README.md`. |
| CP6 | CCPM | 🟢 | 14 bash scripts (`status.sh`, `standup.sh`, …) on native Windows. | None — the project already runs bash (`lefthook`, `gitleaks`, `bin/*.exe`) via Git Bash / the Bash tool. Smoke-tested in Task 6 Step 2. |
| PG1 | product-mgmt | 🟡 | The product-management plugin's page says "Available in Claude Cowork" — Claude **Code** installability is unconfirmed. Installing an uninstallable plugin wastes the task. | Task 1 Step 5 fact-checks the `/plugin marketplace add` + `/plugin install` strings / a backing GitHub marketplace repo. Task 5 installs **only if** Code-installable; otherwise **defer** with a documented fallback (reuse layer authors specs via `writing-plans`; roadmap via the registry + map WISHLIST). Same default-defer shape as D3 #5. |
| PG2 | product-mgmt | 🟢 | Could the plugin register CC lifecycle hooks? | Verify on install (Task 5 Step 2). Skills/commands plugins register none; if it does → stop and re-audit. |
| PG3 | product-mgmt | 🟡 | `/write-spec` (PRD) overlaps the CCPM PRD phase (§5 п.6). | Boundary (Task 7 Tooling entry): CCPM PRD = the *engineering* epic→issue→code traceability artifact; product-management `/write-spec` = the *product-strategy* PRD (problem→spec, roadmap-aligned). Different altitude. Moot if PG1 defers product-management. |
| GH1 | GitHub MCP | 🟢 | Enabling the `projects` toolset = a config + permissions change on an already-installed official server. | Task 2: enable `projects` in the github server's toolset config in `.mcp.json`; add `mcp__github__projects_get/list/write` to `~/.claude/settings.json` `permissions.allow`. No new install. |
| GH2 | GitHub MCP | 🟡 | A separate GitHub Projects v2 MCP (Arclio etc.) would duplicate the official `projects` toolset (§5 п.6). | **Dropped** — not installed. Documented here, no task. |
| REU1 | reuse layer | 🟢 | Re-tagging existing nodes (`sk_wplans`, `mcp_gh`, `sk_qitem`) to C9 would *empty* their current sections — `NODE_SECTION` is 1-node→1-section. | Reuse nodes **stay** in their sections; C9 gets its **own** new nodes (CCPM, product-management). The reuse coverage is documented in `docs/projects/README.md` and noted in the new nodes' `NODE_DETAILS` (Task 8). Same as A6/D3 (they added new nodes, did not re-tag). |
| CC1 | all | 🟡 | Bus-factor — CCPM is a community project (`automazeio`, pre-`v1`-tagged); product-management is Anthropic (low risk). | CCPM is **vendored** → immune to upstream loss (like A6's mermaid). product-management stays a marketplace plugin (cache-pinned). Noted in the Tooling entry. No alpha-substrate spike needed — neither has a known-broken core (unlike ruflo K7). |
| NUM1 | normative sync | 🟡 | The A6 plan claims Tooling slots #36-#38; the D3 plan claims the next ≥2 after A6. C9 must not collide. | Task 1 Step 6 + Task 7 Step 1 read the **live** `docs/Tooling_v8_3.md` Прил. Н §0 counter and assign C9's number(s) sequentially after whatever is current. Never hard-code a number before reading. |

**Severable scope.** Core C9 = Tasks 1-4 + 6-9 (reuse enablement + CCPM vendored + normative + map + finish) — already populates the section. **Task 5** (product-management) is severable + conditional (PG1). Unlike A6, C9 adds **no lefthook job** (no commit-pipeline gate) — fewer conflicts by design. **Selected 2026-05-17 (Variant А): core + conditional Task 5.**

---

## File Structure

| File | Created / Modified | Responsibility |
|---|---|---|
| `.claude/skills/ccpm/` | Create (vendored) | The CCPM skill — `SKILL.md` + `references/` + `references/scripts/` |
| `.claude/prds/.gitkeep` | Create | CCPM PRD store (CCPM's hard-coded convention — CP5) |
| `.claude/epics/.gitkeep` | Create | CCPM epic/task store (CCPM's hard-coded convention — CP5) |
| `docs/projects/` | Create dir | C9 home — the project-management playbook & convention |
| `docs/projects/README.md` | Create | The PM convention: GitHub-Projects-v2-as-sprint-board; CCPM vs `writing-plans` vs registry vs ADR boundaries; reuse-layer map |
| `docs/adr/ADR-004-project-management-tooling.md` | Create (conditional — adr-kit present, A6 landed) | Seed ADR documenting the C9 tooling + GitHub-issue-backed-PM decision (CP3) |
| `.mcp.json` | Modify | Enable the `projects` toolset on the `github` server (GH1) |
| `~/.claude/settings.json` | Modify | `permissions.allow` += `mcp__github__projects_*`; `enabledPlugins` += product-management (conditional); `extraKnownMarketplaces` += 1 (conditional) |
| `cspell.json` | Modify | `ignorePaths` += `.claude/skills/ccpm/**` (CP1) |
| `.markdownlintignore` | Modify | += `.claude/skills/ccpm/` (CP1) |
| `cspell-words.txt` | Modify (conditional) | New PM vocabulary |
| `docs/Tooling_v8_3.md` | Modify | Прил. Н — new project-management subsection(s) + §0 counter bump |
| `docs/Plugin_stack_rules_v1.md` | Modify | R10.1 — new project-management rows |
| `docs/Pravila_raboty_Claude_v1_1.md` | Modify | §13.2 — project-management category note |
| `CLAUDE.md` | Modify (**via claude-md-management only**) | §3 title count, §1 row 2b count, new §3.3 project-management rows |
| `docs/CHANGELOG_claude_md.md` | Modify | CLAUDE.md version-bump entry |
| `docs/automation-graph.html` | Modify | New C9 nodes → `NODE_SECTION` C9; header metrics |

---

## Task 1: Pre-flight — baseline, branch, snapshot, fact-check

**Files:** none modified (read-only) except a new branch

- [ ] **Step 1: Confirm tree state and create the working branch**

```bash
cd "c:/моя/проекты/портал crm/Документация"
git status --short
git rev-parse --short HEAD
git fetch origin && git checkout -b feat/c9-project-management-tooling origin/main
```

Expected: record `origin/main` HEAD SHA as the regression baseline; new branch `feat/c9-project-management-tooling` created off it. (Push pattern at the end: `git push origin feat/c9-project-management-tooling:main`.)

- [ ] **Step 2: Snapshot the hook chain**

Read `.claude/settings.json`, `.claude/settings.local.json` (if present), and `~/.claude/settings.json`. Record every hook on `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PreCompact`, `PostCompact`, `Stop`. This is the CP4/PG2 baseline — Tasks 3 and 5 compare against it.
Expected (`~/.claude/settings.json`): SessionStart economy-self-check; PreToolUse skill-marker/skill-check/economy-state-guard; UserPromptSubmit economy-mode; PostCompact economy-postcompact; Stop economy-verifier (Sonnet). Project `.claude/settings.json`: ruflo-recall + ruflo-queen (UserPromptSubmit), CLAUDE.md-warn (PreToolUse), markdownlint-fix + schema-CHANGELOG-reminder (PostToolUse).

- [ ] **Step 3: Baseline regression**

```
/regression quick
```

Expected: GREEN. Record the current Pest / Vitest counts from the last green run (memory `project_state.md`). C9 touches no `app/` code → the final run (Task 9) must match.

- [ ] **Step 4: Fact-check CCPM**

Open `https://github.com/automazeio/ccpm` and confirm assumptions still hold:

- Skill structure: `skill/ccpm/SKILL.md` + `skill/ccpm/references/` + `skill/ccpm/references/scripts/` (~14 bash scripts).
- MIT license.
- No `settings.json` `hooks` block / no Claude Code lifecycle hook registration.
- Integration is manual (symlink / copy) — no `install.sh` required.

If CCPM now registers CC lifecycle hooks → **stop**, re-audit CP4 before continuing.

- [ ] **Step 5: Fact-check product-management Claude Code installability (PG1)**

Determine whether the Anthropic product-management plugin is installable in Claude **Code** (not only Claude Cowork):

- WebFetch `https://claude.com/plugins/product-management` for an explicit `/plugin marketplace add …` + `/plugin install …` instruction.
- WebSearch for a backing GitHub marketplace repo (e.g. in `anthropics/claude-plugins-official` `marketplace.json`, or a dedicated repo).

Record the verdict: **product-management Code-installable? yes/no** + the exact marketplace + install strings if yes. This drives Task 5 (conditional) and Task 8 (whether a `product_mgmt` node is added).

- [ ] **Step 6: Check A6/D3 landed + read the live Tooling counter (NUM1)**

```bash
git log --oneline origin/main | grep -iE "adr-kit|architecture-patterns|mermaid|trail of bits|security guidance" | head
ls ~/.claude/plugins/cache/ | grep -iE "adr-kit|architecture"
```

Read `docs/Tooling_v8_3.md` Прил. Н §0 — record the **live** tool counter. Record: **A6 landed?** yes/no (drives Task 4's conditional ADR-004) and the counter value (drives Task 7 numbering).

No repo files changed → no commit.

---

## Task 2: Enable the GitHub MCP `projects` toolset (reuse — GH1)

**Files:** Modify `.mcp.json`; Modify `~/.claude/settings.json` (the `Edit` triggers the `ask` permission — expected)

- [ ] **Step 1: Inspect the github server config**

Read `.mcp.json` — locate the `github` server block. Identify how toolsets are configured (the official server gates toolsets via a `--toolsets` arg or a `GITHUB_TOOLSETS` env var; the hosted server may use a query param). Record the current toolset value.

- [ ] **Step 2: Enable the `projects` toolset**

Edit `.mcp.json` — add `projects` to the github server's enabled toolsets (alongside `issues`, `pull_requests`, `repos`, etc.). If toolsets were previously unset (server default), set an explicit list that **includes the previously-working toolsets plus `projects`** — do not narrow the surface. Example (adjust to the actual config shape):

```json
"github": {
  "...": "...",
  "env": { "GITHUB_TOOLSETS": "repos,issues,pull_requests,projects" }
}
```

- [ ] **Step 3: Add the `projects` tool permissions**

Edit `~/.claude/settings.json` — append to `permissions.allow`:

```
"mcp__github__projects_get",
"mcp__github__projects_list",
"mcp__github__projects_write"
```

- [ ] **Step 4: Reload and verify**

```
/reload-plugins
```

Confirm `mcp__github__projects_get`, `mcp__github__projects_list`, `mcp__github__projects_write` are now available MCP tools. If they are still absent → the toolset value or the server version is wrong; re-inspect Step 1-2. Confirm no `settings.json` `hooks` block changed.

- [ ] **Step 5: Commit**

```bash
git add .mcp.json
git commit -m "feat(c9): enable GitHub MCP projects toolset for Projects v2 (GH1)"
```

(`~/.claude/settings.json` is outside the repo — not committed.)

---

## Task 3: Vendor the CCPM skill (standalone, vendored — CP1/CP4)

**Files:**

- Create: `.claude/skills/ccpm/` (vendored skill tree)
- Modify: `cspell.json`, `.markdownlintignore`

- [ ] **Step 1: Clone the source to a temp location**

```bash
git clone --depth 1 https://github.com/automazeio/ccpm.git /tmp/ccpm-src
ls -R /tmp/ccpm-src/skill/ccpm/
```

Expected: `SKILL.md` + `references/` (`plan.md`, `structure.md`, `sync.md`, `execute.md`, `track.md`, `conventions.md`) + `references/scripts/` (~14 `.sh` files).

- [ ] **Step 2: Verify CCPM ships no Claude Code hooks (CP4)**

```bash
grep -rIl "hooks" /tmp/ccpm-src --include="*.json" || echo "no hooks json"
ls /tmp/ccpm-src/.claude/ 2>/dev/null || echo "no .claude config dir"
```

Expected: no `settings.json` with a `hooks` block. If CCPM ships hooks → **stop**, re-audit CP4.

- [ ] **Step 3: Vendor the skill into the project**

```bash
mkdir -p ".claude/skills/ccpm"
cp -r /tmp/ccpm-src/skill/ccpm/. ".claude/skills/ccpm/"
ls -R ".claude/skills/ccpm/"
rm -rf /tmp/ccpm-src
```

Expected: `.claude/skills/ccpm/SKILL.md` + `references/**` present. (Vendoring — not a submodule — keeps it on Windows+Cyrillic paths and immune to upstream loss, CC1.)

- [ ] **Step 4: Exclude the vendored skill from the doc-lint chain (CP1)**

Edit `.markdownlintignore` — append:

```
.claude/skills/ccpm/
```

Edit `cspell.json` — add `.claude/skills/ccpm/**` to the `ignorePaths` array. Do **not** ignore `.claude/skills/` wholesale — `q-item-add`, `rls-check`, `regression`, `mermaid` stay linted.

- [ ] **Step 5: Reload and verify the skill is discoverable**

```
/reload-plugins
```

Confirm a `ccpm` skill is now listed among available skills (project `.claude/skills/` is auto-discovered, like the other project skills). Confirm neither `settings.json` `hooks` block changed (CP4).

- [ ] **Step 6: Verify lint exclusion works, then commit**

```bash
git add .claude/skills/ccpm/ cspell.json .markdownlintignore
npx lefthook run pre-commit
```

Expected: cspell + markdownlint jobs do NOT report errors from `.claude/skills/ccpm/**`; all 8 jobs green.

```bash
git commit -m "feat(c9): vendor CCPM skill into .claude/skills + lint-ignore (CP1)"
```

---

## Task 4: CCPM bootstrap + the C9 home (CP3 / CP5)

**Files:**

- Create: `.claude/prds/.gitkeep`, `.claude/epics/.gitkeep`
- Create: `docs/projects/README.md`
- Create (conditional — A6 landed): `docs/adr/ADR-004-project-management-tooling.md`
- Modify (conditional): `cspell-words.txt`

- [ ] **Step 1: Create the CCPM store directories**

```bash
mkdir -p ".claude/prds" ".claude/epics"
echo "# CCPM PRD store — see docs/projects/README.md" > ".claude/prds/.gitkeep"
echo "# CCPM epic/task store — see docs/projects/README.md" > ".claude/epics/.gitkeep"
```

(CCPM hard-codes these paths — CP5. `.gitkeep` keeps the empty dirs tracked.)

- [ ] **Step 2: Create the C9 home + the PM convention**

```bash
mkdir -p "docs/projects"
```

Create `docs/projects/README.md`:

```markdown
# docs/projects — project-management playbook (map section C9)

Home of the `C9 «Управление проектами»` section. Defines how the Лидерра
development project is planned, tracked, and reported.

## Toolset

- **CCPM** (`.claude/skills/ccpm/`) — the PRD→epic→GitHub-issue→code traceability
  layer. PRDs live in `.claude/prds/`, epics/tasks in `.claude/epics/<feature>/`.
  Invoked via the `/pm` flow / the `ccpm` skill.
- **GitHub MCP** — issues, sub-issues (epic = parent issue, task = sub-issue),
  and **Projects v2** boards used as the sprint/iteration board.
- **Superpowers `writing-plans` / `executing-plans` / `subagent-driven-development`**
  — authoring and running execution plan-files in `docs/superpowers/plans/`.
- **`q-item-add` skill + `docs/Открытые_вопросы_v8_3.md`** — the open-question
  registry (Б-/CTO-/Ю-/Диз-/DO-/OPEN- codes).
- **product-management plugin** (if installed — see Task 5) — PRD/roadmap/metrics
  product-strategy ceremonies.

## Boundaries (which tool for which artifact)

- **Open product/business/legal question** → `Открытые_вопросы` registry. Not an
  epic, not an ADR — it has no resolution yet.
- **A closed technical/architecture decision** → `docs/adr/` (adr-kit, A6).
- **A feature to build, with engineering traceability** → a CCPM PRD → epic →
  GitHub issues.
- **The step-by-step execution plan for that epic** → a `docs/superpowers/plans/`
  file (Superpowers `writing-plans`). CCPM tracks *what & status*; the plan
  file tracks *how, task-by-task*.
- **Product-strategy spec / roadmap** → product-management `/write-spec` /
  `/roadmap-update` (if installed); else a registry/WISHLIST entry.

## Workflow

1. Idea → CCPM PRD (`.claude/prds/`).
2. PRD → epic + GitHub issues (CCPM `sync`, via GitHub MCP `issue_write` /
   `sub_issue_write`).
3. Epic → a `docs/superpowers/plans/` plan-file → execution.
4. Status → CCPM `status.sh` / `standup.sh`; the GitHub Projects v2 board is the
   sprint view.
```

Adjust the bullet list to whatever Task 5 resolves for product-management.

- [ ] **Step 3: Decide on the conditional ADR (uses Task 1 Step 6 result)**

If **A6 landed** (`docs/adr/ADR-000-adr-process.md` exists, adr-kit present) → do Step 4. If A6 has **not** landed → skip Step 4, and add a line to `docs/projects/README.md` noting "the C9 tooling decision will be recorded as an ADR once adr-kit (A6) lands". Record the branch taken.

- [ ] **Step 4: Write ADR-004 (conditional)**

Create `docs/adr/ADR-004-project-management-tooling.md`:

```markdown
# ADR-004: Project-management tooling (C9)

- **Status:** Accepted
- **Date:** 2026-05-17
- **Deciders:** Дмитрий

## Context
The `C9 «Управление проектами»` map section had zero tooling. Planning was done
ad-hoc via `docs/superpowers/plans/` files, the `Открытые_вопросы` registry, and
sprint notes in memory. GitHub Issues were barely used (FF-push workflow).

## Decision
- Project management adopts a **GitHub-issue-backed** model: CCPM
  (vendored skill) drives PRD→epic→issue→code with traceability; epics are
  parent issues, tasks are sub-issues.
- The **GitHub Projects v2** board (official GitHub MCP `projects` toolset) is
  the sprint/iteration board.
- Execution plans stay as `docs/superpowers/plans/` files (Superpowers).
- The `Открытые_вопросы` registry remains the home of *open* questions; an ADR
  records *closed* decisions; CCPM tracks *features in flight*.
- product-management (Anthropic) is added only if Claude-Code-installable.

## Consequences
- Positive: C9 populated; planning traceable; sprints visible on a board.
- Risk: CCPM is third-party (bus-factor) — mitigated by vendoring.
- Risk: a workflow shift toward GitHub Issues — accepted, this is the decision.

## Enforcement
None — C9 tools are advisory; verified by use and code review.
```

- [ ] **Step 5: Lint + commit**

```bash
npx markdownlint-cli2 "docs/projects/*.md" "docs/adr/ADR-004-*.md"
npx cspell --no-progress --no-summary --no-gitignore "docs/projects/*.md" "docs/adr/ADR-004-*.md"
```

Add flagged valid terms (`CCPM`, `Лидерра`, `WISHLIST`, etc.) to `cspell-words.txt`. Then:

```bash
git add docs/projects/ .claude/prds/ .claude/epics/ cspell-words.txt
git add docs/adr/ADR-004-*.md   # only if Step 4 ran
git commit -m "feat(c9): bootstrap docs/projects + CCPM store + ADR-004"
```

---

## Task 5: product-management plugin — conditional install (PG1 / PG2) — *severable*

**Files:** Modify `~/.claude/settings.json`. No repo file changed.

> Run this task **only if Task 1 Step 5 confirmed Claude Code installability**. Otherwise skip — append to `docs/projects/README.md` a line: "product-management deferred — not Claude-Code-installable as of 2026-05-17; PRD/roadmap covered by `writing-plans` + the registry/WISHLIST" — and treat Task 5 as deferred for Tasks 7-8.

- [ ] **Step 1: Install the plugin**

Run the exact strings confirmed in Task 1 Step 5, e.g.:

```
/plugin marketplace add <anthropic-marketplace>
/plugin install product-management@<anthropic-marketplace>
/reload-plugins
```

- [ ] **Step 2: Verify the plugin + NO lifecycle hooks (PG2)**

Read `~/.claude/settings.json` — `enabledPlugins` contains `product-management…: true`. Read the `hooks` block of `~/.claude/settings.json` AND project `.claude/settings.json` — both **unchanged** vs the Task 1 Step 2 snapshot. If product-management injected a `hooks` entry → stop and re-audit PG2.

- [ ] **Step 3: Smoke-test a command**

Invoke `/write-spec` (or `/roadmap-update`) on a trivial sample. Expected: it runs and produces a structured PRD/roadmap artifact. Functional smoke — no file output required.

- [ ] **Step 4: Confirm the economy/ruflo chain intact**

Submit a trivial prompt; the economy marker still appears, no hook errors. No repo files changed in Task 5 → no commit.

---

## Task 6: Smoke-test CCPM + close out

**Files:** none modified

- [ ] **Step 1: Smoke-test the CCPM skill**

Invoke the `ccpm` skill with a trivial PM intent (e.g. "draft a PRD for a sample feature"). Expected: the skill loads, `SKILL.md` routes intent, a PRD-shaped artifact is produced under `.claude/prds/` (or proposed). Do **not** sync to real GitHub issues — functional smoke only.

- [ ] **Step 2: Smoke-test a CCPM bash script on Windows (CP6)**

```bash
bash .claude/skills/ccpm/references/scripts/status.sh
```

Expected: the script runs under Git Bash / the Bash tool and prints a status summary (empty store is fine). If it fails on a Windows path / CRLF issue → record it; the script set is advisory, not commit-critical — note in `docs/projects/README.md` and continue.

- [ ] **Step 3: Confirm the hook chain is intact**

Economy marker still appears; the Stop verifier still runs; ruflo + CLAUDE.md-warn hooks fire. No plugin/skill leaked a `hooks` entry. No commit (no files changed).

---

## Task 7: Normative registry sync (CP / PG / CC / NUM1)

**Files:** Modify `docs/Tooling_v8_3.md`, `docs/Plugin_stack_rules_v1.md`, `docs/Pravila_raboty_Claude_v1_1.md`, `CLAUDE.md`, `docs/CHANGELOG_claude_md.md`

- [ ] **Step 1: Read the registry homes + the live counter (NUM1)**

Read for exact insertion points and the **current** counter: `docs/Tooling_v8_3.md` Прил. Н §0 + the last `§4.x` subsection; `docs/Plugin_stack_rules_v1.md` R10.1; `docs/Pravila_raboty_Claude_v1_1.md` §13.2. Assign C9's number(s) sequentially from `counter + 1` — **after** any A6/D3 entries already present. Record `#N` (CCPM) and, if Task 5 ran, `#N+1` (product-management).

- [ ] **Step 2: Add the Tooling Прил. Н project-management subsection(s)**

Edit `docs/Tooling_v8_3.md`: add a subsection for `#N CCPM` (and `#N+1 product-management` if installed), category **project-management** (off-phase). Per tool record: CCPM (GitHub `automazeio/ccpm` MIT, **vendored** standalone skill in `.claude/skills/ccpm/`, no hooks; GitHub-issue-backed traceability — CP3; PRD/epic store in `.claude/prds`/`.claude/epics` — CP5; boundary vs `writing-plans` — CP2); product-management (Anthropic-verified marketplace plugin; boundary vs CCPM PRD — PG3) — or, if deferred, a one-line "deferred — not Claude-Code-installable" note instead. Also note the GitHub MCP `projects` toolset reuse (no new slot — GitHub MCP is already #3). Add the bus-factor note (CC1). Bump §0 counter and the Прил. Н version header.

- [ ] **Step 3: Add PSR_v1 R10.1 rows**

Edit `docs/Plugin_stack_rules_v1.md`: add a CCPM row (and product-management row if installed) to R10.1, category **project-management** (off-phase) — explicitly *outside* the UI-pool → no R6.0/R6.1 stack-filter, no R14 pipeline (same treatment as `claude-md-management`, the A6 architecture-tooling, and the D3 audit-security categories). Bump the PSR_v1 version header.

- [ ] **Step 4: Add the Pravila §13.2 note**

Edit `docs/Pravila_raboty_Claude_v1_1.md` §13.2: add a one-line **project-management** category note covering CCPM (+ product-management if installed), alongside the existing infrastructure / debug-runtime / architecture-tooling / audit-security notes. Re-read Pravila §0/§13 first to keep section numbering consistent. Bump the Pravila version header.

- [ ] **Step 5: Update CLAUDE.md via the governed channel**

Invoke `/claude-md-management:claude-md-improver`. Apply: §3 title count bump, §1 priority-chain row 2b count bump, new §3.3 project-management row(s) for `#N` (+`#N+1`). The plugin also writes the `docs/CHANGELOG_claude_md.md` entry and bumps §0 cross-ref versions (Tooling / PSR_v1 / Pravila). **Do not** edit `CLAUDE.md` directly (§5 п.10).

- [ ] **Step 6: Lint + commit**

```bash
npx markdownlint-cli2 "docs/Tooling_v8_3.md" "docs/Plugin_stack_rules_v1.md" "docs/Pravila_raboty_Claude_v1_1.md" "docs/CHANGELOG_claude_md.md"
npx cspell --no-progress --no-summary --no-gitignore "docs/Tooling_v8_3.md" "docs/Plugin_stack_rules_v1.md" "docs/Pravila_raboty_Claude_v1_1.md"
git add docs/Tooling_v8_3.md docs/Plugin_stack_rules_v1.md docs/Pravila_raboty_Claude_v1_1.md CLAUDE.md docs/CHANGELOG_claude_md.md cspell-words.txt
git commit -m "docs(c9): register CCPM (+product-management) project-management category (NUM1)"
```

---

## Task 8: Reflect C9 on the map — close the section

**Files:** Modify `docs/automation-graph.html`

- [ ] **Step 1: Read the structures to replicate**

In `docs/automation-graph.html` read, as templates: an existing vendored-skill node (`mermaid_skill` if A6 landed, else a project-skill node `sk_rls`) and a plugin node (`claude_md_mgmt`) across `NODES`, `NODE_DETAILS`/`nd(...)`, `NODE_SECTION`, and the "Паспорт узла" date fields. Record the current node/edge counts from the header.

- [ ] **Step 2: Add the C9 nodes**

Add to `NODES`, replicating the template shapes:

- `ccpm` — label `CCPM\n(skill)`, skills group.
- `product_mgmt` — label `product-\nmanagement`, plugins group. *(omit if Task 5 was deferred)*

Add matching `nd(...)` / `NODE_DETAILS` entries (Russian, per the file's convention), Паспорт `since: '2026-05-17'`:

- `ccpm` — "Vendored-скил: PRD→эпик→GitHub-issue→код с трассируемостью. Раздел C9 опирается также на reuse — GitHub MCP (issues/Projects v2) + Superpowers writing-plans + q-item-add."
- `product_mgmt` — "Плагин Anthropic: PRD/роадмап/метрики (product-strategy церемонии)."

- [ ] **Step 3: Map the new nodes to section C9**

In `NODE_SECTION` add (omit `product_mgmt` if Task 5 deferred):

```js
ccpm: 'C9', product_mgmt: 'C9',
```

`C9 «Управление проектами»` goes from 0 → 1-2 nodes — the section is no longer empty.

- [ ] **Step 4: Update header metrics + group-count comments**

Bump the node count in the map header/legend by 1-2. Update the `NODE_SECTION` group-count comments (plugins, skills).

- [ ] **Step 5: Smoke-test the map**

```bash
npx stylelint docs/automation-graph.html
```

Open `docs/automation-graph.html` (Playwright MCP or a local `http.server` — quirk 90: `file://` rejected). Expected: 0 JS console errors; the new node(s) render; clicking section `C9` highlights them.

- [ ] **Step 6: Commit**

```bash
git add docs/automation-graph.html
git commit -m "feat(map): C9 nodes — closes section «Управление проектами»"
```

---

## Task 9: Final regression & branch finish

**Files:** none modified

- [ ] **Step 1: Full pre-commit chain**

```bash
npx lefthook run pre-commit
```

Expected: all jobs green — C9 adds **no** lefthook job (job count unchanged: 8, or 9 if A6's adr-judge landed).

- [ ] **Step 2: Confirm app code untouched — run the suites**

C9 changes no `app/` code → suites must match the Task 1 Step 3 baseline:

```bash
cd app && php artisan test --parallel
npm run test:vue
```

Expected: Pest and Vitest counts unchanged vs the Task 1 baseline (0 regressions). Record exact counts; write out any failure with file:line.

- [ ] **Step 3: Confirm the economy/ruflo hook chain is intact**

Economy marker still appears; the Stop verifier still runs; no plugin/skill leaked a `hooks` entry into either `settings.json`. Compare to the Task 1 Step 2 snapshot.

- [ ] **Step 4: Pre-push checks**

```bash
./bin/gitleaks.exe detect --source . --no-banner --redact
./bin/lychee.exe --config .lychee.toml "docs/**/*.md" "*.md"
```

Expected: gitleaks 0 leaks; lychee 0 broken (new `docs/projects/*.md` + `docs/adr/ADR-004-*.md` are scanned — fix or `.lychee.toml`-exclude any link).

- [ ] **Step 5: Finish the branch**

Invoke `superpowers:finishing-a-development-branch` — present the standard options. Do **not** push without an explicit user choice. Push pattern: `git push origin feat/c9-project-management-tooling:main`.

---

## Self-Review

**1. Spec coverage (Variant А — reuse core + CCPM + conditional product-management).** Reuse — GitHub MCP `projects` toolset enabled (Task 2), Superpowers/`q-item-add`/ruflo documented in the convention (Task 4 Step 2). CCPM — vendored (Task 3), bootstrapped (Task 4), smoked (Task 6). product-management — conditional install (Task 5). Section closure: normative (Task 7), map (Task 8), regression/finish (Task 9). Conflict audit: CP1→T3.4, CP2→T4.2, CP3→T4.4 (ADR-004), CP4→T1.4+T3.2, CP5→T4.1+T7.2, CP6→T6.2, PG1→T1.5+T5(header), PG2→T5.2, PG3→T7.2, GH1→T2, GH2→no task (dropped), REU1→T8.2, CC1→T7.2, NUM1→T1.6+T7.1. No gaps.

**2. Placeholder scan.** `#N`/`#N+1` (Task 7), the exact `/plugin install` strings (Task 5), and the `.mcp.json` toolset config shape (Task 2) are **runtime-resolved by design** — the live Tooling counter, the product-management marketplace, and the actual `.mcp.json` shape are not knowable before Task 1 Step 5-6 / Task 2 Step 1, which carry concrete resolution criteria (same pattern as the A6/D3 plans). All file contents (`docs/projects/README.md`, ADR-004, the `.gitkeep` seeds) are shown in full. No "TBD" / "handle edge cases".

**3. Consistency.** Branch `feat/c9-project-management-tooling` consistent T1↔T9. Node ids `ccpm` / `product_mgmt` consistent T8 Steps 2-3. Category name **project-management** consistent T7 Steps 2-4. Paths consistent: `.claude/skills/ccpm/`, `.claude/prds/`, `.claude/epics/`, `docs/projects/`. The conditional `product_mgmt` is flagged uniformly (Task 5 header, Task 7 Step 2, Task 8 Steps 2-3). No lefthook job added — consistent with the "minimal-conflict" goal.

---

## Execution Handoff

Plan complete and saved to `docs/superpowers/plans/2026-05-17-c9-project-management-tooling-integration.md`. Two execution options:

1. **Subagent-Driven (recommended for the doc-heavy tasks)** — fresh subagent per task, two-stage review. *Caveat:* Tasks 2, 5 (`/plugin …`, `/reload-plugins`), Task 3 Step 5 + Task 6 Step 1 (skill invocations) and Task 7 Step 5 (`claude-md-management`) are main-session-bound — those steps stay with the controller.
2. **Inline Execution** — `superpowers:executing-plans`, batch with checkpoints. **Recommended here** — install/config/docs-heavy with many interactive main-session steps (same as the A6/D3 plans).

**Sequencing reminder:** C9 cannot start until A6 **and** D3 are complete and pushed (locked — see "Sequencing" in the header). One open item before execution: execution method — **1** (Subagent-Driven) or **2** (Inline, recommended here).
