syntaur 0.1.14 → 0.3.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 (134) hide show
  1. package/README.md +5 -0
  2. package/dashboard/dist/assets/{_basePickBy-eih-KlEh.js → _basePickBy-BhaCV7eH.js} +1 -1
  3. package/dashboard/dist/assets/{_baseUniq-M21wg9ZQ.js → _baseUniq-CDPcqrs2.js} +1 -1
  4. package/dashboard/dist/assets/{arc-uKZMelpQ.js → arc-BP0RxLwl.js} +1 -1
  5. package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-CpMG5exj.js → architectureDiagram-2XIMDMQ5-BDzvaeJp.js} +1 -1
  6. package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-BHnCCKl_.js → blockDiagram-WCTKOSBZ-ZeL9mROo.js} +1 -1
  7. package/dashboard/dist/assets/{c4Diagram-IC4MRINW-B-n3zU9i.js → c4Diagram-IC4MRINW-7S5bvFLp.js} +1 -1
  8. package/dashboard/dist/assets/channel-CcB_wcgb.js +1 -0
  9. package/dashboard/dist/assets/{chunk-4BX2VUAB-ChD9Iuih.js → chunk-4BX2VUAB-Ca7R4nv5.js} +1 -1
  10. package/dashboard/dist/assets/{chunk-55IACEB6-B3vP9Psg.js → chunk-55IACEB6-flEv13FB.js} +1 -1
  11. package/dashboard/dist/assets/{chunk-FMBD7UC4-CIhWgxPS.js → chunk-FMBD7UC4-CfcYWBM6.js} +1 -1
  12. package/dashboard/dist/assets/{chunk-JSJVCQXG-DiGIV_cB.js → chunk-JSJVCQXG-Dw4yL0VS.js} +1 -1
  13. package/dashboard/dist/assets/{chunk-KX2RTZJC-DnGsx5jo.js → chunk-KX2RTZJC-B2cDe40G.js} +1 -1
  14. package/dashboard/dist/assets/{chunk-NQ4KR5QH-BFBu1fmg.js → chunk-NQ4KR5QH-LZVm0IWg.js} +1 -1
  15. package/dashboard/dist/assets/{chunk-QZHKN3VN-DYtumHth.js → chunk-QZHKN3VN-Dg0EeHNI.js} +1 -1
  16. package/dashboard/dist/assets/{chunk-WL4C6EOR-BzCrQPuw.js → chunk-WL4C6EOR-v3rXNwXc.js} +1 -1
  17. package/dashboard/dist/assets/classDiagram-VBA2DB6C-BJr38z2g.js +1 -0
  18. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-BJr38z2g.js +1 -0
  19. package/dashboard/dist/assets/clone-Cfs2GUGt.js +1 -0
  20. package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-Bl8mb5eY.js → cose-bilkent-S5V4N54A-D-3JzLoS.js} +1 -1
  21. package/dashboard/dist/assets/{dagre-KLK3FWXG-BHffcOgo.js → dagre-KLK3FWXG-d_mbczhU.js} +1 -1
  22. package/dashboard/dist/assets/{diagram-E7M64L7V-Ib83qzT_.js → diagram-E7M64L7V-BUyAp8pW.js} +1 -1
  23. package/dashboard/dist/assets/{diagram-IFDJBPK2-hOdh63_T.js → diagram-IFDJBPK2-C8doXcyQ.js} +1 -1
  24. package/dashboard/dist/assets/{diagram-P4PSJMXO-D4ocLmc5.js → diagram-P4PSJMXO-BUSmHa55.js} +1 -1
  25. package/dashboard/dist/assets/{erDiagram-INFDFZHY-CHJ6zqnJ.js → erDiagram-INFDFZHY-Bn5_0LPU.js} +1 -1
  26. package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-DEz5g2Ye.js → flowDiagram-PKNHOUZH-CnEjerQM.js} +1 -1
  27. package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-BSftxDHA.js → ganttDiagram-A5KZAMGK-CL94fbyy.js} +1 -1
  28. package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-Cr3vGf07.js → gitGraphDiagram-K3NZZRJ6-4i_PeG8V.js} +1 -1
  29. package/dashboard/dist/assets/{graph-D4us8trI.js → graph-BtoFhoAd.js} +1 -1
  30. package/dashboard/dist/assets/index-DZUGYrvE.css +1 -0
  31. package/dashboard/dist/assets/index-Dv_-SxuL.js +481 -0
  32. package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-CH_jVfru.js → infoDiagram-LFFYTUFH-CdUsuNgZ.js} +1 -1
  33. package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-BdKLa5GC.js → ishikawaDiagram-PHBUUO56-BjggRlUx.js} +1 -1
  34. package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-C_SMzNGF.js → journeyDiagram-4ABVD52K-V4AgexlR.js} +1 -1
  35. package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-BeA-egRW.js → kanban-definition-K7BYSVSG-ChlylQRf.js} +1 -1
  36. package/dashboard/dist/assets/{layout-B8tDmL4j.js → layout-DLcz9AmA.js} +1 -1
  37. package/dashboard/dist/assets/{linear-CeGJyrHS.js → linear-l2xnSHze.js} +1 -1
  38. package/dashboard/dist/assets/{mermaid.core-DyEs-LPd.js → mermaid.core-DKO1ytRW.js} +4 -4
  39. package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-DCxzAr8m.js → mindmap-definition-YRQLILUH-DTmTPHrT.js} +1 -1
  40. package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-CEj5dRDi.js → pieDiagram-SKSYHLDU-CwK80y8Y.js} +1 -1
  41. package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-CKfvAEQg.js → quadrantDiagram-337W2JSQ-Be1xqW_w.js} +1 -1
  42. package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-CTRqKPtJ.js → requirementDiagram-Z7DCOOCP-JcspXCs0.js} +1 -1
  43. package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-BlYbz8UR.js → sankeyDiagram-WA2Y5GQK-nJb1BInq.js} +1 -1
  44. package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-PT2t7ryQ.js → sequenceDiagram-2WXFIKYE-DUrclEgA.js} +1 -1
  45. package/dashboard/dist/assets/{stateDiagram-RAJIS63D-eDX7IUuV.js → stateDiagram-RAJIS63D-CjinnNtF.js} +1 -1
  46. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-yfclw-nM.js +1 -0
  47. package/dashboard/dist/assets/{timeline-definition-YZTLITO2-By11B1Ow.js → timeline-definition-YZTLITO2-kM-oVLNz.js} +1 -1
  48. package/dashboard/dist/assets/{treemap-KZPCXAKY-rvdLeWWV.js → treemap-KZPCXAKY-CYziFlrQ.js} +1 -1
  49. package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-Br_oZ1wv.js → vennDiagram-LZ73GAT5-DX0DbxBN.js} +1 -1
  50. package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-D-MWVqrT.js → xychartDiagram-JWTSCODW-BGqM42ZM.js} +1 -1
  51. package/dashboard/dist/index.html +2 -2
  52. package/dist/dashboard/server.d.ts +6 -1
  53. package/dist/dashboard/server.js +2427 -1089
  54. package/dist/dashboard/server.js.map +1 -1
  55. package/dist/index.js +6139 -2624
  56. package/dist/index.js.map +1 -1
  57. package/examples/playbooks/keep-records-updated.md +15 -9
  58. package/examples/playbooks/read-before-plan.md +13 -10
  59. package/examples/{sample-mission → sample-project}/_index-assignments.md +1 -1
  60. package/examples/{sample-mission → sample-project}/_index-decisions.md +1 -1
  61. package/examples/{sample-mission → sample-project}/_index-plans.md +1 -1
  62. package/examples/{sample-mission → sample-project}/_status.md +4 -4
  63. package/examples/{sample-mission → sample-project}/assignments/design-auth-schema/assignment.md +8 -18
  64. package/examples/sample-project/assignments/design-auth-schema/comments.md +26 -0
  65. package/examples/sample-project/assignments/design-auth-schema/progress.md +20 -0
  66. package/examples/{sample-mission → sample-project}/assignments/implement-jwt-middleware/assignment.md +8 -18
  67. package/examples/sample-project/assignments/implement-jwt-middleware/comments.md +17 -0
  68. package/examples/sample-project/assignments/implement-jwt-middleware/progress.md +20 -0
  69. package/examples/{sample-mission → sample-project}/assignments/write-auth-tests/assignment.md +8 -9
  70. package/examples/sample-project/assignments/write-auth-tests/comments.md +10 -0
  71. package/examples/sample-project/assignments/write-auth-tests/progress.md +10 -0
  72. package/examples/{sample-mission → sample-project}/manifest.md +3 -3
  73. package/examples/{sample-mission → sample-project}/memories/_index.md +2 -2
  74. package/examples/{sample-mission → sample-project}/memories/postgres-connection-pooling.md +1 -1
  75. package/examples/{sample-mission → sample-project}/resources/_index.md +1 -1
  76. package/package.json +5 -3
  77. package/platforms/README.md +7 -7
  78. package/platforms/claude-code/README.md +1 -1
  79. package/platforms/claude-code/agents/syntaur-expert.md +94 -66
  80. package/platforms/claude-code/commands/doctor-syntaur/doctor-syntaur.md +112 -0
  81. package/platforms/claude-code/commands/track-session/track-session.md +8 -8
  82. package/platforms/claude-code/hooks/enforce-boundaries.sh +4 -4
  83. package/platforms/claude-code/hooks/hooks.json +1 -1
  84. package/platforms/claude-code/hooks/session-cleanup.sh +5 -5
  85. package/platforms/claude-code/references/file-ownership.md +20 -8
  86. package/platforms/claude-code/references/protocol-summary.md +24 -9
  87. package/platforms/claude-code/skills/complete-assignment/SKILL.md +35 -17
  88. package/platforms/claude-code/skills/create-assignment/SKILL.md +22 -19
  89. package/platforms/claude-code/skills/grab-assignment/SKILL.md +56 -49
  90. package/platforms/claude-code/skills/plan-assignment/SKILL.md +57 -10
  91. package/platforms/claude-code/skills/syntaur-protocol/SKILL.md +38 -24
  92. package/platforms/codex/.codex-plugin/plugin.json +3 -3
  93. package/platforms/codex/README.md +1 -1
  94. package/platforms/codex/adapters/AGENTS.md.template +3 -3
  95. package/platforms/codex/agents/openai.yaml +2 -2
  96. package/platforms/codex/agents/syntaur-operator.md +58 -43
  97. package/platforms/codex/references/file-ownership.md +19 -8
  98. package/platforms/codex/references/protocol-summary.md +28 -9
  99. package/platforms/codex/scripts/enforce-boundaries.sh +2 -2
  100. package/platforms/codex/scripts/session-cleanup.sh +2 -2
  101. package/platforms/codex/skills/complete-assignment/SKILL.md +7 -6
  102. package/platforms/codex/skills/create-assignment/SKILL.md +18 -12
  103. package/platforms/codex/skills/grab-assignment/SKILL.md +30 -20
  104. package/platforms/codex/skills/plan-assignment/SKILL.md +19 -11
  105. package/platforms/codex/skills/syntaur-protocol/SKILL.md +46 -28
  106. package/platforms/cursor/README.md +1 -1
  107. package/platforms/cursor/adapters/syntaur-protocol.mdc +1 -1
  108. package/platforms/opencode/README.md +1 -1
  109. package/platforms/opencode/adapters/opencode.json.template +1 -1
  110. package/dashboard/dist/assets/channel-DVBgSlOI.js +0 -1
  111. package/dashboard/dist/assets/classDiagram-VBA2DB6C-B7dxBacd.js +0 -1
  112. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-B7dxBacd.js +0 -1
  113. package/dashboard/dist/assets/clone-DAOrHcCC.js +0 -1
  114. package/dashboard/dist/assets/index-AXntWS_w.css +0 -1
  115. package/dashboard/dist/assets/index-CEMjexkj.js +0 -460
  116. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO--yuSBnLh.js +0 -1
  117. package/examples/sample-mission/agent.md +0 -33
  118. package/examples/sample-mission/claude.md +0 -13
  119. package/platforms/claude-code/skills/create-mission/SKILL.md +0 -51
  120. package/platforms/codex/skills/create-mission/SKILL.md +0 -35
  121. /package/examples/{sample-mission → sample-project}/assignments/design-auth-schema/decision-record.md +0 -0
  122. /package/examples/{sample-mission → sample-project}/assignments/design-auth-schema/handoff.md +0 -0
  123. /package/examples/{sample-mission → sample-project}/assignments/design-auth-schema/plan.md +0 -0
  124. /package/examples/{sample-mission → sample-project}/assignments/design-auth-schema/scratchpad.md +0 -0
  125. /package/examples/{sample-mission → sample-project}/assignments/implement-jwt-middleware/decision-record.md +0 -0
  126. /package/examples/{sample-mission → sample-project}/assignments/implement-jwt-middleware/handoff.md +0 -0
  127. /package/examples/{sample-mission → sample-project}/assignments/implement-jwt-middleware/plan.md +0 -0
  128. /package/examples/{sample-mission → sample-project}/assignments/implement-jwt-middleware/scratchpad.md +0 -0
  129. /package/examples/{sample-mission → sample-project}/assignments/write-auth-tests/decision-record.md +0 -0
  130. /package/examples/{sample-mission → sample-project}/assignments/write-auth-tests/handoff.md +0 -0
  131. /package/examples/{sample-mission → sample-project}/assignments/write-auth-tests/plan.md +0 -0
  132. /package/examples/{sample-mission → sample-project}/assignments/write-auth-tests/scratchpad.md +0 -0
  133. /package/examples/{sample-mission/mission.md → sample-project/project.md} +0 -0
  134. /package/examples/{sample-mission → sample-project}/resources/auth-requirements.md +0 -0
@@ -1,24 +1,26 @@
1
1
  # Syntaur Protocol Summary
2
2
 
3
+ Protocol version: **2.0**
4
+
3
5
  ## Directory Structure
4
6
 
5
7
  ```
6
8
  ~/.syntaur/
7
9
  config.md
8
- missions/
9
- <mission-slug>/
10
+ projects/
11
+ <project-slug>/
10
12
  manifest.md # Derived: root navigation (read-only)
11
- mission.md # Human-authored: mission overview (read-only)
13
+ project.md # Human-authored: project overview (read-only)
12
14
  _index-assignments.md # Derived (read-only)
13
15
  _index-plans.md # Derived (read-only)
14
16
  _index-decisions.md # Derived (read-only)
15
17
  _status.md # Derived (read-only)
16
- claude.md # Human-authored: Claude-specific instructions (read-only)
17
- agent.md # Human-authored: universal agent instructions (read-only)
18
18
  assignments/
19
19
  <assignment-slug>/
20
- assignment.md # Agent-writable: source of truth for state
21
- plan.md # Agent-writable: implementation plan
20
+ assignment.md # Agent-writable: source of truth for state (includes ## Todos checklist)
21
+ plan*.md # Agent-writable: versioned implementation plans (optional, 0 or more: plan.md, plan-v2.md, ...)
22
+ progress.md # Agent-writable, append-only: timestamped progress log
23
+ comments.md # CLI-mediated: threaded questions/notes/feedback (via `syntaur comment`)
22
24
  scratchpad.md # Agent-writable: working notes
23
25
  handoff.md # Agent-writable: append-only handoff log
24
26
  decision-record.md # Agent-writable: append-only decision log
@@ -28,6 +30,15 @@
28
30
  memories/
29
31
  _index.md # Derived (read-only)
30
32
  <memory-slug>.md # Shared-writable
33
+ assignments/
34
+ <assignment-id>/ # Standalone assignments — folder named by UUID, `project: null`
35
+ assignment.md # Same schema as project-nested, `slug` is display-only
36
+ plan*.md
37
+ progress.md
38
+ comments.md
39
+ scratchpad.md
40
+ handoff.md
41
+ decision-record.md
31
42
  playbooks/
32
43
  manifest.md # Derived: playbook listing (read-only)
33
44
  <slug>.md # User-authored: behavioral rules for agents
@@ -62,9 +73,13 @@
62
73
  ## Key Rules
63
74
 
64
75
  1. **Assignment frontmatter is the single source of truth** for all assignment state.
65
- 2. **One folder per mission**, one subfolder per assignment.
76
+ 2. **Project-nested assignments** live at `projects/<slug>/assignments/<aslug>/` (folder name = slug). **Standalone assignments** live at `assignments/<uuid>/` (folder name = UUID, `project: null`, slug display-only).
66
77
  3. **Derived files** (underscore-prefixed) are never edited manually.
67
78
  4. **Slugs** are lowercase, hyphen-separated.
68
- 5. **Dependencies** are declared via `dependsOn` in assignment frontmatter.
79
+ 5. **Dependencies** are declared via `dependsOn` in assignment frontmatter. Only valid within the same project — standalone assignments cannot declare `dependsOn`.
69
80
  6. An assignment cannot transition from `pending` to `in_progress` while any dependency is not `completed`.
70
81
  7. **Playbooks** in `~/.syntaur/playbooks/` define behavioral rules agents must follow. Read `manifest.md` for a summary, then read each referenced playbook before starting work.
82
+ 8. **Todos** in the `## Todos` section of `assignment.md` are an informal markdown checklist. Items may be simple tasks or link to plan files. When a plan is superseded, mark the old todo: `- [x] ~~Execute [plan](./plan.md)~~ (superseded by plan-v2)` — never delete it. `## Todos` is also the landing spot for cross-assignment requests via `syntaur request`.
83
+ 9. **Progress** is appended to `progress.md` as timestamped entries (newest first). Do not add a `## Progress` section to `assignment.md`.
84
+ 10. **Comments** are appended to `comments.md` via `syntaur comment <slug> "body" [--type question|note|feedback] [--reply-to <id>]`. Never edit `comments.md` directly. Questions carry a `resolved` flag.
85
+ 11. **Cross-assignment work** is requested via `syntaur request <source> <target> "text"` — appends to the target's `## Todos` annotated `(from: <source>)`.
@@ -17,15 +17,15 @@ Write a handoff for your current assignment and transition it to review (or comp
17
17
 
18
18
  User provided: $ARGUMENTS
19
19
 
20
- If the user passed `--complete`, transition directly to `completed` instead of `review`. However, `--complete` is ONLY allowed if ALL acceptance criteria are met. If any criteria are unmet, always transition to `review` regardless of the `--complete` flag, and inform the user why.
20
+ If the user passed `--complete`, transition directly to `completed` instead of `review`. However, `--complete` is ONLY allowed if ALL acceptance criteria are met AND every `## Todos` item is either checked or marked superseded. If any criterion or todo is unresolved, always transition to `review` regardless of the `--complete` flag, and inform the user why.
21
21
 
22
22
  ## Step 1: Load Context
23
23
 
24
24
  Read `.syntaur/context.json` from the current working directory.
25
25
 
26
- If the file does not exist, tell the user: "No active assignment found. Run `/grab-assignment <mission-slug>` first."
26
+ If the file does not exist, tell the user: "No active assignment found. Run `/grab-assignment <project-slug>` first."
27
27
 
28
- Extract: `missionSlug`, `assignmentSlug`, `assignmentDir`, `missionDir`.
28
+ Extract: `projectSlug`, `assignmentSlug`, `assignmentDir`, `projectDir`.
29
29
 
30
30
  ## Step 1.5: Load Playbooks
31
31
 
@@ -37,18 +37,34 @@ ls ~/.syntaur/playbooks/*.md 2>/dev/null
37
37
 
38
38
  For each file found, read it and check that your work follows its directives. If any playbook has completion-related rules (e.g., "run tests before done"), follow them before proceeding.
39
39
 
40
- ## Step 2: Verify Acceptance Criteria
40
+ ## Step 2: Verify Acceptance Criteria and Todos
41
41
 
42
- Read `<assignmentDir>/assignment.md` and find the `## Acceptance Criteria` section.
42
+ Read `<assignmentDir>/assignment.md` and find the `## Acceptance Criteria` and `## Todos` sections.
43
43
 
44
- Review each criterion (checkbox item). For each:
45
- - If you believe it is met, note why (what was implemented, where)
46
- - If it is NOT met, flag it clearly
44
+ Review each acceptance criterion (checkbox item) and each todo. For each:
45
+ - If you believe it is met/done, note why (what was implemented, where)
46
+ - If it is NOT met/done, flag it clearly
47
47
 
48
- If any criteria are not met, warn the user: "The following acceptance criteria are not yet met: [list]. Do you want to proceed with the handoff anyway?"
48
+ Superseded todos (marked `- [x] ~~...~~ (superseded by ...)`) count as resolved they do not need to be done again.
49
+
50
+ If any acceptance criteria are unmet OR any todo is still `- [ ]` and not superseded, warn the user: "The following are not yet done: [list]. Do you want to proceed with the handoff anyway?"
49
51
 
50
52
  If the user says no, stop.
51
53
 
54
+ ## Step 2.5: Append a Final Progress Entry
55
+
56
+ Before writing the handoff, append a final entry to `<assignmentDir>/progress.md` summarizing what was completed. The entry goes at the **top** of the body (reverse-chron order) under a new `## <RFC 3339 timestamp>` heading:
57
+
58
+ ```markdown
59
+ ## <ISO 8601 timestamp>
60
+
61
+ <One paragraph summarizing the final state of work: what was implemented, what verifications passed, and any deliberate scope exclusions.>
62
+ ```
63
+
64
+ Update `progress.md`'s frontmatter: bump `entryCount` and set `updated` to the current timestamp.
65
+
66
+ Do NOT add a `## Progress` section to `assignment.md` — progress entries live exclusively in `progress.md` as of protocol v2.0.
67
+
52
68
  ## Step 3: Write Handoff Entry
53
69
 
54
70
  Read `<assignmentDir>/handoff.md` to see its current content and frontmatter.
@@ -82,20 +98,22 @@ Use the Edit tool to append this entry to handoff.md (do not overwrite existing
82
98
 
83
99
  Also update the handoff.md frontmatter: set `updated` to the current timestamp and increment the `handoffCount` by 1.
84
100
 
85
- ## Step 4: Update Acceptance Criteria Checkboxes
101
+ ## Step 4: Update Checkboxes (Criteria + Todos)
102
+
103
+ In `<assignmentDir>/assignment.md`, update checkboxes in both the `## Acceptance Criteria` and `## Todos` sections to reflect the current state. Use the Edit tool to check off items that were completed (change `- [ ]` to `- [x]`).
86
104
 
87
- In `<assignmentDir>/assignment.md`, update the acceptance criteria checkboxes to reflect the current state. Use the Edit tool to check off criteria that were met (change `- [ ]` to `- [x]`).
105
+ **Note:** Ideally, these should have been checked off incrementally during implementation. If they are already checked, verify they are still accurate. If some were missed, check them off now with a note in the handoff about which were verified at completion time vs. during development.
88
106
 
89
- **Note:** Ideally, criteria should have been checked off incrementally during implementation. If they are already checked, verify they are still accurate. If some were missed, check them off now with a note in the handoff about which were verified at completion time vs. during development.
107
+ Do NOT uncheck or rewrite superseded todo lines (those matching `- [x] ~~...~~ (superseded by ...)`) leave that history intact.
90
108
 
91
109
  ## Step 4.5: Close Session
92
110
 
93
- Read the context file (`.syntaur/context.json`) to get the `sessionId` and `missionSlug`. Then mark the session as completed via the dashboard API:
111
+ Read the context file (`.syntaur/context.json`) to get the `sessionId` and `projectSlug`. Then mark the session as completed via the dashboard API:
94
112
 
95
113
  ```bash
96
114
  curl -s -X PATCH "http://localhost:$(cat ~/.syntaur/dashboard-port 2>/dev/null || echo 4800)/api/agent-sessions/<session-id>/status" \
97
115
  -H "Content-Type: application/json" \
98
- -d '{"status": "completed", "missionSlug": "<mission-slug>"}'
116
+ -d '{"status": "completed", "projectSlug": "<project-slug>"}'
99
117
  ```
100
118
 
101
119
  If the API call fails (e.g., dashboard not running), this is non-critical — the session will be reconciled automatically on the next dashboard load.
@@ -105,20 +123,20 @@ If the API call fails (e.g., dashboard not running), this is non-critical — th
105
123
  If the user passed `--complete`:
106
124
 
107
125
  ```bash
108
- syntaur complete <assignment-slug> --mission <mission-slug>
126
+ syntaur complete <assignment-slug> --project <project-slug>
109
127
  ```
110
128
 
111
129
  Otherwise, transition to review:
112
130
 
113
131
  ```bash
114
- syntaur review <assignment-slug> --mission <mission-slug>
132
+ syntaur review <assignment-slug> --project <project-slug>
115
133
  ```
116
134
 
117
135
  Use `dangerouslyDisableSandbox: true` since the CLI writes to `~/.syntaur/`.
118
136
 
119
137
  If the command fails, report the error. Common failures:
120
138
  - Assignment is not in `in_progress` status (cannot transition)
121
- - Mission not found
139
+ - Project not found
122
140
 
123
141
  ## Step 6: Clean Up Context
124
142
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: create-assignment
3
- description: Create a new Syntaur assignment within a mission (or as a one-off)
4
- argument-hint: <title> --mission <slug> [--priority <level>] [--depends-on <slugs>] [--one-off]
3
+ description: Create a new Syntaur assignment within a project (or as a one-off)
4
+ argument-hint: <title> --project <slug> [--priority <level>] [--depends-on <slugs>] [--type <type>] [--one-off]
5
5
  allowed-tools:
6
6
  - Bash
7
7
  - Read
@@ -9,7 +9,7 @@ allowed-tools:
9
9
 
10
10
  # Create Assignment
11
11
 
12
- Create a new assignment within a Syntaur mission from Claude Code.
12
+ Create a new assignment within a Syntaur project from Claude Code.
13
13
 
14
14
  ## Arguments
15
15
 
@@ -17,48 +17,51 @@ The user provided: $ARGUMENTS
17
17
 
18
18
  Parse the arguments:
19
19
  - First argument (required): the assignment title (e.g., `"Add login endpoint"`)
20
- - `--mission <slug>` (required unless `--one-off`): the mission to add the assignment to
21
- - `--one-off` (optional): create a standalone mission+assignment in one step
20
+ - `--project <slug>` (required unless `--one-off`): the project to add the assignment to
21
+ - `--one-off` (optional): create a **standalone** assignment at `~/.syntaur/assignments/<uuid>/` with `project: null`. Folder is named by UUID; `slug` is display-only. `--depends-on` is not permitted for standalone assignments.
22
22
  - `--slug` (optional): override the auto-generated assignment slug
23
23
  - `--priority` (optional): `low`, `medium` (default), `high`, or `critical`
24
- - `--depends-on` (optional): comma-separated list of assignment slugs this depends on
25
- - `--dir` (optional): override the default mission directory
24
+ - `--type` (optional): classification such as `feature`, `bug`, `refactor`, `research`, `chore`. Defaults to `feature`. When `~/.syntaur/config.md` defines `types.definitions`, the CLI validates against that list.
25
+ - `--depends-on` (optional, project-nested only): comma-separated list of assignment slugs this depends on
26
+ - `--dir` (optional): override the default project directory
26
27
 
27
28
  If no title was provided, ask the user what the assignment should be called.
28
29
 
29
- If neither `--mission` nor `--one-off` was provided, check if there is an active assignment context in `.syntaur/context.json`. If so, default `--mission` to that context's `missionSlug` and confirm with the user: "Add this assignment to mission `<missionSlug>`?"
30
+ If neither `--project` nor `--one-off` was provided, check if there is an active assignment context in `.syntaur/context.json`. If so, default `--project` to that context's `projectSlug` and confirm with the user: "Add this assignment to project `<projectSlug>`?"
30
31
 
31
- If there is no active context and no mission flag, ask the user which mission to add it to, or whether it should be a one-off.
32
+ If there is no active context and no project flag, ask the user which project to add it to, or whether it should be a one-off.
32
33
 
33
34
  ## Step 1: Run the CLI
34
35
 
35
36
  Build the command from the parsed arguments. Use `dangerouslyDisableSandbox: true` since the CLI writes to `~/.syntaur/` which is outside the project sandbox.
36
37
 
37
38
  ```bash
38
- syntaur create-assignment "<title>" --mission <slug> [--slug <slug>] [--priority <level>] [--depends-on <slugs>] [--dir <path>]
39
+ syntaur create-assignment "<title>" --project <slug> [--slug <slug>] [--priority <level>] [--depends-on <slugs>] [--type <type>] [--dir <path>]
39
40
  ```
40
41
 
41
- Or for one-off:
42
+ Or for one-off (standalone at `~/.syntaur/assignments/<uuid>/`):
42
43
 
43
44
  ```bash
44
- syntaur create-assignment "<title>" --one-off [--slug <slug>] [--priority <level>] [--dir <path>]
45
+ syntaur create-assignment "<title>" --one-off [--slug <slug>] [--priority <level>] [--type <type>] [--dir <path>]
45
46
  ```
46
47
 
47
- If the command fails (e.g., mission not found, slug collision), report the error and suggest fixes.
48
+ If the command fails (e.g., project not found, slug collision), report the error and suggest fixes.
48
49
 
49
50
  ## Step 2: Read the Created Assignment
50
51
 
51
52
  After successful creation, extract the assignment slug and directory from the CLI output. Read the generated `assignment.md`:
52
53
 
53
54
  ```bash
54
- cat ~/.syntaur/missions/<mission-slug>/assignments/<assignment-slug>/assignment.md
55
+ cat ~/.syntaur/projects/<project-slug>/assignments/<assignment-slug>/assignment.md
55
56
  ```
56
57
 
57
58
  ## Step 3: Guide Next Steps
58
59
 
59
60
  Tell the user:
60
- - The assignment was created with its slug, priority, and location
61
- - List the files created (assignment.md, plan.md, scratchpad.md, handoff.md, decision-record.md)
62
- - Suggest they edit `assignment.md` to fill in the objective, acceptance criteria, and context
63
- - If dependencies were set, note them
64
- - Suggest running `/grab-assignment <mission-slug> <assignment-slug>` to claim and start working on it
61
+ - The assignment was created with its slug, priority, type, and location. For standalone assignments, the location is `~/.syntaur/assignments/<uuid>/` — note the UUID (not slug) is the folder name.
62
+ - List the files created: `assignment.md`, `progress.md`, `comments.md`, `scratchpad.md`, `handoff.md`, `decision-record.md`. `plan.md` is NOT scaffolded — plan files are optional and created on demand by `/plan-assignment`.
63
+ - Remind the user: `progress.md` is where timestamped progress entries go (not `assignment.md`), and `comments.md` is written only via `syntaur comment <slug-or-uuid> "body" --type question|note|feedback`.
64
+ - Suggest they edit `assignment.md` to fill in the objective, acceptance criteria, context, and any initial todos. The `## Todos` section accepts simple tasks or markdown links to plan files.
65
+ - Or suggest running `/plan-assignment` after grabbing it creates a plan file and auto-appends a linked todo to `## Todos`.
66
+ - If dependencies were set, note them. (Standalone assignments cannot declare dependencies.)
67
+ - Suggest running `/grab-assignment <project-slug> <assignment-slug>` (or `/grab-assignment --id <uuid>` for standalone) to claim and start working on it.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: grab-assignment
3
- description: Discover and claim a pending Syntaur assignment from a mission
4
- argument-hint: <mission-slug> [assignment-slug]
3
+ description: Load a Syntaur assignment into the current working context
4
+ argument-hint: <project-slug> [assignment-slug]
5
5
  allowed-tools:
6
6
  - Bash
7
7
  - Read
@@ -12,86 +12,79 @@ allowed-tools:
12
12
 
13
13
  # Grab Assignment
14
14
 
15
- Claim a pending assignment from a Syntaur mission and set up your working context.
15
+ Load a Syntaur assignment into the current working context so you can work on it.
16
+
17
+ **Grabbing is non-destructive.** It never fails because of status. An assignment in `pending`, `in_progress`, `blocked`, `review`, `completed`, or `failed` can all be grabbed — grabbing just sets up context (`.syntaur/context.json`), registers the session, and reads the assignment. Only a `pending` assignment will additionally be transitioned to `in_progress`; any other status is left untouched.
16
18
 
17
19
  ## Arguments
18
20
 
19
21
  The user provided: $ARGUMENTS
20
22
 
21
23
  Parse the arguments:
22
- - First argument (required): the mission slug (e.g., `build-auth-system`)
23
- - Second argument (optional): a specific assignment slug to grab. If omitted, you will list pending assignments and pick one.
24
+ - First argument (required): the project slug (e.g., `build-auth-system`)
25
+ - Second argument (optional): a specific assignment slug to grab. If omitted, you will list the project's assignments and pick one (preferring `pending` when multiple exist).
24
26
 
25
27
  ## Pre-flight Check
26
28
 
27
29
  1. Check if `.syntaur/context.json` already exists in the current working directory.
28
- - If it exists, read it and warn the user: "You already have an active assignment: `<assignmentSlug>` in mission `<missionSlug>`. Grabbing a new assignment will replace this context. Proceed?"
30
+ - If it exists, read it and warn the user: "You already have an active assignment: `<assignmentSlug>` in project `<projectSlug>`. Grabbing a new assignment will replace this context. Proceed?"
29
31
  - If the user says no, stop.
30
32
 
31
- ## Step 1: Discover the Mission
33
+ ## Step 1: Discover the Project
32
34
 
33
- Read the mission directory to understand what is available:
35
+ Read the project directory to understand what is available:
34
36
 
35
37
  ```bash
36
- ls ~/.syntaur/missions/<mission-slug>/
38
+ ls ~/.syntaur/projects/<project-slug>/
37
39
  ```
38
40
 
39
- Read the mission files, starting with the manifest (the protocol-defined entry point):
40
- - Read `~/.syntaur/missions/<mission-slug>/manifest.md` first (root navigation file per protocol spec)
41
- - Read `~/.syntaur/missions/<mission-slug>/mission.md` for goal and context
42
- - Read `~/.syntaur/missions/<mission-slug>/agent.md` for agent instructions
43
- - Read `~/.syntaur/missions/<mission-slug>/claude.md` if it exists for Claude-specific instructions
44
-
45
- Note the `workspace` field in `mission.md` frontmatter if present. This indicates which project/codebase grouping the mission belongs to. When writing context to `.syntaur/context.json` (Step 5), include `"workspace": "<value>"` if the mission has a workspace.
41
+ Read the project files, starting with the manifest (the protocol-defined entry point):
42
+ - Read `~/.syntaur/projects/<project-slug>/manifest.md` first (root navigation file per protocol spec)
43
+ - Read `~/.syntaur/projects/<project-slug>/project.md` for goal and context
44
+ - Read `~/.syntaur/projects/<project-slug>/agent.md` for agent instructions
45
+ - Read `~/.syntaur/projects/<project-slug>/claude.md` if it exists for Claude-specific instructions
46
46
 
47
- ## Step 2: Find Pending Assignments
47
+ Note the `workspace` field in `project.md` frontmatter if present. This indicates which project/codebase grouping the project belongs to. When writing context to `.syntaur/context.json` (Step 5), include `"workspace": "<value>"` if the project has a workspace.
48
48
 
49
- List assignment directories and check their status:
50
-
51
- ```bash
52
- ls ~/.syntaur/missions/<mission-slug>/assignments/
53
- ```
49
+ ## Step 2: Find Assignments
54
50
 
55
- For each assignment directory, read the `assignment.md` frontmatter and look for `status: pending`. You can use grep:
51
+ List assignment directories:
56
52
 
57
53
  ```bash
58
- grep -l "status: pending" ~/.syntaur/missions/<mission-slug>/assignments/*/assignment.md
54
+ ls ~/.syntaur/projects/<project-slug>/assignments/
59
55
  ```
60
56
 
61
- If no pending assignments exist, tell the user and stop.
62
-
63
- If the user specified an assignment slug as the second argument, verify it exists and is pending. If it is not pending, report its current status and stop.
57
+ If the user specified an assignment slug as the second argument, verify that directory exists. Its status does **not** matter — grab it regardless. If it doesn't exist, report that and stop.
64
58
 
65
- If no specific assignment was requested, present the list of pending assignments with their titles and priorities, and ask the user which one to grab. If there is only one pending assignment, grab it automatically.
59
+ If no specific assignment was requested, read each `assignment.md` frontmatter and present the list with title, priority, and current status. Prefer `pending` assignments when presenting options (they're the most likely default), but show non-terminal assignments too so the user can pick one to resume. Ask the user which to grab unless there is exactly one obvious candidate (single `pending` assignment).
66
60
 
67
61
  ## Step 3: Claim the Assignment
68
62
 
69
- Run the Syntaur CLI commands to assign and start the assignment. Use `dangerouslyDisableSandbox: true` for these bash commands since the CLI writes to `~/.syntaur/` which is outside the project sandbox.
63
+ Read the assignment frontmatter first to learn its current `status`:
70
64
 
71
65
  ```bash
72
- syntaur assign <assignment-slug> --agent claude --mission <mission-slug>
66
+ cat ~/.syntaur/projects/<project-slug>/assignments/<assignment-slug>/assignment.md
73
67
  ```
74
68
 
75
- Then:
69
+ Then run the Syntaur CLI to set the assignee. This is safe at any status and does not transition state. Use `dangerouslyDisableSandbox: true` for these bash commands since the CLI writes to `~/.syntaur/` which is outside the project sandbox.
76
70
 
77
71
  ```bash
78
- syntaur start <assignment-slug> --mission <mission-slug>
72
+ syntaur assign <assignment-slug> --agent claude --project <project-slug>
79
73
  ```
80
74
 
81
- If either command fails, report the error and stop. Common failures:
82
- - Assignment has unmet dependencies (cannot start until dependencies are `completed`)
83
- - Assignment is not in `pending` status
84
- - Mission not found
85
-
86
- ## Step 4: Read Assignment Context and Set Workspace
87
-
88
- After successfully starting the assignment, read the full assignment details:
75
+ **Only if the current status is `pending`**, also run `syntaur start` to transition it to `in_progress`:
89
76
 
90
77
  ```bash
91
- cat ~/.syntaur/missions/<mission-slug>/assignments/<assignment-slug>/assignment.md
78
+ syntaur start <assignment-slug> --project <project-slug>
92
79
  ```
93
80
 
94
- Extract from the frontmatter:
81
+ For any other status (`in_progress`, `blocked`, `review`, `completed`, `failed`), **skip `syntaur start`** — the assignment has already been advanced past pending and grabbing should not rewind it. Tell the user which status the assignment is in and continue with context setup.
82
+
83
+ If `syntaur assign` fails (e.g., project not found, invalid slug), report the error and stop. Do not treat a non-pending status as a failure.
84
+
85
+ ## Step 4: Read Assignment Context and Set Workspace
86
+
87
+ You have already read the assignment file in Step 3. Extract from the frontmatter:
95
88
  - `title` -- the assignment title
96
89
  - `workspace.repository` -- the code repository path (may be null)
97
90
  - `workspace.worktreePath` -- the worktree path (may be null)
@@ -99,7 +92,15 @@ Extract from the frontmatter:
99
92
  - `dependsOn` -- list of dependency slugs
100
93
  - `priority` -- priority level
101
94
 
102
- Read the objective and acceptance criteria from the markdown body.
95
+ Read the objective, acceptance criteria, and the `## Todos` section (if present) from the markdown body. Active (unchecked) todos indicate outstanding work and may link to plan files to execute.
96
+
97
+ ### Auto-load upstream decision records
98
+
99
+ If `dependsOn` is non-empty, for each dependency slug `<dep>`, read:
100
+ - `<projectDir>/assignments/<dep>/handoff.md` (if it exists) for integration context
101
+ - `<projectDir>/assignments/<dep>/decision-record.md` (if it exists) for upstream decisions
102
+
103
+ Surface those upstream decisions in the Step 6 report — downstream work should inherit prior decisions without the user having to ask.
103
104
 
104
105
  ### Set workspace if not configured
105
106
 
@@ -124,10 +125,10 @@ Then write the JSON file with this structure:
124
125
 
125
126
  ```json
126
127
  {
127
- "missionSlug": "<mission-slug>",
128
+ "projectSlug": "<project-slug>",
128
129
  "assignmentSlug": "<assignment-slug>",
129
- "missionDir": "/Users/<username>/.syntaur/missions/<mission-slug>",
130
- "assignmentDir": "/Users/<username>/.syntaur/missions/<mission-slug>/assignments/<assignment-slug>",
130
+ "projectDir": "/Users/<username>/.syntaur/projects/<project-slug>",
131
+ "assignmentDir": "/Users/<username>/.syntaur/projects/<project-slug>/assignments/<assignment-slug>",
131
132
  "workspaceRoot": "<workspace.worktreePath if set, else workspace.repository if it is a local path, else current working directory>",
132
133
  "title": "<assignment title>",
133
134
  "branch": "<workspace.branch or null>",
@@ -141,7 +142,7 @@ Use absolute paths (expand `~` to the actual home directory). Note: `workspace.r
141
142
 
142
143
  ## Step 5.5: Register Agent Session
143
144
 
144
- After creating the context file, register this session in the mission's agent session log so it appears in the dashboard.
145
+ After creating the context file, register this session in the project's agent session log so it appears in the dashboard.
145
146
 
146
147
  1. Find the current Claude Code session ID by reading from `~/.claude/sessions/`. These are JSON files keyed by PID containing `sessionId`, `cwd`, etc. Find the most recently modified file whose `cwd` matches the current working directory:
147
148
  ```bash
@@ -153,7 +154,7 @@ If you cannot find a matching session file (e.g., no file matches the cwd, or th
153
154
 
154
155
  2. Run the track-session command (use `dangerouslyDisableSandbox: true` since it writes to `~/.syntaur/`):
155
156
  ```bash
156
- syntaur track-session --mission <missionSlug> --assignment <assignmentSlug> --agent claude --session-id <claude-session-id> --path $(pwd)
157
+ syntaur track-session --project <projectSlug> --assignment <assignmentSlug> --agent claude --session-id <claude-session-id> --path $(pwd)
157
158
  ```
158
159
 
159
160
  3. Update the `.syntaur/context.json` context file to include the session ID. Add `"sessionId": "<claude-session-id>"` to the JSON object you wrote in Step 5.
@@ -174,7 +175,13 @@ If no playbook files exist, skip this step.
174
175
 
175
176
  Summarize what was done:
176
177
  - Which assignment was grabbed
178
+ - Its current status (note if it was already past `pending` — e.g., "already in `review`, status unchanged")
177
179
  - The objective (first paragraph from assignment.md body)
178
180
  - The acceptance criteria (the checkbox list)
181
+ - Active todos from the `## Todos` section (if any), with links to any referenced plan files
179
182
  - The workspace path (if set)
180
- - Suggest next step: "Run `/plan-assignment` to create an implementation plan."
183
+ - Suggest an appropriate next step based on status:
184
+ - `pending` / `in_progress`: `/plan-assignment` to plan implementation
185
+ - `blocked`: investigate the blocker recorded in `blockedReason`
186
+ - `review`: inspect the implementation and help verify acceptance criteria
187
+ - `completed` / `failed`: read the handoff; grab is probably for reference or reopen
@@ -23,13 +23,13 @@ Optional notes from the user: $ARGUMENTS
23
23
 
24
24
  Read `.syntaur/context.json` from the current working directory.
25
25
 
26
- If the file does not exist, tell the user: "No active assignment found. Run `/grab-assignment <mission-slug>` first to claim an assignment."
26
+ If the file does not exist, tell the user: "No active assignment found. Run `/grab-assignment <project-slug>` first to claim an assignment."
27
27
 
28
28
  Extract from the context file:
29
- - `missionSlug` -- the mission slug
29
+ - `projectSlug` -- the project slug
30
30
  - `assignmentSlug` -- the assignment slug
31
31
  - `assignmentDir` -- absolute path to the assignment folder
32
- - `missionDir` -- absolute path to the mission folder
32
+ - `projectDir` -- absolute path to the project folder
33
33
  - `workspaceRoot` -- absolute path to the workspace (may be null)
34
34
 
35
35
  ## Step 1.5: Load Playbooks
@@ -47,12 +47,12 @@ For each file found, read it and follow its directives. Playbooks may contain ru
47
47
  Read the following files to understand the assignment:
48
48
 
49
49
  1. Read `<assignmentDir>/assignment.md` -- extract the objective, acceptance criteria, context section, and any Q&A
50
- 2. Read `<missionDir>/agent.md` -- extract conventions and boundaries
51
- 3. Read `<missionDir>/claude.md` if it exists -- extract Claude-specific instructions
52
- 4. Read `<missionDir>/mission.md` -- extract the mission goal for broader context
50
+ 2. Read `<projectDir>/agent.md` -- extract conventions and boundaries
51
+ 3. Read `<projectDir>/claude.md` if it exists -- extract Claude-specific instructions
52
+ 4. Read `<projectDir>/project.md` -- extract the project goal for broader context
53
53
 
54
54
  If the assignment has dependencies (`dependsOn` in frontmatter), read the handoff.md from each dependency's assignment folder for integration context:
55
- - `<missionDir>/assignments/<dep-slug>/handoff.md`
55
+ - `<projectDir>/assignments/<dep-slug>/handoff.md`
56
56
 
57
57
  ## Step 3: Explore Workspace (if set)
58
58
 
@@ -72,9 +72,32 @@ If `workspaceRoot` is null, skip this step and note in the plan that no workspac
72
72
 
73
73
  ## Step 4: Write the Plan
74
74
 
75
- Read the existing `<assignmentDir>/plan.md` to see its current frontmatter structure. Preserve the YAML frontmatter fields (`assignment`, `status`, `created`, `updated`) and update the `updated` timestamp. Change the `status` field from `draft` to `in_progress` if it is still `draft`.
75
+ Plans are versioned. The first plan for an assignment is `plan.md`; subsequent plans are `plan-v2.md`, `plan-v3.md`, etc. Each plan gets a linked entry in the `## Todos` section of `assignment.md`, and any prior active plan todo is marked superseded (never deleted).
76
76
 
77
- Replace the markdown body with a detailed implementation plan. The plan should include:
77
+ ### 4a. Determine the next plan filename
78
+
79
+ Use Glob to list `<assignmentDir>/plan*.md`. Then:
80
+
81
+ - If no plan files exist, the target is `plan.md` and the version label is "plan".
82
+ - If `plan.md` exists but no `plan-v<N>.md`, the target is `plan-v2.md` and the version label is "plan v2".
83
+ - Otherwise, pick the smallest `N >= 2` such that `plan-v<N>.md` does not exist. The version label is `plan v<N>`.
84
+
85
+ Remember this `planFilename` and `versionLabel` for the remaining substeps.
86
+
87
+ ### 4b. Write the plan file
88
+
89
+ Write `<assignmentDir>/<planFilename>` with standard plan frontmatter:
90
+
91
+ ```yaml
92
+ ---
93
+ assignment: <assignmentSlug>
94
+ status: draft
95
+ created: "<nowTimestamp>"
96
+ updated: "<nowTimestamp>"
97
+ ---
98
+ ```
99
+
100
+ Then the markdown body should include:
78
101
 
79
102
  1. **Overview** -- one paragraph summarizing the approach
80
103
  2. **Tasks** -- numbered list of implementation tasks, each with:
@@ -86,7 +109,31 @@ Replace the markdown body with a detailed implementation plan. The plan should i
86
109
  4. **Risks and Open Questions** -- anything that might block or complicate implementation
87
110
  5. **Testing Strategy** -- how to verify the implementation works
88
111
 
89
- Write the plan using the Edit tool to update `<assignmentDir>/plan.md`. Preserve the existing frontmatter and replace only the body content.
112
+ **Decision capture:** While planning, note any meaningful choices you make (library picks, schema design, architectural calls, rejected alternatives). Record each as a numbered entry in `<assignmentDir>/decision-record.md` with the format `## Decision N: <short title>` fields: Status (proposed/accepted), Context, Decision, Consequences. Downstream assignments that depend on this one auto-load these decisions during `/grab-assignment`, so they pay off over time.
113
+
114
+ If the target file already exists (only possible for `plan.md` on first re-run against a scaffolded-but-empty plan), preserve the frontmatter and replace only the body, flipping `status` from `draft` to `in_progress` and updating `updated`.
115
+
116
+ ### 4c. Update assignment.md Todos
117
+
118
+ Read `<assignmentDir>/assignment.md` and locate the `## Todos` section.
119
+
120
+ 1. **Supersede prior plan todos.** Scan unchecked todo lines for any that match the pattern `- [ ] Execute [<label>](./plan.md)` or `- [ ] Execute [<label>](./plan-v<N>.md)`. For each match, rewrite the line as:
121
+
122
+ ```
123
+ - [x] ~~Execute [<label>](./<old-plan-filename>)~~ (superseded by <versionLabel>)
124
+ ```
125
+
126
+ Never delete the old line — preserve history.
127
+
128
+ 2. **Append the new plan todo.** Append a new line to the end of the `## Todos` section:
129
+
130
+ ```
131
+ - [ ] Execute [<versionLabel>](./<planFilename>)
132
+ ```
133
+
134
+ 3. **Missing section fallback.** If the `## Todos` section does not exist (legacy assignment predating this convention), insert it immediately after `## Acceptance Criteria` with a short guidance HTML comment followed by the new todo line. Match the template used by `/create-assignment`.
135
+
136
+ Also update the assignment frontmatter `updated` timestamp.
90
137
 
91
138
  ## Step 5: Report to User
92
139