技能备份 - 2026-04-15 (40个技能)
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
---
|
||||
name: repo-kanban-pm
|
||||
description: "Install and enforce a lightweight product-management workflow inside a code repo: feature-as-kanban boards, ROADMAP status tracking, branch/PR conventions, and an optional daily OpenClaw cron PM review. Use this skill when (1) starting work in a NEW repository/project that does not yet have a ROADMAP+feature-KANBAN system, (2) you are delegated to spin up a new project and want multi-agent coordination from day one, or (3) you are asked to fix/restructure an existing repo and introduce an organized backlog/feature tracking system. Also use when adding a daily PM audit loop (cron) to keep code + docs + PRs in sync."
|
||||
---
|
||||
|
||||
# Repo Kanban PM System
|
||||
|
||||
## What this skill does
|
||||
|
||||
Sets up a **multi-agent-safe** product workflow in a repo:
|
||||
- `docs/roadmap/ROADMAP.md` as the portfolio status
|
||||
- `docs/features/<feature>/KANBAN.md` as execution boards
|
||||
- `docs/pm/bugs/` as the **bug intake + triage inbox** (linkable into KANBAN)
|
||||
- Updates `AGENTS.md` to enforce the workflow
|
||||
- (Optional) creates a daily OpenClaw cron job to run a PM review (includes bug triage)
|
||||
|
||||
## When to use this skill (decision rule)
|
||||
|
||||
Use `repo-kanban-pm` when you are tasked with either:
|
||||
|
||||
1) **Creating/spinning up a new project/repo** and multiple agents will work on it (or you want to avoid chaos later).
|
||||
- Goal: install ROADMAP + per-feature KANBAN boards immediately.
|
||||
|
||||
2) **Entering an existing repo to fix, refactor, or restructure it** and it *does not* have a clear feature/backlog tracking system.
|
||||
- Goal: introduce the kanban workflow so subsequent work is trackable and PRs stay aligned.
|
||||
|
||||
Do **not** use this skill if the repo already has an equivalent system that the team actively uses (avoid duplicating governance).
|
||||
|
||||
---
|
||||
|
||||
## Quick start
|
||||
|
||||
### 1) Initialize the repo workflow
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
bash scripts/init_repo_pm.sh /absolute/path/to/repo
|
||||
```
|
||||
|
||||
This will:
|
||||
- create `docs/pm/` with the workflow doc + template
|
||||
- create `docs/pm/bugs/` with bug README + template
|
||||
- add `KANBAN.md` to any existing `docs/features/*/` folders
|
||||
- patch `AGENTS.md` to include the kanban rules (idempotent)
|
||||
|
||||
### 2) Add a daily PM cron (optional)
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
bash scripts/add_daily_pm_cron.sh /absolute/path/to/repo --agent persey --tz Europe/Minsk --time 10:00
|
||||
```
|
||||
|
||||
## Operating rules (agents)
|
||||
|
||||
1. Pick a feature from `docs/roadmap/ROADMAP.md`
|
||||
2. Create/update `docs/features/<feature>/KANBAN.md` and set status to `in-progress`
|
||||
3. Create a branch: `feat/<feature-slug>-<short>`
|
||||
4. PR must link the feature’s `KANBAN.md`
|
||||
5. On merge: mark `KANBAN.md` as done and tick the ROADMAP checkbox
|
||||
|
||||
## Templates
|
||||
|
||||
- Workflow spec: `docs/pm/KANBAN-SYSTEM.md`
|
||||
- Feature template: `docs/pm/FEATURE-KANBAN-TEMPLATE.md`
|
||||
|
||||
## Notes
|
||||
|
||||
- Keep KANBAN boards short.
|
||||
- ROADMAP contains status only; do not duplicate per-task detail there.
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"ownerId": "kn7cpxsva2g8jszszqg98t0gjs81wbmx",
|
||||
"slug": "repo-kanban-pm",
|
||||
"version": "0.1.1",
|
||||
"publishedAt": 1772111070347
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
REPO_PATH=${1:-}
|
||||
shift || true
|
||||
|
||||
AGENT_ID="persey"
|
||||
TZ="Europe/Minsk"
|
||||
TIME="10:00"
|
||||
NAME="daily-pm-review"
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--agent) AGENT_ID="$2"; shift 2;;
|
||||
--tz) TZ="$2"; shift 2;;
|
||||
--time) TIME="$2"; shift 2;;
|
||||
--name) NAME="$2"; shift 2;;
|
||||
*) echo "Unknown arg: $1" >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -z "$REPO_PATH" ]]; then
|
||||
echo "Usage: add_daily_pm_cron.sh /absolute/path/to/repo [--agent persey] [--tz Europe/Minsk] [--time 10:00] [--name daily-pm-review]" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# TIME HH:MM
|
||||
HH=${TIME%:*}
|
||||
MM=${TIME#*:}
|
||||
|
||||
CRON_EXPR="${MM} ${HH} * * *"
|
||||
|
||||
openclaw cron add \
|
||||
--name "${NAME}" \
|
||||
--agent "${AGENT_ID}" \
|
||||
--cron "${CRON_EXPR}" \
|
||||
--tz "${TZ}" \
|
||||
--announce \
|
||||
--description "Daily PM audit for repo: ${REPO_PATH}" \
|
||||
--message "Run daily PM review for repo: ${REPO_PATH}\n\nProcess:\n1) Read docs/roadmap/ROADMAP.md\n2) Read docs/features/*/KANBAN.md\n3) Scan docs/pm/bugs/*.md and ensure each open bug is linked from a feature KANBAN\n4) gh pr list + check recent commits\n5) Ensure KANBAN + ROADMAP reflect reality\n6) Run lightweight checks (if applicable): cd apps/telegram && npx tsc --noEmit\n7) Post report: Done/In progress/Open bugs/Blocked/Risks/Next"
|
||||
|
||||
echo "Cron created: ${NAME} (${CRON_EXPR} ${TZ})"
|
||||
@@ -0,0 +1,134 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
REPO_PATH=${1:-}
|
||||
if [[ -z "$REPO_PATH" ]]; then
|
||||
echo "Usage: init_repo_pm.sh /absolute/path/to/repo" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$REPO_PATH"
|
||||
|
||||
mkdir -p docs/pm docs/pm/bugs
|
||||
|
||||
# Write workflow docs if missing
|
||||
if [[ ! -f docs/pm/KANBAN-SYSTEM.md ]]; then
|
||||
cat > docs/pm/KANBAN-SYSTEM.md <<'EOF'
|
||||
# Repo — Feature Kanban Workflow (Agent Coordination)
|
||||
|
||||
**Single source of truth for portfolio-level status:**
|
||||
- `docs/roadmap/ROADMAP.md`
|
||||
|
||||
**Single source of truth for feature-level execution:**
|
||||
- `docs/features/<feature>/KANBAN.md`
|
||||
|
||||
## Rules
|
||||
1. One feature = one branch.
|
||||
2. One feature = one kanban file.
|
||||
3. ROADMAP is status, KANBAN is work.
|
||||
4. No hidden work: code changes require KANBAN + ROADMAP updates and a PR link.
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ ! -f docs/pm/FEATURE-KANBAN-TEMPLATE.md ]]; then
|
||||
cat > docs/pm/FEATURE-KANBAN-TEMPLATE.md <<'EOF'
|
||||
# <Feature Name> — Kanban
|
||||
|
||||
**Status:** backlog | in-progress | blocked | done
|
||||
**Owner:** <agent>
|
||||
**Branch:** <branch-name>
|
||||
**PR:** <link>
|
||||
**Last updated:** YYYY-MM-DD
|
||||
|
||||
## Goal
|
||||
|
||||
One sentence.
|
||||
|
||||
## Kanban
|
||||
|
||||
### Backlog
|
||||
- [ ]
|
||||
|
||||
### Doing
|
||||
- [ ]
|
||||
|
||||
### Blocked
|
||||
- [ ]
|
||||
|
||||
### Done
|
||||
- [ ]
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Bug inbox (PM intake) — idempotent
|
||||
if [[ ! -f docs/pm/bugs/README.md ]]; then
|
||||
cat > docs/pm/bugs/README.md <<'EOF'
|
||||
# Bugs & Fixes (PM Inbox)
|
||||
|
||||
This folder is the **bug intake + triage inbox**.
|
||||
|
||||
## Process
|
||||
1. Create a bug file: `BUG-YYYY-MM-DD-<slug>.md`
|
||||
2. Fill in repro steps + expected/actual + severity
|
||||
3. Link it from the relevant feature `docs/features/<feature>/KANBAN.md` (Blocked/Doing)
|
||||
4. When fixed: add PR link and mark status fixed
|
||||
|
||||
## Daily PM review responsibility
|
||||
- Scan this folder and ensure each open bug is linked from at least one feature KANBAN.
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [[ ! -f docs/pm/bugs/BUG-TEMPLATE.md ]]; then
|
||||
cat > docs/pm/bugs/BUG-TEMPLATE.md <<'EOF'
|
||||
# BUG: <title>
|
||||
|
||||
**Status:** open | in-progress | blocked | fixed
|
||||
**Severity:** low | medium | high | critical
|
||||
**Discovered:** YYYY-MM-DD
|
||||
**Reporter:**
|
||||
|
||||
**Feature link:** `docs/features/<feature>/KANBAN.md`
|
||||
**Related PR:**
|
||||
|
||||
## Repro Steps
|
||||
1.
|
||||
2.
|
||||
|
||||
## Expected
|
||||
|
||||
## Actual
|
||||
|
||||
## Suspected Area
|
||||
|
||||
## Fix Plan
|
||||
- [ ]
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Ensure features folders exist; add KANBAN if missing
|
||||
if [[ -d docs/features ]]; then
|
||||
for d in docs/features/*; do
|
||||
[[ -d "$d" ]] || continue
|
||||
if [[ ! -f "$d/KANBAN.md" ]]; then
|
||||
cp docs/pm/FEATURE-KANBAN-TEMPLATE.md "$d/KANBAN.md"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Patch AGENTS.md (append section if not present)
|
||||
if [[ -f AGENTS.md ]]; then
|
||||
if ! rg -q "Feature Execution Workflow \(Kanban, Mandatory\)" AGENTS.md 2>/dev/null; then
|
||||
cat >> AGENTS.md <<'EOF'
|
||||
|
||||
## Feature Execution Workflow (Kanban, Mandatory)
|
||||
|
||||
1. Pick a feature from `docs/roadmap/ROADMAP.md`.
|
||||
2. Create/update `docs/features/<feature>/KANBAN.md` and set it to **in-progress**.
|
||||
3. Create a dedicated branch: `feat/<feature-slug>-<short>`.
|
||||
4. During work: move checkboxes between Backlog → Doing → Done.
|
||||
5. Before review/merge: update KANBAN with branch + PR link and update ROADMAP status.
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Initialized repo-kanban-pm workflow in: $REPO_PATH"
|
||||
Reference in New Issue
Block a user