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
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
* mdNetwork() maps the project's markdown link network on demand
|
|
14
14
|
* (lib/mdNetworkScan.cjs) for the Tools pane. matrix() reads the saved
|
|
15
15
|
* Competitor matrix (lib/project-pages/competitiveMatrix.cjs readMatrix).
|
|
16
|
+
* mdReview() reads the newest Review MD network record plus each review
|
|
17
|
+
* session's validation records (lib/mdReviewRecord.cjs readMdReview).
|
|
16
18
|
*/
|
|
17
19
|
|
|
18
20
|
const { ipcMain } = require('electron');
|
|
@@ -25,6 +27,7 @@ const { sendIfAlive } = require('./lib/sendToRenderer.cjs');
|
|
|
25
27
|
const { listLibrary, migrateLegacy } = require('./lib/project-pages/pagesLibrary.cjs');
|
|
26
28
|
const { scanMdNetwork } = require('./lib/mdNetworkScan.cjs');
|
|
27
29
|
const { readMatrix } = require('./lib/project-pages/competitiveMatrix.cjs');
|
|
30
|
+
const { readMdReview } = require('./lib/mdReviewRecord.cjs');
|
|
28
31
|
|
|
29
32
|
let mainWindow = null;
|
|
30
33
|
function attachWindow(window) {
|
|
@@ -116,6 +119,20 @@ async function mdNetwork({ cwd, recordFolders, docFolders }) {
|
|
|
116
119
|
});
|
|
117
120
|
}
|
|
118
121
|
|
|
122
|
+
const MD_REVIEW_EPHEMERAL = 'refusing an ephemeral cwd (tmpdir or linked git worktree): no project review record';
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* -> MdReviewResult: the newest review record under reviews/docs/ and, per
|
|
126
|
+
* given Epic id, its reviews/validation/<id>/*.md paths — read once per call
|
|
127
|
+
* (no watcher, no cache). Resolves the project root like mdNetwork(); an
|
|
128
|
+
* ephemeral cwd gets `{ ok: false, error }`.
|
|
129
|
+
*/
|
|
130
|
+
async function mdReview({ cwd, epicIds }) {
|
|
131
|
+
const { root, ephemeral } = tryProjectRoot(config.validatePath(cwd));
|
|
132
|
+
if (ephemeral) return { ok: false, error: MD_REVIEW_EPHEMERAL };
|
|
133
|
+
return readMdReview(root, { epicIds });
|
|
134
|
+
}
|
|
135
|
+
|
|
119
136
|
const MATRIX_EPHEMERAL = 'refusing an ephemeral cwd (tmpdir or linked git worktree): no project matrix';
|
|
120
137
|
|
|
121
138
|
/**
|
|
@@ -306,6 +323,7 @@ function registerProjectPagesIpc() {
|
|
|
306
323
|
const { schemas: s, validated: v } = require('./ipcSchemas.cjs');
|
|
307
324
|
ipcMain.handle('project-pages:get', v(s.projectPagesCwd, get));
|
|
308
325
|
ipcMain.handle('project-pages:md-network', v(s.projectPagesMdNetwork, mdNetwork));
|
|
326
|
+
ipcMain.handle('project-pages:md-review', v(s.projectPagesMdReview, mdReview));
|
|
309
327
|
ipcMain.handle('project-pages:matrix', v(s.projectPagesCwd, matrix));
|
|
310
328
|
ipcMain.handle('project-pages:watch', v(s.projectPagesCwd, ({ cwd }) => watchOutput(cwd)));
|
|
311
329
|
ipcMain.handle('project-pages:rename', v(s.projectPagesRename, renameEntry));
|
|
@@ -321,6 +339,7 @@ module.exports = {
|
|
|
321
339
|
registerProjectPagesIpc,
|
|
322
340
|
get,
|
|
323
341
|
mdNetwork,
|
|
342
|
+
mdReview,
|
|
324
343
|
matrix,
|
|
325
344
|
isLibraryPath,
|
|
326
345
|
renameEntry,
|
|
@@ -73,7 +73,8 @@ function mintEventId() {
|
|
|
73
73
|
* same meta arg and are copied the same way, as is `notice` (PRD 2950 — a
|
|
74
74
|
* marker like 'job-not-queued', or PRD 3116's 'build-done'/'build-failed', the
|
|
75
75
|
* renderer turns into a distinct notice) and `buildOutput` (PRD 3116 — `{ kind,
|
|
76
|
-
* id, title }` of a macro build's saved entry)
|
|
76
|
+
* id, title }` of a macro build's saved entry), and `reply` (`{ fromCwd,
|
|
77
|
+
* fromEpicId, outcome, referencePaths }` — a cross-project reply's origin). All
|
|
77
78
|
* keys are added to the event object only when present in `meta`, never as
|
|
78
79
|
* `undefined`-valued keys, so events appended without them serialize
|
|
79
80
|
* identically to before.
|
|
@@ -110,6 +111,12 @@ async function appendResponseEventWithReason(cwd, sourcePromptId, text, meta = {
|
|
|
110
111
|
const { kind, id, title } = meta.buildOutput;
|
|
111
112
|
event.buildOutput = { kind, id, title };
|
|
112
113
|
}
|
|
114
|
+
// Cross-project reply provenance (crossProjectReply.cjs) — whitelisted
|
|
115
|
+
// keys only, so a caller can't smuggle arbitrary fields onto the chain.
|
|
116
|
+
if (meta && meta.reply && typeof meta.reply === 'object') {
|
|
117
|
+
const { fromCwd, fromEpicId, outcome, referencePaths } = meta.reply;
|
|
118
|
+
event.reply = { fromCwd, fromEpicId, outcome, referencePaths };
|
|
119
|
+
}
|
|
113
120
|
data.events[sourcePromptId] = [...events, event];
|
|
114
121
|
await config.writeJson(path, data, { writer: 'scheduler' });
|
|
115
122
|
broadcast(EVENT_APPENDED_CHANNEL, { cwd, promptSessionId: sourcePromptId, event });
|
package/src/main/scheduler.cjs
CHANGED
|
@@ -156,6 +156,7 @@ const queueOps = require('./queueOps.cjs');
|
|
|
156
156
|
const { listEpicPrdDirs, listArchivedPrdDirs, deriveProjectCwdFromPrdPath } = require('./lib/prd/prdLocations.cjs');
|
|
157
157
|
const { ensureEpic, appendPrdCreatedEvent, readActiveIndex } = require('./lib/epic/epicMint.cjs');
|
|
158
158
|
const agentModelResolve = require('./lib/claude/agentModelResolve.cjs');
|
|
159
|
+
const packSpawnArgs = require('./lib/packs/packSpawnArgs.cjs');
|
|
159
160
|
const { buildPersonaToolScope, personaToolScopeArgs, personaToolScopeEnv } = require('./lib/claude/personaToolScope.cjs');
|
|
160
161
|
const { resolveEpicEffort, effortArgs } = require('./lib/claude/agentEffortResolve.cjs');
|
|
161
162
|
const { transitionJob, STATUS_HISTORY_CAP, LEGAL_TRANSITIONS } = require('./lib/scheduler/scheduleJobTransitions.cjs');
|
|
@@ -4699,13 +4700,14 @@ function knownMcpServers() {
|
|
|
4699
4700
|
return { [seed.SERVER_NAME]: seed.schedulerServerEntry() };
|
|
4700
4701
|
}
|
|
4701
4702
|
|
|
4702
|
-
function buildClaudeSpawnArgs({ model, effort, sessionId, resume, systemPrompt, toolScope }) {
|
|
4703
|
+
function buildClaudeSpawnArgs({ model, effort, sessionId, resume, systemPrompt, toolScope, pluginDirArgs = [] }) {
|
|
4703
4704
|
return [
|
|
4704
4705
|
'-p',
|
|
4705
4706
|
'--model', model,
|
|
4706
4707
|
...effortArgs(effort),
|
|
4707
4708
|
...(systemPrompt ? ['--append-system-prompt', systemPrompt] : []),
|
|
4708
4709
|
...personaToolScopeArgs(toolScope, { mcpServers: knownMcpServers() }),
|
|
4710
|
+
...(Array.isArray(pluginDirArgs) ? pluginDirArgs : []),
|
|
4709
4711
|
'--dangerously-skip-permissions',
|
|
4710
4712
|
...headlessPermissionArgs(),
|
|
4711
4713
|
'--disallowedTools', HEADLESS_DISALLOWED_TOOLS.join(','),
|
|
@@ -5038,6 +5040,24 @@ async function executeJob(job, runDir, defaultCwd, onPid, execCwd, resumeTarget
|
|
|
5038
5040
|
const effortResolution = resolveEpicEffort({ cwd, agentType: job.agentType, prdEffort: job.effort });
|
|
5039
5041
|
const personaEffort = effortResolution.effort;
|
|
5040
5042
|
const personaToolScope = buildPersonaToolScope(personaResolution.tools, { disallowed: HEADLESS_DISALLOWED_TOOLS });
|
|
5043
|
+
// Epic context packs (PRD 3154): the job's Epic's selected packs load as
|
|
5044
|
+
// --plugin-dir per pack, and their laws are appended AFTER the (already
|
|
5045
|
+
// capped) persona body — the persona cap never applies to laws. Fresh and
|
|
5046
|
+
// resume spawns alike; no Epic / no packs / an error = today's argv.
|
|
5047
|
+
let packArgs = { pluginDirArgs: [], laws: '' };
|
|
5048
|
+
try {
|
|
5049
|
+
const packEpicId = job.epicId || job.sourcePromptId;
|
|
5050
|
+
const packEpic = packEpicId ? agentModelResolve.findEpicById(cwd, packEpicId) : null;
|
|
5051
|
+
const composed = packSpawnArgs.composePackSpawnArgs({ packIds: packEpic?.packs });
|
|
5052
|
+
if (composed && Array.isArray(composed.pluginDirArgs)) {
|
|
5053
|
+
packArgs = { pluginDirArgs: composed.pluginDirArgs, laws: typeof composed.laws === 'string' ? composed.laws : '' };
|
|
5054
|
+
}
|
|
5055
|
+
} catch (err) {
|
|
5056
|
+
safeLog(`[scheduler] context packs skipped for ${job.slug}: ${err && err.message ? err.message : String(err)}\n`);
|
|
5057
|
+
}
|
|
5058
|
+
const jobSystemPrompt = packArgs.laws
|
|
5059
|
+
? (personaResolution.systemPrompt ? `${personaResolution.systemPrompt}\n\n${packArgs.laws}` : packArgs.laws)
|
|
5060
|
+
: personaResolution.systemPrompt;
|
|
5041
5061
|
safeLog(`[scheduler] agentType=${job.agentType || '(none)'} persona=${personaResolution.personaPath || '(fallback — no persona applied)'} model=${personaResolution.model}${personaEffort ? ` effort=${personaEffort}${effortResolution.source === 'prd' ? ' (prd)' : ''}` : ''} ${personaToolScope ? `tools=${personaToolScope.tools.length} scoped` : 'tools=unscoped'}\n`);
|
|
5042
5062
|
|
|
5043
5063
|
// Authoritative guarantee that buildClaudeSpawnArgs (a pure sync helper,
|
|
@@ -5252,8 +5272,9 @@ async function executeJob(job, runDir, defaultCwd, onPid, execCwd, resumeTarget
|
|
|
5252
5272
|
effort: personaEffort,
|
|
5253
5273
|
sessionId,
|
|
5254
5274
|
resume: !!resumeTarget,
|
|
5255
|
-
systemPrompt:
|
|
5275
|
+
systemPrompt: jobSystemPrompt,
|
|
5256
5276
|
toolScope: personaToolScope,
|
|
5277
|
+
pluginDirArgs: packArgs.pluginDirArgs,
|
|
5257
5278
|
});
|
|
5258
5279
|
const jobSpawn = claudeSpawnTarget('job', job.slug, claudeBin, jobArgs);
|
|
5259
5280
|
|
package/src/preload/api.d.ts
CHANGED
|
@@ -448,6 +448,23 @@ export type AgentCliTerminalCommandResult =
|
|
|
448
448
|
| { ok: true; command: string }
|
|
449
449
|
| { ok: false; message: string };
|
|
450
450
|
|
|
451
|
+
/** One `packs.list` row — display data only; pack dir and laws text stay in main. */
|
|
452
|
+
export interface PackListRow {
|
|
453
|
+
id: string;
|
|
454
|
+
label: string;
|
|
455
|
+
description: string;
|
|
456
|
+
requires: { platform?: 'darwin' | 'linux' | 'win32' };
|
|
457
|
+
/** True when the pack ships an always-on laws.md. */
|
|
458
|
+
hasLaws: boolean;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export type PacksListResult =
|
|
462
|
+
| { ok: true; packs: PackListRow[] }
|
|
463
|
+
| { ok: false; error: string };
|
|
464
|
+
|
|
465
|
+
/** `packs.terminalArgs` result — `--plugin-dir`/`--append-system-prompt` args, already composed by main. */
|
|
466
|
+
export type PacksTerminalArgsResult = { ok: true; args: string[] };
|
|
467
|
+
|
|
451
468
|
/** One global `~/.claude/agents/<name>.md` persona, per the Agent Library nav page. */
|
|
452
469
|
export interface AgentPersona {
|
|
453
470
|
name: string;
|
|
@@ -1633,6 +1650,8 @@ export interface ProjectVideoMeta {
|
|
|
1633
1650
|
id: string;
|
|
1634
1651
|
title: string;
|
|
1635
1652
|
kind: 'project-demo' | 'blog-post' | 'feature';
|
|
1653
|
+
/** The `Video target:` text the video was built for (a post path or URL, or a feature name); absent for a Project demo. */
|
|
1654
|
+
target?: string;
|
|
1636
1655
|
style: string;
|
|
1637
1656
|
lengthS: number;
|
|
1638
1657
|
createdAt: string;
|
|
@@ -1759,6 +1778,48 @@ export interface MdNetwork {
|
|
|
1759
1778
|
/** `{ ok: false, error }` when there is nothing to map or the scan failed (not a git repo, no root CLAUDE.md, an ephemeral cwd). */
|
|
1760
1779
|
export type MdNetworkResult = MdNetwork | { ok: false; error: string };
|
|
1761
1780
|
|
|
1781
|
+
// ────────────────────────────────────────────── Project Pages: Review MD network record
|
|
1782
|
+
// Mirrors the JSDoc typedefs in src/main/lib/mdReviewRecord.cjs (ReviewVerdict,
|
|
1783
|
+
// ReviewRecord, MdReviewOk | MdReviewErr). Keep in sync by hand.
|
|
1784
|
+
|
|
1785
|
+
/** One row of the record's per-doc verdict table. */
|
|
1786
|
+
export interface MdReviewVerdict {
|
|
1787
|
+
doc: string;
|
|
1788
|
+
verdict: string;
|
|
1789
|
+
owner: string;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
/** A parsed review record (reviews/docs/<YYYY-MM-DD>-md-network[-N].md); any field the record lacks is null/empty. */
|
|
1793
|
+
export interface MdReviewRecord {
|
|
1794
|
+
date: string | null;
|
|
1795
|
+
mode: string | null;
|
|
1796
|
+
modeKind: 'Full review' | 'Drift check' | null;
|
|
1797
|
+
scope: string | null;
|
|
1798
|
+
session: string | null;
|
|
1799
|
+
baseCommit: string | null;
|
|
1800
|
+
owner: string | null;
|
|
1801
|
+
map: string | null;
|
|
1802
|
+
driftCheckCommand: string | null;
|
|
1803
|
+
findingsCounts: Record<string, number>;
|
|
1804
|
+
censusSummary: string | null;
|
|
1805
|
+
verdicts: MdReviewVerdict[];
|
|
1806
|
+
decisions: string[];
|
|
1807
|
+
followUpPrds: string[];
|
|
1808
|
+
nextReviewDue: string | null;
|
|
1809
|
+
nextReviewNote: string | null;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
/** The newest review record (null when none) plus, per requested Epic id, its validation record paths (repo-relative). */
|
|
1813
|
+
export interface MdReviewOk {
|
|
1814
|
+
ok: true;
|
|
1815
|
+
record: MdReviewRecord | null;
|
|
1816
|
+
recordPath: string | null;
|
|
1817
|
+
validation: Record<string, string[]>;
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
/** `{ ok: false, error }` for an ephemeral cwd or an unresolvable project root. */
|
|
1821
|
+
export type MdReviewResult = MdReviewOk | { ok: false; error: string };
|
|
1822
|
+
|
|
1762
1823
|
// ────────────────────────────────────────────── Project Pages: markdown doc census
|
|
1763
1824
|
// Mirrors the JSDoc typedefs in src/main/lib/mdDocCensus.cjs.
|
|
1764
1825
|
// Every path is repo-relative POSIX; folder strings end with '/'.
|
|
@@ -2264,6 +2325,12 @@ export interface SessionManagerAPI {
|
|
|
2264
2325
|
/** The exact shell line (no trailing CR) the Epic Terminal pane types to launch/resume this Epic's CLI. */
|
|
2265
2326
|
terminalCommand: (payload: { cwd: string; claudeSessionId: string }) => Promise<AgentCliTerminalCommandResult>;
|
|
2266
2327
|
};
|
|
2328
|
+
/** Shipped context-pack catalog (New Session picker). Never rejects. */
|
|
2329
|
+
packs: {
|
|
2330
|
+
list: () => Promise<PacksListResult>;
|
|
2331
|
+
/** Pack CLI args for this Epic's Terminal `claude` line; `[]` for agent-CLI/no-pack Epics or any error. */
|
|
2332
|
+
terminalArgs: (payload: { cwd: string; claudeSessionId: string }) => Promise<PacksTerminalArgsResult>;
|
|
2333
|
+
};
|
|
2267
2334
|
agents: {
|
|
2268
2335
|
listPersonas: () => Promise<AgentPersona[]>;
|
|
2269
2336
|
savePersona: (payload: AgentPersonaSaveInput) => Promise<{ ok: boolean; path: string }>;
|
|
@@ -2659,6 +2726,8 @@ export interface SessionManagerAPI {
|
|
|
2659
2726
|
get: (cwd: string) => Promise<ProjectPagesGetResult>;
|
|
2660
2727
|
/** Map the project's markdown link network from its root CLAUDE.md (read-only, bounded, no LLM) for the Tools pane. Scans on every call — no watcher, no cache. `ok:false` (with `error`) for a cwd `get` answers with empty lists (tmpdir / linked worktree), a folder that is not a git repo, or no root CLAUDE.md; rejects on an invalid cwd, like `get`. */
|
|
2661
2728
|
mdNetwork: (payload: { cwd: string; recordFolders?: string[]; docFolders?: string[] }) => Promise<MdNetworkResult>;
|
|
2729
|
+
/** Read the newest Review MD network record (reviews/docs/) and each given Epic id's validation record paths (reviews/validation/<id>/*.md). Read-only, no watcher, no cache, no LLM. `ok:false` for an ephemeral cwd; rejects on an invalid cwd or a bad Epic id. */
|
|
2730
|
+
mdReview: (payload: { cwd: string; epicIds?: string[] }) => Promise<MdReviewResult>;
|
|
2662
2731
|
/** Read the saved Competitor matrix (project-pages/matrix/matrix.json) — read-only; writes go through project_matrix_write. */
|
|
2663
2732
|
matrix: (payload: { cwd: string }) => Promise<CompetitorMatrixResult>;
|
|
2664
2733
|
/** Start pushing `onChanged` events for this cwd's output dir. Refcounted per cwd; `ok:false` (reason 'ephemeral'|'invalid-cwd') means no live updates are possible, not an error. */
|
|
@@ -2898,6 +2967,8 @@ export interface PromptSessionsCreateEpicPayload {
|
|
|
2898
2967
|
agentCli?: 'claude' | 'codex' | 'gemini' | 'antigravity' | 'cursor' | 'opencode';
|
|
2899
2968
|
/** Model for a non-Claude CLI; absent = that CLI's default. */
|
|
2900
2969
|
agentCliModel?: string;
|
|
2970
|
+
/** Selected context pack ids (packs.list ids); absent = none. Loaded by the CLI, never in openingPrompt. */
|
|
2971
|
+
packs?: string[];
|
|
2901
2972
|
}
|
|
2902
2973
|
|
|
2903
2974
|
export interface PromptSessionsCreateEpicResult {
|
|
@@ -370,6 +370,20 @@
|
|
|
370
370
|
"kind": "invoke",
|
|
371
371
|
"remote": "deny"
|
|
372
372
|
},
|
|
373
|
+
{
|
|
374
|
+
"ns": "packs",
|
|
375
|
+
"method": "list",
|
|
376
|
+
"channel": "packs:list",
|
|
377
|
+
"kind": "invoke",
|
|
378
|
+
"remote": "read"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"ns": "packs",
|
|
382
|
+
"method": "terminalArgs",
|
|
383
|
+
"channel": "packs:terminal-args",
|
|
384
|
+
"kind": "invoke",
|
|
385
|
+
"remote": "read"
|
|
386
|
+
},
|
|
373
387
|
{
|
|
374
388
|
"ns": "agents",
|
|
375
389
|
"method": "listPersonas",
|
|
@@ -1434,6 +1448,13 @@
|
|
|
1434
1448
|
"kind": "invoke",
|
|
1435
1449
|
"remote": "read"
|
|
1436
1450
|
},
|
|
1451
|
+
{
|
|
1452
|
+
"ns": "projectPages",
|
|
1453
|
+
"method": "mdReview",
|
|
1454
|
+
"channel": "project-pages:md-review",
|
|
1455
|
+
"kind": "invoke",
|
|
1456
|
+
"remote": "read"
|
|
1457
|
+
},
|
|
1437
1458
|
{
|
|
1438
1459
|
"ns": "projectPages",
|
|
1439
1460
|
"method": "matrix",
|
package/src/preload/index.cjs
CHANGED
|
@@ -126,6 +126,12 @@ contextBridge.exposeInMainWorld('api', {
|
|
|
126
126
|
detect: (payload) => ipcRenderer.invoke('agentCli:detect', payload),
|
|
127
127
|
terminalCommand: (payload) => ipcRenderer.invoke('agentCli:terminal-command', payload),
|
|
128
128
|
},
|
|
129
|
+
// Context-pack catalog — display data only (remote: read).
|
|
130
|
+
packs: {
|
|
131
|
+
list: () => ipcRenderer.invoke('packs:list'),
|
|
132
|
+
// Pack part of an Epic Terminal `claude` line (--plugin-dir/--append-system-prompt).
|
|
133
|
+
terminalArgs: (payload) => ipcRenderer.invoke('packs:terminal-args', payload),
|
|
134
|
+
},
|
|
129
135
|
agents: {
|
|
130
136
|
listPersonas: () => ipcRenderer.invoke('agents:list-personas'),
|
|
131
137
|
savePersona: (payload) => ipcRenderer.invoke('agents:save-persona', payload),
|
|
@@ -416,6 +422,7 @@ contextBridge.exposeInMainWorld('api', {
|
|
|
416
422
|
projectPages: {
|
|
417
423
|
get: (cwd) => ipcRenderer.invoke('project-pages:get', { cwd }),
|
|
418
424
|
mdNetwork: (payload) => ipcRenderer.invoke('project-pages:md-network', payload),
|
|
425
|
+
mdReview: (payload) => ipcRenderer.invoke('project-pages:md-review', payload),
|
|
419
426
|
matrix: (payload) => ipcRenderer.invoke('project-pages:matrix', payload),
|
|
420
427
|
watch: (cwd) => ipcRenderer.invoke('project-pages:watch', { cwd }),
|
|
421
428
|
unwatch: (cwd) => ipcRenderer.invoke('project-pages:unwatch', { cwd }),
|
|
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__proj
|
|
|
5
5
|
title: 'Project Home — Demo Video'
|
|
6
6
|
model: opus
|
|
7
7
|
effort: max
|
|
8
|
-
seedVersion:
|
|
8
|
+
seedVersion: 13
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
You are the demo-video-builder. You make a short animated demo, 30 seconds or 1 minute long per `<length_and_pacing>`, that shows someone what this
|
|
@@ -42,22 +42,22 @@ not "run by cron"; "it runs on your own computer", not "a local-first agent". Ne
|
|
|
42
42
|
file name, or function name aloud. Product names stay as they are.
|
|
43
43
|
|
|
44
44
|
For everyone else, replace any word a person outside software would have to look up. For a developer
|
|
45
|
-
tool, keep only words every developer uses daily (code, terminal
|
|
46
|
-
|
|
45
|
+
tool, keep only words every developer uses daily (code, terminal) and drop the project's internal
|
|
46
|
+
terms ("the static-path contract"); the banned list in `<voice_first>` applies to both audiences.
|
|
47
47
|
</audience_and_language>
|
|
48
48
|
|
|
49
49
|
<length_and_pacing>
|
|
50
50
|
The video is D seconds long: D = 60 when the additional instructions carry a 'Video length: 60' line or plainly ask for one minute, otherwise D = 30. Every length rule in this file follows D.
|
|
51
51
|
- Script: ~70-80 spoken words for 30 s, ~140-160 for 60 s (~150 wpm). Narration stays at speed 1.0 with a short breath between lines; size the script so the recipe never has to speed a line up.
|
|
52
|
-
- Keystones: a keystone is one scene, one camera stop and the picture built there. Every keystone stays on screen at least 5 s, counting the camera move or transition that brings it in, and that move takes at least 1.0 s
|
|
52
|
+
- Keystones: a keystone is one scene, one camera stop and the picture built there. Every keystone stays on screen at least 5 s, counting the camera move or transition that brings it in, and that move takes at least 1.0 s, so a viewer never feels rushed. So 30 s holds at most 6 keystones and 60 s at most 12.
|
|
53
53
|
- A keystone may carry one or two script lines. It keeps building while they are spoken instead of cutting away.
|
|
54
54
|
- 60 s tells the same story with more room: up to 5-6 features, but only features you can source. Never pad with invented claims; use longer holds and richer drawings instead.
|
|
55
55
|
</length_and_pacing>
|
|
56
56
|
|
|
57
57
|
<script_first>
|
|
58
58
|
Write the narration script before any visual work: the word count from `<length_and_pacing>`, beats =
|
|
59
|
-
hook (a question or bold claim, 0-4 s)
|
|
60
|
-
`<call_to_action>`. Every line traces to the claims list. Then storyboard the keystones per `<storyboard>`,
|
|
59
|
+
the scenes in `<video_structure>`, opening on a hook (a question or bold claim, 0-4 s) and ending on the
|
|
60
|
+
close per `<call_to_action>`. Every line traces to the claims list. Then storyboard the keystones per `<storyboard>`,
|
|
61
61
|
each sized to the lines it carries; visuals illustrate what the line says at that moment (the noun
|
|
62
62
|
on screen when it is spoken). Good script first, visuals second — a strong script with simple
|
|
63
63
|
visuals beats flashy visuals over a weak script.
|
|
@@ -68,8 +68,8 @@ The close depends on the audience. Use only what you read; never invent a link o
|
|
|
68
68
|
- Everyone else: close on the public link, from the manifest's `homepage` or a live URL in the README
|
|
69
69
|
or docs. Show the full link on the closing card as plain text, never an `<a>` tag (the write tool
|
|
70
70
|
rejects outbound links), and say its short form aloud ("example dot com").
|
|
71
|
-
- Developer tool: close on the
|
|
72
|
-
|
|
71
|
+
- Developer tool: close on the product URL when one exists, otherwise the docs link; never a shell
|
|
72
|
+
command (see `<voice_first>`). The narration says what to do and does not read a link out in full.
|
|
73
73
|
- Everyone else with no public link: close on the project's name and one plain line on what it does.
|
|
74
74
|
Never fall back to an install command.
|
|
75
75
|
</call_to_action>
|
|
@@ -90,7 +90,9 @@ Scenes run in this order: title, problem, reveal, 2-3 moments, payoff, closing.
|
|
|
90
90
|
<kind_and_target>
|
|
91
91
|
Read two lines in the additional instructions:
|
|
92
92
|
- `Video kind:` is one of Project demo, Blog post, Feature. Project demo covers the whole product. Feature covers one named feature only. Blog post retells one post: set `meta.sources` to verbatim spans copied from the post, one per claim, so every claim is checkable.
|
|
93
|
-
- `Video target:` names what the video is for (the
|
|
93
|
+
- `Video target:` names what the video is for (the post path or URL, or the feature). Make the script serve that target.
|
|
94
|
+
- With no `Video target:` line, or a target you cannot find in the repository or read at its URL, make a Project demo of the whole project, whatever `Video kind:` says. Do not search for a likely target: never pick a post or feature yourself. Say in your report that you fell back to a Project demo and why, and save `kind` and `meta.kind` as `project-demo` with no `meta.target`.
|
|
95
|
+
- A post or feature text is a claim, not a source of truth. Check every claim it makes about how this project works against the source tree. Drop a claim the code contradicts, or attribute it to the post ("the post says ..."); never narrate it as fact about the project.
|
|
94
96
|
- `Entry id:` is the video's id. Pass it to `project_video_write` unchanged as `videoId`.
|
|
95
97
|
</kind_and_target>
|
|
96
98
|
|
|
@@ -150,12 +152,9 @@ PRNG (e.g. mulberry32 with a fixed seed) so `seek(t)` stays exact and frames are
|
|
|
150
152
|
<storyboard>
|
|
151
153
|
Before writing any code, turn the script into a storyboard of keystones per `<length_and_pacing>` (5-6 for 30 s,
|
|
152
154
|
8-12 for 60 s), each carrying one or two script lines, with timings that sum to exactly D seconds:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
3-6. One keystone per key feature (3 at 30 s; up to 5-6 at 60 s, each sourced), each a short caption plus a real capture when one exists, otherwise a simple animated
|
|
157
|
-
diagram or kinetic type built from shapes, SVG, or canvas. Never invent a screenshot.
|
|
158
|
-
7. Closing card — the project's name and the close from `<call_to_action>`.
|
|
155
|
+
one keystone (or two) per scene of `<video_structure>`. Feature moments carry a short caption plus a
|
|
156
|
+
real capture when one exists, otherwise a simple animated diagram or kinetic type built from shapes,
|
|
157
|
+
SVG, or canvas. Never invent a screenshot.
|
|
159
158
|
|
|
160
159
|
The character appears in most scenes per `<character>`; the style follows `<styles>`. Keep every
|
|
161
160
|
caption at 12 words or fewer, and hold each scene on screen long enough to read twice.
|
|
@@ -230,27 +229,24 @@ for start, end, line, voice in SCENES:
|
|
|
230
229
|
clip = samples[: len(buf) - at]
|
|
231
230
|
buf[at : at + len(clip)] += clip
|
|
232
231
|
soundfile.write('narration.wav', buf, sr)
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
232
|
+
# The soundtrack is the kit's mix (<kit>): spec.json is
|
|
233
|
+
# { "narrationWav": "narration.wav", "cues": [...], "style": "...", "lengthS": D, "out": "mix.mp3" }
|
|
234
|
+
KIT = os.path.expanduser('~/.claude/session-manager/demo-video-kit')
|
|
235
|
+
subprocess.run(['node', f'{KIT}/sound.cjs', 'spec.json'], check=True)
|
|
236
|
+
b64 = base64.b64encode(open('mix.mp3', 'rb').read()).decode()
|
|
237
237
|
html = open('template.html').read() # your finished HTML with the placeholder below
|
|
238
238
|
html = html.replace('AUDIO_B64_PLACEHOLDER', b64) # <audio src="data:audio/mpeg;base64,AUDIO_B64_PLACEHOLDER">
|
|
239
239
|
open('demo.html', 'w').write(html)
|
|
240
240
|
```
|
|
241
241
|
|
|
242
|
-
Keep the
|
|
243
|
-
~48 kbps makes speech sound crushed (a 30 s track is only ~235 KB, 60 s about 470 KB). Keep the whole document
|
|
244
|
-
under the 2 MB cap.
|
|
245
|
-
- Keep the recipe's `LOUDNESS` filter. Raw Kokoro speech sits near -23 LUFS and can clip; the filter
|
|
246
|
-
brings it to about -15 LUFS with room under 0 dBFS, so it holds up beside other web video.
|
|
242
|
+
Keep the whole document under the 2 MB cap.
|
|
247
243
|
- Wire `play()`/`pause()`/`seek(t)` to the `<audio>` element too (`audio.currentTime = t` on
|
|
248
244
|
seek) so narration never drifts from the visual clock; call `.play()` on load and, on rejection
|
|
249
245
|
(autoplay-blocked), show a small "tap for sound" button instead of failing silently.
|
|
250
246
|
- Never write the literal pattern `function (` or `function(` in the inline `<script>` —
|
|
251
247
|
`project_video_write`'s safety scanner blocks anything matching `/\bFunction\s*\(/i`.
|
|
252
248
|
Use arrow functions (`() => { ... }`) throughout.
|
|
253
|
-
- Save the built file by path (see `<process>` step
|
|
249
|
+
- Save the built file by path (see `<process>` step 8). Never retype the base64 audio into a tool
|
|
254
250
|
argument — a ~300 KB payload retyped by the model is exactly how a run once shipped silent.
|
|
255
251
|
</audio_policy>
|
|
256
252
|
|
|
@@ -264,17 +260,16 @@ open('demo.html', 'w').write(html)
|
|
|
264
260
|
`<script_first>`, ending on the close from `<call_to_action>`.
|
|
265
261
|
4. Choose the style per `<styles>` and design the mascot per `<character>`.
|
|
266
262
|
5. Write the storyboard per `<storyboard>`, with scene timings summing to exactly D seconds.
|
|
267
|
-
6. Build the HTML per `<output_contract>` (with `<dynamic_elements>`) and the
|
|
268
|
-
`<audio_policy
|
|
269
|
-
|
|
263
|
+
6. Build the HTML per `<output_contract>` (with `<dynamic_elements>`) and the soundtrack per
|
|
264
|
+
`<audio_policy>` (narration, then the kit's mix), ending with the final document written to a
|
|
265
|
+
file (`demo.html`) whose `<audio>` tag carries the mix.
|
|
270
266
|
7. Self-check before saving: run the kit per `<kit>` (checks.cjs and frames.cjs must pass); keystone durations sum to D, each keystone is on screen at least 5 s with a move of at least 1.0 s, the duration meta and smDemo.duration both say D, in Animated whiteboard every keystone has at least 6 drawn elements and only the allowed palette, every caption traces to a claim in your
|
|
271
267
|
list, the character appears, at least 3 dynamic elements are present, the style matches the
|
|
272
268
|
choice, every spoken line and caption passes `<audience_and_language>`, the close follows
|
|
273
|
-
`<call_to_action>`,
|
|
274
|
-
|
|
275
|
-
8.
|
|
276
|
-
9.
|
|
277
|
-
10. Report back the audience, the style, the character, the close, the length D, and the scenes as one short
|
|
269
|
+
`<call_to_action>`, sound.cjs reported the mix at -14 LUFS, and the document contains none of the
|
|
270
|
+
forbidden network APIs.
|
|
271
|
+
8. Call `project_video_write` exactly once with `{ videoId, title, kind, lengthS, htmlPath, meta }`: `videoId` is the 'Entry id' line, `htmlPath` the absolute path of the built file (never pass the document in `html`; retyping base64 is how narration got lost). `meta` takes only these keys: `title`; `kind` (`project-demo`, `blog-post` or `feature`); `target` (the `Video target:` text; omit it for a Project demo); `style`; `lengthS`; `character` (null with no mascot); `sources` (each `{claim, source, ref}`; for a Blog post `source` is the verbatim span); `report` (the kit checks result); `macroVersion`; `seedVersion`; `model`; `effort`. Any other key is rejected. It validates the document and writes it as that video.
|
|
272
|
+
9. Report back the audience, the style, the character, the close, the length D, and the scenes as one short
|
|
278
273
|
list — scene, timing, and the claim behind it.
|
|
279
274
|
</process>
|
|
280
275
|
|
|
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Bash, Edit, Write
|
|
|
5
5
|
model: sonnet
|
|
6
6
|
effort: medium
|
|
7
7
|
title: Engineering — Software Engineer
|
|
8
|
-
seedVersion:
|
|
8
|
+
seedVersion: 6
|
|
9
9
|
executorOnly: true
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -26,9 +26,9 @@ points you at), and the project's own files.
|
|
|
26
26
|
this PRD) reads this report to decide what happens next; a report that just restates the PRD is
|
|
27
27
|
not useful.
|
|
28
28
|
|
|
29
|
-
## Run contract (execute in this order
|
|
29
|
+
## Run contract (execute in this order)
|
|
30
30
|
|
|
31
|
-
0. ORIENT.
|
|
31
|
+
0. ORIENT. Read the PRD's `# Files` section and the `Read first:` list in its implementation notes, then read those files, before anything else; don't re-survey the repo. Why: the PRD already decided what you need, and the run has a wall-clock budget.
|
|
32
32
|
1. RED. Write or extend the test the PRD names so it fails for the right reason. Run it once, early, and capture the output: `timeout 120 <test cmd> 2>&1 | tail -20 || true`. Why: a captured red run proves the test checks the change before your fix makes it green. If the PRD changes only docs or config and names no test, skip this step.
|
|
33
33
|
2. BUILD. Change only the files listed in `# Files`. If you need another file, change it and say why in your report. Why: an edit outside the list collides with another PRD's own edit to that file.
|
|
34
34
|
3. FINISH. Follow the SCHEDULER FINISH PROTOCOL at the end of your prompt — do not run the gate, commit, or print a verdict yourself outside it. That protocol runs the `# Gate` commands in order, commits with exact paths, and prints the scheduler's own last line, `SCHEDULER_VERDICT: PASS`, only when the gate came back green and the commit landed.
|