claude-code-session-manager 0.143.0 → 0.144.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +3 -1
  2. package/dist/assets/AppSettings-Z68gQiVE.js +2 -0
  3. package/dist/assets/{History-DTttbvPb.js → History-C3E6y_7t.js} +2 -2
  4. package/dist/assets/HomeClaudeConfig-Yd1vXzBn.js +5 -0
  5. package/dist/assets/{Panel-B_D4Bg7L.js → Panel-CnfWs46Z.js} +1 -1
  6. package/dist/assets/ProjectClaudeConfig-CP0Wsg-H.js +26 -0
  7. package/dist/assets/Scheduler-D8un7N3B.js +16 -0
  8. package/dist/assets/{SkillReferenceGraph-D1b2aiol.js → SkillReferenceGraph-DRtZV1Al.js} +1 -1
  9. package/dist/assets/{Skills-cfV7sgk6.js → Skills-Bg5O2Hyn.js} +23 -23
  10. package/dist/assets/{TiptapBody-DVXtEIVy.js → TiptapBody-BdzoBmqu.js} +27 -27
  11. package/dist/assets/{Toggle-CYajnSdx.js → Toggle-Dt5K1OXt.js} +1 -1
  12. package/dist/assets/{VoiceButton-DJ4gGRuE.js → VoiceButton-CTLyRgdF.js} +1 -1
  13. package/dist/assets/{historyTotals-D3MoHY2U.js → historyTotals-B2_KWBga.js} +1 -1
  14. package/dist/assets/{index-CdTppjKR.js → index-446b69rr.js} +698 -697
  15. package/dist/assets/{index-DVHIHoJf.css → index-BJ5TJvmz.css} +1 -1
  16. package/dist/index.html +2 -2
  17. package/dist-web/app.css +1 -1
  18. package/dist-web/app.js +439 -436
  19. package/package.json +4 -2
  20. package/plugins/session-manager-dev/skills/develop/SKILL.md +14 -13
  21. package/plugins/session-manager-dev/skills/maintaining-md-network/SKILL.md +16 -2
  22. package/plugins/session-manager-dev/skills/maintaining-md-network/weekly-consolidation.md +87 -0
  23. package/scripts/README.md +1 -1
  24. package/scripts/scheduler-mcp-server.cjs +77 -0
  25. package/src/main/adminRouteRegistry.cjs +6 -0
  26. package/src/main/agentLibrary.cjs +60 -11
  27. package/src/main/agentsIpc.cjs +19 -0
  28. package/src/main/build-info.json +4 -4
  29. package/src/main/chatRunner.cjs +109 -0
  30. package/src/main/health.cjs +59 -17
  31. package/src/main/index.cjs +4 -0
  32. package/src/main/ipcSchemas.cjs +50 -1
  33. package/src/main/lib/claude/agentArmory.cjs +128 -0
  34. package/src/main/lib/claude/agentModelResolve.cjs +3 -2
  35. package/src/main/lib/claude/agentSnapshot.cjs +24 -3
  36. package/src/main/lib/claude/builtinTools.cjs +110 -0
  37. package/src/main/lib/claude/environmentProfiles.cjs +1 -1
  38. package/src/main/lib/claude/headlessMcpServers.cjs +138 -0
  39. package/src/main/lib/claude/jobSandboxPolicy.cjs +8 -2
  40. package/src/main/lib/claude/personaToolScope.cjs +77 -6
  41. package/src/main/lib/epic/epicDepsSync.cjs +66 -0
  42. package/src/main/lib/epic/epicOutsideRead.cjs +38 -1
  43. package/src/main/lib/epic/epicSettle.cjs +48 -4
  44. package/src/main/lib/epic/epicSpawnPlan.cjs +3 -1
  45. package/src/main/lib/epic/epicValidationHook.cjs +9 -1
  46. package/src/main/lib/epic/planReviewInput.cjs +123 -0
  47. package/src/main/lib/epic/restorableSessions.cjs +1 -0
  48. package/src/main/lib/epic/scriptStartedBy.cjs +71 -0
  49. package/src/main/lib/externalContract.cjs +12 -0
  50. package/src/main/lib/feedback-remote/createdProjects.cjs +291 -0
  51. package/src/main/lib/feedback-remote/crossProjectFeedback.cjs +24 -2
  52. package/src/main/lib/feedback-remote/macroAdminRoutes.cjs +24 -3
  53. package/src/main/lib/feedback-remote/pendingReplies.cjs +8 -4
  54. package/src/main/lib/feedback-remote/projectCreate.cjs +415 -0
  55. package/src/main/lib/feedback-remote/replyClaims.cjs +15 -6
  56. package/src/main/lib/feedback-remote/serviceMcpSession.cjs +29 -1
  57. package/src/main/lib/feedback-remote/serviceMcpTools.cjs +43 -2
  58. package/src/main/lib/feedback-remote/servicePairLocalRoutes.cjs +91 -0
  59. package/src/main/lib/feedback-remote/servicePairings.cjs +47 -7
  60. package/src/main/lib/feedback-remote/serviceStdioBridge.cjs +99 -1
  61. package/src/main/lib/git/gitWorktree.cjs +1 -1
  62. package/src/main/lib/git/worktreeDeps.cjs +9 -3
  63. package/src/main/lib/mcpToolCatalog.cjs +43 -5
  64. package/src/main/lib/mcpToolsProbe.cjs +19 -2
  65. package/src/main/lib/packs/packCatalog.cjs +98 -5
  66. package/src/main/lib/persona-macro/agentPersonaSchema.cjs +6 -0
  67. package/src/main/lib/persona-macro/builtinMacros.cjs +6 -4
  68. package/src/main/lib/persona-macro/personaFrontmatterSchema.cjs +9 -0
  69. package/src/main/lib/persona-macro/personaLoadout.cjs +58 -0
  70. package/src/main/lib/persona-macro/personaMerge.cjs +11 -3
  71. package/src/main/lib/persona-macro/personaUpgrade.cjs +96 -0
  72. package/src/main/lib/persona-macro/projectVideoToolCheck.cjs +1 -1
  73. package/src/main/lib/persona-macro/shippedPersonaSeeds.cjs +94 -0
  74. package/src/main/lib/prd/prdCreate.cjs +48 -5
  75. package/src/main/lib/prd/prdFrontmatter.cjs +5 -2
  76. package/src/main/lib/prd/prdMcpReachWarnings.cjs +44 -0
  77. package/src/main/lib/prd/prdSandboxWarnings.cjs +49 -0
  78. package/src/main/lib/process/peerChatSession.cjs +165 -0
  79. package/src/main/lib/project-pages/videoScriptPress.cjs +6 -0
  80. package/src/main/lib/project-pages/videoScriptRunRoute.cjs +24 -4
  81. package/src/main/lib/promptSessionSchema.cjs +2 -0
  82. package/src/main/lib/scheduler/baselineGate.cjs +31 -2
  83. package/src/main/lib/scheduler/planRecordHarvest.cjs +104 -12
  84. package/src/main/lib/scheduler/planReleaseRoute.cjs +110 -0
  85. package/src/main/lib/scheduler/planReviewSchema.cjs +182 -0
  86. package/src/main/lib/scheduler/planReviewStats.cjs +63 -0
  87. package/src/main/lib/scheduler/planReviewStore.cjs +128 -0
  88. package/src/main/lib/scheduler/sandboxEnvironmentLimit.cjs +141 -0
  89. package/src/main/lib/scheduler/scheduleJobSchema.cjs +2 -0
  90. package/src/main/lib/scheduler/upgradeDrain.cjs +32 -5
  91. package/src/main/lib/scheduler/validatorVerdictSchema.cjs +12 -2
  92. package/src/main/lib/tasks/memoryConsolidation.cjs +109 -37
  93. package/src/main/lib/tasks/taskAdminRoutes.cjs +26 -14
  94. package/src/main/lib/tasks/taskRun.cjs +3 -1
  95. package/src/main/lib/tasks/weeklyConsolidationInputs.cjs +178 -0
  96. package/src/main/projectPages.cjs +22 -14
  97. package/src/main/pty.cjs +3 -0
  98. package/src/main/runVerify.cjs +3 -2
  99. package/src/main/scheduler/planReviewHold.cjs +140 -0
  100. package/src/main/scheduler/prdParser.cjs +1 -0
  101. package/src/main/scheduler/reviewLadder.cjs +2 -0
  102. package/src/main/scheduler/utilizationHold.cjs +7 -2
  103. package/src/main/scheduler.cjs +532 -78
  104. package/src/main/seedAgentPersonas.cjs +11 -6
  105. package/src/main/seedStatus.cjs +1 -1
  106. package/src/main/templates/PRD_AUTHORING.md +16 -1
  107. package/src/main/webRemote.cjs +47 -7
  108. package/src/preload/api.d.ts +71 -1
  109. package/src/preload/apiSurface.json +28 -0
  110. package/src/preload/index.cjs +9 -0
  111. package/src/seed/agents/architect.md +28 -43
  112. package/src/seed/agents/dev-lead.md +3 -1
  113. package/src/seed/agents/md-network-curator.md +27 -0
  114. package/src/seed/agents/plan-reviewer.md +47 -0
  115. package/src/seed/agents/validator.md +2 -1
  116. package/dist/assets/AppSettings-BO4jDVGO.js +0 -2
  117. package/dist/assets/HomeClaudeConfig-DADP5bfn.js +0 -3
  118. package/dist/assets/ProjectClaudeConfig-DPnDJKcr.js +0 -26
  119. package/dist/assets/Scheduler-CNLjn90m.js +0 -16
@@ -13,8 +13,9 @@
13
13
  * bundled file's own stamp. Same or higher stays untouched. Lower checks
14
14
  * the installed file's body against every body this app has ever shipped
15
15
  * for that persona (`lib/persona-macro/shippedPersonaSeeds.cjs`). No match means a
16
- * person wrote or edited that file; it is left alone and the skip is
17
- * logged. Why: a lower stamp alone does not prove the file is a stale
16
+ * person wrote or edited that file; it is left alone, the skip is
17
+ * logged, and the Agent Library shows it as a newer version available
18
+ * (lib/persona-macro/personaUpgrade.cjs). Why: a lower stamp alone does not prove the file is a stale
18
19
  * shipped copy — only a body match does. A match replaces the installed
19
20
  * file with the bundled one. Frontmatter keys the user changed are kept,
20
21
  * including a `model:` line the user removed entirely; keys the user
@@ -80,7 +81,7 @@ const { writeJsonSync, writeTextAtomic, validatePath, validateWrite } = require(
80
81
  const { splitFrontmatter } = require('./lib/prd/prdFrontmatter.cjs');
81
82
  const { SHIPPED_PERSONA_SEEDS } = require('./lib/persona-macro/shippedPersonaSeeds.cjs');
82
83
 
83
- const PERSONAS = ['architect', 'dev-lead', 'project-home-builder', 'validator', 'demo-video-builder', 'blender-artist', 'competitive-researcher', 'competitive-analyst'];
84
+ const PERSONAS = ['architect', 'dev-lead', 'project-home-builder', 'validator', 'demo-video-builder', 'blender-artist', 'competitive-researcher', 'competitive-analyst', 'plan-reviewer', 'md-network-curator'];
84
85
  // What `{ done: true }` (the pre-seeded-set marker format) meant: only these two personas existed
85
86
  // in PERSONAS at the time. Fixed, not derived from the current PERSONAS array above — otherwise
86
87
  // every future persona added to PERSONAS would retroactively count as already delivered to a
@@ -309,7 +310,8 @@ async function upgradeStalePersonas({ logger = console, writeLog = () => {}, shi
309
310
  if (!fs.existsSync(destPath)) continue; // nothing installed yet — the first-seed pass below owns this name
310
311
  try {
311
312
  const bundledText = fs.readFileSync(path.join(srcDir, `${name}.md`), 'utf8');
312
- const installedText = fs.readFileSync(destPath, 'utf8');
313
+ const installedBytes = fs.readFileSync(destPath);
314
+ const installedText = installedBytes.toString('utf8');
313
315
  const bundledVersion = readSeedVersion(bundledText);
314
316
  const installedVersion = readSeedVersion(installedText);
315
317
  if (installedVersion >= bundledVersion) continue; // same or newer — never touched
@@ -335,10 +337,10 @@ async function upgradeStalePersonas({ logger = console, writeLog = () => {}, shi
335
337
  // catch below on failure.
336
338
  validateWrite(validatePath(destPath));
337
339
 
338
- const backupPath = backupPathFor(name, installedText);
340
+ const backupPath = backupPathFor(name, installedBytes);
339
341
  if (!fs.existsSync(backupPath)) {
340
342
  fs.mkdirSync(path.dirname(backupPath), { recursive: true });
341
- await writeTextAtomic(backupPath, installedText);
343
+ await writeTextAtomic(backupPath, installedBytes);
342
344
  } // same content already backed up by an earlier attempt — never write a second copy
343
345
 
344
346
  const nextText = buildUpgradedPersona(bundledText, installedText, matches);
@@ -404,6 +406,9 @@ module.exports = {
404
406
  personaBodyHash,
405
407
  readSeedVersion,
406
408
  normalizeNewlines,
409
+ backupPathFor,
410
+ bundledSourceDir,
411
+ destAgentsDir,
407
412
  sameFmValue,
408
413
  markerPath,
409
414
  markerStatus,
@@ -47,7 +47,7 @@ const FIXES = {
47
47
  'dev-plugin': 'Open Plugins → Library and click Install next to "session-manager-dev".',
48
48
  'scheduler-mcp': () =>
49
49
  `Run in a terminal: claude mcp add ${seedSchedulerMcp.SERVER_NAME} --scope user -- node ${seedSchedulerMcp.serverScriptPath()}`,
50
- 'agent-personas': `Copy ${seedAgentPersonas.PERSONAS.map((n) => `src/seed/agents/${n}.md`).join(', ')} into ~/.claude/agents/ (skip any that already exist there).`,
50
+ 'agent-personas': `Copy ${seedAgentPersonas.PERSONAS.map((n) => `src/seed/agents/${n}.md`).join(', ')} into ~/.claude/agents/, copying only the ones that are missing. Installed copies you never edited update on their own at app start; a copy you edited is kept, and a newer bundled version is offered in the Agent Library.`,
51
51
  };
52
52
 
53
53
  /** { 'dev-plugin': {status, fix}, 'scheduler-mcp': {status, fix}, 'agent-personas': {status, fix} } */
@@ -1,4 +1,4 @@
1
- <!-- PRD_AUTHORING.md v30 -->
1
+ <!-- PRD_AUTHORING.md v36 -->
2
2
  # PRD Authoring Guide — Scheduler Safety Rules
3
3
 
4
4
  Rule: every PRD you queue follows the rules below.
@@ -146,12 +146,24 @@ The executor can't ask you anything: no `ScheduleWakeup`, Cron, Monitor, `AskUse
146
146
  Worktree reach: every PRD runs in an isolated git worktree holding tracked files plus linked dependencies: `node_modules` (the root and each nested npm package's) is a worktree-local folder whose entries link to the main checkout's, and non-uv `.venv`/`venv` is symlinked whole; pnpm projects (pnpm-lock.yaml) get a worktree-local `node_modules` installed offline from the store, and uv projects (uv.lock) get a worktree-local env built by an offline frozen `uv sync`, not a symlink. Why: a pnpm install through the symlink purged the main checkout's node_modules (Bilko-Game-Academy 2026-10-18). A step that needs gitignored runtime state (databases, downloads/, browser profiles, logs) or a live side effect must address the main checkout by absolute path (e.g. `$HOME/Projects/<repo>/...`), be artifact-only (a deliverable artifact + `artifactPaths`, no tracked edits), and `dependsOn` the PRD that lands its tracked edits. A project may declare `worktreeSetup` gate-syntax commands in a tracked `.session-manager.json` at the repo root; they run once per fresh job worktree and baseline scratch worktree, before the executor starts, with cwd = the worktree root (a project in a subfolder names it, e.g. `timeout 600 godot --headless --path game --import`). Setups run one at a time per project and are never skipped; they must write only inside the worktree (node_modules entries and non-uv venvs link into the main checkout). The outcome is the `[scheduler] worktree setup:` lines at the top of the run log plus `worktreeSetup` in the run's meta.json. Host crontab installs stay human-only (see §14).
147
147
  Why: burrow PRD 1516 halted because its relative `.venv` python against downloads/fb-tracker.db, scripts/install-cron.sh and `pipeline-cron.sh --now` resolved inside the worktree (no runtime state; install-cron would bake a temporary worktree path into crontab), while sibling 1494 succeeded the same day using an absolute main-checkout path and artifact-only output. `scheduler_create_prd` warns on relative gitignored paths.
148
148
 
149
+ Live checks: A check against a running local service is an `http` criterion (loopback only, run by the scheduler outside the sandbox). `http` criteria are GET-only and send no credentials, so a bearer-authed route (Session Manager's own `/admin/*` routes) is never probed from a PRD gate, job step or criterion. The Epic's architect probes it read-only at PLAN SETTLED, publishes the record with `artifact_publish`, and a validator criterion cites the record's `storedPath` and `sha256`; see [Authenticated admin routes](../../../session-manager-operations/architecture/scheduler-operations.md#authenticated-admin-routes).
150
+
149
151
  Rule: gates never run `npm ci` or `npm install` — dependencies are already linked, so an install only slows the run.
150
152
  Why: `npm --prefix web/feedback-widget ci` through the old whole-folder link emptied the main checkout's web/feedback-widget/node_modules (session-manager, 2026-11-24).
151
153
 
152
154
  Rule: a job's processes never outlive it — the group sweep at exit, the job scope stop (systemd) and the 5-minute leftover sweep (Linux) stop anything it started, so `nohup` or `&` does not daemonize. Anything that must keep running goes to a service manager (systemd unit, cron), never `nohup` or `&`.
153
155
  Why: finished jobs left dev servers running for days, holding memory and ports.
154
156
 
157
+ ### Job sandbox limits
158
+
159
+ Rule: jobs under the OS sandbox (dev-lead, validator, any `osSandboxRequired` environment) must not depend on any of these:
160
+ - Bash writes under `.claude/` are refused (no `git mv`, `git rm` or `rm` there). **Any** write to `.claude/agents/`, `.claude/commands/`, `.claude/skills/`, `.claude/hooks/` or `.claude/settings*.json` is refused too, including by the Edit and Write tools (CLI mandatory write protections). A PRD must not list those paths in `# Files`; the architect edits them inline, outside the job sandbox. Why: PRD 4704 (2026-11-26) asked for an Edit on `.claude/agents/` and all three calls were denied.
161
+ - AF_UNIX socket bind/connect is refused (`Operation not permitted`).
162
+ - `/tmp` is read-only; only `$TMPDIR` (the job's private dir) is writable.
163
+
164
+ Gates must not run tests that open Unix sockets or hardcode `/tmp` — run those outside the job, or mark them skipped in the gate.
165
+ Why: the CLI sandbox protects `.claude/` config dirs even inside the worktree write root; Self PRDs 1326 and 1313 parked on exactly this.
166
+
155
167
  ---
156
168
 
157
169
  ## §8 Scope sizing — target ≤10 min, ceiling 15
@@ -246,7 +258,9 @@ Before queueing a new PRD, verify each of these:
246
258
  - [ ] **§6 Gate and files:** `gate` follows every rule in §6 (or is `["none"]` alone); `files` is 1–50 repo-relative paths, no overlap with a concurrent PRD.
247
259
  - [ ] **§7 Self-contained:** no reference to "the conversation" or outside context; paths/identifiers inline; clean UTF-8, no NUL bytes (`grep -qP '\x00' file && echo BAD`).
248
260
  - [ ] **§7 Worktree reach:** no relative path to a gitignored file; live-run steps use absolute main-checkout paths in an artifact-only PRD. Why: the job worktree has no gitignored runtime state, so relative paths fail or bake a temporary path into host config (burrow 1516).
261
+ - [ ] **§7 Job sandbox limits:** no gate or step uses Bash writes under `.claude/`, Unix sockets, or hardcoded `/tmp` (see [Job sandbox limits](#job-sandbox-limits)).
249
262
  - [ ] **§7 No installs:** no gate runs `npm ci` or `npm install`. Why: dependencies are linked; an install through a link emptied the main checkout's web/feedback-widget/node_modules (2026-11-24).
263
+ - [ ] **No authed loopback probe:** no gate or criterion probes a bearer-authed loopback route (`/admin/*`); `http` criteria are GET-only with no credentials. Why: release checks 4539 and 4337 prescribed one and ended silent_no_op.
250
264
  - [ ] **§8 Scope:** targets ≤10 min, ceiling 15; e2e/publish sharded to one spec per PRD.
251
265
  - [ ] **§9 Failure surfacing:** errors exit 1 with a diagnostic line; no silent `|| true`.
252
266
  - [ ] **§10 Negative assertions:** every "should find nothing" check is inverted to exit 0 on the clean case.
@@ -259,3 +273,4 @@ Before queueing a new PRD, verify each of these:
259
273
  - [ ] **Doc links gated:** a PRD that adds, moves or renames a markdown file runs the project's doc-link check in its gate when the project has one (in session-manager: `timeout 120 npm run lint:docs`). Why: PRD kit-cast-playbook added `src/main/lib/demo-video-kit/cast.md` with only the kit tests in its gate, so the orphan doc landed on 2026-11-23 and turned lint:docs red for the next PRD.
260
274
  - [ ] **Size budgets gated:** a PRD that edits a file the project caps by size runs that cap's check in its gate when the project has one (in session-manager: README.md gates `timeout 120 npm run lint:readme`). Why: PRD 4105-web-remote-label-leftovers edited README.md with only lint:docs and typecheck in its gate, so README.md reached 24,026 bytes on 2026-11-24, over its cap, and npm run lint turned red for every later PRD.
261
275
  - [ ] **Gate purity:** a gate command must not create or modify tracked files; outputs go to the per-gate TMPDIR or a gitignored path. Why: a dirtied tree fails the clean-tree check.
276
+ - [ ] **Plan-review checklist** (the independent reviewer checks each queued PRD; check them yourself first): every criterion is provable from the tree or a read-only probe; a failure path is covered; one edge case is covered; no criterion is vacuous because a sibling PRD already satisfies it; every `dependsOn` is real (the PRD needs that PRD's output); the gate is green at base; a live-behavior change has an `http` criterion; a doc PRD depends on the code PRD it describes.
@@ -1308,7 +1308,7 @@ async function handleServiceHello(envelope, device, client, peerPubKey) {
1308
1308
  * Owner confirmed a pending service's SAS: check it against that client's own
1309
1309
  * SAS, then pin the key via store.confirmPending. Returns { ok, service } or { ok:false, error }.
1310
1310
  */
1311
- async function confirmServiceSas(pairingId, sas) {
1311
+ async function confirmServiceSas(pairingId, sas, { via } = {}) {
1312
1312
  const target = _clients.values().find((c) => c.role === 'service' && c.pendingPairingId === pairingId) || null;
1313
1313
  if (!target) return { ok: false, error: 'no_pending_service' };
1314
1314
  if (target.e2e.state !== 'pending_sas' || typeof target.e2e.pendingSas !== 'string') return { ok: false, error: 'wrong_state' };
@@ -1330,7 +1330,7 @@ async function confirmServiceSas(pairingId, sas) {
1330
1330
  target.e2e = confirmSasLogic(target.e2e).next;
1331
1331
  target.service = service;
1332
1332
  target.pendingPairingId = null;
1333
- await auditLog(new Date().toISOString(), 'service:confirm-sas', target.deviceId, undefined, `ok:service=${auditToken(service.serviceId)}`, target);
1333
+ await auditLog(new Date().toISOString(), 'service:confirm-sas', target.deviceId, undefined, `${via === 'local' ? 'ok:paired-locally:' : 'ok:'}service=${auditToken(service.serviceId)}`, target);
1334
1334
  finalizeE2eAuthenticated('paired service authenticated — SAS confirmed by owner', target);
1335
1335
  return { ok: true, service };
1336
1336
  }
@@ -1352,7 +1352,23 @@ async function pairedDevice() {
1352
1352
  function redactService(s) {
1353
1353
  if (!s) return s;
1354
1354
  const { pubKey: _omit, ...rest } = s;
1355
- return rest;
1355
+ return { ...rest, projectRoot: typeof rest.projectRoot === 'string' ? rest.projectRoot : null };
1356
+ }
1357
+
1358
+ const PROJECT_ROOT_ERROR = 'projectRoot must be an existing folder in your home folder';
1359
+
1360
+ /** True when p is an absolute path to an existing directory inside the home folder. */
1361
+ function isProjectRootOk(p) {
1362
+ if (typeof p !== 'string' || p.length === 0 || p.includes('\0') || !path.isAbsolute(p)) return false;
1363
+ try {
1364
+ // Resolve symlinks on both sides so a link inside home that points outside is refused.
1365
+ const real = fs.realpathSync(p);
1366
+ const rel = path.relative(fs.realpathSync(os.homedir()), real);
1367
+ if (rel === '' || rel === '..' || rel.startsWith('..' + path.sep) || path.isAbsolute(rel)) return false;
1368
+ return fs.statSync(real).isDirectory();
1369
+ } catch {
1370
+ return false;
1371
+ }
1356
1372
  }
1357
1373
 
1358
1374
  function logRelayFailure(op, r) {
@@ -1362,7 +1378,7 @@ function logRelayFailure(op, r) {
1362
1378
  });
1363
1379
  }
1364
1380
 
1365
- async function servicePairStart({ name, homeCwd, scope }) {
1381
+ async function startPairing({ name, homeCwd, scope, projectRoot }, pairedVia) {
1366
1382
  const device = await pairedDevice();
1367
1383
  if (!device) return { ok: false, error: 'no_paired_device' };
1368
1384
  const { SERVICE_TOOL_NAMES } = require('./lib/feedback-remote/servicePairings.cjs');
@@ -1370,6 +1386,8 @@ async function servicePairStart({ name, homeCwd, scope }) {
1370
1386
  if (!path.isAbsolute(homeCwd)) return { ok: false, error: 'homeCwd must be an absolute path' };
1371
1387
  const unknown = scope.find((t) => !SERVICE_TOOL_NAMES.includes(t));
1372
1388
  if (unknown) return { ok: false, error: `scope names an unknown tool: ${unknown}` };
1389
+ const wantsProjectCreate = scope.includes('project_create');
1390
+ if (wantsProjectCreate && !isProjectRootOk(projectRoot)) return { ok: false, error: PROJECT_ROOT_ERROR };
1373
1391
 
1374
1392
  const r = await relayRequest('POST', `${RELAY_API_BASE}/client-otp`, { body: {}, token: device.deviceToken });
1375
1393
  if (!isOk(r)) {
@@ -1381,18 +1399,38 @@ async function servicePairStart({ name, homeCwd, scope }) {
1381
1399
  const codeExpiresAt = Date.now() + CLIENT_OTP_TTL_MS;
1382
1400
  let pairingId;
1383
1401
  try {
1384
- ({ pairingId } = await getServiceStore().createPending({ name, homeCwd, scope }));
1402
+ ({ pairingId } = await getServiceStore().createPending({
1403
+ name, homeCwd, scope, projectRoot: wantsProjectCreate ? projectRoot : undefined, pairedVia,
1404
+ }));
1385
1405
  } catch (e) {
1386
1406
  return { ok: false, error: e?.message || 'pending pairing failed' };
1387
1407
  }
1388
- await auditLog(new Date().toISOString(), 'service:pair-start', device.deviceId, undefined, 'ok', null);
1408
+ await auditLog(new Date().toISOString(), 'service:pair-start', device.deviceId, undefined, pairedVia === 'local' ? 'ok:paired-locally' : 'ok', null);
1389
1409
  return { ok: true, code, pairingId, codeExpiresAt, deviceId: device.deviceId };
1390
1410
  }
1391
1411
 
1412
+ function servicePairStart(input) {
1413
+ return startPairing(input, 'window');
1414
+ }
1415
+
1416
+ /** Same-machine pairing without the window: refused while Web remote is off. */
1417
+ async function servicePairStartLocal(input) {
1418
+ if ((await loadConfig()).remoteEnabled !== true) return { ok: false, error: 'web_remote_off' };
1419
+ return startPairing(input, 'local');
1420
+ }
1421
+
1422
+ /** Confirms ONLY a 'local' pending pairing; the SAS check in confirmServiceSas still applies. */
1423
+ async function confirmServiceSasLocal(pairingId, sas) {
1424
+ if ((await loadConfig()).remoteEnabled !== true) return { ok: false, error: 'web_remote_off' };
1425
+ const pending = getServiceStore().listPending().find((p) => p.pairingId === pairingId);
1426
+ if (!pending || pending.pairedVia !== 'local') return { ok: false, error: 'not_local_pairing' };
1427
+ return confirmServiceSas(pairingId, sas, { via: 'local' });
1428
+ }
1429
+
1392
1430
  async function servicesList() {
1393
1431
  const store = getServiceStore();
1394
1432
  const services = store.list().map(redactService);
1395
- const pending = store.listPending();
1433
+ const pending = store.listPending().map(redactService);
1396
1434
  const known = new Set(services.map((s) => s.relayClientId).filter(Boolean));
1397
1435
  const device = await pairedDevice();
1398
1436
  if (!device) return { ok: true, services, pending, relayOrphans: [], relayError: 'no_paired_device' };
@@ -2172,6 +2210,8 @@ module.exports = {
2172
2210
  setServiceInvoker,
2173
2211
  getServiceStore,
2174
2212
  confirmServiceSas,
2213
+ servicePairStartLocal,
2214
+ confirmServiceSasLocal,
2175
2215
  servicePairCancel,
2176
2216
  attachWindow,
2177
2217
  registerRemoteHandlers,
@@ -569,11 +569,45 @@ export type PacksListResult =
569
569
  /** `packs.terminalArgs` result — `--plugin-dir`/`--append-system-prompt` args, already composed by main. */
570
570
  export type PacksTerminalArgsResult = { ok: true; args: string[] };
571
571
 
572
+ /** One armory entry (`agentArmory.cjs`). */
573
+ export interface ArmoryItem {
574
+ id: string;
575
+ label: string;
576
+ badges: ('risky' | 'banned' | 'floor')[];
577
+ }
578
+ export interface ArmoryMcpItem extends ArmoryItem {
579
+ tools: ArmoryItem[];
580
+ status: 'not-checked' | 'checked' | 'failing';
581
+ scope: string;
582
+ }
583
+ export interface ArmoryPackItem extends ArmoryItem {
584
+ skills: string[];
585
+ source?: string;
586
+ }
587
+ export interface Armory {
588
+ builtins: ArmoryItem[];
589
+ bundledSkills: ArmoryItem[];
590
+ mcpServers: ArmoryMcpItem[];
591
+ packs: ArmoryPackItem[];
592
+ unpackedSkills: string[];
593
+ /** Sandbox environment profiles (`environmentProfiles.cjs`). */
594
+ environments: { name: string; summary: string }[];
595
+ errors: string[];
596
+ }
597
+
572
598
  /** One global `~/.claude/agents/<name>.md` persona, per the Agent Library nav page. */
573
599
  export interface AgentPersona {
574
600
  name: string;
575
601
  description: string | null;
576
602
  tools: string[];
603
+ /** The `tools:` decision: undecided (no line) / bare (`[]`) / equipped / unbound (`*`). */
604
+ loadout?: 'undecided' | 'bare' | 'equipped' | 'unbound';
605
+ /** Declared MCP servers (`mcpServers:`); [] = none. */
606
+ mcpServers?: string[];
607
+ /** Declared context packs (`packs:`); [] = none. */
608
+ packs?: string[];
609
+ /** Declared environment profile (`environment:`); null = headless-default. */
610
+ environment?: string | null;
577
611
  model: string | null;
578
612
  /** Per-Epic reasoning effort (`effort:` frontmatter; a `models.catalog` effort level). Null = inherit. Passed to the claude spawn as `--effort` (never `auto`). */
579
613
  effort: string | null;
@@ -597,6 +631,8 @@ export interface AgentPersona {
597
631
  title?: string | null;
598
632
  /** Bundled-persona version stamp (seedAgentPersonas.cjs). Null for a persona that was never seeded, or has no stamp. */
599
633
  seedVersion?: number | null;
634
+ /** Set when a newer bundled version exists that was not applied (edited file or unseen). Null/absent otherwise. */
635
+ upgrade?: { installedVersion: number; bundledVersion: number; edited: boolean; bundledBody: string } | null;
600
636
  /** `executorOnly: true` frontmatter — persona only executes a scoped PRD; New Epic warns when it is picked as Actor. */
601
637
  executorOnly?: boolean;
602
638
  path: string;
@@ -617,6 +653,14 @@ export interface AgentPersonaSaveInput {
617
653
  originalName?: string;
618
654
  description: string;
619
655
  tools: string[];
656
+ /** Global save only: the loadout decision encoding `tools:` (omit = derive from `tools`). */
657
+ loadout?: 'bare' | 'unbound' | 'equipped';
658
+ /** Global save: declared MCP servers; omit = keep the file's value, `[]` = none. */
659
+ mcpServers?: string[];
660
+ /** Global save: declared context packs; omit = keep the file's value, `[]` = none. */
661
+ packs?: string[];
662
+ /** Global save: declared environment profile; omit = keep the file's value. */
663
+ environment?: string;
620
664
  model: string;
621
665
  /** Effort level, or `'inherit'`/omitted to write no `effort:` line. */
622
666
  effort?: string;
@@ -1117,6 +1161,8 @@ export interface ScheduleJob {
1117
1161
  artifactPaths?: string[] | null;
1118
1162
  /** PRD frontmatter library voice (in-process only); handed to the job as SM_VOICE_ID. */
1119
1163
  voiceId?: string | null;
1164
+ /** PRD frontmatter persona (queue rows carry it; absent = dev-lead). */
1165
+ agentType?: string | null;
1120
1166
  slug: string;
1121
1167
  title: string;
1122
1168
  cwd: string | null;
@@ -2930,7 +2976,8 @@ export type WebRemoteServiceTool =
2930
2976
  | 'macro_list'
2931
2977
  | 'macro_run'
2932
2978
  | 'epic_get'
2933
- | 'events_read';
2979
+ | 'events_read'
2980
+ | 'project_create';
2934
2981
 
2935
2982
  /** A paired service as the renderer sees it (its pinned key is never returned). */
2936
2983
  export interface WebRemoteService {
@@ -2938,9 +2985,13 @@ export interface WebRemoteService {
2938
2985
  name: string;
2939
2986
  homeCwd: string;
2940
2987
  scope: WebRemoteServiceTool[];
2988
+ /** Owner-approved projects folder project_create creates into; null without that tool. */
2989
+ projectRoot: string | null;
2941
2990
  relayClientId: string | null;
2942
2991
  pairedAt: number;
2943
2992
  lastSeenAt: number;
2993
+ /** How the pairing was approved: owner window (default) or the loopback admin API. */
2994
+ pairedVia?: 'window' | 'local';
2944
2995
  }
2945
2996
 
2946
2997
  export interface WebRemotePendingService {
@@ -2948,8 +2999,10 @@ export interface WebRemotePendingService {
2948
2999
  name: string;
2949
3000
  homeCwd: string;
2950
3001
  scope: WebRemoteServiceTool[];
3002
+ projectRoot: string | null;
2951
3003
  createdAt: number;
2952
3004
  expiresAt: number;
3005
+ pairedVia?: 'window' | 'local';
2953
3006
  }
2954
3007
 
2955
3008
  /** A relay client no local service owns. */
@@ -2973,6 +3026,8 @@ export interface WebRemoteServicePairStartInput {
2973
3026
  name: string;
2974
3027
  homeCwd: string;
2975
3028
  scope: WebRemoteServiceTool[];
3029
+ /** Required (an existing folder in the home folder) when scope includes project_create. */
3030
+ projectRoot?: string;
2976
3031
  }
2977
3032
 
2978
3033
  export type WebRemoteServicePairStartResult =
@@ -3040,6 +3095,8 @@ export interface SessionManagerAPI {
3040
3095
  onNewSession: (handler: () => void) => () => void;
3041
3096
  onRebootSession: (handler: () => void) => () => void;
3042
3097
  onOpenFreeHour: (handler: () => void) => () => void;
3098
+ /** Fired when POST /admin/projects/create makes a new project; `cwd` is its folder. */
3099
+ onProjectCreated: (handler: (payload: { cwd: string }) => void) => () => void;
3043
3100
  archiveProject: (encoded: string) => Promise<{ ok: boolean; error?: string }>;
3044
3101
  };
3045
3102
  pty: {
@@ -3114,6 +3171,10 @@ export interface SessionManagerAPI {
3114
3171
  listPersonas: () => Promise<AgentPersona[]>;
3115
3172
  savePersona: (payload: AgentPersonaSaveInput) => Promise<{ ok: boolean; path: string }>;
3116
3173
  deletePersona: (payload: { name: string }) => Promise<{ ok: boolean }>;
3174
+ /** Replaces the installed persona with the bundled one (backing the old file up). */
3175
+ takeBundledPersona: (p: { name: string }) => Promise<{ backupPath: string; seedVersion: number }>;
3176
+ /** Hides the upgrade notice for this bundled version. */
3177
+ dismissPersonaUpgrade: (p: { name: string; bundledVersion: number }) => Promise<{ ok: true }>;
3117
3178
  /** Drops the overlay of the OPEN project at `projectCwd` (an `overrideDetails[].cwd`). */
3118
3179
  removeOverride: (payload: { name: string; projectCwd: string }) => Promise<{ ok: boolean }>;
3119
3180
  /** Raw persona `.md` text for the New Epic AIM composer (epicIntake.ts's `agentBody`),
@@ -3156,6 +3217,8 @@ export interface SessionManagerAPI {
3156
3217
  effort: string | null;
3157
3218
  source: 'persona' | 'persona-overlay' | 'inherit' | null;
3158
3219
  }>;
3220
+ /** Gear armory read model (`agentArmory.cjs`): every equippable tool/skill/MCP/pack with badges. Never throws; source failures land in `errors`. */
3221
+ armory: (payload: { cwd?: string }) => Promise<Armory>;
3159
3222
  /** Fires after any save/delete/removeOverride — subscribers should re-fetch listPersonas(). */
3160
3223
  onChanged: (handler: () => void) => () => void;
3161
3224
  };
@@ -3748,6 +3811,13 @@ export interface SessionManagerAPI {
3748
3811
  /** Set when main awaits the result; echo it back via `reportExternalNewSessionResult`. */
3749
3812
  requestId?: string;
3750
3813
  via?: 'script';
3814
+ /** Set by main only for via 'script' (epic/scriptStartedBy.cjs); never on a human press. */
3815
+ startedBy?: {
3816
+ kind: 'script';
3817
+ route: string;
3818
+ caller?: { pipeline?: string; runId?: string; step?: string; attempt?: number };
3819
+ [k: string]: unknown;
3820
+ };
3751
3821
  effort?: string;
3752
3822
  /** Scripted job press: build a review cut first. */
3753
3823
  reviewStage?: boolean;
@@ -199,6 +199,13 @@
199
199
  "kind": "on",
200
200
  "remote": "deny"
201
201
  },
202
+ {
203
+ "ns": "app",
204
+ "method": "onProjectCreated",
205
+ "channel": "projects:created",
206
+ "kind": "on",
207
+ "remote": "deny"
208
+ },
202
209
  {
203
210
  "ns": "pty",
204
211
  "method": "spawn",
@@ -452,6 +459,20 @@
452
459
  "kind": "invoke",
453
460
  "remote": "mutate"
454
461
  },
462
+ {
463
+ "ns": "agents",
464
+ "method": "takeBundledPersona",
465
+ "channel": "agents:take-bundled-persona",
466
+ "kind": "invoke",
467
+ "remote": "mutate"
468
+ },
469
+ {
470
+ "ns": "agents",
471
+ "method": "dismissPersonaUpgrade",
472
+ "channel": "agents:dismiss-persona-upgrade",
473
+ "kind": "invoke",
474
+ "remote": "mutate"
475
+ },
455
476
  {
456
477
  "ns": "agents",
457
478
  "method": "removeOverride",
@@ -487,6 +508,13 @@
487
508
  "kind": "invoke",
488
509
  "remote": "read"
489
510
  },
511
+ {
512
+ "ns": "agents",
513
+ "method": "armory",
514
+ "channel": "agents:armory",
515
+ "kind": "invoke",
516
+ "remote": "read"
517
+ },
490
518
  {
491
519
  "ns": "agents",
492
520
  "method": "onChanged",
@@ -54,6 +54,12 @@ contextBridge.exposeInMainWorld('api', {
54
54
  ipcRenderer.on('app:open-free-hour', listener);
55
55
  return () => ipcRenderer.removeListener('app:open-free-hour', listener);
56
56
  },
57
+ // Fired by POST /admin/projects/create on a fresh create (projectCreate.cjs defaultNotifyRenderer).
58
+ onProjectCreated: (handler) => {
59
+ const listener = (_e, payload) => handler({ cwd: payload?.cwd });
60
+ ipcRenderer.on('projects:created', listener);
61
+ return () => ipcRenderer.removeListener('projects:created', listener);
62
+ },
57
63
  },
58
64
  pty: {
59
65
  spawn: (payload) => ipcRenderer.invoke('pty:spawn', payload),
@@ -136,10 +142,13 @@ contextBridge.exposeInMainWorld('api', {
136
142
  savePersona: (payload) => ipcRenderer.invoke('agents:save-persona', payload),
137
143
  deletePersona: (payload) => ipcRenderer.invoke('agents:delete-persona', payload),
138
144
  removeOverride: (payload) => ipcRenderer.invoke('agents:remove-override', payload),
145
+ takeBundledPersona: (payload) => ipcRenderer.invoke('agents:take-bundled-persona', payload),
146
+ dismissPersonaUpgrade: (payload) => ipcRenderer.invoke('agents:dismiss-persona-upgrade', payload),
139
147
  getPersonaBody: (payload) => ipcRenderer.invoke('agents:get-persona-body', payload),
140
148
  resolveModelInfo: (payload) => ipcRenderer.invoke('agents:resolve-model-info', payload),
141
149
  resolveEpicModel: (payload) => ipcRenderer.invoke('agents:resolve-epic-model', payload),
142
150
  resolveEpicEffort: (payload) => ipcRenderer.invoke('agents:resolve-epic-effort', payload),
151
+ armory: (payload) => ipcRenderer.invoke('agents:armory', payload),
143
152
  // Fired after any save/delete/removeOverride so every mounted
144
153
  // subscriber (Agent Library, Tag Library) re-fetches the same file.
145
154
  onChanged: (handler) => {
@@ -1,20 +1,21 @@
1
1
  ---
2
2
  name: architect
3
- description: The primary Actor for an Epic's whole interactive conversation — owns overall plan and decomposition, clarifies scope, searches before building, decomposes work into scheduled PRDs via /develop, tracks them to completion, and verifies before calling anything done. Never implements a PRD itself — that's dev-lead's job, one PRD at a time, headless. Task-type framing is the Epic's Mission tag's job, not this persona's.
4
- tools: Read, Grep, Glob, Bash, Edit, Write
3
+ description: The primary Actor for an Epic's whole interactive conversation — owns overall plan and decomposition, clarifies scope, searches before building, does operations and small provable tweaks itself, queues substantial work as scheduled PRDs via /develop, tracks them to completion, and verifies before calling anything done. Never implements a queued PRD — that's dev-lead's job, one PRD at a time, headless. Task-type framing is the Epic's Mission tag's job, not this persona's.
4
+ tools: Read, Grep, Glob, Bash, Edit, Write, WebFetch, WebSearch, Task
5
5
  model: opus
6
6
  effort: medium
7
+ environment: open-web
7
8
  tags: feature, bug, discussion, art
8
9
  title: Engineering — Architect
9
- seedVersion: 6
10
+ mcpServers: session-manager-scheduler
11
+ packs: session-manager-dev
12
+ seedVersion: 8
10
13
  ---
11
14
 
12
15
  You are the architect. You are the one Actor a human talks to for the whole life of an Epic's
13
- conversation — the overall plan, the decomposition, the judgment calls — not the one who
14
- implements any single PRD. This file carries only your working style; the mechanics of how
15
- development actually gets executed live in the `session-manager-dev:develop` skill (and, for the
16
- executor's own rules, `standards.md` beside it) — reach for that skill rather than improvising a
17
- parallel process, the same way `/develop` itself references `standards.md` instead of restating it.
16
+ conversation — the overall plan, the decomposition, the judgment calls. The mechanics of queued
17
+ development live in the `session-manager-dev:develop` skill (and `standards.md` beside it); reach
18
+ for that skill rather than improvising a parallel process.
18
19
 
19
20
  ## How you work
20
21
 
@@ -24,48 +25,32 @@ parallel process, the same way `/develop` itself references `standards.md` inste
24
25
  2. **Search before you build.** Read the surrounding code for existing patterns, utilities, and
25
26
  conventions before drafting a plan. A wrong assumption here becomes a wrong decomposition;
26
27
  verify by reading, don't guess from a filename or a memory of how similar code usually looks.
27
- 3. **Own the plan; delegate every implementation.** Once scope is reasonably clear, decompose the
28
- work and queue it via `/develop` — never hand-implement inline in this conversation, not even a
29
- "quick" fix. This session is where the thinking happens (what to build, in what order, what the
30
- acceptance criteria actually prove); the scheduled `claude -p` executor is where the typing
31
- happens. This applies even when the plan is already fully scoped in conversation — queuing isn't
32
- extra ceremony, it's how the work actually gets built.
28
+ Hand wide sweeps to a subagent so this conversation keeps the conclusion, not the file dumps.
29
+ 3. **Size the work, then pick the lane.**
30
+ - **Do it here** for operations and tweaks: any MCP, scheduler, ops or git action; a config,
31
+ doc, persona or prompt edit; or a code change of about one file and 30 lines or fewer, with
32
+ an obvious correct form, that you can prove this turn (typecheck plus the nearest test, or a
33
+ live check). Then run the gates, commit on the Epic branch, and show the evidence. These
34
+ commits reach main when the Epic merges, not when a PRD lands — say so when it matters.
35
+ - **Queue via `/develop`** when any of these is true: it is new behavior that needs new tests;
36
+ it touches more than about 2 files or crosses modules; it touches a law area (ops ownership,
37
+ Epic minting, IPC/preload contracts, the scheduler); it deserves the validator's independent
38
+ check; or a PRD of this Epic is touching the same files.
39
+ - **If unsure, queue.** Never split one change across both lanes.
33
40
  4. **Track what you queued to completion.** `/develop`'s own Phase 2 (watch the scheduler, gate on
34
41
  definition-of-done, route to the right specialist reviewer) is how a decomposition actually
35
42
  finishes — don't queue PRDs and walk away from them.
36
43
  5. **Never treat "the tests pass" as "it's done."** Verify live against the real acceptance
37
- criteria before reporting anything as complete.
38
- 6. **Stay agnostic about what kind of work this is.** Whether this Epic is a feature build, a bug
39
- fix, or an open-ended discussion is decided by its Mission tag, which reaches you in the Mission
40
- part of the opening prompt, after this persona. Don't restate or second-guess that framing here —
41
- your job is *how* to plan, not *what* the work is.
42
- 7. **Finish the whole job.** Nothing you could queue, decide or schedule goes back to the human;
43
- follow the develop skill's rule 6 (No residue). A defect you find outside the Epic's goal is a
44
- side plan in this Epic, or `/send-feedback` when it belongs to another project. Never keep a
45
- to-do only in memory: a memory may point at a queued PRD or a scheduled trigger, never be the
44
+ criteria before reporting anything as complete — in either lane.
45
+ 6. **Finish the whole job.** Nothing you could do, queue, decide or schedule goes back to the
46
+ human; follow the develop skill's rule 6 (No residue). A defect you find outside the Epic's goal
47
+ is a side plan in this Epic, or `/send-feedback` when it belongs to another project. Never keep
48
+ a to-do only in memory: a memory may point at a queued PRD or a scheduled trigger, never be the
46
49
  only place work is owed.
47
50
 
48
51
  ## Relationship to `dev-lead`
49
52
 
50
- You and `dev-lead` are deliberately different scopes, not two names for the same thing:
51
53
  - **You (architect)** own the whole Epic — the plan, the decomposition, the sequencing, the
52
- tracking, the final call on "is this actually done."
54
+ tracking, the small tweaks, the final call on "is this actually done."
53
55
  - **`dev-lead`** owns exactly one already-scoped PRD at a time, headless, with no visibility into
54
- the overall plan — it reads a PRD's Goal/Acceptance Criteria/Implementation notes and executes
55
- that PRD, nothing more.
56
-
57
- A PRD's `agentType` frontmatter names its executor. When omitted, the PRD API stamps `dev-lead`.
58
- Set it only when another persona must run the PRD (`validator` on the validate PRD, the project's
59
- art persona on art PRDs). The scheduler reads it at dispatch and launches the run as that persona:
60
- its body appended as the system prompt, plus its model, effort and tools. You can change it before
61
- the run with `scheduler_update_prd`.
62
-
63
- ## What you don't do
64
-
65
- - Don't implement a PRD yourself in this conversation — that collapses your scope into
66
- `dev-lead`'s and defeats the reason PRDs get queued in the first place (keeping the expensive
67
- interactive session on judgment calls, not typing).
68
- - Don't fork `/develop`'s PRD structure, sizing rules, or scheduler mechanics into this file —
69
- reference the skill, don't duplicate it.
70
- - Don't narrow yourself to one task type — that content belongs to a Mission tag, not to this
71
- generalist persona.
56
+ the overall plan. Once work is queued, it is dev-lead's: don't also implement a queued PRD here.
@@ -5,7 +5,8 @@ tools: Read, Grep, Glob, Bash, Edit, Write
5
5
  model: sonnet
6
6
  effort: medium
7
7
  title: Engineering — Software Engineer
8
- seedVersion: 8
8
+ packs: session-manager-dev
9
+ seedVersion: 10
9
10
  executorOnly: true
10
11
  ---
11
12
 
@@ -43,3 +44,4 @@ Out of contract: anything past the Acceptance Criteria list. If the PRD looks wr
43
44
  - Don't decompose new PRDs, re-plan the sequence, or second-guess whether this PRD should exist —
44
45
  if scope looks wrong, say so in your report; don't unilaterally expand or split the work.
45
46
  - Don't fork `standards.md`'s rules into this file — reference it, don't restate it.
47
+ - Don't write auto memory. Optionally end your final report with `Lessons:` and at most 3 `- ` lines, only for a lesson a future run would need (usually none); the weekly pass reads them (maintaining-md-network `weekly-consolidation.md`).
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: md-network-curator
3
+ description: Out-of-band weekly curator of a project's markdown network and memory. Runs the maintaining-md-network Weekly consolidation pass headless and read-only, fans out one subagent per transcript batch, and answers with a record of proposed changes. Only proposes; never edits, deletes or queues.
4
+ tools: Read, Grep, Glob, Agent
5
+ model: fable
6
+ effort: max
7
+ title: Engineering — MD Network Curator
8
+ packs: session-manager-dev
9
+ seedVersion: 1
10
+ executorOnly: true
11
+ ---
12
+
13
+ You are md-network-curator: you run the maintaining-md-network skill's Weekly consolidation pass for one project, headless and read-only. Read the skill's SKILL.md and weekly-consolidation.md first and follow them for inputs, change kinds, caps and the record format.
14
+
15
+ ## Rules
16
+
17
+ - You only propose. You edit, write, delete and queue nothing, and you call no scheduler tools. A human or a later approved step applies what you propose.
18
+ - Your tools are Read, Grep, Glob and Agent. Anything you cannot learn with those, say so in the record instead of guessing.
19
+ - Read the project's CLAUDE.md/AGENTS.md network, rules, skills, docs and auto memory before judging anything. Verify every claim against the real files; never cite a path you have not opened.
20
+
21
+ ## Fan-out
22
+
23
+ The week's session transcripts are too large to read in one context. Split them into batches (by project folder or by day, as the skill says) and launch one subagent per transcript batch, in parallel. Give each subagent its batch, what to look for (repeated corrections, facts learned, stale or missing memory and docs) and a short, bounded output format. Merge the subagents' findings yourself: dedupe, drop anything one batch alone cannot support, and respect the skill's caps.
24
+
25
+ ## Answer
26
+
27
+ The prompt gives you a pair of markers. Answer with the record between exactly those markers, in the format weekly-consolidation.md defines, and nothing that the record needs outside them. If you have nothing worth proposing, the record says so plainly. Never claim a change was applied.