claude-code-session-manager 0.134.0 → 0.135.1
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 +1 -1
- package/dist/assets/{AgentLibrary-C9KFGJQq.js → AgentLibrary-BBY7E1ag.js} +1 -1
- package/dist/assets/{AppSettings-CvVQ6ot5.js → AppSettings-vMiIi0xn.js} +1 -1
- package/dist/assets/{Button-BHvploNk.js → Button-C0Z090Ui.js} +1 -1
- package/dist/assets/{DocumentEditorPane-DaX4xag_.js → DocumentEditorPane-Ds10W8SZ.js} +1 -1
- package/dist/assets/{Extensions-DbRY-KEz.js → Extensions-CjPiz2I5.js} +2 -2
- package/dist/assets/{History-BE_mjM24.js → History-Bm3KXXs1.js} +1 -1
- package/dist/assets/{Library-I37dQ6pB.js → Library-D-khizDg.js} +1 -1
- package/dist/assets/{ListDetail-DJYMWYQd.js → ListDetail-CJYpp8fW.js} +1 -1
- package/dist/assets/{Panel-DP8eSKSs.js → Panel-BHFGylfy.js} +1 -1
- package/dist/assets/{ProjectClaudeConfig-Cw8lc3Qi.js → ProjectClaudeConfig-DIzNAala.js} +1 -1
- package/dist/assets/{ProvenanceBadge-DUwhsmdA.js → ProvenanceBadge-CYryeTYF.js} +1 -1
- package/dist/assets/{Scheduler-B9D2gZqs.js → Scheduler-BS82wfRP.js} +1 -1
- package/dist/assets/{Settings-DSk7bn-1.js → Settings-DWPHJ94d.js} +1 -1
- package/dist/assets/{SkillReferenceGraph-DtJcJJHR.js → SkillReferenceGraph-Cf2M7YNq.js} +1 -1
- package/dist/assets/{Skills-BPZnSjsB.js → Skills-DLq55Odf.js} +1 -1
- package/dist/assets/{SourceChip-DUxulNOp.js → SourceChip-CHxAzRlD.js} +1 -1
- package/dist/assets/{SystemPrompt-BXAugVle.js → SystemPrompt-BYtKMAr3.js} +1 -1
- package/dist/assets/{TiptapBody-CDC1vrOo.js → TiptapBody-O_Gfq0Ha.js} +1 -1
- package/dist/assets/{Toggle-CrgM7OTR.js → Toggle-BJOUI5NY.js} +1 -1
- package/dist/assets/{ViewTabs-DLwaU9RB.js → ViewTabs-kkvNGu-S.js} +1 -1
- package/dist/assets/{VoiceButton-C4hIBxIP.js → VoiceButton-3i-6ju2L.js} +1 -1
- package/dist/assets/{historyTotals-itA00dXm.js → historyTotals-CHrIptK1.js} +1 -1
- package/dist/assets/{index-Cjt8B7H9.css → index-CjQ_p5y7.css} +1 -1
- package/dist/assets/{index-Cznhnxhq.js → index-D9qgN9_V.js} +362 -362
- package/dist/index.html +2 -2
- package/dist-web/app.css +1 -1
- package/dist-web/app.js +392 -392
- package/package.json +1 -1
- package/plugins/CLAUDE.md +7 -8
- package/plugins/session-manager-dev/.claude-plugin/plugin.json +1 -1
- package/plugins/session-manager-dev/skills/builder/SKILL.md +113 -91
- package/plugins/session-manager-dev/skills/builder/manual.md +80 -0
- package/plugins/session-manager-dev/skills/develop/SKILL.md +29 -56
- package/plugins/session-manager-dev/skills/develop/standards.md +12 -20
- package/plugins/session-manager-dev/skills/send-feedback/SKILL.md +13 -18
- package/src/main/build-info.json +4 -4
- package/src/main/lib/CLAUDE.md +2 -0
- package/src/main/lib/epic/epicTranscriptPath.cjs +5 -4
- package/src/main/lib/epic/restorableSessions.cjs +16 -8
- package/src/main/lib/persona-macro/macroJobDispatch.cjs +3 -2
- package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +34 -0
- package/src/main/lib/prd/prdFrontmatter.cjs +25 -1
- package/src/main/lib/scheduler/scheduleJobSchema.cjs +3 -0
- package/src/main/promptSessionEvents.cjs +7 -1
- package/src/main/runVerify.cjs +2 -2
- package/src/main/scheduler/prdParser.cjs +17 -1
- package/src/main/scheduler.cjs +137 -15
- package/src/main/templates/PRD_AUTHORING.md +2 -2
- package/src/preload/api.d.ts +8 -2
- package/src/seed/agents/demo-video-builder.md +25 -32
- package/src/seed/agents/dev-lead.md +3 -3
- package/src/seed/agents/project-home-builder.md +4 -2
- package/plugins/session-manager-dev/skills/builder/0-diff/SKILL.md +0 -44
- package/plugins/session-manager-dev/skills/builder/1-classify-and-bump/SKILL.md +0 -37
- package/plugins/session-manager-dev/skills/builder/2-gate/SKILL.md +0 -37
- package/plugins/session-manager-dev/skills/builder/3-publish/SKILL.md +0 -137
- package/plugins/session-manager-dev/skills/builder/4-manual/SKILL.md +0 -124
- package/plugins/session-manager-dev/skills/builder/5-report/SKILL.md +0 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-session-manager",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.135.1",
|
|
4
4
|
"description": "Local cockpit for the Claude Code CLI — multi-tab terminal, full config surface, scheduler, voice dictation, and live observability.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main/index.cjs",
|
package/plugins/CLAUDE.md
CHANGED
|
@@ -26,8 +26,8 @@ breaks them all, undetectably from here.
|
|
|
26
26
|
**Path literals inside shipped skills.** A skill runs in OTHER repos, so a
|
|
27
27
|
session-manager-internal path (`src/main/...`, `src/renderer/...`, bare `scripts/...`) inside one
|
|
28
28
|
is a portability defect unless `$SM_ROOT`-qualified (e.g. `node "$SM_ROOT/scripts/<x>.cjs"`, with `$SM_ROOT` resolved
|
|
29
|
-
to the installed package root) or removed.
|
|
30
|
-
`
|
|
29
|
+
to the installed package root) or removed. `builder/manual.md` is session-manager-specific on
|
|
30
|
+
purpose and runs only when `session-manager-operations/manual/manual.json` exists.
|
|
31
31
|
|
|
32
32
|
## Who consumes this
|
|
33
33
|
|
|
@@ -46,12 +46,11 @@ for live sibling consumers.
|
|
|
46
46
|
- Do not confuse this with `.claude/` at the repo root — this repo's own unshipped local dev
|
|
47
47
|
config. `.claude/agents/*.md` are per-project OVERLAYS that win over
|
|
48
48
|
`~/.claude/agents/*.md` (Claude Code's own precedence, per `src/main/agentLibrary.cjs`);
|
|
49
|
-
`src/seed/agents/` is the shipped source for the
|
|
50
|
-
`src/main/seedAgentPersonas.cjs` copies into `~/.claude/agents/`
|
|
51
|
-
`
|
|
52
|
-
and
|
|
53
|
-
hooks)
|
|
54
|
-
nothing else under `.claude/` is.
|
|
49
|
+
`src/seed/agents/` is the shipped source for the personas
|
|
50
|
+
`src/main/seedAgentPersonas.cjs` copies into `~/.claude/agents/` (its `PERSONAS` list);
|
|
51
|
+
`builder` has no seed source — the generic `~/.claude/agents/builder.md` is machine-local
|
|
52
|
+
and this repo's `.claude/agents/builder.md` overlays it. Tracked under `.claude/`:
|
|
53
|
+
`settings.json` (guard hooks), `agents/builder.md`, and the `agents/page-*.md` stewards.
|
|
55
54
|
- The scheduler MCP server (`session-manager-scheduler`) is registered at USER scope in
|
|
56
55
|
`~/.claude.json`, not in this repo.
|
|
57
56
|
- A skill may run headless via a scheduled PRD in another project — don't rely on
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "session-manager-dev",
|
|
3
3
|
"description": "The default end-to-end development skillset for the Claude Code Session Manager: decompose work into scheduler PRDs and track them to a validated finish (/develop), publish releases to npm (/builder), hand a finding to another project on this machine (/send-feedback), and review or drift-check a project's CLAUDE.md/markdown network (/maintaining-md-network). Together with the session-manager scheduler these form a develop → queue → validate → release loop.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bilko Bibitkov",
|
|
7
7
|
"email": "BilkoBibitkov2000@gmail.com",
|
|
@@ -1,95 +1,117 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: builder
|
|
3
|
-
description:
|
|
3
|
+
description: Release the current project's npm package — diff HEAD against the last published version, pick the semver bump from conventional-commit prefixes, run the project's gates, publish from an isolated git worktree (never the live working directory), keep a Field Manual in step when the project has one, then report. Use when the user says "/builder" or asks to publish, release, cut a release, bump the version, ship to npm, update the manual, or whether anything is unpublished.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# builder
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
6
|
+
# builder
|
|
7
|
+
|
|
8
|
+
Release pipeline for whatever npm package the current project publishes. Configuration comes
|
|
9
|
+
from `session-manager-operations/architecture/build-target.json` (`packageName`, `registry`,
|
|
10
|
+
`versionBumpPolicy`, `gates`). When that file is absent, use `package.json`'s `name`,
|
|
11
|
+
conventional-commit bumps and no declared gates, and say in the report which source you used.
|
|
12
|
+
|
|
13
|
+
The decision to release was made when this skill was invoked. Once a diff exists and the gates
|
|
14
|
+
pass, run straight through to publish without asking again. Stop only where a step below says
|
|
15
|
+
stop.
|
|
16
|
+
|
|
17
|
+
## 1. Diff — what is unpublished
|
|
18
|
+
|
|
19
|
+
1. Last published point: `npm view <packageName> version` (the registry, not a local tag — a
|
|
20
|
+
tag can exist for a publish that failed). No network, or a 404 because the package was never
|
|
21
|
+
published: `git describe --tags --abbrev=0`.
|
|
22
|
+
2. Resolve that version's tag (`git tag -l 'v<version>'`). If no local tag matches, compare
|
|
23
|
+
against `git describe --tags --abbrev=0` and note the discrepancy in the report.
|
|
24
|
+
3. `git log <tag>..HEAD --oneline`. Empty → stop and report "nothing to publish".
|
|
25
|
+
|
|
26
|
+
## 2. Classify and bump
|
|
27
|
+
|
|
28
|
+
Take the highest bump the whole commit list implies:
|
|
29
|
+
|
|
30
|
+
- `BREAKING CHANGE:` in a body, or `!:` after the type/scope (`feat(api)!:`) → **major**.
|
|
31
|
+
- Any `feat:` / `feat(scope):` → **minor**.
|
|
32
|
+
- Any `fix:` / `fix(scope):` → **patch**.
|
|
33
|
+
- Only `chore:`, `docs:`, `refactor:`, `test:`, `ci:` and the like → **patch** (a release was
|
|
34
|
+
requested; these still ship in it).
|
|
35
|
+
|
|
36
|
+
If a meaningful share of commits has no `type:` prefix at all (a bare "wip", "updates"), do not
|
|
37
|
+
guess: list the unclassifiable commits and ask which bump to apply. A wrong semver bump is hard
|
|
38
|
+
to walk back once published.
|
|
39
|
+
|
|
40
|
+
## 3. Gate
|
|
41
|
+
|
|
42
|
+
Run each name in `build-target.json`'s `gates` as `timeout 300 npm run <gate>`, in order,
|
|
43
|
+
against `HEAD`, with no `--skip` flags. With no `gates` entry, run the pre-commit checks the
|
|
44
|
+
project's `CLAUDE.md` or README requires; with none documented, say so in the report. Any
|
|
45
|
+
failure → stop: report the command and its real output, and that no bump, tag or publish
|
|
46
|
+
happened.
|
|
47
|
+
|
|
48
|
+
## 4. Publish from an isolated worktree
|
|
49
|
+
|
|
50
|
+
A dirty main working tree does not block this: the build and publish run in a clean worktree
|
|
51
|
+
checked out at the release tag, so nothing uncommitted in the main tree reaches the artifact.
|
|
52
|
+
Run in this order:
|
|
53
|
+
|
|
54
|
+
1. `npm version <bump> --no-git-tag-version` — updates `package.json` / `package-lock.json`
|
|
55
|
+
without a tag, so the tag below carries the release commit.
|
|
56
|
+
2. `git add package.json package-lock.json` — only these two, never `-A`.
|
|
57
|
+
3. Commit, listing the release's commits:
|
|
58
|
+
```
|
|
59
|
+
git commit -m "chore(release): bump to v<version>
|
|
60
|
+
|
|
61
|
+
- <commit subject>
|
|
62
|
+
- ..."
|
|
63
|
+
```
|
|
64
|
+
4. `git tag v<version>`
|
|
65
|
+
5. `mkdir -p "$HOME/.cache/sm-publish" && git worktree add "$HOME/.cache/sm-publish/v<version>" v<version>`
|
|
66
|
+
— never under `/tmp` or `os.tmpdir()`: some test suites (this repo's included) treat those
|
|
67
|
+
paths as fixtures and fail there.
|
|
68
|
+
6. In the worktree: `npm ci`, then the gates again (step 3), then the project's build. Check
|
|
69
|
+
every `files` entry in `package.json` exists before publishing; stop on any failure.
|
|
70
|
+
7. `npm publish` from inside the worktree, so `prepublishOnly` builds there too.
|
|
71
|
+
A 403 saying two-factor authentication or a bypass-2FA granular token is required is not a
|
|
72
|
+
login problem (`npm whoami` can succeed). Don't retry `npm login` or `npm publish`: run
|
|
73
|
+
`npm profile get` and `npm token list`, stop, and report the exact 403 and both results so a
|
|
74
|
+
human can supply an OTP or a token (the CLI cannot mint a granular token). An E409 "staged"
|
|
75
|
+
response means the publish waits for a human to approve it on npmjs.com — report that.
|
|
76
|
+
8. Back in the main repo: `git push origin main` and `git push origin v<version>`.
|
|
77
|
+
9. `git worktree remove "$HOME/.cache/sm-publish/v<version>" --force`
|
|
78
|
+
10. Verify the registry. `npm view` lags for minutes, so read a cache-busted packument and the
|
|
79
|
+
tarball first:
|
|
80
|
+
```
|
|
81
|
+
curl -s "https://registry.npmjs.org/<packageName>?t=$(date +%s)"
|
|
82
|
+
curl -sI <versions["<version>"].dist.tarball>
|
|
83
|
+
npm view <packageName> version dist-tags
|
|
84
|
+
```
|
|
85
|
+
`dist-tags.latest` is `<version>`, the version is listed, the tarball returns 200. A stale
|
|
86
|
+
`npm view` with a current packument is lag, not failure — never republish.
|
|
87
|
+
11. If `.github/workflows/release.yml` exists, the tag push started it. Wait on that run with a
|
|
88
|
+
bounded blocking watcher, then read the assets once:
|
|
89
|
+
```
|
|
90
|
+
timeout 1200 gh run watch "$(gh run list --workflow release.yml --branch v<version> --limit 1 --json databaseId --jq '.[0].databaseId')" --exit-status
|
|
91
|
+
gh release view v<version> --json assets --jq '.assets[].name'
|
|
92
|
+
```
|
|
93
|
+
Report the installer assets found (here: `.dmg`, `.exe`, `.AppImage`) and any missing. If
|
|
94
|
+
no run is listed yet, say so instead of polling.
|
|
95
|
+
|
|
96
|
+
On any failing step: stop there and report the step and its output. Once the worktree exists,
|
|
97
|
+
leave it only when its state is evidence for the failure; otherwise remove it (step 9) so a
|
|
98
|
+
retry doesn't collide with a stale path.
|
|
99
|
+
|
|
100
|
+
## 5. Manual (only when `session-manager-operations/manual/manual.json` exists)
|
|
101
|
+
|
|
102
|
+
Follow [`manual.md`](manual.md). The npm publish has already landed; a manual failure never
|
|
103
|
+
undoes it.
|
|
104
|
+
|
|
105
|
+
## 6. Report
|
|
106
|
+
|
|
107
|
+
One plain-text report, whether the pipeline finished or stopped:
|
|
108
|
+
|
|
109
|
+
- **Version** previous → new, and the bump kind.
|
|
110
|
+
- **Commits covered**, grouped by the rule that classified each.
|
|
111
|
+
- **Gates** and their results.
|
|
112
|
+
- **Registry**: packument `dist-tags` / version and tarball status.
|
|
113
|
+
- **Git**: both pushes confirmed, worktree removed.
|
|
114
|
+
- **Installer release**: assets found and missing, or "no release workflow".
|
|
115
|
+
- **Manual**: `manual.md`'s report, "no content change", or "no manual".
|
|
116
|
+
- **Stopped early?** Which step, why, its output, and anything a retry must account for
|
|
117
|
+
(a leftover worktree or local tag).
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# builder — Field Manual step
|
|
2
|
+
|
|
3
|
+
Runs as step 5 of `builder` when `session-manager-operations/manual/manual.json` exists, or on
|
|
4
|
+
its own ("update the manual", "does the manual need a revision"). Standalone, derive the commit
|
|
5
|
+
list and version the way step 1 does.
|
|
6
|
+
|
|
7
|
+
The manual is a **product we publish**, not generated documentation: it has its own version
|
|
8
|
+
line, and readers follow it step by step and are owed accuracy.
|
|
9
|
+
|
|
10
|
+
- **Source of truth:** `session-manager-operations/manual/` (its `README.md` has the on-disk
|
|
11
|
+
shape and release checklist).
|
|
12
|
+
- **Build:** `npm run manual:build` → `~/Projects/Bilko/data/manual/releases/<version>/`.
|
|
13
|
+
- **Price:** free — every chapter and both downloads (root `CLAUDE.md`, open-core law). The
|
|
14
|
+
legacy `session_manager` Stripe SKU stays wired only so late payments resolve; it sells nothing.
|
|
15
|
+
|
|
16
|
+
## 1. Decide whether a revision is owed
|
|
17
|
+
|
|
18
|
+
Read `manual.json`; compare `documentsAppVersion` with the version just published. Map the
|
|
19
|
+
release's commits onto the chapters: a chapter is **affected** when a commit touched a surface
|
|
20
|
+
it describes (grep the diff for the file paths, tab names, flags and CLI invocations the chapter
|
|
21
|
+
names).
|
|
22
|
+
|
|
23
|
+
| Finding | Action |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| No commit touches a documented surface | Bump `documentsAppVersion` only, report "no content change", stop. No manual release for a version bump alone. |
|
|
26
|
+
| A commit changes behaviour a chapter describes | Revise that chapter (step 2). |
|
|
27
|
+
| A commit ships a surface no chapter covers | Report it as a **gap** with a proposed chapter; don't author a whole chapter unprompted. |
|
|
28
|
+
|
|
29
|
+
## 2. Revise the affected chapters
|
|
30
|
+
|
|
31
|
+
Edit the chapter HTML in `session-manager-operations/manual/chapters/`.
|
|
32
|
+
|
|
33
|
+
- Follow `manual/STYLE.md` (voice, reading level, component vocabulary).
|
|
34
|
+
- Every claim must be checkable against real code now: read the file, run the command, confirm
|
|
35
|
+
the constant. A wrong instruction breaks every reader who follows it.
|
|
36
|
+
- Never invent a screenshot. A figure with no captured image stays a `manual-figure__frame`
|
|
37
|
+
placeholder saying what still needs capturing.
|
|
38
|
+
- Write an operator's guide — what a surface is for, the one thing people get wrong, the
|
|
39
|
+
workflow that pays off — not a restatement of the codebase.
|
|
40
|
+
- Every chapter carries `free: true`; `web/manual/build.mjs` refuses a release where one lacks it.
|
|
41
|
+
|
|
42
|
+
## 3. Bump the manual's version
|
|
43
|
+
|
|
44
|
+
In `manual.json`: `documentsAppVersion` → the app version just published; `version` → patch for
|
|
45
|
+
corrections and figure fills, minor for a revised or added chapter, major for a restructure of
|
|
46
|
+
the chapter map (independent of the app's version); `releasedAt` → today in
|
|
47
|
+
America/Los_Angeles.
|
|
48
|
+
|
|
49
|
+
## 4. Build and verify
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm run manual:check # sources valid, nothing written
|
|
53
|
+
npm run manual:build # emits into ../Bilko/data/manual/releases/<version>/
|
|
54
|
+
ls ~/Projects/Bilko/data/manual/releases/<version>/
|
|
55
|
+
cd ~/Projects/Bilko && npx vitest run tests/manual.test.ts
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The build is the gate: it refuses a missing chapter, a malformed or duplicated slug, an asset
|
|
59
|
+
without a source, or a chapter without `free: true`. A refusal is a stop. The Bilko test checks
|
|
60
|
+
every chapter and asset the manifest advertises exists on disk.
|
|
61
|
+
|
|
62
|
+
## 5. Commit both repos
|
|
63
|
+
|
|
64
|
+
The bundle is served from the Bilko repo, so an uncommitted bundle is an unpublished manual.
|
|
65
|
+
Commit locally once build and test pass: `session-manager` (chapter sources + `manual.json`)
|
|
66
|
+
and `~/Projects/Bilko` (`data/manual/releases/<version>/`). Pushing the Bilko side is what ships
|
|
67
|
+
it; treat that push with the same release trigger as the npm publish.
|
|
68
|
+
|
|
69
|
+
## Report
|
|
70
|
+
|
|
71
|
+
1. Manual version and `documentsAppVersion`, before → after.
|
|
72
|
+
2. Chapters revised, one line each: what changed and why.
|
|
73
|
+
3. Coverage gaps, as proposals.
|
|
74
|
+
4. Figures still pending capture, by chapter.
|
|
75
|
+
5. Whether the Bilko bundle is committed and pushed; if not pushed, say readers still see the
|
|
76
|
+
previous edition.
|
|
77
|
+
|
|
78
|
+
Not in scope: screenshot capture, the product page in the Bilko repo, and pricing — the legacy
|
|
79
|
+
SKU and `MANUAL_PRODUCT_KEY` mapping in `Bilko:shared/manual-catalog.ts` stay wired; removing
|
|
80
|
+
either is an explicit decision.
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: develop
|
|
3
3
|
description: >-
|
|
4
|
-
Lead a software-development task: analyze it
|
|
5
|
-
self-contained PRDs (an independent set, or a 3-5 PRD chain), queue them for the
|
|
6
|
-
session-manager scheduler
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
code X", or otherwise starts dev work that should run as scheduled PRDs rather than inline
|
|
10
|
-
now. Home of the developer-only guidance (performance, debugging, API reuse, TDD). Keywords:
|
|
11
|
-
develop, build, implement, code, feature, refactor, bugfix, queue dev work, PRDs, PRD chain,
|
|
12
|
-
multi-angle analysis.
|
|
4
|
+
Lead a software-development task inside a Session Manager Epic: analyze it, split it into
|
|
5
|
+
small self-contained PRDs (an independent set, or a 3-5 PRD chain), queue them for the
|
|
6
|
+
session-manager scheduler, then track them to a validated finish and report back. Use when
|
|
7
|
+
the user says "/develop" or asks for code to be built, fixed or refactored as scheduled PRDs
|
|
8
|
+
rather than inline — features, bug fixes, refactors, follow-up fix waves.
|
|
13
9
|
---
|
|
14
10
|
|
|
15
11
|
# /develop — plan, queue, track to done
|
|
@@ -42,8 +38,9 @@ new work. **report** = your final message to the human.
|
|
|
42
38
|
4. **Never delegate PRD authoring.** You write scope, title, goal, criteria and notes. Calling
|
|
43
39
|
`scheduler_create_prd` with your own text is not delegation.
|
|
44
40
|
5. **Never restate the engineering rules.** They live in `standards.md` beside this file, with
|
|
45
|
-
the reasons behind the run rules. Interactive work uses the
|
|
46
|
-
`systematic-debugging` skills
|
|
41
|
+
the reasons behind the run rules. Interactive work uses the built-in `/code-review` for
|
|
42
|
+
review (and `test-driven-development` / `systematic-debugging` skills when installed). Why:
|
|
43
|
+
one copy never goes stale.
|
|
47
44
|
|
|
48
45
|
## Phase 1 — plan and queue
|
|
49
46
|
|
|
@@ -64,15 +61,15 @@ unrelated one.
|
|
|
64
61
|
### Preflight — confirm the tool is even in your tool list
|
|
65
62
|
|
|
66
63
|
Before drafting, check that `mcp__session-manager-scheduler__scheduler_create_prd` is in your
|
|
67
|
-
tools. Why: drafts made first are wasted. It is the only sanctioned way to write a PRD. Its
|
|
68
|
-
failure modes have different fixes:
|
|
64
|
+
tools. Why: drafts made first are wasted. It is the only sanctioned way to write a PRD. Its
|
|
65
|
+
three failure modes have different fixes:
|
|
69
66
|
|
|
70
67
|
- **(a) Tool PRESENT but ERRORS** because the session-manager app is not running. A validation
|
|
71
68
|
error is not this case: fix the input and retry. **STOP. Do not write any PRD file.** Tell the
|
|
72
69
|
human to start the app, then retry the same call. Why: a PRD file the API did not write is
|
|
73
70
|
quarantined and never runs.
|
|
74
|
-
- **(
|
|
75
|
-
- **(
|
|
71
|
+
- **(b) Create errors with "did not answer" or "Connection closed".** It may still have been written; retry the same call with the same slug (it returns the existing PRD with `alreadyExisted: true`, or per entry `applied`) and never re-issue it under a new slug. `scheduler_get_prd` accepts the bare slug.
|
|
72
|
+
- **(c) Tool ABSENT from your tool list.** The `session-manager-scheduler` MCP server is not
|
|
76
73
|
registered: a **misconfiguration**, not an offline app.
|
|
77
74
|
**STOP. Do not write any PRD file.** Tell the human. The app registers the server at user
|
|
78
75
|
scope the first time it starts. If it is still missing, the human deletes
|
|
@@ -156,47 +153,23 @@ Never pass `parallelGroup`; it is ignored. The API writes the frontmatter, the `
|
|
|
156
153
|
fence (three backticks + `gate`), a `# Gate` heading or a `# Files` heading in any text field —
|
|
157
154
|
the API rejects that.
|
|
158
155
|
|
|
159
|
-
### gate rules
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
9. Put `NAME=value` words before `timeout`, never after it, for example
|
|
177
|
-
`CI=1 timeout 300 npm test`. A leading `TMPDIR=$(mktemp -d) ` is allowed but not needed: the
|
|
178
|
-
scheduler gives each gate its own TMPDIR.
|
|
179
|
-
10. Before queueing, run each gate command once at the current HEAD in the main checkout. If it
|
|
180
|
-
is red, scope the gate to the PRD's own test files, never a suite that is already red, and
|
|
181
|
-
say in the PRD notes which suite was red and why it was scoped out. Why: a gate that is red
|
|
182
|
-
on the base parks the job as `sentinel_fail` whatever the executor does.
|
|
183
|
-
11. A gate command must not create or modify tracked files; write outputs to the per-gate TMPDIR
|
|
184
|
-
or a gitignored path. Why: a dirtied tree fails the clean-tree check.
|
|
185
|
-
12. Never put a step only a human or the passage of time can complete (host cron install,
|
|
186
|
-
waiting for a live post, a live payment, an account dashboard action) in a gate or
|
|
187
|
-
criterion; keep them out of PRDs at authoring time. An executor that meets one ends
|
|
188
|
-
`SCHEDULER_VERDICT: FAIL` naming what is missing. Why: no executor can pass such a gate,
|
|
189
|
-
and queued work runs with no questions asked.
|
|
190
|
-
Live-run steps that need gitignored state follow PRD_AUTHORING.md §7 (absolute main-checkout
|
|
191
|
-
paths, artifact-only).
|
|
192
|
-
|
|
193
|
-
### files rules
|
|
194
|
-
|
|
195
|
-
1. 1–50 repo-relative paths. A folder ends with `/`.
|
|
196
|
-
2. No absolute paths, no `~` at the start, no `..` or `.` segments, no `*` or `?`, no `\` or
|
|
197
|
-
backticks, no leading `-`. Use `/` between folders.
|
|
198
|
-
3. The scheduler never runs two PRDs with overlapping files at once (held as `files-overlap`);
|
|
199
|
-
`dependsOn` is for real output or order dependencies only.
|
|
156
|
+
### gate and files rules
|
|
157
|
+
|
|
158
|
+
The syntax rules for `gate` and `files` are in PRD_AUTHORING.md §6, and the API enforces them: it
|
|
159
|
+
refuses a bad gate or path and returns warnings — read them and fix the input. Two rules only you
|
|
160
|
+
can apply, because they depend on the repo at authoring time:
|
|
161
|
+
|
|
162
|
+
1. Before queueing, run each gate command once at the current HEAD in the main checkout. If it
|
|
163
|
+
is red, scope the gate to the PRD's own test files, never a suite that is already red, and
|
|
164
|
+
say in the PRD notes which suite was red and why it was scoped out. Why: a gate that is red
|
|
165
|
+
on the base parks the job as `sentinel_fail` whatever the executor does.
|
|
166
|
+
2. Never put a step only a human or the passage of time can complete (host cron install,
|
|
167
|
+
waiting for a live post, a live payment, an account dashboard action) in a gate or
|
|
168
|
+
criterion; keep them out of PRDs at authoring time. An executor that meets one ends
|
|
169
|
+
`SCHEDULER_VERDICT: FAIL` naming what is missing. Why: no executor can pass such a gate,
|
|
170
|
+
and queued work runs with no questions asked.
|
|
171
|
+
Live-run steps that need gitignored state follow PRD_AUTHORING.md §7 (absolute main-checkout
|
|
172
|
+
paths, artifact-only).
|
|
200
173
|
|
|
201
174
|
### What a headless run cannot do
|
|
202
175
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Engineering standards
|
|
2
2
|
|
|
3
3
|
> Single source of truth for the engineering rationale behind every scheduled PRD.
|
|
4
|
-
> `scheduler_create_prd`
|
|
4
|
+
> `scheduler_create_prd` appends a one-line pointer to this file's
|
|
5
5
|
> absolute path to every PRD — never a copy — and the executor's ordered run contract lives in
|
|
6
6
|
> the `dev-lead` persona it is launched as. Read a section here when a contract line needs its
|
|
7
7
|
> reasoning; edit here once and every PRD sees it.
|
|
@@ -13,32 +13,24 @@
|
|
|
13
13
|
|
|
14
14
|
## Debugging approach
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
- If three hypotheses fail, stop and re-examine your assumptions from scratch.
|
|
19
|
-
- When a bug was recently introduced, bisect commits to find the offender.
|
|
20
|
-
- When a bug is in a long pipeline, halve the input or code path until it localizes.
|
|
21
|
-
- Record each bisection step so the path to the root cause is reproducible.
|
|
22
|
-
- Never attempt a fix until you can reproduce the bug on demand.
|
|
16
|
+
- Never attempt a fix until you can reproduce the bug on demand; if you can't, instrument the
|
|
17
|
+
system until you can.
|
|
23
18
|
- Capture the reproduction as a failing test before changing production code.
|
|
24
|
-
-
|
|
19
|
+
- For a recent regression, bisect commits; record the steps in your report.
|
|
25
20
|
|
|
26
21
|
## API reuse and single source of truth
|
|
27
22
|
|
|
28
|
-
- One concept = one implementation. Before writing code that computes, fetches, formats
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
- Treat duplication as a latent bug. Copy-pasted logic drifts; divergence between copies is how silent inconsistencies ship (e.g. one site reads a 0–100 percentage as a 0–1 fraction). When you see the same logic in two places, consolidate it on sight and route both through the shared unit.
|
|
32
|
-
- Design for extensibility: stable shared contracts, single ownership, callers depend on the contract — not on a private copy. New surfaces consume the canonical API; they never reimplement it.
|
|
33
|
-
- When reviewing or implementing, explicitly check: "is this value/behaviour already produced elsewhere, and am I reusing that path?" If not, fix the reuse before adding the feature.
|
|
23
|
+
- One concept = one implementation. Before writing code that computes, fetches, formats or displays a value, search for the existing implementation and reuse it; a datum shown in N places flows from one shared accessor, store, hook or endpoint.
|
|
24
|
+
- Extend, don't fork: generalize a close-but-insufficient function (add a param, widen the contract) instead of cloning a variant. Why: copies drift, and divergence is how silent inconsistencies ship (one site reads a 0–100 percentage as a 0–1 fraction).
|
|
25
|
+
- Duplication you touch is a bug in scope: route both copies through the shared unit when both are in the PRD's `# Files`; otherwise name the duplicate in your report.
|
|
34
26
|
|
|
35
27
|
## Test-driven development
|
|
36
28
|
|
|
37
29
|
- Write the failing test first, then the implementation that makes it pass — for every feature and every bugfix.
|
|
38
30
|
- A bugfix starts with a test that reproduces the bug (red), then the fix (green).
|
|
39
31
|
- Do not write production code without a test asserting the behavior it adds.
|
|
40
|
-
- (Interactive sessions:
|
|
41
|
-
workflow. Headless PRD runs can't load it — the three rules above are the
|
|
32
|
+
- (Interactive sessions: if a `test-driven-development` skill is installed, it has the full
|
|
33
|
+
red-green-refactor workflow. Headless PRD runs can't load it — the three rules above are the core.)
|
|
42
34
|
- Put the red test in the nearest existing scenario test for that workflow.
|
|
43
35
|
- Create a new test file only for a new module or a new workflow.
|
|
44
36
|
- Name tests and files by behaviour, never by PRD id.
|
|
@@ -77,9 +69,9 @@ Long hangs, not bad code, cause most failed runs. The PRD body carries a one-lin
|
|
|
77
69
|
- **Verify before done.** Run the acceptance test once before declaring success. Why: a run that ends on a failing test is not done — fix it or `exit 1` with the failure instead.
|
|
78
70
|
- **Fail loud, fail fast.** On any step failure, print one diagnostic line and `exit 1`. Do not swallow it with `|| true` or retry silently. Exception: a `rateLimited` exit-1 is the scheduler's own benign auto-pause — it resumes next window on its own, so do not engineer around it.
|
|
79
71
|
- **Stay in the AC.** Do not add work past the acceptance checklist — "while we're here" extras are how runs overrun. Keep the body clean UTF-8, with no NUL or control bytes.
|
|
80
|
-
- **You ARE the executor — never re-queue or self-schedule.** Do the acceptance criteria yourself. Why: `/develop` or any queue-authoring skill just writes a *new* PRD and returns — the run exits 0 having done nothing, with no commit and no verdict line (`needs_review` with `no_verdict_sentinel`). The same applies to calling `ScheduleWakeup`, or backgrounding a review agent (`/code-review`, `/security-review`) and ending your turn with something like "I'll wait for the review agents to complete": a headless run has no next turn, so nothing ever resumes it — no verdict line prints, and the job parks in `needs_review` even though the work already landed. Run a required second review pass synchronously, inline, before the finish protocol — call the reviewer and read its result in the same turn. If the work is too big for one run, do not queue more work; see the timeout rule below.
|
|
81
|
-
- **Never `git stash`, `git reset`, `git checkout -- <path>`, or `git clean` against working-tree state you did not create.**
|
|
72
|
+
- **You ARE the executor — never re-queue or self-schedule.** Do the acceptance criteria yourself. Why: `/develop` or any queue-authoring skill just writes a *new* PRD and returns — the run exits 0 having done nothing, with no commit and no verdict line (`needs_review` with `no_verdict_sentinel`). The same applies to calling `ScheduleWakeup`, or backgrounding a review agent (`/code-review`, `/security-review`) and ending your turn with something like "I'll wait for the review agents to complete": a headless run has no next turn, so nothing ever resumes it — no verdict line prints, and the job parks in `needs_review` even though the work already landed. Run a required second review pass synchronously, inline, before the finish protocol — call the reviewer and read its result in the same turn. If the work is too big for one run, do not queue more work; see the timeout rule below.
|
|
73
|
+
- **Never `git stash`, `git reset`, `git checkout -- <path>`, or `git clean` against working-tree state you did not create.** You are normally isolated in your own `git worktree` on branch `sm-job/<slug>`, and the scheduler salvages any uncommitted diff of yours on teardown — so you never need to touch shared state to protect your own work. Confirm isolation with `git rev-parse --git-common-dir` (a worktree's common-dir differs from its own `.git`) or by checking your cwd; `git diff`/`git status` are always safe. If you land in a SHARED tree with pre-existing dirty tracked files anyway, work around them — scope `git add`/commits to only the paths you touched — or end with `SCHEDULER_VERDICT: FAIL <reason>` (`SCHEDULER_VERDICT: BLOCKED_BY_FOREIGN_WIP` only when your gate failed on those files, as the finish protocol says); never discard, stash, or revert someone else's uncommitted changes to get a clean checkout. A shared tree may be feeding a running service that reads its config straight from the working tree, so reverting it is a production change, not a local inconvenience. The scheduler runs a shared-tree stash guard as a backstop (`checkSharedTreeGuard`/`evaluateSharedTreeGuard`), but that guard exists to catch a mistake, not to license one. Executors have stashed a sibling job's WIP and an operator's live config edit and never restored either.
|
|
82
74
|
- **`gh pr edit --body` can fail on repos with legacy GitHub Projects (classic) boards.** It queries the deprecated `repository.pullRequest.projectCards` field and errors with a `GraphQL: Projects (classic) is being deprecated` message even though the edit itself would otherwise succeed — a known `gh` CLI quirk, not a defect in your work. Prefer `gh api -X PATCH repos/<owner>/<repo>/pulls/<n> -f body="$(cat body.md)"` instead; it skips that field. If `gh pr edit` fails this way anyway retry immediately with the `gh api` form and note the fallback in your report.
|
|
83
75
|
- **Never `sleep N && <cmd>` to poll remote CI/job status.** The harness hard-blocks a `sleep` chained to another command. Use the tool's own blocking watcher under a hard cap instead: `timeout 600 gh run watch <run-id> --repo <owner>/<repo> --exit-status`. `gh pr checks` exits 8 while checks are pending and 1 on failure — that is not a defect in your work.
|
|
84
|
-
- **The verdict line is your authoritative "I passed" signal — emit it truthfully.** The scheduler's finish protocol ends by printing `SCHEDULER_VERDICT: PASS` once the AC gate is green and the commit has landed (or `SCHEDULER_VERDICT: FAIL <reason>` + `exit 1` otherwise). `PASS` plus a landed commit is authoritative: it overrides incidental transcript markers, so a deliberately reproduced red test or a grep result containing "Error" will not false-trip `needs_review`, as long as the run genuinely ends green and committed. Exiting 0 with uncommitted changes, or with no verdict line at all, is the #1 cause of needless `needs_review`. Never print `PASS` when the gate is red — that turns a safety net into a silent-failure machine.
|
|
76
|
+
- **The verdict line is your authoritative "I passed" signal — emit it truthfully.** The scheduler's finish protocol ends by printing `SCHEDULER_VERDICT: PASS` once the AC gate is green and the commit has landed (or `SCHEDULER_VERDICT: FAIL <reason>` + `exit 1` otherwise). `PASS` plus a landed commit is authoritative: it overrides incidental transcript markers, so a deliberately reproduced red test or a grep result containing "Error" will not false-trip `needs_review`, as long as the run genuinely ends green and committed. An artifact-only PRD (`deliverable: artifact` + `artifactPaths`) commits nothing by design: a green gate with a clean tree is a `PASS`, never a `FAIL` for the missing commit. Exiting 0 with uncommitted changes, or with no verdict line at all, is the #1 cause of needless `needs_review`. Never print `PASS` when the gate is red — that turns a safety net into a silent-failure machine.
|
|
85
77
|
- **If your own AC gate failed on a SIBLING job's in-flight file, say so with the right verdict — don't print a lying FAIL.** If the prompt disclosed a `--- FOREIGN WORKING-TREE STATE ---` section and your gate failure is confined to paths that section named as not your work, print `SCHEDULER_VERDICT: BLOCKED_BY_FOREIGN_WIP` (and `exit 1`) plus a `FOREIGN_WIP_PATHS: <path1>, <path2>, ...` line naming exactly the failing paths. The scheduler validates every listed path against the manifest it disclosed to you — list a path it never named, or claim this verdict for your own regression, and it is rejected back to `FAIL`. This is not an escape hatch: it exists so a correctly-diagnosed "not my regression" gets auto-requeued once the sibling clears its WIP, instead of spawning a fix-plan investigation into someone else's unfinished work.
|