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.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/assets/{AgentLibrary-DRlcF1YD.js → AgentLibrary-BFztz90B.js} +1 -1
- package/dist/assets/{AppSettings-CBhYHKGI.js → AppSettings-6_dqi9Ti.js} +1 -1
- package/dist/assets/{Button-DtBUGvGI.js → Button-5wbUTtD5.js} +1 -1
- package/dist/assets/{DocumentEditorPane-C82c7Qtl.js → DocumentEditorPane-CRgJFjka.js} +1 -1
- package/dist/assets/{Extensions-Kn-oUD2_.js → Extensions-ZXSJbnK7.js} +2 -2
- package/dist/assets/{History-B4c3Uz9u.js → History-CmSTZeiu.js} +1 -1
- package/dist/assets/{Library-1RpLT-aH.js → Library-DcTnW9kq.js} +1 -1
- package/dist/assets/{ListDetail-xr0oxNkv.js → ListDetail-BGsdNFiK.js} +1 -1
- package/dist/assets/{Panel-O8XPrpJu.js → Panel-BR2PeMf6.js} +1 -1
- package/dist/assets/{ProjectClaudeConfig-DBGhhzg2.js → ProjectClaudeConfig-DJYcUU1G.js} +1 -1
- package/dist/assets/{ProvenanceBadge-DSaizfZL.js → ProvenanceBadge-B_TDAI3k.js} +1 -1
- package/dist/assets/{Scheduler-D2_5NyiR.js → Scheduler-DqocyumD.js} +1 -1
- package/dist/assets/{Settings-Clgqb3Lq.js → Settings-BzPe2TH6.js} +1 -1
- package/dist/assets/{SkillReferenceGraph-D80RA7kR.js → SkillReferenceGraph-DfdO0Q_N.js} +1 -1
- package/dist/assets/{Skills-DNG7tHSf.js → Skills-CGPJxKhR.js} +1 -1
- package/dist/assets/{SourceChip-D-Imzszd.js → SourceChip-CI8xpHRi.js} +1 -1
- package/dist/assets/{SystemPrompt-CGlOpUQA.js → SystemPrompt-BbzGIHoz.js} +1 -1
- package/dist/assets/{TiptapBody-CJFGfBdz.js → TiptapBody-CTmjUhAI.js} +1 -1
- package/dist/assets/{Toggle-0Ff0bPa_.js → Toggle-CWx9Rq6E.js} +1 -1
- package/dist/assets/{ViewTabs-BCMYQwo_.js → ViewTabs-BnjD0Crp.js} +1 -1
- package/dist/assets/{VoiceButton-JzyC6DAB.js → VoiceButton-C-iQGCL1.js} +1 -1
- package/dist/assets/{historyTotals-B01WPBwh.js → historyTotals-BaxAMu7r.js} +1 -1
- package/dist/assets/{index-CjQ_p5y7.css → index-62tyjEQB.css} +1 -1
- package/dist/assets/index-Cob2iZhR.js +3116 -0
- package/dist/index.html +2 -2
- package/dist-web/app.css +1 -1
- package/dist-web/app.js +412 -412
- package/package.json +1 -1
- package/plugins/CLAUDE.md +9 -8
- package/plugins/packs/apple-design/.claude-plugin/plugin.json +6 -0
- package/plugins/packs/apple-design/laws.md +14 -0
- package/plugins/packs/apple-design/skills/hig-layout-and-accessibility/SKILL.md +152 -0
- package/plugins/packs/apple-design/skills/liquid-glass-adoption/SKILL.md +132 -0
- package/plugins/packs/apple-design/sm-pack.json +5 -0
- package/plugins/packs/apple-swift-core/.claude-plugin/plugin.json +12 -0
- package/plugins/packs/apple-swift-core/laws.md +13 -0
- package/plugins/packs/apple-swift-core/skills/swift-concurrency/SKILL.md +160 -0
- package/plugins/packs/apple-swift-core/skills/swiftui-state-and-navigation/SKILL.md +165 -0
- package/plugins/packs/apple-swift-core/sm-pack.json +5 -0
- package/plugins/session-manager-dev/.claude-plugin/plugin.json +1 -1
- package/plugins/session-manager-dev/skills/builder/SKILL.md +136 -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 +11 -19
- package/plugins/session-manager-dev/skills/maintaining-md-network/SKILL.md +9 -0
- package/plugins/session-manager-dev/skills/maintaining-md-network/drift-check.md +5 -2
- package/plugins/session-manager-dev/skills/maintaining-md-network/scripts/drift-check.cjs +100 -5
- package/plugins/session-manager-dev/skills/send-feedback/SKILL.md +65 -21
- package/scripts/scheduler-mcp-server.cjs +65 -5
- package/src/main/build-info.json +4 -4
- package/src/main/chatRunner.cjs +26 -2
- package/src/main/index.cjs +4 -0
- package/src/main/ipcSchemas.cjs +13 -0
- package/src/main/lib/CLAUDE.md +2 -0
- package/src/main/lib/claude/agentModelResolve.cjs +23 -0
- package/src/main/lib/epic/epicMint.cjs +12 -6
- package/src/main/lib/epic/epicTranscriptPath.cjs +5 -4
- package/src/main/lib/epic/promptSessionsCreateEpic.cjs +8 -4
- package/src/main/lib/epic/restorableSessions.cjs +16 -8
- package/src/main/lib/feedback-remote/crossProjectFeedback.cjs +201 -8
- package/src/main/lib/feedback-remote/crossProjectReply.cjs +375 -0
- package/src/main/lib/feedback-remote/remoteIpcDispatch.cjs +2 -0
- package/src/main/lib/mcpToolCatalog.cjs +38 -4
- package/src/main/lib/mdNetworkScan.cjs +61 -11
- package/src/main/lib/mdReviewRecord.cjs +287 -0
- package/src/main/lib/packs/packCatalog.cjs +120 -0
- package/src/main/lib/packs/packSpawnArgs.cjs +59 -0
- package/src/main/lib/packs/packsIpc.cjs +76 -0
- package/src/main/lib/persona-macro/builtinMacros.cjs +3 -2
- package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +34 -0
- package/src/main/lib/prd/prdCreate.cjs +2 -2
- package/src/main/lib/promptSessionSchema.cjs +8 -0
- package/src/main/projectPages.cjs +19 -0
- package/src/main/promptSessionEvents.cjs +8 -1
- package/src/main/scheduler.cjs +23 -2
- package/src/preload/api.d.ts +71 -0
- package/src/preload/apiSurface.json +21 -0
- package/src/preload/index.cjs +7 -0
- package/src/seed/agents/demo-video-builder.md +28 -33
- package/src/seed/agents/dev-lead.md +3 -3
- package/dist/assets/index-rt7pTODX.js +0 -3116
- 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
|
@@ -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.
|
|
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:
|
|
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
|
+
|
|
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
|
|
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
|
|