claude-code-session-manager 0.134.0 → 0.135.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/assets/{AgentLibrary-C9KFGJQq.js → AgentLibrary-BBY7E1ag.js} +1 -1
- package/dist/assets/{AppSettings-CvVQ6ot5.js → AppSettings-vMiIi0xn.js} +1 -1
- package/dist/assets/{Button-BHvploNk.js → Button-C0Z090Ui.js} +1 -1
- package/dist/assets/{DocumentEditorPane-DaX4xag_.js → DocumentEditorPane-Ds10W8SZ.js} +1 -1
- package/dist/assets/{Extensions-DbRY-KEz.js → Extensions-CjPiz2I5.js} +2 -2
- package/dist/assets/{History-BE_mjM24.js → History-Bm3KXXs1.js} +1 -1
- package/dist/assets/{Library-I37dQ6pB.js → Library-D-khizDg.js} +1 -1
- package/dist/assets/{ListDetail-DJYMWYQd.js → ListDetail-CJYpp8fW.js} +1 -1
- package/dist/assets/{Panel-DP8eSKSs.js → Panel-BHFGylfy.js} +1 -1
- package/dist/assets/{ProjectClaudeConfig-Cw8lc3Qi.js → ProjectClaudeConfig-DIzNAala.js} +1 -1
- package/dist/assets/{ProvenanceBadge-DUwhsmdA.js → ProvenanceBadge-CYryeTYF.js} +1 -1
- package/dist/assets/{Scheduler-B9D2gZqs.js → Scheduler-BS82wfRP.js} +1 -1
- package/dist/assets/{Settings-DSk7bn-1.js → Settings-DWPHJ94d.js} +1 -1
- package/dist/assets/{SkillReferenceGraph-DtJcJJHR.js → SkillReferenceGraph-Cf2M7YNq.js} +1 -1
- package/dist/assets/{Skills-BPZnSjsB.js → Skills-DLq55Odf.js} +1 -1
- package/dist/assets/{SourceChip-DUxulNOp.js → SourceChip-CHxAzRlD.js} +1 -1
- package/dist/assets/{SystemPrompt-BXAugVle.js → SystemPrompt-BYtKMAr3.js} +1 -1
- package/dist/assets/{TiptapBody-CDC1vrOo.js → TiptapBody-O_Gfq0Ha.js} +1 -1
- package/dist/assets/{Toggle-CrgM7OTR.js → Toggle-BJOUI5NY.js} +1 -1
- package/dist/assets/{ViewTabs-DLwaU9RB.js → ViewTabs-kkvNGu-S.js} +1 -1
- package/dist/assets/{VoiceButton-C4hIBxIP.js → VoiceButton-3i-6ju2L.js} +1 -1
- package/dist/assets/{historyTotals-itA00dXm.js → historyTotals-CHrIptK1.js} +1 -1
- package/dist/assets/{index-Cjt8B7H9.css → index-CjQ_p5y7.css} +1 -1
- package/dist/assets/{index-Cznhnxhq.js → index-D9qgN9_V.js} +362 -362
- package/dist/index.html +2 -2
- package/dist-web/app.css +1 -1
- package/dist-web/app.js +392 -392
- package/package.json +1 -1
- package/plugins/CLAUDE.md +7 -8
- package/plugins/session-manager-dev/.claude-plugin/plugin.json +1 -1
- package/plugins/session-manager-dev/skills/builder/SKILL.md +113 -91
- package/plugins/session-manager-dev/skills/builder/manual.md +80 -0
- package/plugins/session-manager-dev/skills/develop/SKILL.md +29 -56
- package/plugins/session-manager-dev/skills/develop/standards.md +12 -20
- package/plugins/session-manager-dev/skills/send-feedback/SKILL.md +13 -18
- package/src/main/build-info.json +4 -4
- package/src/main/lib/CLAUDE.md +2 -0
- package/src/main/lib/epic/epicTranscriptPath.cjs +5 -4
- package/src/main/lib/epic/restorableSessions.cjs +16 -8
- package/src/main/lib/persona-macro/macroJobDispatch.cjs +3 -2
- package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +34 -0
- package/src/main/lib/prd/prdFrontmatter.cjs +25 -1
- package/src/main/lib/scheduler/scheduleJobSchema.cjs +3 -0
- package/src/main/promptSessionEvents.cjs +7 -1
- package/src/main/runVerify.cjs +2 -2
- package/src/main/scheduler/prdParser.cjs +17 -1
- package/src/main/scheduler.cjs +137 -15
- package/src/main/templates/PRD_AUTHORING.md +2 -2
- package/src/preload/api.d.ts +8 -2
- package/src/seed/agents/demo-video-builder.md +25 -32
- package/src/seed/agents/dev-lead.md +3 -3
- package/src/seed/agents/project-home-builder.md +4 -2
- package/plugins/session-manager-dev/skills/builder/0-diff/SKILL.md +0 -44
- package/plugins/session-manager-dev/skills/builder/1-classify-and-bump/SKILL.md +0 -37
- package/plugins/session-manager-dev/skills/builder/2-gate/SKILL.md +0 -37
- package/plugins/session-manager-dev/skills/builder/3-publish/SKILL.md +0 -137
- package/plugins/session-manager-dev/skills/builder/4-manual/SKILL.md +0 -124
- package/plugins/session-manager-dev/skills/builder/5-report/SKILL.md +0 -35
package/src/main/scheduler.cjs
CHANGED
|
@@ -77,7 +77,8 @@ const {
|
|
|
77
77
|
findLiveProcessForJob, logHasOutput, resolvePidlessGateOutcome, resolveCommitGuardOutcome,
|
|
78
78
|
readSpawnedPidFromLog, readLogMtimeMs, isClaudeArgv,
|
|
79
79
|
} = require('./lib/scheduler/reaperHelpers.cjs');
|
|
80
|
-
const { resolveProjectRoot, ensureRuntimeIgnores, RUNTIME_NAMESPACES } = require('./lib/opsOwnership.cjs');
|
|
80
|
+
const { resolveProjectRoot, ensureRuntimeIgnores, RUNTIME_NAMESPACES, opsPath } = require('./lib/opsOwnership.cjs');
|
|
81
|
+
const { BUILTIN_MACROS } = require('./lib/persona-macro/builtinMacros.cjs');
|
|
81
82
|
const { sweepStrandedJobBranches } = require('./lib/git/branchSweep.cjs');
|
|
82
83
|
const { detectRateLimitInLog } = require('./lib/claude/rateLimitDetect.cjs');
|
|
83
84
|
const { stripAppOwnedChurn } = require('./lib/scheduler/jobDirtFilter.cjs');
|
|
@@ -192,7 +193,7 @@ const { reconcileEpicWorktreesOnBoot } = require('./lib/epic/epicWorktreeBoot.cj
|
|
|
192
193
|
const queueStore = require('./lib/scheduler/queueStore.cjs');
|
|
193
194
|
const supervisorRecord = require('./lib/scheduler/jobSupervisorRecord.cjs');
|
|
194
195
|
const adoptedRunSupervisor = require('./lib/scheduler/adoptedRunSupervisor.cjs');
|
|
195
|
-
const { splitFrontmatter, parsePrdFile, serializePrdFile } = require('./lib/prd/prdFrontmatter.cjs');
|
|
196
|
+
const { splitFrontmatter, parsePrdFile, serializePrdFile, isArtifactOnlyDeclaration } = require('./lib/prd/prdFrontmatter.cjs');
|
|
196
197
|
const { applyStructuredPrdPatch } = require('./lib/prd/prdBodyPatch.cjs');
|
|
197
198
|
const { resolvePersonaDefaultEstimate, DEFAULT_PRD_AGENT_TYPE } = require('./lib/prd/prdAgentType.cjs');
|
|
198
199
|
const { resolveDepSlug, findNearMatches } = require('./lib/prd/depSlugResolve.cjs');
|
|
@@ -305,7 +306,14 @@ const BASH_MAX_TIMEOUT_MS = 900_000; // 15 min — must stay below IDLE_OUTPUT_K
|
|
|
305
306
|
// `git add <path>`, the SCHEDULER_VERDICT lines, `/code-review medium --fix`
|
|
306
307
|
// and the "Never call /code-review with no level, or at xhigh, max or ultra"
|
|
307
308
|
// ban — PRD 2887: a level-less call took the session's max effort and outlived
|
|
308
|
-
// the job budget) — keep them exact.
|
|
309
|
+
// the job budget) — keep them exact.
|
|
310
|
+
//
|
|
311
|
+
// `isArtifactOnly: true` (PRD 3109) adds one VERDICT bullet and one COMMIT
|
|
312
|
+
// sentence for a PRD whose frontmatter declares deliverable: artifact +
|
|
313
|
+
// artifactPaths: it commits nothing by design, and runVerify already accepts
|
|
314
|
+
// its no-commit PASS (pass_no_commit_artifact_verified). Without the variant
|
|
315
|
+
// Self job 826-project-home-build saved its page, ran a green gate, and still
|
|
316
|
+
// printed a false FAIL for the missing commit (parked in needs_review). No line
|
|
309
317
|
// of this text may START with SCHEDULER_VERDICT: or FOREIGN_WIP_PATHS: —
|
|
310
318
|
// runVerify's scanners are line-anchored.
|
|
311
319
|
function buildFinishHead(verifyStepNum) {
|
|
@@ -370,7 +378,20 @@ const FINISH_FIX_PLAN_VERDICT_LINE = `
|
|
|
370
378
|
An auto fix plan whose steps changed no file has nothing to commit
|
|
371
379
|
and prints PASS when the gate is green. Do not invent a commit to have one.`;
|
|
372
380
|
|
|
373
|
-
|
|
381
|
+
// Artifact-only VERDICT bullet + COMMIT sentence (PRD 3109): a PRD with
|
|
382
|
+
// deliverable: artifact + artifactPaths commits nothing by design, and
|
|
383
|
+
// runVerify's artifact exemption already accepts its no-commit PASS — so say
|
|
384
|
+
// so, or "PASS needs a landed commit" yields a false FAIL after a green gate.
|
|
385
|
+
const FINISH_ARTIFACT_ONLY_VERDICT_LINE = `
|
|
386
|
+
- This job is artifact-only: its PRD declares deliverable: artifact.
|
|
387
|
+
It commits nothing by design, so no commit is expected. When the
|
|
388
|
+
gate is green and the tree is clean, print PASS. Never print FAIL
|
|
389
|
+
for the missing commit, and do not invent a commit to have one.`;
|
|
390
|
+
|
|
391
|
+
const FINISH_ARTIFACT_ONLY_COMMIT_LINE = `
|
|
392
|
+
This job is artifact-only: its output is git-excluded, so there is nothing to stage. Skip the commit and go to the next step.`;
|
|
393
|
+
|
|
394
|
+
function buildFinishTail({ verifyStepNum, commitStepNum, verdictStepNum, isFixPlan = false, isArtifactOnly = false }) {
|
|
374
395
|
return `${verifyStepNum}. VERIFY — run every command in the PRD's \`# Gate\` section, in order, in the
|
|
375
396
|
foreground. Each must exit 0. If the PRD has no \`# Gate\` section, run the
|
|
376
397
|
project's own typecheck, lint and test commands instead. The project's
|
|
@@ -390,13 +411,13 @@ ${commitStepNum}. COMMIT — stage only the exact paths you created or changed f
|
|
|
390
411
|
Never commit any file under these folders, even when the PRD names it:
|
|
391
412
|
${FINISH_RUNTIME_FOLDERS}
|
|
392
413
|
Why: those folders hold the app's live state. A commit of them breaks the
|
|
393
|
-
running scheduler for every checkout that pulls it
|
|
414
|
+
running scheduler for every checkout that pulls it.${isArtifactOnly ? FINISH_ARTIFACT_ONLY_COMMIT_LINE : ''}
|
|
394
415
|
${verdictStepNum}. VERDICT LINE — end your final report with exactly one of these lines.
|
|
395
416
|
Put nothing after it, except the FOREIGN_WIP_PATHS line described below.
|
|
396
417
|
SCHEDULER_VERDICT: PASS
|
|
397
418
|
SCHEDULER_VERDICT: FAIL <one-line reason>
|
|
398
419
|
SCHEDULER_VERDICT: BLOCKED_BY_FOREIGN_WIP
|
|
399
|
-
- Print PASS only when the gate is green AND the commit from step ${commitStepNum} landed.${isFixPlan ? FINISH_FIX_PLAN_VERDICT_LINE : ''}
|
|
420
|
+
- Print PASS only when the gate is green AND the commit from step ${commitStepNum} landed.${isFixPlan ? FINISH_FIX_PLAN_VERDICT_LINE : ''}${isArtifactOnly ? FINISH_ARTIFACT_ONLY_VERDICT_LINE : ''}
|
|
400
421
|
- Print FAIL when the gate is red or the commit could not land. Also print
|
|
401
422
|
FAIL when a step needs something this run cannot reach (live runtime
|
|
402
423
|
state, credentials, an account or dashboard action, a host install): do
|
|
@@ -439,14 +460,20 @@ in your final report.`;
|
|
|
439
460
|
* `isFixPlan: true` (auto fix-plan jobs only) adds one VERDICT bullet: a fix
|
|
440
461
|
* plan that changed no file has nothing to commit and prints PASS on a green
|
|
441
462
|
* gate. Omitted/false leaves the text unchanged.
|
|
463
|
+
* `isArtifactOnly: true` (PRDs whose own frontmatter has deliverable:
|
|
464
|
+
* artifact + non-empty artifactPaths — PRD 3109) adds one VERDICT bullet
|
|
465
|
+
* (after the fix-plan bullet when both are set) and one COMMIT sentence: the
|
|
466
|
+
* job commits nothing by design and prints PASS on a green gate with a clean
|
|
467
|
+
* tree, never FAIL for the missing commit. Self job 826 printed exactly that
|
|
468
|
+
* false FAIL. Omitted/false leaves the text unchanged.
|
|
442
469
|
*/
|
|
443
|
-
function buildFinishProtocol({ reviewInRun = true, isFixPlan = false } = {}) {
|
|
470
|
+
function buildFinishProtocol({ reviewInRun = true, isFixPlan = false, isArtifactOnly = false } = {}) {
|
|
444
471
|
if (reviewInRun) {
|
|
445
472
|
return buildFinishHead(3) + FINISH_REVIEW_STEPS_IN_RUN
|
|
446
|
-
+ buildFinishTail({ verifyStepNum: 3, commitStepNum: 4, verdictStepNum: 5, isFixPlan });
|
|
473
|
+
+ buildFinishTail({ verifyStepNum: 3, commitStepNum: 4, verdictStepNum: 5, isFixPlan, isArtifactOnly });
|
|
447
474
|
}
|
|
448
475
|
return buildFinishHead(2) + FINISH_REVIEW_STEP_DEFERRED
|
|
449
|
-
+ buildFinishTail({ verifyStepNum: 2, commitStepNum: 3, verdictStepNum: 4, isFixPlan });
|
|
476
|
+
+ buildFinishTail({ verifyStepNum: 2, commitStepNum: 3, verdictStepNum: 4, isFixPlan, isArtifactOnly });
|
|
450
477
|
}
|
|
451
478
|
|
|
452
479
|
const FINISH_PROTOCOL = buildFinishProtocol({ reviewInRun: true });
|
|
@@ -1851,6 +1878,8 @@ async function reconcilePass(state) {
|
|
|
1851
1878
|
bodyPreview: p.body.split('\n').slice(0, 6).join('\n'),
|
|
1852
1879
|
agentType: p.agentType ?? job.agentType ?? null,
|
|
1853
1880
|
macroId: p.macroId ?? job.macroId ?? null,
|
|
1881
|
+
deliverable: p.deliverable ?? job.deliverable ?? null,
|
|
1882
|
+
artifactPaths: p.artifactPaths ?? job.artifactPaths ?? null,
|
|
1854
1883
|
effort: p.effort ?? job.effort ?? null,
|
|
1855
1884
|
};
|
|
1856
1885
|
// Adopt path: a row parked 'quarantined' (no createdVia provenance when
|
|
@@ -1976,6 +2005,8 @@ async function reconcilePass(state) {
|
|
|
1976
2005
|
bodyPreview: p.body.split('\n').slice(0, 6).join('\n'),
|
|
1977
2006
|
agentType: p.agentType ?? inv.row?.agentType ?? null,
|
|
1978
2007
|
macroId: p.macroId ?? inv.row?.macroId ?? null,
|
|
2008
|
+
deliverable: p.deliverable ?? inv.row?.deliverable ?? null,
|
|
2009
|
+
artifactPaths: p.artifactPaths ?? inv.row?.artifactPaths ?? null,
|
|
1979
2010
|
effort: p.effort ?? inv.row?.effort ?? null,
|
|
1980
2011
|
};
|
|
1981
2012
|
const reason = `reconcile: repaired invalid status ${JSON.stringify(oldStatus)}`;
|
|
@@ -2129,6 +2160,8 @@ async function reconcilePass(state) {
|
|
|
2129
2160
|
bodyPreview: p.body.split('\n').slice(0, 6).join('\n'),
|
|
2130
2161
|
agentType: p.agentType ?? null,
|
|
2131
2162
|
macroId: p.macroId ?? null,
|
|
2163
|
+
deliverable: p.deliverable ?? null,
|
|
2164
|
+
artifactPaths: p.artifactPaths ?? null,
|
|
2132
2165
|
effort: p.effort ?? null,
|
|
2133
2166
|
status: 'pending',
|
|
2134
2167
|
// Enqueue time (PRD 1086/1087): the cross-project fairness tiebreak and
|
|
@@ -3193,9 +3226,9 @@ function applyOrphanOutcome(job, outcome, killNote = '', confirmedLandedCommit =
|
|
|
3193
3226
|
|
|
3194
3227
|
function applyOrphanOutcomeInner(job, outcome, killNote, confirmedLandedCommit, snap, now) {
|
|
3195
3228
|
// A reported 'success' completes only on landed-commit evidence, or for a
|
|
3196
|
-
// DECLARED artifact-only PRD (`deliverable: artifact` + artifactPaths —
|
|
3197
|
-
//
|
|
3198
|
-
const artifactOnly =
|
|
3229
|
+
// DECLARED artifact-only PRD (`deliverable: artifact` + artifactPaths — the
|
|
3230
|
+
// shared isArtifactOnlyDeclaration predicate) where no commit is legitimate.
|
|
3231
|
+
const artifactOnly = isArtifactOnlyDeclaration(job);
|
|
3199
3232
|
if (outcome === 'success' && (confirmedLandedCommit || artifactOnly)) {
|
|
3200
3233
|
if (confirmedLandedCommit) {
|
|
3201
3234
|
transitionJob(job, 'completed', { reason: `boot orphan reconciliation: run succeeded, landedCommit ${confirmedLandedCommit} resolves`, source: 'applyOrphanOutcome:landed' });
|
|
@@ -3450,6 +3483,77 @@ function armSettleAfterValidatorBudgetKill(job, { scheduleSettle = defaultSchedu
|
|
|
3450
3483
|
}
|
|
3451
3484
|
}
|
|
3452
3485
|
|
|
3486
|
+
// PRD 3116: a macro's background-build PRD (frontmatter `macroId`) ends with
|
|
3487
|
+
// a DONE/FAILED notice naming what was saved, not the generic "PRD finished"
|
|
3488
|
+
// line — the generic line read as "idle" and owners typed into the Epic to
|
|
3489
|
+
// "start" a build that had already finished.
|
|
3490
|
+
const MACRO_ARTIFACT_RE = /^session-manager-operations\/project-pages\/(videos|knowledge)\/([a-z0-9-]+)\/index\.html$/;
|
|
3491
|
+
const MACRO_META_MAX_BYTES = 256 * 1024;
|
|
3492
|
+
|
|
3493
|
+
function macroLabelFor(prd) {
|
|
3494
|
+
const builtin = BUILTIN_MACROS.find((m) => m && m.id === prd.macroId);
|
|
3495
|
+
if (builtin && typeof builtin.label === 'string' && builtin.label) return builtin.label;
|
|
3496
|
+
const title = typeof prd.title === 'string' ? prd.title.replace(/:\s*background build\s*$/i, '').trim() : '';
|
|
3497
|
+
return title || prd.macroId;
|
|
3498
|
+
}
|
|
3499
|
+
|
|
3500
|
+
/**
|
|
3501
|
+
* readMacroBuildOutput(cwd, prd) → { kind, id, title, meta } | null
|
|
3502
|
+
* Never throws. The entry id must match /^[a-z0-9-]+$/; the meta.json path is
|
|
3503
|
+
* built with opsPath, never from the raw frontmatter string.
|
|
3504
|
+
*/
|
|
3505
|
+
function readMacroBuildOutput(cwd, prd) {
|
|
3506
|
+
try {
|
|
3507
|
+
if (!cwd) return null;
|
|
3508
|
+
const first = Array.isArray(prd.artifactPaths) ? prd.artifactPaths[0] : null;
|
|
3509
|
+
if (typeof first !== 'string') return null;
|
|
3510
|
+
const m = MACRO_ARTIFACT_RE.exec(first.trim());
|
|
3511
|
+
if (!m) return null;
|
|
3512
|
+
const dir = m[1];
|
|
3513
|
+
const id = m[2];
|
|
3514
|
+
const metaPath = opsPath(cwd, 'project-pages', dir, id, 'meta.json');
|
|
3515
|
+
const st = fs.statSync(metaPath);
|
|
3516
|
+
if (!st.isFile() || st.size > MACRO_META_MAX_BYTES) return null;
|
|
3517
|
+
const meta = JSON.parse(fs.readFileSync(metaPath, 'utf8'));
|
|
3518
|
+
if (!meta || typeof meta !== 'object' || typeof meta.title !== 'string' || !meta.title.trim()) return null;
|
|
3519
|
+
return { kind: dir === 'videos' ? 'video' : 'knowledge', id, title: meta.title.trim(), meta };
|
|
3520
|
+
} catch {
|
|
3521
|
+
return null;
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
|
|
3525
|
+
/**
|
|
3526
|
+
* macroBuildNotice(job, prd) → { message, notice, buildOutput? } | null
|
|
3527
|
+
* null for any PRD without a `macroId`, or a status other than completed/failed.
|
|
3528
|
+
*/
|
|
3529
|
+
function macroBuildNotice(job, prd) {
|
|
3530
|
+
if (!prd || typeof prd.macroId !== 'string' || !prd.macroId) return null;
|
|
3531
|
+
if (job.status !== 'completed' && job.status !== 'failed') return null;
|
|
3532
|
+
const label = macroLabelFor(prd);
|
|
3533
|
+
if (job.status === 'failed') {
|
|
3534
|
+
const reason = job.error || job.verifierVerdict || job.status;
|
|
3535
|
+
return {
|
|
3536
|
+
message: `FAILED — ${label}: the background build failed (${reason}). Press it again in Project Home to retry.`,
|
|
3537
|
+
notice: 'build-failed',
|
|
3538
|
+
};
|
|
3539
|
+
}
|
|
3540
|
+
const out = readMacroBuildOutput(job.cwd, prd);
|
|
3541
|
+
if (!out) return { message: `DONE — ${label} finished.`, notice: 'build-done' };
|
|
3542
|
+
const buildOutput = { kind: out.kind, id: out.id, title: out.title };
|
|
3543
|
+
if (out.kind === 'video') {
|
|
3544
|
+
return {
|
|
3545
|
+
message: `DONE — ${label}: “${out.title}” is saved (${out.meta.lengthS} s · ${out.meta.style}). Watch it in Project Home ▸ Videos.`,
|
|
3546
|
+
notice: 'build-done',
|
|
3547
|
+
buildOutput,
|
|
3548
|
+
};
|
|
3549
|
+
}
|
|
3550
|
+
return {
|
|
3551
|
+
message: `DONE — ${label}: “${out.title}” is saved. Read it in Project Home ▸ Pages.`,
|
|
3552
|
+
notice: 'build-done',
|
|
3553
|
+
buildOutput,
|
|
3554
|
+
};
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3453
3557
|
/**
|
|
3454
3558
|
* notifyOriginatingTab(job) → void
|
|
3455
3559
|
*
|
|
@@ -3508,6 +3612,8 @@ async function notifyOriginatingTab(job, {
|
|
|
3508
3612
|
message = `PRD ${job.slug} was skipped: its PRD source could not be found on disk. Blocked dependents: ${shown}${more}.`
|
|
3509
3613
|
+ ' If the PRD file exists, run scheduler_reset_job with force:true; if it was intentionally removed, archive it with scheduler_archive_prd.';
|
|
3510
3614
|
}
|
|
3615
|
+
const macroNotice = macroBuildNotice(job, prd);
|
|
3616
|
+
if (macroNotice) message = macroNotice.message;
|
|
3511
3617
|
|
|
3512
3618
|
// The EPIC this check-in belongs to. Deliberately does NOT consider
|
|
3513
3619
|
// `sourceTabId` — that is a Terminal tab id, not an Epic id, and
|
|
@@ -3609,6 +3715,8 @@ async function notifyOriginatingTab(job, {
|
|
|
3609
3715
|
outcome: job.status,
|
|
3610
3716
|
validation: 'unvalidated',
|
|
3611
3717
|
...(typeof job.agentType === 'string' ? { agentType: job.agentType } : {}),
|
|
3718
|
+
...(macroNotice ? { notice: macroNotice.notice } : {}),
|
|
3719
|
+
...(macroNotice && macroNotice.buildOutput ? { buildOutput: macroNotice.buildOutput } : {}),
|
|
3612
3720
|
}).catch((e) => {
|
|
3613
3721
|
console.error('[scheduler] notifyOriginatingTab appendResponseEvent error', job?.slug, e);
|
|
3614
3722
|
return false;
|
|
@@ -4884,7 +4992,20 @@ async function executeJob(job, runDir, defaultCwd, onPid, execCwd, resumeTarget
|
|
|
4884
4992
|
// Always route through composeExecutorPrompt (even with an empty digest)
|
|
4885
4993
|
// so the finish protocol is appended in the prompt's tail exactly once,
|
|
4886
4994
|
// after any digest fence rather than concatenated ahead of it.
|
|
4887
|
-
|
|
4995
|
+
// Artifact-only finish variant (PRD 3109): read from the PRD FILE's own
|
|
4996
|
+
// frontmatter — queue rows and parsePrd()'s result carry no
|
|
4997
|
+
// deliverable/artifactPaths, so job.* would always be false. Uses the shared
|
|
4998
|
+
// isArtifactOnlyDeclaration predicate; any read/parse failure → false.
|
|
4999
|
+
let isArtifactOnly = false;
|
|
5000
|
+
if (prdPath) {
|
|
5001
|
+
try {
|
|
5002
|
+
const fm = parsePrdFile(await fsp.readFile(prdPath, 'utf8')).frontmatter;
|
|
5003
|
+
isArtifactOnly = isArtifactOnlyDeclaration(fm);
|
|
5004
|
+
} catch {
|
|
5005
|
+
isArtifactOnly = false;
|
|
5006
|
+
}
|
|
5007
|
+
}
|
|
5008
|
+
prompt = composeExecutorPrompt({ prdBody: prompt, digestText, finishProtocol: buildFinishProtocol({ reviewInRun, isFixPlan: resolveIsFixPlan(job.slug, job.isFixPlan), isArtifactOnly }) });
|
|
4888
5009
|
|
|
4889
5010
|
// Foreign-WIP manifest (starry-night-ships PRD 148 postmortem): the
|
|
4890
5011
|
// scheduler already knows, at spawn time, which dirty paths this job did
|
|
@@ -8959,7 +9080,6 @@ async function reapDeadRunningJobs() {
|
|
|
8959
9080
|
// -1 commit count or a missing checkout (runMadeCommit null) or an
|
|
8960
9081
|
// unreadable status (dirt null) keeps the pre-guard behaviour.
|
|
8961
9082
|
if (runMadeCommit !== null && dirt !== null) {
|
|
8962
|
-
const artifactPaths = row.artifactPaths;
|
|
8963
9083
|
const guardVerdict = commitGuardVerdict({
|
|
8964
9084
|
newlyDirty: dirt,
|
|
8965
9085
|
siblingRunning: false,
|
|
@@ -8967,7 +9087,7 @@ async function reapDeadRunningJobs() {
|
|
|
8967
9087
|
jobSelfCommitted: runMadeCommit,
|
|
8968
9088
|
legitimateNoOp: false,
|
|
8969
9089
|
isFixPlanJob: resolveIsFixPlan(d.slug, row.isFixPlan),
|
|
8970
|
-
artifactVerified: row
|
|
9090
|
+
artifactVerified: isArtifactOnlyDeclaration(row),
|
|
8971
9091
|
verifyResult: null,
|
|
8972
9092
|
salvagePatch,
|
|
8973
9093
|
});
|
|
@@ -11610,6 +11730,8 @@ async function listPrdsInternal({ cwd: rawCwd } = {}) {
|
|
|
11610
11730
|
dependsOn: parsed.dependsOn ?? null,
|
|
11611
11731
|
agentType: parsed.agentType ?? null,
|
|
11612
11732
|
macroId: parsed.macroId ?? null,
|
|
11733
|
+
deliverable: parsed.deliverable ?? null,
|
|
11734
|
+
artifactPaths: parsed.artifactPaths ?? null,
|
|
11613
11735
|
effort: parsed.effort ?? null,
|
|
11614
11736
|
disposition: parsed.disposition ?? null,
|
|
11615
11737
|
planId: parsed.planId ?? null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- PRD_AUTHORING.md
|
|
1
|
+
<!-- PRD_AUTHORING.md v20 -->
|
|
2
2
|
# PRD Authoring Guide — Scheduler Safety Rules
|
|
3
3
|
|
|
4
4
|
Rule: every PRD you queue follows the rules below.
|
|
@@ -189,7 +189,7 @@ timeout 120 python -m pytest tests/test_repro.py::test_bug 2>&1 | tail -3 || tru
|
|
|
189
189
|
timeout 300 pytest -q # LAST thing the run does
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
The scheduler appends a finish protocol after your PRD's own steps — you never write it: review, then the `# Gate` commands (§6), then commit only the exact paths you created or changed for this PRD, then the verdict line — `SCHEDULER_VERDICT: PASS` once the gate is green and the commit landed, else `SCHEDULER_VERDICT: FAIL <one-line reason>`. Never print `PASS` on a red gate.
|
|
192
|
+
The scheduler appends a finish protocol after your PRD's own steps — you never write it: review, then the `# Gate` commands (§6), then commit only the exact paths you created or changed for this PRD, then the verdict line — `SCHEDULER_VERDICT: PASS` once the gate is green and the commit landed (an artifact-only PRD, §5, lands no commit by design and prints `PASS` once the gate is green and the tree is clean), else `SCHEDULER_VERDICT: FAIL <one-line reason>`. Never print `PASS` on a red gate.
|
|
193
193
|
|
|
194
194
|
---
|
|
195
195
|
|
package/src/preload/api.d.ts
CHANGED
|
@@ -793,6 +793,9 @@ export interface ScheduleJobRuntime {
|
|
|
793
793
|
|
|
794
794
|
export interface ScheduleJob {
|
|
795
795
|
macroId?: string | null;
|
|
796
|
+
/** PRD frontmatter artifact-only declaration (PRD 3114). */
|
|
797
|
+
deliverable?: 'artifact' | null;
|
|
798
|
+
artifactPaths?: string[] | null;
|
|
796
799
|
slug: string;
|
|
797
800
|
title: string;
|
|
798
801
|
cwd: string | null;
|
|
@@ -3008,8 +3011,11 @@ export interface PromptSessionEventAppendedPayload {
|
|
|
3008
3011
|
at: string;
|
|
3009
3012
|
prdSlug?: string;
|
|
3010
3013
|
text?: string;
|
|
3011
|
-
/** 'job-not-queued' = a macro's background build could not be queued for this Epic (macroJobIpc.cjs)
|
|
3012
|
-
|
|
3014
|
+
/** 'job-not-queued' = a macro's background build could not be queued for this Epic (macroJobIpc.cjs);
|
|
3015
|
+
* 'build-done' / 'build-failed' = a macro's background-build PRD finished (scheduler.cjs notifyOriginatingTab). */
|
|
3016
|
+
notice?: 'job-not-queued' | 'build-done' | 'build-failed';
|
|
3017
|
+
/** The saved Project Home entry a 'build-done' notice names, when its meta.json was readable. */
|
|
3018
|
+
buildOutput?: { kind: 'video' | 'knowledge'; id: string; title: string };
|
|
3013
3019
|
};
|
|
3014
3020
|
}
|
|
3015
3021
|
|
|
@@ -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: 12
|
|
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>
|
|
@@ -150,12 +150,9 @@ PRNG (e.g. mulberry32 with a fixed seed) so `seek(t)` stays exact and frames are
|
|
|
150
150
|
<storyboard>
|
|
151
151
|
Before writing any code, turn the script into a storyboard of keystones per `<length_and_pacing>` (5-6 for 30 s,
|
|
152
152
|
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>`.
|
|
153
|
+
one keystone (or two) per scene of `<video_structure>`. Feature moments carry a short caption plus a
|
|
154
|
+
real capture when one exists, otherwise a simple animated diagram or kinetic type built from shapes,
|
|
155
|
+
SVG, or canvas. Never invent a screenshot.
|
|
159
156
|
|
|
160
157
|
The character appears in most scenes per `<character>`; the style follows `<styles>`. Keep every
|
|
161
158
|
caption at 12 words or fewer, and hold each scene on screen long enough to read twice.
|
|
@@ -230,27 +227,24 @@ for start, end, line, voice in SCENES:
|
|
|
230
227
|
clip = samples[: len(buf) - at]
|
|
231
228
|
buf[at : at + len(clip)] += clip
|
|
232
229
|
soundfile.write('narration.wav', buf, sr)
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
230
|
+
# The soundtrack is the kit's mix (<kit>): spec.json is
|
|
231
|
+
# { "narrationWav": "narration.wav", "cues": [...], "style": "...", "lengthS": D, "out": "mix.mp3" }
|
|
232
|
+
KIT = os.path.expanduser('~/.claude/session-manager/demo-video-kit')
|
|
233
|
+
subprocess.run(['node', f'{KIT}/sound.cjs', 'spec.json'], check=True)
|
|
234
|
+
b64 = base64.b64encode(open('mix.mp3', 'rb').read()).decode()
|
|
237
235
|
html = open('template.html').read() # your finished HTML with the placeholder below
|
|
238
236
|
html = html.replace('AUDIO_B64_PLACEHOLDER', b64) # <audio src="data:audio/mpeg;base64,AUDIO_B64_PLACEHOLDER">
|
|
239
237
|
open('demo.html', 'w').write(html)
|
|
240
238
|
```
|
|
241
239
|
|
|
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.
|
|
240
|
+
Keep the whole document under the 2 MB cap.
|
|
247
241
|
- Wire `play()`/`pause()`/`seek(t)` to the `<audio>` element too (`audio.currentTime = t` on
|
|
248
242
|
seek) so narration never drifts from the visual clock; call `.play()` on load and, on rejection
|
|
249
243
|
(autoplay-blocked), show a small "tap for sound" button instead of failing silently.
|
|
250
244
|
- Never write the literal pattern `function (` or `function(` in the inline `<script>` —
|
|
251
245
|
`project_video_write`'s safety scanner blocks anything matching `/\bFunction\s*\(/i`.
|
|
252
246
|
Use arrow functions (`() => { ... }`) throughout.
|
|
253
|
-
- Save the built file by path (see `<process>` step
|
|
247
|
+
- Save the built file by path (see `<process>` step 8). Never retype the base64 audio into a tool
|
|
254
248
|
argument — a ~300 KB payload retyped by the model is exactly how a run once shipped silent.
|
|
255
249
|
</audio_policy>
|
|
256
250
|
|
|
@@ -264,17 +258,16 @@ open('demo.html', 'w').write(html)
|
|
|
264
258
|
`<script_first>`, ending on the close from `<call_to_action>`.
|
|
265
259
|
4. Choose the style per `<styles>` and design the mascot per `<character>`.
|
|
266
260
|
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
|
-
|
|
261
|
+
6. Build the HTML per `<output_contract>` (with `<dynamic_elements>`) and the soundtrack per
|
|
262
|
+
`<audio_policy>` (narration, then the kit's mix), ending with the final document written to a
|
|
263
|
+
file (`demo.html`) whose `<audio>` tag carries the mix.
|
|
270
264
|
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
265
|
list, the character appears, at least 3 dynamic elements are present, the style matches the
|
|
272
266
|
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
|
|
267
|
+
`<call_to_action>`, sound.cjs reported the mix at -14 LUFS, and the document contains none of the
|
|
268
|
+
forbidden network APIs.
|
|
269
|
+
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), and `meta` is the full record: the Kind and Target lines, style, audience, `sources` (for a Blog post, verbatim spans), and `report` (the kit checks result). It validates the document and writes it as that video.
|
|
270
|
+
9. Report back the audience, the style, the character, the close, the length D, and the scenes as one short
|
|
278
271
|
list — scene, timing, and the claim behind it.
|
|
279
272
|
</process>
|
|
280
273
|
|
|
@@ -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.
|
|
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Bash, Write, Edit, mcp__session-manager-scheduler__proj
|
|
|
5
5
|
title: Project Home — Builder
|
|
6
6
|
model: sonnet
|
|
7
7
|
effort: medium
|
|
8
|
-
seedVersion:
|
|
8
|
+
seedVersion: 6
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
You are the project-home-builder. You write ONE Knowledge Page per run. The page you produce is often the first thing a person sees
|
|
@@ -77,7 +77,9 @@ Produce exactly one complete HTML document:
|
|
|
77
77
|
5. Call `project_page_write` exactly once with `{ pageId: <Entry id>, title, topic, htmlPath or html }`
|
|
78
78
|
(use `htmlPath`, an absolute path to a .html file you wrote, for a large document). It
|
|
79
79
|
validates the document and writes it as that Knowledge Page.
|
|
80
|
-
6. Report back in one or two lines what the page covers.
|
|
80
|
+
6. Report back in one or two lines what the page covers. When this runs as a scheduled build, its
|
|
81
|
+
PRD forbids committing, so no commit is the expected result: once `project_page_write` returned
|
|
82
|
+
ok and the PRD's gate exits 0, end with SCHEDULER_VERDICT: PASS, never FAIL for the missing commit.
|
|
81
83
|
</process>
|
|
82
84
|
|
|
83
85
|
<when_things_fail>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: builder:diff
|
|
3
|
-
description: Step 0 of builder — determine everything on HEAD that hasn't been published yet. Prefer the project's actual npm registry state over git tags, since a tag can exist without a matching publish (or vice versa); fall back to the last git tag when there's no resolvable package name or no network.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# builder:diff
|
|
7
|
-
|
|
8
|
-
Resolve what "already published" means for this project, then list every commit on `HEAD`
|
|
9
|
-
since that point.
|
|
10
|
-
|
|
11
|
-
## 1. Resolve the build target
|
|
12
|
-
|
|
13
|
-
Read `session-manager-operations/architecture/build-target.json` via
|
|
14
|
-
`resolveBuildTarget(cwd)` in `src/main/lib/buildTarget.cjs` (falls back to `package.json`'s
|
|
15
|
-
`name` if no explicit config exists). If `buildTarget.cjs` isn't present yet in this repo,
|
|
16
|
-
read `package.json`'s `name` field directly and note in the final report that the config
|
|
17
|
-
reader was missing — this does not block the pipeline.
|
|
18
|
-
|
|
19
|
-
## 2. Determine the last published point
|
|
20
|
-
|
|
21
|
-
Preferred: `npm view <packageName> version` — the actual registry state, not just a local
|
|
22
|
-
tag. This catches the case where a tag was pushed but the publish itself failed partway
|
|
23
|
-
(the tag would lie; the registry won't).
|
|
24
|
-
|
|
25
|
-
Fallback (no network, or `npm view` 404s because the package was never published): use the
|
|
26
|
-
last git tag instead — `git describe --tags --abbrev=0`.
|
|
27
|
-
|
|
28
|
-
## 3. Diff
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
git log <last-published-version-or-tag>..HEAD --oneline
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
If `npm view` returned a version not tagged locally, resolve its tag first (`git tag -l
|
|
35
|
-
'v<version>'`); if no matching local tag exists, fall back to comparing against
|
|
36
|
-
`git describe --tags --abbrev=0` and note the discrepancy in the report.
|
|
37
|
-
|
|
38
|
-
## Output
|
|
39
|
-
|
|
40
|
-
- The resolved package name and last-published version/tag (and which method resolved it —
|
|
41
|
-
registry or git tag).
|
|
42
|
-
- The full commit list (subject lines) since that point.
|
|
43
|
-
- If the list is empty: stop here and report "nothing to publish" — do not proceed to
|
|
44
|
-
`builder:classify-and-bump`.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: builder:classify-and-bump
|
|
3
|
-
description: Step 1 of builder — parse conventional-commit prefixes from the commit list produced by builder:diff and decide the semver bump. Never guess when the history doesn't follow the convention — ask the user instead.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# builder:classify-and-bump
|
|
7
|
-
|
|
8
|
-
Classify every commit subject from `builder:diff`'s output and pick the highest-severity
|
|
9
|
-
bump that applies.
|
|
10
|
-
|
|
11
|
-
## Rules (conventional commits)
|
|
12
|
-
|
|
13
|
-
- Any commit containing `BREAKING CHANGE:` in its body, or a `!:` right after the type/scope
|
|
14
|
-
(e.g. `feat(api)!:`) → **major**.
|
|
15
|
-
- Any `feat:`/`feat(scope):` commit (and no breaking marker above) → **minor**.
|
|
16
|
-
- Any `fix:`/`fix(scope):` commit (and nothing higher) → **patch**.
|
|
17
|
-
- `chore:`, `docs:`, `refactor:`, `test:`, `ci:` etc. with no `fix`/`feat`/breaking commit
|
|
18
|
-
alongside them → **patch** (matches this project's own convention — see recent history,
|
|
19
|
-
e.g. `chore(release): bump to v0.47.1` following a patch-only commit set).
|
|
20
|
-
|
|
21
|
-
Take the **highest** bump implied by the whole commit list (one `feat:` among ten `fix:`
|
|
22
|
-
commits still means minor; one breaking marker anywhere means major).
|
|
23
|
-
|
|
24
|
-
## When commits don't follow the convention
|
|
25
|
-
|
|
26
|
-
If a meaningful fraction of the commit list has no recognizable `type:` prefix at all (not
|
|
27
|
-
just an unconventional scope — genuinely no prefix, e.g. a bare "wip" or "updates"), **do
|
|
28
|
-
not guess**. Say so explicitly and ask the user which bump to apply, listing the
|
|
29
|
-
unclassifiable commits. This is a needs-decision carve-out: classification stops for a human call instead of
|
|
30
|
-
proceeding — guessing wrong here ships an incorrect semver bump that's hard to walk back once published.
|
|
31
|
-
|
|
32
|
-
## Output
|
|
33
|
-
|
|
34
|
-
- The bump kind: `patch` | `minor` | `major`.
|
|
35
|
-
- The commit list grouped by which rule matched each one (for the eventual report step).
|
|
36
|
-
- If ambiguous: the question posed to the user instead of a bump kind, and the pipeline
|
|
37
|
-
pauses here until answered.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: builder:gate
|
|
3
|
-
description: Step 2 of builder — run typecheck and unit tests, both time-bounded, as the hard pre-publish gate. A failing gate stops the pipeline; builder:publish never runs on a red gate.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# builder:gate
|
|
7
|
-
|
|
8
|
-
Run this project's own check commands against `HEAD` exactly as they run in CI/manually —
|
|
9
|
-
no shortcuts, no `--skip` flags.
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
timeout 180 npm run typecheck
|
|
13
|
-
timeout 300 npm run test:unit
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
(Adjust bounds per project if `CLAUDE.md` documents different timing expectations — these
|
|
17
|
-
values match session-manager's own commands: `tsc --noEmit` and `vitest run`.) Always wrap
|
|
18
|
-
in `timeout` — an unbounded gate command is exactly the kind of stuck-job failure mode
|
|
19
|
-
`PRD_AUTHORING.md` warns about elsewhere in this repo; a hang here should surface as a
|
|
20
|
-
timeout, not run forever.
|
|
21
|
-
|
|
22
|
-
## On failure
|
|
23
|
-
|
|
24
|
-
Stop immediately. Do not proceed to `builder:publish`. Report:
|
|
25
|
-
- which command failed (typecheck or test:unit)
|
|
26
|
-
- the actual failure output (not just "gate failed")
|
|
27
|
-
- that no version bump, tag, or publish happened
|
|
28
|
-
|
|
29
|
-
## On success
|
|
30
|
-
|
|
31
|
-
Proceed to `builder:publish` with no pause for reconfirmation — see the orchestrator's hard
|
|
32
|
-
rules on this.
|
|
33
|
-
|
|
34
|
-
## Output
|
|
35
|
-
|
|
36
|
-
- `PASS` or `FAIL` per command.
|
|
37
|
-
- Full failure output on `FAIL`, empty on `PASS`.
|