claude-code-session-manager 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +21 -0
- package/dist/assets/{TiptapBody-BsNr6F0B.js → TiptapBody-CJ6GK5CM.js} +1 -1
- package/dist/assets/{index-DU1pkhIQ.js → index-DtQ4LzuV.js} +243 -242
- package/dist/index.html +1 -1
- package/package.json +3 -1
- package/plugins/session-manager-dev/.claude-plugin/plugin.json +19 -0
- package/plugins/session-manager-dev/skills/develop/SKILL.md +112 -0
- package/plugins/session-manager-dev/skills/develop/standards.md +67 -0
- package/plugins/session-manager-dev/skills/explain-to-me/SKILL.md +192 -0
- package/plugins/session-manager-dev/skills/explain-to-me/assets/style-reference.html +163 -0
- package/plugins/session-manager-dev/skills/local-project-health/SKILL.md +58 -0
- package/plugins/session-manager-dev/skills/my-feedback/SKILL.md +132 -0
- package/plugins/session-manager-dev/skills/optimize-kpi/SKILL.md +289 -0
- package/plugins/session-manager-dev/skills/prd/SKILL.md +134 -0
- package/plugins/session-manager-dev/skills/process-feedback/SKILL.md +183 -0
- package/plugins/session-manager-dev/skills/project-status/SKILL.md +244 -0
- package/plugins/session-manager-dev/skills/requesting-code-review/SKILL.md +105 -0
- package/plugins/session-manager-dev/skills/requesting-code-review/code-reviewer.md +146 -0
- package/plugins/session-manager-dev/skills/security-review/SKILL.md +105 -0
- package/src/main/__tests__/scheduler-autofix-select.test.cjs +95 -0
- package/src/main/__tests__/scheduler-autopromote.test.cjs +33 -0
- package/src/main/scheduler.cjs +76 -3
- package/src/main/templates/PRD_AUTHORING.md +316 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: process-feedback
|
|
3
|
+
description: >-
|
|
4
|
+
Process the current project's inbound feedback folder end-to-end: read every
|
|
5
|
+
open item, evaluate it against real code, and for work that belongs to this
|
|
6
|
+
project queue it as scheduled PRDs via /develop (never implement inline) —
|
|
7
|
+
then track those PRDs to completion, archive the item as processed, and fold
|
|
8
|
+
lessons back into the folder's README so future feedback (written by other
|
|
9
|
+
agents/projects) gets better. Use whenever the user says "/process-feedback",
|
|
10
|
+
"review the feedback folder", "work through the feedback", "any open
|
|
11
|
+
feedback?", or drops new files into feedback/. Keywords: feedback, intake,
|
|
12
|
+
external-feedback, cross-project requests, process feedback, triage feedback.
|
|
13
|
+
model: opus
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# process-feedback
|
|
17
|
+
|
|
18
|
+
**Role:** the *agent-side intake* for the dev pipeline — the project-to-project complement of
|
|
19
|
+
an interactive human prompt. It evaluates inbound feedback, dispatches the codeable parts to
|
|
20
|
+
`/develop` (the shared pipeline), and owns the feedback-specific bookkeeping (status log,
|
|
21
|
+
RESOLUTION, archive). It does **not** implement, and it does **not** re-specify how PRDs are
|
|
22
|
+
tracked — that lives once, in `/develop` Phase 2.
|
|
23
|
+
|
|
24
|
+
Work the project's intra-project feedback intake (`feedback/` at the repo root;
|
|
25
|
+
some projects name it `external-feedback/`). Each file is a request from an
|
|
26
|
+
upstream/downstream service in the same stack (e.g. Burrow ⇄ signal-builder ⇄
|
|
27
|
+
social-signals-trader). The folder's own `README.md` is the authority on file
|
|
28
|
+
conventions — read it first; the steps below are the process.
|
|
29
|
+
|
|
30
|
+
**Core principle:** this skill *triages and dispatches*; it does not implement.
|
|
31
|
+
Anything that requires writing code for this project is decomposed and queued as
|
|
32
|
+
scheduled PRDs through **`/develop`**, which runs them headlessly on the
|
|
33
|
+
session-manager scheduler. process-feedback then watches those PRDs to
|
|
34
|
+
completion and does the bookkeeping. Implementing feedback inline — bypassing
|
|
35
|
+
the scheduler — is the one thing this skill must not do.
|
|
36
|
+
|
|
37
|
+
## Steps
|
|
38
|
+
|
|
39
|
+
### 0. Quick-exit — bail in milliseconds if there's nothing to do
|
|
40
|
+
|
|
41
|
+
**Do this first, cheaply, before reading any code or spawning anything.** This
|
|
42
|
+
skill is run on a schedule across many projects (the scheduler's feedback sweep),
|
|
43
|
+
so the empty case must cost almost nothing:
|
|
44
|
+
|
|
45
|
+
- If neither `feedback/` nor `external-feedback/` exists → report
|
|
46
|
+
"no feedback intake in `<project>`" and **EXIT**.
|
|
47
|
+
- If the folder exists but holds **no open item** (every file is in `processed/`
|
|
48
|
+
or marked ✅/archived; nothing open/🆕) → report "no open feedback in
|
|
49
|
+
`<project>`" and **EXIT immediately**. Do NOT read source, evaluate, or start
|
|
50
|
+
an agent loop.
|
|
51
|
+
- Only when at least one **open** item exists do you continue — an open item
|
|
52
|
+
means *someone cares about this project*, so it's worth the full pass (and,
|
|
53
|
+
per step 7, leaving the README better for next time).
|
|
54
|
+
|
|
55
|
+
### 1. Read the intake
|
|
56
|
+
|
|
57
|
+
- Read `feedback/README.md` (conventions + the status log), then every file
|
|
58
|
+
whose status is open/🆕. Skip files already ✅/archived. Items already 🛠
|
|
59
|
+
(queued — see step 4) are in flight: don't re-queue them, just re-check their
|
|
60
|
+
PRD status (step 5).
|
|
61
|
+
- If the folder doesn't exist, say so and stop — don't invent one.
|
|
62
|
+
|
|
63
|
+
### 2. Evaluate before queueing
|
|
64
|
+
|
|
65
|
+
For each open item, verify the claims against current code and live data —
|
|
66
|
+
feedback cites the state of the world when it was written, which may have
|
|
67
|
+
drifted. Then classify each ask:
|
|
68
|
+
|
|
69
|
+
- **Ours, do it** — the fix belongs to this project. → goes to `/develop`
|
|
70
|
+
(step 3). Do NOT write the code here.
|
|
71
|
+
- **Ours, decline** — conflicts with the project's contracts/vision (e.g. a
|
|
72
|
+
convenience ask that violates a service boundary). Decline explicitly in the
|
|
73
|
+
RESOLUTION with the reason; never silently skip. Resolved now (no code) →
|
|
74
|
+
close immediately in step 4.
|
|
75
|
+
- **Theirs, forward** — the root cause lives in another service. Do NOT reach
|
|
76
|
+
across the boundary to hack around it; file a feedback/PRD item in *that*
|
|
77
|
+
project's intake folder and reference it (use `/my-feedback to <project>`).
|
|
78
|
+
Resolved now (no code in *this* repo) → close immediately in step 4.
|
|
79
|
+
|
|
80
|
+
Root-cause with evidence (logs, live queries, health checks), not from the
|
|
81
|
+
file's narrative alone — the reporter sees symptoms, you can see causes.
|
|
82
|
+
|
|
83
|
+
### 3. Queue the work via /develop (never implement inline)
|
|
84
|
+
|
|
85
|
+
For every **Ours, do it** item, invoke the **`develop`** skill to turn the ask
|
|
86
|
+
into one or more self-contained PRDs in the scheduler queue. Hand `/develop` a
|
|
87
|
+
complete brief so it does not have to re-ask scope — your step-2 evaluation
|
|
88
|
+
already established it:
|
|
89
|
+
|
|
90
|
+
- The goal, in this-project terms.
|
|
91
|
+
- **Acceptance criteria taken from the feedback's own AC**, made verifiable
|
|
92
|
+
(with the test/health command to prove them).
|
|
93
|
+
- The absolute `cwd`, plus the exact files/patterns/utilities to reuse that you
|
|
94
|
+
found while root-causing (the API-reuse standard — don't make the headless run
|
|
95
|
+
rediscover them).
|
|
96
|
+
- Any constraints, service boundaries, or "out of scope" lines.
|
|
97
|
+
|
|
98
|
+
`/develop` owns decomposition (small ~15-min PRDs), inlining the engineering
|
|
99
|
+
standards, the `NN-` parallel grouping, and — because each PRD publishes its own
|
|
100
|
+
work — the implementation **commit + deploy**. That means process-feedback does
|
|
101
|
+
**not** commit implementation code; the PRDs do, when they run.
|
|
102
|
+
|
|
103
|
+
Record the emitted PRD filenames/ids — you need them for steps 4–6.
|
|
104
|
+
|
|
105
|
+
### 4. Interim bookkeeping — commit the triage now
|
|
106
|
+
|
|
107
|
+
Two cases:
|
|
108
|
+
|
|
109
|
+
- **Closed-without-code** items (declines, upstream forwards): append a full
|
|
110
|
+
`## RESOLUTION` (what was declined and why / what was forwarded where, with the
|
|
111
|
+
upstream file id), flip the README row to ✅, and `git mv` the file to
|
|
112
|
+
`feedback/processed/` — these are done.
|
|
113
|
+
- **Queued** items (sent to `/develop`): append a `## RESOLUTION (in progress)`
|
|
114
|
+
recording the queued PRD filenames/ids and that execution is pending the
|
|
115
|
+
scheduler. Flip the README row to **🛠 queued** (add 🛠 to the log's legend if
|
|
116
|
+
absent) — **not** ✅. Leave the file in `feedback/` until the PRDs land. Do not
|
|
117
|
+
fabricate verification for code that hasn't run yet.
|
|
118
|
+
|
|
119
|
+
Commit only this feedback bookkeeping + any upstream filings (message references
|
|
120
|
+
the feedback file id, e.g. `chore(feedback): triage + queue 2026-06-10-01`).
|
|
121
|
+
Only commit a clean, green tree; if unrelated in-flight work is mixed into the
|
|
122
|
+
working tree, stop and tell the user instead of committing around it.
|
|
123
|
+
|
|
124
|
+
### 5. Track to completion — delegate to /develop Phase 2
|
|
125
|
+
|
|
126
|
+
The queued PRDs run headlessly and can take a while. **Do not re-implement the
|
|
127
|
+
monitor here** — `/develop` Phase 2 already owns it (the 30-min scheduler watch,
|
|
128
|
+
the escalate-on-stuck/`needs_review`/timeout logic, and the live verification
|
|
129
|
+
against each PRD's acceptance criteria). When you call `/develop` in step 3, that
|
|
130
|
+
tracking runs as part of it.
|
|
131
|
+
|
|
132
|
+
Your only job in this step is to consume its outcome per queued item:
|
|
133
|
+
|
|
134
|
+
- **`/develop` escalated a PRD** (failed / stuck / needs attention) — relay it to
|
|
135
|
+
the user with its specifics; leave the feedback item at 🛠 (still in flight)
|
|
136
|
+
until it's resolved or re-queued. Don't archive a broken item as done.
|
|
137
|
+
- **`/develop` reported all of an item's PRDs landed + verified** — proceed to
|
|
138
|
+
step 6 to finalize that item's bookkeeping.
|
|
139
|
+
|
|
140
|
+
### 6. Finalize the archive (when an item's PRDs land + verify)
|
|
141
|
+
|
|
142
|
+
Once `/develop` Phase 2 reports an item's PRDs merged and verified against the AC:
|
|
143
|
+
|
|
144
|
+
- Append the final `## RESOLUTION`: what changed, the PRD/commit refs, what was
|
|
145
|
+
declined/forwarded, and how `/develop` verified it (cite its gate result —
|
|
146
|
+
don't re-run the verification it already did).
|
|
147
|
+
- Flip the README row **🛠 → ✅** (keep the row — the log is the durable index).
|
|
148
|
+
- `git mv` the file to `feedback/processed/` (create the dir if needed). Closed
|
|
149
|
+
items live there as the durable record; only files entered in error are ever
|
|
150
|
+
deleted.
|
|
151
|
+
- Commit the bookkeeping.
|
|
152
|
+
|
|
153
|
+
### 7. Self-improve the intake (always do this)
|
|
154
|
+
|
|
155
|
+
Update the folder's `README.md` guidance section based on what this round
|
|
156
|
+
taught you:
|
|
157
|
+
|
|
158
|
+
- What made an item easy to queue + close? Distill it into a bullet other agents
|
|
159
|
+
can imitate (cite the file as the example) — e.g. a feedback item that already
|
|
160
|
+
carried a crisp, testable AC turned straight into a clean PRD.
|
|
161
|
+
- What slowed you down — a missing log path, an unverifiable claim, an ask that
|
|
162
|
+
actually belonged to a third service, a PRD that got stuck? Add the
|
|
163
|
+
counter-guidance.
|
|
164
|
+
- Keep the section calibrated and short: merge/rewrite stale bullets rather than
|
|
165
|
+
appending forever.
|
|
166
|
+
|
|
167
|
+
This step is the point of the skill: every processing pass should make the
|
|
168
|
+
*next* pass cheaper.
|
|
169
|
+
|
|
170
|
+
## Guardrails
|
|
171
|
+
|
|
172
|
+
- **Never implement feedback inline.** Code that belongs to this project goes
|
|
173
|
+
through `/develop` → the scheduler. The only commits process-feedback makes
|
|
174
|
+
itself are feedback bookkeeping and upstream filings.
|
|
175
|
+
- **Never mark a queued item ✅ or move it to `processed/` before its PRDs land
|
|
176
|
+
and verify.** Queued ≠ done; 🛠 is the honest interim state. An item archived
|
|
177
|
+
as resolved must point to merged, verified work.
|
|
178
|
+
- Never delete feedback files to "clear" the folder — archive them.
|
|
179
|
+
- Service boundaries outrank feedback asks: an item that requests a boundary
|
|
180
|
+
violation gets a documented decline + an upstream filing, not compliance.
|
|
181
|
+
- Report honestly in the RESOLUTION: PRDs that failed or stalled, asks left
|
|
182
|
+
open, deps on other teams. An archived item with open external deps should say
|
|
183
|
+
what unblocks it.
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-status
|
|
3
|
+
model: opus
|
|
4
|
+
description: >-
|
|
5
|
+
GLOBAL FRAMEWORK for one operational status rollup of the project in the
|
|
6
|
+
current working directory — defines the contract (what a status report must
|
|
7
|
+
contain, in what order, on which model) and DELEGATES the project-specific
|
|
8
|
+
measurement to that project's own `project-status-local` skill. Use whenever
|
|
9
|
+
the user asks "what's the project status", "/project-status", "how is this
|
|
10
|
+
project doing", "are the jobs healthy", or wants a one-shot status rollup for
|
|
11
|
+
the repo they're in. Keywords: project status, KPI, north-star, crons, jobs,
|
|
12
|
+
last run, health, rollup, ops.
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# project-status — global framework
|
|
16
|
+
|
|
17
|
+
This is the **global framework**, not an implementation. It owns the *contract*
|
|
18
|
+
(what a status rollup must contain, the order, the presentation, the model
|
|
19
|
+
expectation) and **delegates** the project-specific *how* to the project's own
|
|
20
|
+
`project-status-local` skill.
|
|
21
|
+
|
|
22
|
+
> **Two skills, no name collision (by design).**
|
|
23
|
+
> `project-status` (this, global) = the framework/expectations.
|
|
24
|
+
> `project-status-local` (per project) = the implementation.
|
|
25
|
+
> They have **different names on purpose** — a project must NOT ship a second
|
|
26
|
+
> skill also named `project-status`, because a same-name skill silently shadows
|
|
27
|
+
> this one and drops everything it defines (that is exactly how the model
|
|
28
|
+
> fallback got lost once). Each project ships exactly one `project-status-local`.
|
|
29
|
+
|
|
30
|
+
## What to do when invoked
|
|
31
|
+
|
|
32
|
+
First decide **scope**: one project (the current repo) or several (the user named
|
|
33
|
+
multiple repos, said "all my projects", or wants a cross-project board).
|
|
34
|
+
|
|
35
|
+
### Single project (the cwd)
|
|
36
|
+
|
|
37
|
+
1. **Delegate if a local exists.** If a `project-status-local` skill is available
|
|
38
|
+
in the current project (it appears in the available-skills list), **invoke it**
|
|
39
|
+
(Skill tool, `skill: project-status-local`). It owns the specifics — which KPI
|
|
40
|
+
command to run, which crons are this project's, which health entrypoint to
|
|
41
|
+
call. Present its output; if it omits an element of the contract below, fill
|
|
42
|
+
the gap or note it.
|
|
43
|
+
2. **Otherwise run the generic fallback inline** (the flow at the bottom) and, at
|
|
44
|
+
the end, **offer to scaffold a `project-status-local`** for this repo so the
|
|
45
|
+
next run is project-aware.
|
|
46
|
+
|
|
47
|
+
Do not re-implement a project's specifics here — that belongs in its
|
|
48
|
+
`project-status-local`.
|
|
49
|
+
|
|
50
|
+
### Multiple projects (parallel fan-out)
|
|
51
|
+
|
|
52
|
+
The whole point of the framework/`-local` split: the per-project work is
|
|
53
|
+
**independent**, so run it **concurrently** — one project's KPI/crons/health
|
|
54
|
+
never depends on another's.
|
|
55
|
+
|
|
56
|
+
1. **Resolve the project list.** Use the repos the user named; for "all", or to
|
|
57
|
+
discover them, enumerate every repo that ships a local skill:
|
|
58
|
+
```bash
|
|
59
|
+
for d in ~/Projects/*/.claude/skills/project-status-local/SKILL.md; do
|
|
60
|
+
[ -f "$d" ] && echo "${d%/.claude/skills/project-status-local/SKILL.md}"
|
|
61
|
+
done
|
|
62
|
+
```
|
|
63
|
+
2. **Fan out one agent per project — in a SINGLE message with multiple `Agent`
|
|
64
|
+
tool calls** so they run in parallel (sequential calls would defeat the
|
|
65
|
+
purpose). Each agent (`subagent_type: general-purpose`) gets a prompt like:
|
|
66
|
+
> `cd <ABS_REPO_PATH>`. Produce this repo's status rollup by executing its
|
|
67
|
+
> own `project-status-local`: **read** `.claude/skills/project-status-local/SKILL.md`
|
|
68
|
+
> and run its steps (they are deterministic — a `brief.py`/analyzer call, a
|
|
69
|
+
> `crontab -l | grep` for its crons, its `scripts/health.sh`). If the repo has
|
|
70
|
+
> no `project-status-local`, follow the generic contract (KPI→chores→health)
|
|
71
|
+
> using its `CLAUDE.md` + crontab + health entrypoint. Return a **compact**
|
|
72
|
+
> rollup (≤12 lines): the project name, the 7d North-Star line (KPI vs
|
|
73
|
+
> benchmark → alpha), the health color, and the single worst ❌/⚠️ chore.
|
|
74
|
+
Let each agent **inherit the model** (omit `model`) — it just runs the repo's
|
|
75
|
+
commands; this framework's `model: opus` governs *this* turn.
|
|
76
|
+
3. **Aggregate** the returned rollups into one board: a lead table
|
|
77
|
+
(Project · 7d KPI · Health · Worst signal), RED/❌ projects first, then each
|
|
78
|
+
project's detail block beneath. Note any agent that failed to produce a rollup
|
|
79
|
+
(missing repo, broken local) rather than dropping it silently.
|
|
80
|
+
|
|
81
|
+
Why agents, not the Skill tool, for the others: skill availability is bound to
|
|
82
|
+
the launch repo, so `project-status-local` is only directly invokable for the
|
|
83
|
+
**current** project. For other repos the agent reproduces the local by reading +
|
|
84
|
+
running it (it is deterministic bash), which works from any cwd.
|
|
85
|
+
|
|
86
|
+
## The contract (what every report must satisfy)
|
|
87
|
+
|
|
88
|
+
Order — **1. North-Star KPI (last 7d) → 2. Chores (crons) → 3. Logs & usage
|
|
89
|
+
patterns → 4. Health verdict.** Lead with the KPI line and the single worst
|
|
90
|
+
❌/⚠️ chore or health signal; detail after. Keep it tight; relay engine/analyzer
|
|
91
|
+
output rather than re-deriving numbers by hand.
|
|
92
|
+
|
|
93
|
+
A status check is an **audit**, not just a liveness ping — it reads the project's
|
|
94
|
+
*operational logs* (are the runs clean or throwing?) and its *usage/consumption
|
|
95
|
+
patterns* (who consumes the product's outputs, how often, which surfaces are hot
|
|
96
|
+
vs dead) alongside the KPI and crons. The KPI says "is the output valuable," the
|
|
97
|
+
logs+usage say "is the machine actually being used, and is it healthy under that
|
|
98
|
+
use." Both dimensions belong in every report.
|
|
99
|
+
|
|
100
|
+
- **KPI (the intro):** the metric the project's `CLAUDE.md` mission statement
|
|
101
|
+
names as optimized (a `## North-Star KPI` / `## Objective` section, usually
|
|
102
|
+
linking a definition doc or a measurement command). Measure it over a trailing
|
|
103
|
+
7-day window with the project's own command; state it with the
|
|
104
|
+
benchmark/target the section defines. If `CLAUDE.md` declares no KPI, say so
|
|
105
|
+
plainly (it belongs in the mission statement) and use a git/activity summary
|
|
106
|
+
for the intro — never invent a metric.
|
|
107
|
+
- **Chores:** only THIS project's cron jobs (match by repo name / absolute path),
|
|
108
|
+
each with last-run time, recent result, and an error count, in a table:
|
|
109
|
+
Job · Schedule · Purpose · Last run · Errors · Last result. Staleness: newest
|
|
110
|
+
log line older than ~2× cadence ⇒ ⚠️ overdue; an installed cron with an
|
|
111
|
+
empty/missing log ⇒ ❌ (often a Vixie-cron `TZ=` inline-prefix drop — fix with a
|
|
112
|
+
standalone `TZ=` line). Market-hours-only jobs stale overnight is expected.
|
|
113
|
+
- **Logs & usage patterns:** two sub-parts, both delegated to the `-local` for
|
|
114
|
+
*where the data lives*, but expected in every report:
|
|
115
|
+
- **Logs** — scan the recent operational logs for error/warning rates,
|
|
116
|
+
tracebacks, timeouts, and silent-stall signatures (a job that "ran ok" but
|
|
117
|
+
did no work). Surface counts + the worst recent line, not just last-exit.
|
|
118
|
+
- **Usage / consumption** — how the project's *outputs* are actually consumed:
|
|
119
|
+
per-endpoint/-tool invocation counts, the consumer/tenant breakdown, and
|
|
120
|
+
hot-vs-cold surfaces over a trailing window. This answers "is what we built
|
|
121
|
+
being used, and by whom" — the dimension a KPI alone misses. The `-local`
|
|
122
|
+
names the source (a usage/metering store, an access log, or a proxy like a
|
|
123
|
+
panel/history table); if no usage source exists yet, say so and recommend
|
|
124
|
+
standing one up rather than inventing numbers.
|
|
125
|
+
- **Health verdict:** run the project's own health entrypoint (first hit wins:
|
|
126
|
+
`scripts/health.sh` · `.claude/health.sh` · `bin/health.sh` · a `health`
|
|
127
|
+
Make/just target) and relay its GREEN/YELLOW/RED rollup. A non-zero exit for
|
|
128
|
+
YELLOW/RED is expected, not a skill failure; only a crash is.
|
|
129
|
+
|
|
130
|
+
## After the audit — route findings, then improve (the loop)
|
|
131
|
+
|
|
132
|
+
A status check shouldn't dead-end at a report. Once the four dimensions are in,
|
|
133
|
+
**act on what the audit surfaced** — this is what makes `/project-status` a
|
|
134
|
+
self-contained *bootstrap → evaluate → improve* loop, usable even on a brand-new
|
|
135
|
+
project.
|
|
136
|
+
|
|
137
|
+
**First, work the inbox — triage before generating new work.** Right after the
|
|
138
|
+
audit, clear the inbound queue via **`/process-feedback`**: it evaluates any
|
|
139
|
+
pending feedback (cross-project asks others filed to us, plus the prior cycle's
|
|
140
|
+
`/optimize-kpi` item) and routes each — ours-do-it → `/develop`, theirs →
|
|
141
|
+
`/my-feedback`, decline-with-reason. Don't generate new levers on top of an
|
|
142
|
+
unprocessed backlog. (If the inbox is empty, say so and move on.)
|
|
143
|
+
|
|
144
|
+
Then route **this audit's own findings**, by ownership:
|
|
145
|
+
|
|
146
|
+
1. **A finding that belongs to another project** (an upstream/downstream service
|
|
147
|
+
in the stack — e.g. the data source is stale, a contract drifted): do NOT
|
|
148
|
+
reach across the boundary. File it with **`/my-feedback <project>`** into that
|
|
149
|
+
project's intake, and note it in the report. (Same rule as everywhere: service
|
|
150
|
+
boundaries outrank convenience.)
|
|
151
|
+
2. **A finding that belongs to THIS project** (a real bug, a missing guard, an
|
|
152
|
+
enhancement the audit revealed — a cold sold-surface, a recurring error in the
|
|
153
|
+
logs, a usage gap): queue it as a scheduled PRD via **`/develop`** — never
|
|
154
|
+
implement it inline here. Record the queued PRD id in the report.
|
|
155
|
+
3. **Nothing actionable** — just report.
|
|
156
|
+
|
|
157
|
+
Then, the improvement gate: **if and only if the full health verdict is GREEN**
|
|
158
|
+
(every check passing — not degraded, not down) **and** the KPI/crons are clean,
|
|
159
|
+
invoke **`/optimize-kpi`** to drive the next North-Star improvement. The green gate
|
|
160
|
+
is load-bearing: optimizing the KPI on a broken or degraded base is wasted
|
|
161
|
+
motion — *fix health first* (via routes 1/2 above), and let a later run, once
|
|
162
|
+
green, trigger the optimizer. State explicitly in the report whether the gate
|
|
163
|
+
opened (green → optimize queued) or stayed shut (degraded/down → health findings
|
|
164
|
+
routed first).
|
|
165
|
+
|
|
166
|
+
This sequence — audit → route findings (my-feedback / develop) → optimize-when-green
|
|
167
|
+
— is enough to bootstrap, evaluate, and continuously improve a project from a
|
|
168
|
+
single `/project-status` invocation. The `-local` owns the *specifics* of each
|
|
169
|
+
step; this framework owns the *loop*.
|
|
170
|
+
|
|
171
|
+
## Model expectation (every local must mirror this)
|
|
172
|
+
|
|
173
|
+
This framework runs on **`model: opus`** (Opus 4.8) — a status check is reasoning
|
|
174
|
+
work that should run on the strongest model. **Every `project-status-local` MUST
|
|
175
|
+
carry the same single-value `model: opus` frontmatter line**, so a direct
|
|
176
|
+
`/project-status-local` invocation runs on Opus too. A local that omits it loses
|
|
177
|
+
the override and runs on whatever the session model happens to be.
|
|
178
|
+
|
|
179
|
+
> **Syntax matters — this is a real, documented field.** Skill frontmatter
|
|
180
|
+
> `model:` takes a **single** value (the same aliases as `/model`: `opus`,
|
|
181
|
+
> `sonnet`, `haiku`, `fable`, or a full id like `claude-opus-4-8`). It does NOT
|
|
182
|
+
> accept a comma-separated fallback chain — `model: opus,sonnet` is an invalid
|
|
183
|
+
> value and silently fails to apply (the skill then runs on the session model,
|
|
184
|
+
> not Opus). Graceful failover to Sonnet is configured **at the session level**,
|
|
185
|
+
> not per-skill, via `fallbackModel` in settings:
|
|
186
|
+
> `"fallbackModel": ["opus", "sonnet"]` in `~/.claude/settings.json`. Per the
|
|
187
|
+
> Claude Code docs, a skill's `model:` override applies for the rest of the
|
|
188
|
+
> current turn and reverts to the session model on the next prompt.
|
|
189
|
+
|
|
190
|
+
## Scaffolding a new `project-status-local` — establish the framework with the user
|
|
191
|
+
|
|
192
|
+
When a project has none, **do not silently guess the implementation.** The whole
|
|
193
|
+
point of the framework/`-local` split is that every project's report covers the
|
|
194
|
+
**same four dimensions** (KPI · chores · logs+usage · health) — so the parent's job
|
|
195
|
+
on a missing `-local` is to *establish those expectations with the user*, then
|
|
196
|
+
write a complete local. Run a short **Q&A** (use `AskUserQuestion`, batching the
|
|
197
|
+
gaps you couldn't auto-detect) to pin down each contract dimension:
|
|
198
|
+
|
|
199
|
+
1. **Probe first, ask only the gaps.** Read `CLAUDE.md` (KPI section?), the
|
|
200
|
+
crontab (this repo's jobs + their log paths?), the repo for a health entrypoint
|
|
201
|
+
(`scripts/health.sh` etc.), and for a usage source (a metering/access-log store,
|
|
202
|
+
or a proxy table). Auto-fill what you can find.
|
|
203
|
+
2. **Ask the user to confirm/supply the rest**, one question per unresolved
|
|
204
|
+
dimension:
|
|
205
|
+
- **KPI** — what is this project's North-Star metric + the command that measures
|
|
206
|
+
it over 7d? (If `CLAUDE.md` has no `## North-Star KPI` section, offer to add
|
|
207
|
+
one — the KPI belongs in the mission statement, not only the skill.)
|
|
208
|
+
- **Chores** — which crons are this project's, and where do their logs live?
|
|
209
|
+
- **Logs & usage** — which logs carry the operational signal, and **what is the
|
|
210
|
+
usage/consumption source** (a metering store / access log / proxy)? If none
|
|
211
|
+
exists, flag it and offer to stand one up — a project with no usage telemetry
|
|
212
|
+
can't answer "is what we built being used."
|
|
213
|
+
- **Health** — the health entrypoint + how to read its verdict.
|
|
214
|
+
3. **Write the local** `<repo>/.claude/skills/project-status-local/SKILL.md` with
|
|
215
|
+
frontmatter `name: project-status-local`, `model: opus` (single value — see the
|
|
216
|
+
syntax note above; `fallbackModel` owns failover), a project-specific
|
|
217
|
+
`description`, and a body implementing **all four** contract dimensions against
|
|
218
|
+
the answers — so the next `/project-status` here is project-aware and consistent
|
|
219
|
+
with every other project's report.
|
|
220
|
+
|
|
221
|
+
This Q&A is the deliberate "pain" that makes cross-project reports comparable:
|
|
222
|
+
each `-local` is the *same contract*, filled with that project's specifics.
|
|
223
|
+
|
|
224
|
+
## Generic fallback flow (no local present)
|
|
225
|
+
|
|
226
|
+
Run inline only when the project ships no `project-status-local`:
|
|
227
|
+
|
|
228
|
+
1. **Current time:** `date '+%Y-%m-%d %H:%M %Z'` (for staleness judgment).
|
|
229
|
+
2. **KPI:** read `./CLAUDE.md`, find the North-Star section, run its measurement
|
|
230
|
+
command over 7 days, and state the headline. No KPI section ⇒ say so + git
|
|
231
|
+
summary.
|
|
232
|
+
3. **Chores:** `crontab -l | grep -F "$(basename "$PWD")" | grep -v '^\s*#'`
|
|
233
|
+
(widen/narrow if the cron path differs from the dir name); for each job
|
|
234
|
+
`ls -la <log>` + `tail -n 8 <log>` + an `ERROR|Traceback|failed|exception`
|
|
235
|
+
count; render the chores table.
|
|
236
|
+
4. **Logs & usage:** scan recent logs for error/warning rates + silent stalls;
|
|
237
|
+
look for a usage/consumption source (a metering store, an access log, or a
|
|
238
|
+
request/history table) and summarize per-surface invocation + consumer
|
|
239
|
+
patterns over a trailing window. If none exists, say so and recommend standing
|
|
240
|
+
one up — don't invent usage numbers.
|
|
241
|
+
5. **Health:** run the project's health entrypoint and relay the rollup; if none
|
|
242
|
+
exists, infer from KPI + chores and offer to create `scripts/health.sh`.
|
|
243
|
+
6. Lead with the 7d KPI line and the worst chore/health/usage signal. Then offer
|
|
244
|
+
to scaffold a `project-status-local` (Q&A above) so the next run is consistent.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: requesting-code-review
|
|
3
|
+
description: Use when completing tasks, implementing major features, or before merging to verify work meets requirements
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Requesting Code Review
|
|
7
|
+
|
|
8
|
+
Dispatch superpowers:code-reviewer subagent to catch issues before they cascade.
|
|
9
|
+
|
|
10
|
+
**Core principle:** Review early, review often.
|
|
11
|
+
|
|
12
|
+
## When to Request Review
|
|
13
|
+
|
|
14
|
+
**Mandatory:**
|
|
15
|
+
- After each task in subagent-driven development
|
|
16
|
+
- After completing major feature
|
|
17
|
+
- Before merge to main
|
|
18
|
+
|
|
19
|
+
**Optional but valuable:**
|
|
20
|
+
- When stuck (fresh perspective)
|
|
21
|
+
- Before refactoring (baseline check)
|
|
22
|
+
- After fixing complex bug
|
|
23
|
+
|
|
24
|
+
## How to Request
|
|
25
|
+
|
|
26
|
+
**1. Get git SHAs:**
|
|
27
|
+
```bash
|
|
28
|
+
BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
|
|
29
|
+
HEAD_SHA=$(git rev-parse HEAD)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**2. Dispatch code-reviewer subagent:**
|
|
33
|
+
|
|
34
|
+
Use Task tool with superpowers:code-reviewer type, fill template at `code-reviewer.md`
|
|
35
|
+
|
|
36
|
+
**Placeholders:**
|
|
37
|
+
- `{WHAT_WAS_IMPLEMENTED}` - What you just built
|
|
38
|
+
- `{PLAN_OR_REQUIREMENTS}` - What it should do
|
|
39
|
+
- `{BASE_SHA}` - Starting commit
|
|
40
|
+
- `{HEAD_SHA}` - Ending commit
|
|
41
|
+
- `{DESCRIPTION}` - Brief summary
|
|
42
|
+
|
|
43
|
+
**3. Act on feedback:**
|
|
44
|
+
- Fix Critical issues immediately
|
|
45
|
+
- Fix Important issues before proceeding
|
|
46
|
+
- Note Minor issues for later
|
|
47
|
+
- Push back if reviewer is wrong (with reasoning)
|
|
48
|
+
|
|
49
|
+
## Example
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
[Just completed Task 2: Add verification function]
|
|
53
|
+
|
|
54
|
+
You: Let me request code review before proceeding.
|
|
55
|
+
|
|
56
|
+
BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
|
|
57
|
+
HEAD_SHA=$(git rev-parse HEAD)
|
|
58
|
+
|
|
59
|
+
[Dispatch superpowers:code-reviewer subagent]
|
|
60
|
+
WHAT_WAS_IMPLEMENTED: Verification and repair functions for conversation index
|
|
61
|
+
PLAN_OR_REQUIREMENTS: Task 2 from docs/plans/deployment-plan.md
|
|
62
|
+
BASE_SHA: a7981ec
|
|
63
|
+
HEAD_SHA: 3df7661
|
|
64
|
+
DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
|
|
65
|
+
|
|
66
|
+
[Subagent returns]:
|
|
67
|
+
Strengths: Clean architecture, real tests
|
|
68
|
+
Issues:
|
|
69
|
+
Important: Missing progress indicators
|
|
70
|
+
Minor: Magic number (100) for reporting interval
|
|
71
|
+
Assessment: Ready to proceed
|
|
72
|
+
|
|
73
|
+
You: [Fix progress indicators]
|
|
74
|
+
[Continue to Task 3]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Integration with Workflows
|
|
78
|
+
|
|
79
|
+
**Subagent-Driven Development:**
|
|
80
|
+
- Review after EACH task
|
|
81
|
+
- Catch issues before they compound
|
|
82
|
+
- Fix before moving to next task
|
|
83
|
+
|
|
84
|
+
**Executing Plans:**
|
|
85
|
+
- Review after each batch (3 tasks)
|
|
86
|
+
- Get feedback, apply, continue
|
|
87
|
+
|
|
88
|
+
**Ad-Hoc Development:**
|
|
89
|
+
- Review before merge
|
|
90
|
+
- Review when stuck
|
|
91
|
+
|
|
92
|
+
## Red Flags
|
|
93
|
+
|
|
94
|
+
**Never:**
|
|
95
|
+
- Skip review because "it's simple"
|
|
96
|
+
- Ignore Critical issues
|
|
97
|
+
- Proceed with unfixed Important issues
|
|
98
|
+
- Argue with valid technical feedback
|
|
99
|
+
|
|
100
|
+
**If reviewer wrong:**
|
|
101
|
+
- Push back with technical reasoning
|
|
102
|
+
- Show code/tests that prove it works
|
|
103
|
+
- Request clarification
|
|
104
|
+
|
|
105
|
+
See template at: requesting-code-review/code-reviewer.md
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Code Review Agent
|
|
2
|
+
|
|
3
|
+
You are reviewing code changes for production readiness.
|
|
4
|
+
|
|
5
|
+
**Your task:**
|
|
6
|
+
1. Review {WHAT_WAS_IMPLEMENTED}
|
|
7
|
+
2. Compare against {PLAN_OR_REQUIREMENTS}
|
|
8
|
+
3. Check code quality, architecture, testing
|
|
9
|
+
4. Categorize issues by severity
|
|
10
|
+
5. Assess production readiness
|
|
11
|
+
|
|
12
|
+
## What Was Implemented
|
|
13
|
+
|
|
14
|
+
{DESCRIPTION}
|
|
15
|
+
|
|
16
|
+
## Requirements/Plan
|
|
17
|
+
|
|
18
|
+
{PLAN_REFERENCE}
|
|
19
|
+
|
|
20
|
+
## Git Range to Review
|
|
21
|
+
|
|
22
|
+
**Base:** {BASE_SHA}
|
|
23
|
+
**Head:** {HEAD_SHA}
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git diff --stat {BASE_SHA}..{HEAD_SHA}
|
|
27
|
+
git diff {BASE_SHA}..{HEAD_SHA}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Review Checklist
|
|
31
|
+
|
|
32
|
+
**Code Quality:**
|
|
33
|
+
- Clean separation of concerns?
|
|
34
|
+
- Proper error handling?
|
|
35
|
+
- Type safety (if applicable)?
|
|
36
|
+
- DRY principle followed?
|
|
37
|
+
- Edge cases handled?
|
|
38
|
+
|
|
39
|
+
**Architecture:**
|
|
40
|
+
- Sound design decisions?
|
|
41
|
+
- Scalability considerations?
|
|
42
|
+
- Performance implications?
|
|
43
|
+
- Security concerns?
|
|
44
|
+
|
|
45
|
+
**Testing:**
|
|
46
|
+
- Tests actually test logic (not mocks)?
|
|
47
|
+
- Edge cases covered?
|
|
48
|
+
- Integration tests where needed?
|
|
49
|
+
- All tests passing?
|
|
50
|
+
|
|
51
|
+
**Requirements:**
|
|
52
|
+
- All plan requirements met?
|
|
53
|
+
- Implementation matches spec?
|
|
54
|
+
- No scope creep?
|
|
55
|
+
- Breaking changes documented?
|
|
56
|
+
|
|
57
|
+
**Production Readiness:**
|
|
58
|
+
- Migration strategy (if schema changes)?
|
|
59
|
+
- Backward compatibility considered?
|
|
60
|
+
- Documentation complete?
|
|
61
|
+
- No obvious bugs?
|
|
62
|
+
|
|
63
|
+
## Output Format
|
|
64
|
+
|
|
65
|
+
### Strengths
|
|
66
|
+
[What's well done? Be specific.]
|
|
67
|
+
|
|
68
|
+
### Issues
|
|
69
|
+
|
|
70
|
+
#### Critical (Must Fix)
|
|
71
|
+
[Bugs, security issues, data loss risks, broken functionality]
|
|
72
|
+
|
|
73
|
+
#### Important (Should Fix)
|
|
74
|
+
[Architecture problems, missing features, poor error handling, test gaps]
|
|
75
|
+
|
|
76
|
+
#### Minor (Nice to Have)
|
|
77
|
+
[Code style, optimization opportunities, documentation improvements]
|
|
78
|
+
|
|
79
|
+
**For each issue:**
|
|
80
|
+
- File:line reference
|
|
81
|
+
- What's wrong
|
|
82
|
+
- Why it matters
|
|
83
|
+
- How to fix (if not obvious)
|
|
84
|
+
|
|
85
|
+
### Recommendations
|
|
86
|
+
[Improvements for code quality, architecture, or process]
|
|
87
|
+
|
|
88
|
+
### Assessment
|
|
89
|
+
|
|
90
|
+
**Ready to merge?** [Yes/No/With fixes]
|
|
91
|
+
|
|
92
|
+
**Reasoning:** [Technical assessment in 1-2 sentences]
|
|
93
|
+
|
|
94
|
+
## Critical Rules
|
|
95
|
+
|
|
96
|
+
**DO:**
|
|
97
|
+
- Categorize by actual severity (not everything is Critical)
|
|
98
|
+
- Be specific (file:line, not vague)
|
|
99
|
+
- Explain WHY issues matter
|
|
100
|
+
- Acknowledge strengths
|
|
101
|
+
- Give clear verdict
|
|
102
|
+
|
|
103
|
+
**DON'T:**
|
|
104
|
+
- Say "looks good" without checking
|
|
105
|
+
- Mark nitpicks as Critical
|
|
106
|
+
- Give feedback on code you didn't review
|
|
107
|
+
- Be vague ("improve error handling")
|
|
108
|
+
- Avoid giving a clear verdict
|
|
109
|
+
|
|
110
|
+
## Example Output
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
### Strengths
|
|
114
|
+
- Clean database schema with proper migrations (db.ts:15-42)
|
|
115
|
+
- Comprehensive test coverage (18 tests, all edge cases)
|
|
116
|
+
- Good error handling with fallbacks (summarizer.ts:85-92)
|
|
117
|
+
|
|
118
|
+
### Issues
|
|
119
|
+
|
|
120
|
+
#### Important
|
|
121
|
+
1. **Missing help text in CLI wrapper**
|
|
122
|
+
- File: index-conversations:1-31
|
|
123
|
+
- Issue: No --help flag, users won't discover --concurrency
|
|
124
|
+
- Fix: Add --help case with usage examples
|
|
125
|
+
|
|
126
|
+
2. **Date validation missing**
|
|
127
|
+
- File: search.ts:25-27
|
|
128
|
+
- Issue: Invalid dates silently return no results
|
|
129
|
+
- Fix: Validate ISO format, throw error with example
|
|
130
|
+
|
|
131
|
+
#### Minor
|
|
132
|
+
1. **Progress indicators**
|
|
133
|
+
- File: indexer.ts:130
|
|
134
|
+
- Issue: No "X of Y" counter for long operations
|
|
135
|
+
- Impact: Users don't know how long to wait
|
|
136
|
+
|
|
137
|
+
### Recommendations
|
|
138
|
+
- Add progress reporting for user experience
|
|
139
|
+
- Consider config file for excluded projects (portability)
|
|
140
|
+
|
|
141
|
+
### Assessment
|
|
142
|
+
|
|
143
|
+
**Ready to merge: With fixes**
|
|
144
|
+
|
|
145
|
+
**Reasoning:** Core implementation is solid with good architecture and tests. Important issues (help text, date validation) are easily fixed and don't affect core functionality.
|
|
146
|
+
```
|