syntaur 0.6.1 → 0.7.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 (26) hide show
  1. package/README.md +2 -2
  2. package/dist/dashboard/server.js +10 -1
  3. package/dist/dashboard/server.js.map +1 -1
  4. package/dist/index.js +81 -46
  5. package/dist/index.js.map +1 -1
  6. package/package.json +1 -1
  7. package/platforms/claude-code/README.md +3 -3
  8. package/platforms/claude-code/agents/syntaur-expert.md +12 -4
  9. package/platforms/claude-code/commands/save-session-summary/save-session-summary.md +24 -0
  10. package/platforms/claude-code/hooks/hooks.json +10 -0
  11. package/platforms/claude-code/hooks/session-start.sh +26 -1
  12. package/platforms/claude-code/references/file-ownership.md +2 -1
  13. package/platforms/claude-code/references/protocol-summary.md +6 -1
  14. package/platforms/claude-code/skills/track-session/SKILL.md +86 -0
  15. package/platforms/codex/README.md +2 -2
  16. package/platforms/codex/agents/syntaur-operator.md +6 -4
  17. package/platforms/codex/commands/save-session-summary.md +23 -0
  18. package/platforms/codex/references/file-ownership.md +2 -1
  19. package/platforms/codex/references/protocol-summary.md +6 -1
  20. package/vendor/syntaur-skills/skills/complete-assignment/SKILL.md +2 -0
  21. package/vendor/syntaur-skills/skills/grab-assignment/SKILL.md +7 -2
  22. package/vendor/syntaur-skills/skills/plan-assignment/SKILL.md +3 -1
  23. package/vendor/syntaur-skills/skills/save-session-summary/SKILL.md +113 -0
  24. package/vendor/syntaur-skills/skills/syntaur-protocol/SKILL.md +23 -4
  25. package/vendor/syntaur-skills/skills/syntaur-protocol/references/file-ownership.md +2 -1
  26. package/vendor/syntaur-skills/skills/syntaur-protocol/references/protocol-summary.md +6 -1
package/dist/index.js CHANGED
@@ -2017,8 +2017,9 @@ ${todosSection}## Context
2017
2017
  - [Progress](./progress.md)
2018
2018
  - [Comments](./comments.md)
2019
2019
  - [Scratchpad](./scratchpad.md)
2020
- - [Handoff](./handoff.md)
2020
+ - [Handoff](./handoff.md) \u2014 cross-ticket outbound
2021
2021
  - [Decision Record](./decision-record.md)
2022
+ - [Sessions](./sessions/) \u2014 per-session continuity summaries (one \`<session-id>/summary.md\` per session)
2022
2023
  `;
2023
2024
  }
2024
2025
  var init_assignment = __esm({
@@ -2072,6 +2073,13 @@ var init_handoff = __esm({
2072
2073
  }
2073
2074
  });
2074
2075
 
2076
+ // src/templates/session-summary.ts
2077
+ var init_session_summary = __esm({
2078
+ "src/templates/session-summary.ts"() {
2079
+ "use strict";
2080
+ }
2081
+ });
2082
+
2075
2083
  // src/templates/progress.ts
2076
2084
  function renderProgress(params2) {
2077
2085
  return `---
@@ -2322,8 +2330,11 @@ You are working within the Syntaur protocol for multi-agent project coordination
2322
2330
  progress.md # Agent-writable, append-only: timestamped progress log
2323
2331
  comments.md # CLI-mediated: threaded questions/notes/feedback (via \`syntaur comment\`)
2324
2332
  scratchpad.md # Agent-writable: working notes
2325
- handoff.md # Agent-writable: append-only handoff log
2333
+ handoff.md # Agent-writable: append-only cross-ticket outbound at completion
2326
2334
  decision-record.md # Agent-writable: append-only decision log
2335
+ sessions/
2336
+ <session-id>/
2337
+ summary.md # Agent-writable: per-session continuity (single doc, overwritten)
2327
2338
  resources/
2328
2339
  _index.md # Derived (read-only)
2329
2340
  <resource-slug>.md # Shared-writable
@@ -2339,13 +2350,15 @@ You are working within the Syntaur protocol for multi-agent project coordination
2339
2350
  scratchpad.md
2340
2351
  handoff.md
2341
2352
  decision-record.md
2353
+ sessions/<session-id>/summary.md # Per-session continuity (same as project-nested)
2342
2354
  \`\`\`
2343
2355
 
2344
2356
  ## Write Boundary Rules (CRITICAL)
2345
2357
 
2346
2358
  ### Files you may WRITE:
2347
2359
  1. **Your assignment folder** -- only the assignment you are currently working on:
2348
- - \`assignment.md\`, \`plan*.md\` (0 or more versioned plan files), \`progress.md\`, \`scratchpad.md\`, \`handoff.md\`, \`decision-record.md\`
2360
+ - \`assignment.md\`, \`plan*.md\` (0 or more versioned plan files), \`progress.md\`, \`scratchpad.md\`, \`handoff.md\` (cross-ticket outbound at completion), \`decision-record.md\`
2361
+ - \`sessions/<session-id>/summary.md\` -- per-session continuity (single doc per session id, overwritten on save). Distinct from \`handoff.md\`.
2349
2362
  - Path (project-nested): \`~/.syntaur/projects/<project>/assignments/<your-assignment>/\`
2350
2363
  - Path (standalone): \`~/.syntaur/assignments/<your-assignment-uuid>/\`
2351
2364
  2. **Shared resources and memories** at the project level:
@@ -2449,7 +2462,8 @@ Before starting work, read these files in order:
2449
2462
  3. any \`${params2.assignmentDir}/plan*.md\` files linked from active todos in the \`## Todos\` section (may be 0, 1, or many)
2450
2463
  4. \`${params2.assignmentDir}/progress.md\` -- reverse-chron progress log (if present)
2451
2464
  5. \`${params2.assignmentDir}/comments.md\` -- threaded questions/notes/feedback (if present)
2452
- 6. \`${params2.assignmentDir}/handoff.md\` -- previous session handoff notes
2465
+ 6. \`${params2.assignmentDir}/handoff.md\` -- cross-ticket outbound history (entries from prior agents/humans handing this assignment off)
2466
+ 7. The latest \`${params2.assignmentDir}/sessions/<sid>/summary.md\` if present -- previous-session continuity (selected by \`summary.md\` file mtime; read it for "what was done / what's next" before resuming work in flight)
2453
2467
 
2454
2468
  ## Your Writable Files
2455
2469
 
@@ -2460,6 +2474,7 @@ You may write directly to these files inside your assignment folder:
2460
2474
  - \`${params2.assignmentDir}/scratchpad.md\`
2461
2475
  - \`${params2.assignmentDir}/handoff.md\`
2462
2476
  - \`${params2.assignmentDir}/decision-record.md\`
2477
+ - \`${params2.assignmentDir}/sessions/<session-id>/summary.md\` (per-session continuity)
2463
2478
 
2464
2479
  Do NOT edit \`${params2.assignmentDir}/comments.md\` directly \u2014 use \`syntaur comment\`. Do NOT edit other assignments' files \u2014 use \`syntaur request\` for cross-assignment todos.
2465
2480
 
@@ -2495,7 +2510,8 @@ If the global Syntaur Codex plugin is installed, prefer these workflows instead
2495
2510
  - \`create-assignment\` -- create a new assignment (use \`--type <bug|feature|chore|...>\` to classify; use \`--one-off\` to create a standalone assignment at \`~/.syntaur/assignments/<uuid>/\` with no parent project)
2496
2511
  - \`grab-assignment\` -- claim work, create \`.syntaur/context.json\`, and register a session
2497
2512
  - \`plan-assignment\` -- write a versioned plan file (\`plan.md\`, \`plan-v2.md\`, ...) and link it from the \`## Todos\` section of \`assignment.md\`
2498
- - \`complete-assignment\` -- append the handoff, append a final entry to \`progress.md\`, close the session, and transition state
2513
+ - \`complete-assignment\` -- write the cross-ticket \`handoff.md\` entry, append a final entry to \`progress.md\`, close the session, and transition state
2514
+ - \`save-session-summary\` -- write per-session continuity at \`<assignmentDir>/sessions/<sessionId>/summary.md\` for resume across sessions of the same agent. Codex has no \`PreCompact\` hook event \u2014 invoke this manually before compaction or session end.
2499
2515
  - \`track-session\` -- manage tracked tmux sessions for the dashboard
2500
2516
 
2501
2517
  If the plugin is unavailable, follow the same workflow manually with the \`syntaur\` CLI and keep the protocol files current yourself.
@@ -2509,7 +2525,8 @@ Before starting work, read these files in order:
2509
2525
  4. any \`${params2.assignmentDir}/plan*.md\` files linked from active todos in the \`## Todos\` section (may be 0, 1, or many)
2510
2526
  5. \`${params2.assignmentDir}/progress.md\` -- reverse-chron progress log (if present)
2511
2527
  6. \`${params2.assignmentDir}/comments.md\` -- threaded questions/notes/feedback (if present)
2512
- 7. \`${params2.assignmentDir}/handoff.md\` -- previous session handoff notes
2528
+ 7. \`${params2.assignmentDir}/handoff.md\` -- cross-ticket outbound history (entries from prior agents/humans handing this assignment off)
2529
+ 8. The latest \`${params2.assignmentDir}/sessions/<sid>/summary.md\` if present -- previous-session continuity (read it for "what was done / what's next" before resuming work in flight)
2513
2530
 
2514
2531
  ## Context File
2515
2532
 
@@ -2537,8 +2554,11 @@ Before starting work, read these files in order:
2537
2554
  progress.md # Agent-writable, append-only: timestamped progress log
2538
2555
  comments.md # CLI-mediated: threaded questions/notes/feedback (via \`syntaur comment\`)
2539
2556
  scratchpad.md # Agent-writable: working notes
2540
- handoff.md # Agent-writable: append-only handoff log
2557
+ handoff.md # Agent-writable: append-only cross-ticket outbound at completion
2541
2558
  decision-record.md # Agent-writable: append-only decision log
2559
+ sessions/
2560
+ <session-id>/
2561
+ summary.md # Agent-writable: per-session continuity (single doc, overwritten)
2542
2562
  resources/
2543
2563
  _index.md # Derived (read-only)
2544
2564
  <resource-slug>.md # Shared-writable
@@ -2554,13 +2574,15 @@ Before starting work, read these files in order:
2554
2574
  scratchpad.md
2555
2575
  handoff.md
2556
2576
  decision-record.md
2577
+ sessions/<session-id>/summary.md # Per-session continuity (same as project-nested)
2557
2578
  \`\`\`
2558
2579
 
2559
2580
  ## Write Boundary Rules (CRITICAL)
2560
2581
 
2561
2582
  ### Files you may WRITE:
2562
2583
  1. **Your assignment folder** -- only the assignment you are currently working on:
2563
- - \`assignment.md\`, \`plan*.md\` (0 or more versioned plan files), \`progress.md\`, \`scratchpad.md\`, \`handoff.md\`, \`decision-record.md\`
2584
+ - \`assignment.md\`, \`plan*.md\` (0 or more versioned plan files), \`progress.md\`, \`scratchpad.md\`, \`handoff.md\` (cross-ticket outbound at completion), \`decision-record.md\`
2585
+ - \`sessions/<session-id>/summary.md\` -- per-session continuity (single doc per session id, overwritten on save). Distinct from \`handoff.md\`.
2564
2586
  - Path: \`${params2.assignmentDir}/\`
2565
2587
  2. **Shared resources and memories** at the project level:
2566
2588
  - \`${params2.projectDir}/resources/<slug>.md\`
@@ -2639,7 +2661,7 @@ Read each linked playbook and follow the rules in its body section. The \`when_t
2639
2661
  - Slugs are lowercase, hyphen-separated. For standalone assignments, \`slug\` is display-only; the folder is named by the UUID.
2640
2662
  - Always read \`project.md\` at the project level (when project-nested) before starting work.
2641
2663
  - Keep \`assignment.md\` acceptance criteria and \`## Todos\` updated as work lands; append timestamped entries to \`progress.md\` (never to \`assignment.md\`).
2642
- - Keep active plan file(s) current after planning changes and \`handoff.md\` current before leaving the task.
2664
+ - Keep active plan file(s) current after planning changes. Write \`handoff.md\` (via \`complete-assignment\`) at the cross-ticket boundary; write \`sessions/<sid>/summary.md\` (via \`/save-session-summary\`) before compaction or before ending a session mid-assignment so a future session can resume cleanly.
2643
2665
  - When requirements shift, supersede the prior plan todo (\`- [x] ~~...~~ (superseded by plan-v<N>)\`) and write a new plan file instead of rewriting the old one.
2644
2666
  - Record questions, notes, and feedback via \`syntaur comment\`. Never edit \`comments.md\` directly. Resolve questions via the dashboard UI (toggle on the question entry).
2645
2667
  - To route work to another assignment, use \`syntaur request\`.
@@ -2683,6 +2705,7 @@ var init_templates = __esm({
2683
2705
  init_plan();
2684
2706
  init_scratchpad();
2685
2707
  init_handoff();
2708
+ init_session_summary();
2686
2709
  init_progress();
2687
2710
  init_comments();
2688
2711
  init_decision_record();
@@ -13258,12 +13281,18 @@ var REQUIRED_SKILLS = [
13258
13281
  "plan-assignment",
13259
13282
  "complete-assignment",
13260
13283
  "create-assignment",
13261
- "create-project"
13284
+ "create-project",
13285
+ "save-session-summary"
13262
13286
  ];
13263
13287
  function getVendoredSkillsDir() {
13264
13288
  const here = dirname9(fileURLToPath4(import.meta.url));
13265
13289
  return resolve26(here, "..", "vendor", "syntaur-skills", "skills");
13266
13290
  }
13291
+ function getPlatformSkillsDir(target) {
13292
+ const here = dirname9(fileURLToPath4(import.meta.url));
13293
+ const kind = target === "claude" ? "claude-code" : "codex";
13294
+ return resolve26(here, "..", "platforms", kind, "skills");
13295
+ }
13267
13296
  function defaultSkillTargetDir(target) {
13268
13297
  if (target === "claude") return resolve26(homedir3(), ".claude", "skills");
13269
13298
  return resolve26(homedir3(), ".codex", "skills");
@@ -13318,8 +13347,24 @@ async function skillMatches(srcDir, destDir) {
13318
13347
  if (destFiles.length !== srcFiles.length) return false;
13319
13348
  return true;
13320
13349
  }
13350
+ async function installSkillDir(srcDir, destDir, skillName, source, force) {
13351
+ if (!await fileExists(destDir)) {
13352
+ await copyDir(srcDir, destDir);
13353
+ return { skill: skillName, status: "installed", targetPath: destDir, source };
13354
+ }
13355
+ if (await skillMatches(srcDir, destDir)) {
13356
+ return { skill: skillName, status: "already-current", targetPath: destDir, source };
13357
+ }
13358
+ if (force) {
13359
+ await rm4(destDir, { recursive: true, force: true });
13360
+ await copyDir(srcDir, destDir);
13361
+ return { skill: skillName, status: "overwritten", targetPath: destDir, source };
13362
+ }
13363
+ return { skill: skillName, status: "differs-preserved", targetPath: destDir, source };
13364
+ }
13321
13365
  async function installSkills(options) {
13322
13366
  const source = options.sourceDir ?? getVendoredSkillsDir();
13367
+ const platformSource = options.platformSkillsDir ?? getPlatformSkillsDir(options.target);
13323
13368
  const targetRoot = options.targetDir ?? defaultSkillTargetDir(options.target);
13324
13369
  const force = options.force ?? false;
13325
13370
  if (!await fileExists(source)) {
@@ -13331,39 +13376,19 @@ async function installSkills(options) {
13331
13376
  await mkdir4(targetRoot, { recursive: true });
13332
13377
  for (const skill of REQUIRED_SKILLS) {
13333
13378
  const srcDir = join3(source, skill);
13334
- const destDir = join3(targetRoot, skill);
13335
13379
  if (!await fileExists(srcDir)) continue;
13336
- if (!await fileExists(destDir)) {
13337
- await copyDir(srcDir, destDir);
13338
- results.push({
13339
- skill,
13340
- status: "installed",
13341
- targetPath: destDir
13342
- });
13343
- continue;
13344
- }
13345
- if (await skillMatches(srcDir, destDir)) {
13346
- results.push({
13347
- skill,
13348
- status: "already-current",
13349
- targetPath: destDir
13350
- });
13351
- continue;
13352
- }
13353
- if (force) {
13354
- await rm4(destDir, { recursive: true, force: true });
13355
- await copyDir(srcDir, destDir);
13356
- results.push({
13357
- skill,
13358
- status: "overwritten",
13359
- targetPath: destDir
13360
- });
13361
- } else {
13362
- results.push({
13363
- skill,
13364
- status: "differs-preserved",
13365
- targetPath: destDir
13366
- });
13380
+ const destDir = join3(targetRoot, skill);
13381
+ results.push(await installSkillDir(srcDir, destDir, skill, "shared", force));
13382
+ }
13383
+ if (options.target === "claude" && await fileExists(platformSource)) {
13384
+ const entries = await readdir11(platformSource, { withFileTypes: true });
13385
+ for (const entry of entries) {
13386
+ if (!entry.isDirectory()) continue;
13387
+ const skill = entry.name;
13388
+ if (REQUIRED_SKILLS.includes(skill)) continue;
13389
+ const srcDir = join3(platformSource, skill);
13390
+ const destDir = join3(targetRoot, skill);
13391
+ results.push(await installSkillDir(srcDir, destDir, skill, "platform", force));
13367
13392
  }
13368
13393
  }
13369
13394
  return results;
@@ -13371,8 +13396,16 @@ async function installSkills(options) {
13371
13396
  async function uninstallSkills(options) {
13372
13397
  const targetRoot = options.targetDir ?? defaultSkillTargetDir(options.target);
13373
13398
  if (!await fileExists(targetRoot)) return [];
13399
+ const known = new Set(REQUIRED_SKILLS);
13400
+ const platformSource = options.platformSkillsDir ?? getPlatformSkillsDir(options.target);
13401
+ if (options.target === "claude" && await fileExists(platformSource)) {
13402
+ const entries = await readdir11(platformSource, { withFileTypes: true });
13403
+ for (const entry of entries) {
13404
+ if (entry.isDirectory()) known.add(entry.name);
13405
+ }
13406
+ }
13374
13407
  const removed = [];
13375
- for (const skill of REQUIRED_SKILLS) {
13408
+ for (const skill of known) {
13376
13409
  const destDir = join3(targetRoot, skill);
13377
13410
  if (!await fileExists(destDir)) continue;
13378
13411
  const skillMd = join3(destDir, "SKILL.md");
@@ -13506,9 +13539,10 @@ async function installPluginCommand(options) {
13506
13539
  }
13507
13540
  }
13508
13541
  console.log("\nThe plugin is now available in Claude Code.");
13509
- console.log(" Slash commands: /grab-assignment, /plan-assignment, /complete-assignment, /create-assignment, /create-project");
13542
+ console.log(" Slash commands: /grab-assignment, /plan-assignment, /complete-assignment, /create-assignment, /create-project, /track-session, /save-session-summary");
13510
13543
  console.log(" Background: syntaur-protocol skill (auto-invoked)");
13511
- console.log(" Hook: write boundary enforcement (PreToolUse) + SessionStart/End");
13544
+ console.log(" Claude-specific skill: track-session (agent session registration)");
13545
+ console.log(" Hook: write boundary enforcement (PreToolUse) + SessionStart/End + PreCompact (prompts /save-session-summary)");
13512
13546
  }
13513
13547
 
13514
13548
  // src/commands/install-statusline.ts
@@ -14058,9 +14092,10 @@ async function installCodexPluginCommand(options) {
14058
14092
  }
14059
14093
  console.log("\nThe plugin is now available to Codex.");
14060
14094
  console.log(
14061
- " Protocol skills: syntaur-protocol, create-project, create-assignment, grab-assignment, plan-assignment, complete-assignment"
14095
+ " Protocol skills: syntaur-protocol, create-project, create-assignment, grab-assignment, plan-assignment, complete-assignment, save-session-summary"
14062
14096
  );
14063
14097
  console.log(" Codex-specific: track-session skill (rollout path aware)");
14098
+ console.log(" Slash commands: /track-session, /save-session-summary (no PreCompact hook on Codex \u2014 invoke manually before compaction)");
14064
14099
  console.log(" Hooks: write boundary enforcement, session cleanup");
14065
14100
  }
14066
14101