claude-code-session-manager 0.135.0 → 0.136.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.
Files changed (88) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/assets/{AgentLibrary-DRlcF1YD.js → AgentLibrary-BFztz90B.js} +1 -1
  3. package/dist/assets/{AppSettings-CBhYHKGI.js → AppSettings-6_dqi9Ti.js} +1 -1
  4. package/dist/assets/{Button-DtBUGvGI.js → Button-5wbUTtD5.js} +1 -1
  5. package/dist/assets/{DocumentEditorPane-C82c7Qtl.js → DocumentEditorPane-CRgJFjka.js} +1 -1
  6. package/dist/assets/{Extensions-Kn-oUD2_.js → Extensions-ZXSJbnK7.js} +2 -2
  7. package/dist/assets/{History-B4c3Uz9u.js → History-CmSTZeiu.js} +1 -1
  8. package/dist/assets/{Library-1RpLT-aH.js → Library-DcTnW9kq.js} +1 -1
  9. package/dist/assets/{ListDetail-xr0oxNkv.js → ListDetail-BGsdNFiK.js} +1 -1
  10. package/dist/assets/{Panel-O8XPrpJu.js → Panel-BR2PeMf6.js} +1 -1
  11. package/dist/assets/{ProjectClaudeConfig-DBGhhzg2.js → ProjectClaudeConfig-DJYcUU1G.js} +1 -1
  12. package/dist/assets/{ProvenanceBadge-DSaizfZL.js → ProvenanceBadge-B_TDAI3k.js} +1 -1
  13. package/dist/assets/{Scheduler-D2_5NyiR.js → Scheduler-DqocyumD.js} +1 -1
  14. package/dist/assets/{Settings-Clgqb3Lq.js → Settings-BzPe2TH6.js} +1 -1
  15. package/dist/assets/{SkillReferenceGraph-D80RA7kR.js → SkillReferenceGraph-DfdO0Q_N.js} +1 -1
  16. package/dist/assets/{Skills-DNG7tHSf.js → Skills-CGPJxKhR.js} +1 -1
  17. package/dist/assets/{SourceChip-D-Imzszd.js → SourceChip-CI8xpHRi.js} +1 -1
  18. package/dist/assets/{SystemPrompt-CGlOpUQA.js → SystemPrompt-BbzGIHoz.js} +1 -1
  19. package/dist/assets/{TiptapBody-CJFGfBdz.js → TiptapBody-CTmjUhAI.js} +1 -1
  20. package/dist/assets/{Toggle-0Ff0bPa_.js → Toggle-CWx9Rq6E.js} +1 -1
  21. package/dist/assets/{ViewTabs-BCMYQwo_.js → ViewTabs-BnjD0Crp.js} +1 -1
  22. package/dist/assets/{VoiceButton-JzyC6DAB.js → VoiceButton-C-iQGCL1.js} +1 -1
  23. package/dist/assets/{historyTotals-B01WPBwh.js → historyTotals-BaxAMu7r.js} +1 -1
  24. package/dist/assets/{index-CjQ_p5y7.css → index-62tyjEQB.css} +1 -1
  25. package/dist/assets/index-Cob2iZhR.js +3116 -0
  26. package/dist/index.html +2 -2
  27. package/dist-web/app.css +1 -1
  28. package/dist-web/app.js +412 -412
  29. package/package.json +1 -1
  30. package/plugins/CLAUDE.md +9 -8
  31. package/plugins/packs/apple-design/.claude-plugin/plugin.json +6 -0
  32. package/plugins/packs/apple-design/laws.md +14 -0
  33. package/plugins/packs/apple-design/skills/hig-layout-and-accessibility/SKILL.md +152 -0
  34. package/plugins/packs/apple-design/skills/liquid-glass-adoption/SKILL.md +132 -0
  35. package/plugins/packs/apple-design/sm-pack.json +5 -0
  36. package/plugins/packs/apple-swift-core/.claude-plugin/plugin.json +12 -0
  37. package/plugins/packs/apple-swift-core/laws.md +13 -0
  38. package/plugins/packs/apple-swift-core/skills/swift-concurrency/SKILL.md +160 -0
  39. package/plugins/packs/apple-swift-core/skills/swiftui-state-and-navigation/SKILL.md +165 -0
  40. package/plugins/packs/apple-swift-core/sm-pack.json +5 -0
  41. package/plugins/session-manager-dev/.claude-plugin/plugin.json +1 -1
  42. package/plugins/session-manager-dev/skills/builder/SKILL.md +136 -91
  43. package/plugins/session-manager-dev/skills/builder/manual.md +80 -0
  44. package/plugins/session-manager-dev/skills/develop/SKILL.md +29 -56
  45. package/plugins/session-manager-dev/skills/develop/standards.md +11 -19
  46. package/plugins/session-manager-dev/skills/maintaining-md-network/SKILL.md +9 -0
  47. package/plugins/session-manager-dev/skills/maintaining-md-network/drift-check.md +5 -2
  48. package/plugins/session-manager-dev/skills/maintaining-md-network/scripts/drift-check.cjs +100 -5
  49. package/plugins/session-manager-dev/skills/send-feedback/SKILL.md +65 -21
  50. package/scripts/scheduler-mcp-server.cjs +65 -5
  51. package/src/main/build-info.json +4 -4
  52. package/src/main/chatRunner.cjs +26 -2
  53. package/src/main/index.cjs +4 -0
  54. package/src/main/ipcSchemas.cjs +13 -0
  55. package/src/main/lib/CLAUDE.md +2 -0
  56. package/src/main/lib/claude/agentModelResolve.cjs +23 -0
  57. package/src/main/lib/epic/epicMint.cjs +12 -6
  58. package/src/main/lib/epic/epicTranscriptPath.cjs +5 -4
  59. package/src/main/lib/epic/promptSessionsCreateEpic.cjs +8 -4
  60. package/src/main/lib/epic/restorableSessions.cjs +16 -8
  61. package/src/main/lib/feedback-remote/crossProjectFeedback.cjs +201 -8
  62. package/src/main/lib/feedback-remote/crossProjectReply.cjs +375 -0
  63. package/src/main/lib/feedback-remote/remoteIpcDispatch.cjs +2 -0
  64. package/src/main/lib/mcpToolCatalog.cjs +38 -4
  65. package/src/main/lib/mdNetworkScan.cjs +61 -11
  66. package/src/main/lib/mdReviewRecord.cjs +287 -0
  67. package/src/main/lib/packs/packCatalog.cjs +120 -0
  68. package/src/main/lib/packs/packSpawnArgs.cjs +59 -0
  69. package/src/main/lib/packs/packsIpc.cjs +76 -0
  70. package/src/main/lib/persona-macro/builtinMacros.cjs +3 -2
  71. package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +34 -0
  72. package/src/main/lib/prd/prdCreate.cjs +2 -2
  73. package/src/main/lib/promptSessionSchema.cjs +8 -0
  74. package/src/main/projectPages.cjs +19 -0
  75. package/src/main/promptSessionEvents.cjs +8 -1
  76. package/src/main/scheduler.cjs +23 -2
  77. package/src/preload/api.d.ts +71 -0
  78. package/src/preload/apiSurface.json +21 -0
  79. package/src/preload/index.cjs +7 -0
  80. package/src/seed/agents/demo-video-builder.md +28 -33
  81. package/src/seed/agents/dev-lead.md +3 -3
  82. package/dist/assets/index-rt7pTODX.js +0 -3116
  83. package/plugins/session-manager-dev/skills/builder/0-diff/SKILL.md +0 -44
  84. package/plugins/session-manager-dev/skills/builder/1-classify-and-bump/SKILL.md +0 -37
  85. package/plugins/session-manager-dev/skills/builder/2-gate/SKILL.md +0 -37
  86. package/plugins/session-manager-dev/skills/builder/3-publish/SKILL.md +0 -137
  87. package/plugins/session-manager-dev/skills/builder/4-manual/SKILL.md +0 -124
  88. package/plugins/session-manager-dev/skills/builder/5-report/SKILL.md +0 -35
@@ -0,0 +1,165 @@
1
+ ---
2
+ name: swiftui-state-and-navigation
3
+ description: >-
4
+ Use when writing or changing SwiftUI views in an iOS app — choosing between
5
+ @State, @Binding, @Bindable, @Environment and @Observable models, passing
6
+ state between screens, or building navigation with NavigationStack,
7
+ navigationDestination, sheets and programmatic paths. Not for non-Swift code.
8
+ paths: ['**/*.swift']
9
+ ---
10
+
11
+ # SwiftUI state and navigation
12
+
13
+ Pick the smallest owner for each piece of state, and drive navigation from data.
14
+
15
+ ## Who owns the state
16
+
17
+ | Need | Use |
18
+ | --- | --- |
19
+ | Value local to one view (toggle, text field) | `@State private var` |
20
+ | Child edits a parent's value | `@Binding` |
21
+ | Shared model object owned by a view | `@State private var model = Model()` with an `@Observable` class |
22
+ | Child needs bindings into an `@Observable` object | `@Bindable var model` |
23
+ | App-wide dependency (store, router, settings) | `.environment(model)` + `@Environment(Model.self)` |
24
+ | Small persisted preference | `@AppStorage("key")` |
25
+
26
+ ### Do
27
+
28
+ ```swift
29
+ @Observable @MainActor
30
+ final class CounterModel {
31
+ var count = 0
32
+ func increment() { count += 1 }
33
+ }
34
+
35
+ struct CounterView: View {
36
+ @State private var model = CounterModel()
37
+ var body: some View {
38
+ Button("Count: \(model.count)") { model.increment() }
39
+ .accessibilityLabel("Increment counter")
40
+ }
41
+ }
42
+
43
+ #Preview { CounterView() }
44
+ ```
45
+
46
+ ### Don't
47
+
48
+ ```swift
49
+ final class CounterModel: ObservableObject { // legacy pattern
50
+ @Published var count = 0
51
+ }
52
+ struct CounterView: View {
53
+ @ObservedObject var model = CounterModel() // re-created on every parent redraw
54
+ var body: some View { Text("\(model.count)") }
55
+ }
56
+ ```
57
+
58
+ Rules of thumb:
59
+
60
+ - Keep `@State` `private`; it belongs to the view that declares it.
61
+ - Create an `@Observable` model in exactly one place (`@State` or app entry) and pass it down.
62
+ - Use `@Bindable` only when you need `$model.field` bindings; plain `let model` is enough to read.
63
+ - Don't copy model values into `@State` in `init` — it silently stops tracking the source.
64
+ - Derive values with computed properties instead of storing duplicates that drift.
65
+
66
+ ## Navigation
67
+
68
+ Use one `NavigationStack` per navigation hierarchy, at the root of the tab or
69
+ scene, and drive it with values.
70
+
71
+ ### Do
72
+
73
+ ```swift
74
+ enum Route: Hashable {
75
+ case detail(Item.ID)
76
+ case settings
77
+ }
78
+
79
+ @Observable @MainActor
80
+ final class Router {
81
+ var path: [Route] = []
82
+ func show(_ route: Route) { path.append(route) }
83
+ func popToRoot() { path.removeAll() }
84
+ }
85
+
86
+ struct RootView: View {
87
+ @State private var router = Router()
88
+ var body: some View {
89
+ NavigationStack(path: $router.path) {
90
+ ItemList()
91
+ .navigationDestination(for: Route.self) { route in
92
+ switch route {
93
+ case .detail(let id): ItemDetail(id: id)
94
+ case .settings: SettingsView()
95
+ }
96
+ }
97
+ }
98
+ .environment(router)
99
+ }
100
+ }
101
+
102
+ struct ItemRow: View {
103
+ let item: Item
104
+ var body: some View {
105
+ NavigationLink(value: Route.detail(item.id)) { Text(item.title) }
106
+ }
107
+ }
108
+ ```
109
+
110
+ ### Don't
111
+
112
+ ```swift
113
+ NavigationView { // deprecated
114
+ List(items) { item in
115
+ NavigationLink(destination: ItemDetail(item: item)) { // builds every destination eagerly
116
+ Text(item.title)
117
+ }
118
+ }
119
+ }
120
+ ```
121
+
122
+ Rules of thumb:
123
+
124
+ - Never use `NavigationView`; use `NavigationStack`, or `NavigationSplitView` for sidebar layouts on iPad and Mac.
125
+ - Register `navigationDestination(for:)` once per value type, near the stack root, not inside a lazy row.
126
+ - Push identifiers (`Item.ID`) rather than whole mutable models, so deep links and state restoration work.
127
+ - Don't nest a `NavigationStack` inside another one; a pushed view inherits the parent stack.
128
+ - Present modals with `.sheet(item:)` bound to optional state; dismiss with `@Environment(\.dismiss)`.
129
+ - Keep tab selection in an enum: `TabView(selection: $tab)` with one `NavigationStack` inside each tab.
130
+
131
+ ## Sheets
132
+
133
+ ```swift
134
+ struct ItemList: View {
135
+ @State private var editing: Item?
136
+ var body: some View {
137
+ List(items) { item in
138
+ Button(item.title) { editing = item }
139
+ }
140
+ .sheet(item: $editing) { item in EditItemView(item: item) }
141
+ }
142
+ }
143
+ ```
144
+
145
+ Avoid a separate `isPresented` Bool plus a second optional for the same sheet —
146
+ the two drift apart and the sheet opens with stale data.
147
+
148
+ ## Previews
149
+
150
+ Give each view a `#Preview` with sample data. For views that read the
151
+ environment, inject it in the preview:
152
+
153
+ ```swift
154
+ #Preview {
155
+ NavigationStack { ItemList() }
156
+ .environment(Router())
157
+ }
158
+ ```
159
+
160
+ ## Checklist before you finish
161
+
162
+ - No `ObservableObject`, `@Published`, `@StateObject`, `@ObservedObject` in new code.
163
+ - No `NavigationView`; navigation is value-based.
164
+ - Each view has a `#Preview`; custom controls have `accessibilityLabel`.
165
+ - User-facing strings come from the String Catalog.
@@ -0,0 +1,5 @@
1
+ {
2
+ "id": "apple-swift-core",
3
+ "label": "Apple · Swift core",
4
+ "description": "Modern Swift 6 and SwiftUI rules for iOS apps: strict concurrency, @Observable state, NavigationStack, async/await, SwiftData, previews, accessibility and String Catalogs, plus skills for state, navigation and concurrency."
5
+ }
@@ -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.3.6",
4
+ "version": "0.4.2",
5
5
  "author": {
6
6
  "name": "Bilko Bibitkov",
7
7
  "email": "BilkoBibitkov2000@gmail.com",
@@ -1,95 +1,140 @@
1
1
  ---
2
2
  name: builder
3
- description: Watch the current project's git history against its published npm package and drive the next publish — diff HEAD against the last release, classify + bump the version from conventional-commit prefixes, gate on typecheck/tests, publish from an isolated git worktree (never the live working directory), keep the free Field Manual in step with what shipped, then report. Orchestrates 6 nested sub-skills (builder:diff, :classify-and-bump, :gate, :publish, :manual, :report). Use when the user says "/builder", "publish", "release", "cut a release", "bump the version", "ship to npm", "update the manual", or asks whether there's anything unpublished.
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 (orchestrator)
7
-
8
- Global, project-agnostic release pipeline — works against whatever npm package the current
9
- project publishes (resolved via `src/main/lib/buildTarget.cjs`'s `resolveBuildTarget()`, or
10
- by reading `package.json` directly if that file isn't present yet). Codified from a real
11
- session that ran this exact sequence 4 times by hand, publishing session-manager
12
- v0.45.1 → v0.47.1 to npm — this skill turns that proven manual procedure into a reusable one.
13
-
14
- **Naming convention**: sub-skill directories
15
- are prefixed `0-`, `1-`, ... in execution order, so a plain directory listing sorts in DAG
16
- order without opening any file. The invocable `name:` field stays a clean colon-scoped
17
- identifier (`builder:diff`) without the numeric prefix.
18
-
19
- ## Pipeline DAG
20
-
21
- ```
22
- ┌───────────────────────┐
23
- │ 0. builder:diff │ HEAD vs. last published version (npm view, else last git tag)
24
- └───────────────────────┘
25
- │ commit list since last release (empty → stop, nothing to do)
26
- ▼
27
- ┌───────────────────────────┐
28
- │ 1. builder:classify-and-bump │ conventional-commit prefixes → patch/minor/major
29
- └───────────────────────────┘ (non-conventional history → ask, don't guess)
30
- │ bump kind decided
31
- ▼
32
- ┌───────────────────────┐
33
- │ 2. builder:gate │ npm run typecheck + npm run test:unit, both bounded
34
- └───────────────────────┘
35
- PASS │ │ FAIL
36
- ▼ ▼
37
- ┌───────────────────────┐ STOP — report failing gate, do not publish
38
- │ 3. builder:publish │ ISOLATED WORKTREE technique (see that step's own file)
39
- └───────────────────────┘
40
- │ version bumped, tagged, pushed, published, dist-tag verified
41
- ▼
42
- ┌───────────────────────┐
43
- │ 4. builder:manual │ does the Field Manual still describe reality?
44
- └───────────────────────┘ revise chapters → bump manual version → build bundle
45
- │ manual release (or an explicit "no content change")
46
- ▼
47
- ┌───────────────────────┐
48
- │ 5. builder:report │ version, commits covered, dist-tag, manual + push confirmation
49
- └───────────────────────┘
50
- ```
51
-
52
- | Step | Input | Output | On failure/empty |
53
- |---|---|---|---|
54
- | 0. `builder:diff` | current project cwd | commit list since last published version (or last git tag) | no commits since last release → stop, report "nothing to publish" |
55
- | 1. `builder:classify-and-bump` | commit list | bump kind (`patch`/`minor`/`major`) | commits don't follow conventional-commit style → say so, ask the user rather than guessing |
56
- | 2. `builder:gate` | working tree at HEAD | typecheck + unit test result | either fails → stop, report the failure, do not publish |
57
- | 3. `builder:publish` | bump kind, gate-passed HEAD | published npm package, pushed tag + main | any step fails → stop, report which step and the worktree's state (don't leave it behind uncleaned unless it's evidence of the failure) |
58
- | 4. `builder:manual` | commit list + published version | revised chapters + a built manual release bundle, or an explicit "no content change" | build refuses (missing chapter/asset, bad slug, no free chapter) → stop and report; the npm publish already landed and is unaffected |
59
- | 5. `builder:report` | publish + manual result | one summary: version bumped, commits covered, npm dist-tag verified, git push confirmed, manual edition shipped or explicitly unchanged | n/a |
60
-
61
- ## Hard rules — read before running any step
62
-
63
- - **A dirty working tree in the main repo is NOT a blocker.** The isolated-worktree
64
- technique in `builder:publish` sidesteps it entirely — `npm ci` + `vite build` +
65
- `npm publish` all run inside a clean worktree checked out from the just-created tag, never
66
- touching the live/dirty repo. Don't hold the pipeline waiting for a clean tree; that
67
- guidance is superseded by this skill.
68
- - **Once a diff is found and the gate passes, run the full sequence through to publish
69
- without pausing for reconfirmation.** This was confirmed by the user across 4 consecutive
70
- manual runs in the session that originated this skill — asking "should I publish now?"
71
- after the gate is green is exactly the friction this skill exists to remove.
72
- - **The gate is a hard stop.** A failing `typecheck` or `test:unit` run means step 3 never
73
- executes — no publish, no version bump, no tag. Report the failure and stop.
74
- - **The manual is a product, not a changelog.** `builder:manual` may only claim what it has
75
- verified against real code, and may never invent a screenshot. A wrong instruction in a
76
- guide readers follow step by step breaks their setup — hold it above the app's own docs.
77
- A manual bundle that isn't pushed to the Bilko repo is not shipped; say so plainly.
78
- - **Never guess a version bump from unconventional commit messages.** If the commit list
79
- doesn't cleanly map to `fix:`/`feat:`/`BREAKING CHANGE:` prefixes, `builder:classify-and-bump`
80
- asks the user which bump to apply rather than inferring one.
81
-
82
- ## Why nested skills instead of one inline sequence
83
-
84
- Each step is its own file so it shows up as its own invocation in whatever surface tracks
85
- skill/tool calls, and so a step can be changed (a different gate command, a new registry
86
- target) without touching the others.
87
-
88
- ## What this skill is not
89
-
90
- - Not a decision-maker on *whether* to release — it assumes the user (or an Epic) already
91
- wants the next diff shipped. If there's genuine ambiguity about scope, `builder:classify-and-bump`
92
- is the one step that pauses to ask.
93
- - Not a registry-agnostic tool — `builder:publish` is npm-specific (see `buildTarget.cjs`'s
94
- `registry` field for future non-npm targets; out of scope for this version).
95
- - Not wired to any UI button — invoking this skill is the only entry point today.
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
+
66
+ **CI-publish path.** If `grep -q 'npm-publish:' .github/workflows/release.yml` succeeds, CI
67
+ publishes on the tag push (npm Trusted Publishing, OIDC). Skip the local worktree build and
68
+ `npm publish` (steps 5-7 and 9) and run instead:
69
+
70
+ - `git push origin main` and `git push origin v<version>`.
71
+ - Wait on the release run with a bounded blocking watcher (never an open-ended poll):
72
+ ```
73
+ timeout 1200 gh run watch "$(gh run list --workflow release.yml --branch v<version> --limit 1 --json databaseId --jq '.[0].databaseId')" --exit-status
74
+ ```
75
+ - Verify the registry: re-read the cache-busted packument
76
+ `curl -s "https://registry.npmjs.org/<packageName>?t=$(date +%s)"` until `dist-tags.latest`
77
+ is `<version>` — at most 20 tries, 30 s apart (`sleep 30` between tries). Then do steps 10
78
+ (tarball 200) and 11 (installer assets) as written.
79
+
80
+ If the `npm-publish` job fails, or the version never appears within the 20 tries: report the
81
+ failing job log (`gh run view <run-id> --log-failed`), then fall back to the local worktree
82
+ publish below (steps 5-7, 9, 10) **exactly once** — the tag is already pushed, so skip step 8.
83
+ An E409 "staged" from that fallback still means a human approves it on npmjs.com; report that.
84
+
85
+ **Local worktree path (fallback).** Projects whose `release.yml` has no `npm-publish` job (or
86
+ have no `release.yml`) always use steps 5-11:
87
+
88
+ 5. `mkdir -p "$HOME/.cache/sm-publish" && git worktree add "$HOME/.cache/sm-publish/v<version>" v<version>`
89
+ — never under `/tmp` or `os.tmpdir()`: some test suites (this repo's included) treat those
90
+ paths as fixtures and fail there.
91
+ 6. In the worktree: `npm ci`, then the gates again (step 3), then the project's build. Check
92
+ every `files` entry in `package.json` exists before publishing; stop on any failure.
93
+ 7. `npm publish` from inside the worktree, so `prepublishOnly` builds there too.
94
+ A 403 saying two-factor authentication or a bypass-2FA granular token is required is not a
95
+ login problem (`npm whoami` can succeed). Don't retry `npm login` or `npm publish`: run
96
+ `npm profile get` and `npm token list`, stop, and report the exact 403 and both results so a
97
+ human can supply an OTP or a token (the CLI cannot mint a granular token). An E409 "staged"
98
+ response means the publish waits for a human to approve it on npmjs.com — report that.
99
+ 8. Back in the main repo: `git push origin main` and `git push origin v<version>`.
100
+ 9. `git worktree remove "$HOME/.cache/sm-publish/v<version>" --force`
101
+ 10. Verify the registry. `npm view` lags for minutes, so read a cache-busted packument and the
102
+ tarball first:
103
+ ```
104
+ curl -s "https://registry.npmjs.org/<packageName>?t=$(date +%s)"
105
+ curl -sI <versions["<version>"].dist.tarball>
106
+ npm view <packageName> version dist-tags
107
+ ```
108
+ `dist-tags.latest` is `<version>`, the version is listed, the tarball returns 200. A stale
109
+ `npm view` with a current packument is lag, not failure — never republish.
110
+ 11. If `.github/workflows/release.yml` exists, the tag push started it. Wait on that run with a
111
+ bounded blocking watcher, then read the assets once:
112
+ ```
113
+ timeout 1200 gh run watch "$(gh run list --workflow release.yml --branch v<version> --limit 1 --json databaseId --jq '.[0].databaseId')" --exit-status
114
+ gh release view v<version> --json assets --jq '.assets[].name'
115
+ ```
116
+ Report the installer assets found (here: `.dmg`, `.exe`, `.AppImage`) and any missing. If
117
+ no run is listed yet, say so instead of polling.
118
+
119
+ On any failing step: stop there and report the step and its output. Once the worktree exists,
120
+ leave it only when its state is evidence for the failure; otherwise remove it (step 9) so a
121
+ retry doesn't collide with a stale path.
122
+
123
+ ## 5. Manual (only when `session-manager-operations/manual/manual.json` exists)
124
+
125
+ Follow [`manual.md`](manual.md). The npm publish has already landed; a manual failure never
126
+ undoes it.
127
+
128
+ ## 6. Report
129
+
130
+ One plain-text report, whether the pipeline finished or stopped:
131
+
132
+ - **Version** previous → new, and the bump kind.
133
+ - **Commits covered**, grouped by the rule that classified each.
134
+ - **Gates** and their results.
135
+ - **Registry**: packument `dist-tags` / version and tarball status.
136
+ - **Git**: both pushes confirmed, worktree removed.
137
+ - **Installer release**: assets found and missing, or "no release workflow".
138
+ - **Manual**: `manual.md`'s report, "no content change", or "no manual".
139
+ - **Stopped early?** Which step, why, its output, and anything a retry must account for
140
+ (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 from five angles, split it into small
5
- self-contained PRDs (an independent set, or a 3-5 PRD chain), queue them for the
6
- session-manager scheduler with the required gate and files, each pointing the headless
7
- executor at the engineering standards file, then track them to a validated finish and report
8
- back. Use whenever the user says "/develop", "develop X", "build me X", "implement X", "let's
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 `test-driven-development`,
46
- `systematic-debugging` skills and the built-in `/code-review` for review. Why: one copy never goes stale.
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 two
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
- - **(c) 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.
75
- - **(b) Tool ABSENT from your tool list.** The `session-manager-scheduler` MCP server is not
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
- 1. 1–10 commands. The scheduler re-runs them, in order. Each must exit 0.
162
- 2. Start each `&&` step with `timeout <seconds>`, for example `timeout 300 npm test &&
163
- timeout 120 npm run lint`. Why: a command without a timeout can hang the run.
164
- 3. Join steps inside one entry with `&&`.
165
- 4. The scheduler runs gate commands without a shell, so shell syntax is refused. Outside single
166
- quotes, do not use `|` `<` `>` `;` `&` (only `&&` between steps), backticks, `$`, `\`, `*`,
167
- `?`, `[`, `]`, `(`, `)`, `{`, `}` or `!`. Inside double quotes, `$`, backticks and `\` are
168
- refused too.
169
- 5. Do not start a word with `#` or `~`, and do not put `~` right after `=` or `:`. `HEAD~1` is
170
- fine.
171
- 6. Put text with these characters inside single quotes, for example `rg -n 'a|b' src/`. A check
172
- that needs a shell belongs in a test file that the gate runs.
173
- 7. Keep each entry on one line, at most 500 chars, with plain spaces between words.
174
- 8. Use `["none"]` only for docs or config with no runnable check. Write exactly `none`. Never
175
- mix `none` with commands.
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