syntaur 0.7.1 → 0.8.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 (48) hide show
  1. package/.claude-plugin/plugin.json +23 -0
  2. package/README.md +64 -24
  3. package/dist/index.js +632 -254
  4. package/dist/index.js.map +1 -1
  5. package/package.json +6 -8
  6. package/platforms/claude-code/.claude-plugin/plugin.json +15 -2
  7. package/{vendor/syntaur-skills → platforms/claude-code}/skills/complete-assignment/SKILL.md +0 -2
  8. package/{vendor/syntaur-skills → platforms/claude-code}/skills/grab-assignment/SKILL.md +2 -7
  9. package/{vendor/syntaur-skills → platforms/claude-code}/skills/plan-assignment/SKILL.md +1 -3
  10. package/{vendor/syntaur-skills → platforms/claude-code}/skills/syntaur-protocol/SKILL.md +4 -23
  11. package/{vendor/syntaur-skills → platforms/claude-code}/skills/syntaur-protocol/references/file-ownership.md +1 -2
  12. package/{vendor/syntaur-skills → platforms/claude-code}/skills/syntaur-protocol/references/protocol-summary.md +1 -6
  13. package/platforms/claude-code/skills/track-server/SKILL.md +49 -0
  14. package/platforms/codex/.codex-plugin/plugin.json +2 -2
  15. package/platforms/codex/skills/clear-assignment/SKILL.md +111 -0
  16. package/platforms/codex/skills/complete-assignment/SKILL.md +146 -0
  17. package/platforms/codex/skills/create-assignment/SKILL.md +73 -0
  18. package/platforms/codex/skills/create-project/SKILL.md +56 -0
  19. package/platforms/codex/skills/grab-assignment/SKILL.md +158 -0
  20. package/platforms/codex/skills/manage-statuses/SKILL.md +72 -0
  21. package/platforms/codex/skills/plan-assignment/SKILL.md +137 -0
  22. package/platforms/codex/skills/save-session-summary/SKILL.md +113 -0
  23. package/platforms/codex/skills/syntaur-protocol/SKILL.md +119 -0
  24. package/platforms/codex/skills/syntaur-protocol/references/file-ownership.md +67 -0
  25. package/platforms/codex/skills/syntaur-protocol/references/protocol-summary.md +82 -0
  26. package/platforms/codex/skills/track-server/SKILL.md +49 -0
  27. package/platforms/codex/skills/track-session/SKILL.md +63 -26
  28. package/skills/clear-assignment/SKILL.md +111 -0
  29. package/skills/complete-assignment/SKILL.md +146 -0
  30. package/skills/create-assignment/SKILL.md +73 -0
  31. package/skills/create-project/SKILL.md +56 -0
  32. package/skills/grab-assignment/SKILL.md +158 -0
  33. package/skills/manage-statuses/SKILL.md +72 -0
  34. package/skills/plan-assignment/SKILL.md +137 -0
  35. package/skills/save-session-summary/SKILL.md +113 -0
  36. package/skills/syntaur-protocol/SKILL.md +119 -0
  37. package/skills/syntaur-protocol/references/file-ownership.md +67 -0
  38. package/skills/syntaur-protocol/references/protocol-summary.md +82 -0
  39. package/skills/track-server/SKILL.md +49 -0
  40. package/skills/track-session/SKILL.md +86 -0
  41. package/scripts/postinstall-submodules.mjs +0 -40
  42. package/vendor/syntaur-skills/LICENSE +0 -21
  43. package/vendor/syntaur-skills/README.md +0 -57
  44. /package/{vendor/syntaur-skills → platforms/claude-code}/skills/clear-assignment/SKILL.md +0 -0
  45. /package/{vendor/syntaur-skills → platforms/claude-code}/skills/create-assignment/SKILL.md +0 -0
  46. /package/{vendor/syntaur-skills → platforms/claude-code}/skills/create-project/SKILL.md +0 -0
  47. /package/{vendor/syntaur-skills → platforms/claude-code}/skills/manage-statuses/SKILL.md +0 -0
  48. /package/{vendor/syntaur-skills → platforms/claude-code}/skills/save-session-summary/SKILL.md +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "syntaur",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "Project workflow CLI with dashboard, Claude Code plugin, and Codex plugin",
5
5
  "homepage": "https://github.com/prong-horn/syntaur#readme",
6
6
  "repository": {
@@ -28,13 +28,11 @@
28
28
  "bin",
29
29
  ".agents",
30
30
  "platforms",
31
+ "skills",
32
+ ".claude-plugin",
31
33
  "examples",
32
34
  "dashboard/dist",
33
- "statusline",
34
- "scripts/postinstall-submodules.mjs",
35
- "vendor/syntaur-skills/skills/**",
36
- "vendor/syntaur-skills/LICENSE",
37
- "vendor/syntaur-skills/README.md"
35
+ "statusline"
38
36
  ],
39
37
  "scripts": {
40
38
  "build": "tsup",
@@ -45,9 +43,9 @@
45
43
  "typecheck": "tsc --noEmit",
46
44
  "test": "vitest run",
47
45
  "test:watch": "vitest",
48
- "prepack": "node scripts/verify-vendored-skills.mjs",
46
+ "mirror-skills": "node scripts/mirror-skills-to-platforms.mjs",
47
+ "prepack": "node scripts/mirror-skills-to-platforms.mjs",
49
48
  "prepublishOnly": "npm run build && npm ci --prefix dashboard && npm run build --prefix dashboard",
50
- "postinstall": "node scripts/postinstall-submodules.mjs",
51
49
  "try": "node scripts/try.mjs",
52
50
  "untry": "npm unlink -g syntaur && npm install -g syntaur@latest && echo '\\n✓ global syntaur restored to latest published version'"
53
51
  },
@@ -1,9 +1,22 @@
1
1
  {
2
2
  "name": "syntaur",
3
- "description": "Syntaur protocol adapter for Claude Code. Provides skills for grabbing, planning, and completing assignments, plus write boundary enforcement via hooks.",
3
+ "description": "Syntaur protocol adapter for Claude Code. Provides skills for grabbing, planning, and completing assignments, project management, session/server tracking, save-session-summary continuity, plus write boundary enforcement via hooks.",
4
4
  "author": {
5
5
  "name": "Brennen",
6
6
  "email": ""
7
7
  },
8
- "version": "0.1.8"
8
+ "version": "0.8.0",
9
+ "skills": [
10
+ "./skills/syntaur-protocol",
11
+ "./skills/grab-assignment",
12
+ "./skills/plan-assignment",
13
+ "./skills/complete-assignment",
14
+ "./skills/create-assignment",
15
+ "./skills/create-project",
16
+ "./skills/manage-statuses",
17
+ "./skills/clear-assignment",
18
+ "./skills/save-session-summary",
19
+ "./skills/track-session",
20
+ "./skills/track-server"
21
+ ]
9
22
  }
@@ -63,8 +63,6 @@ Do NOT add a `## Progress` section to `assignment.md` — progress entries live
63
63
 
64
64
  ## Step 4: Write Handoff Entry
65
65
 
66
- `handoff.md` is the **assignment-level cross-ticket outbound** doc — written here, at completion, for the next ticket / agent / human reviewer. It is NOT the mid-assignment session continuity artifact; that lives at `<assignmentDir>/sessions/<sid>/summary.md` and is written by `/save-session-summary`. Any `sessions/*/summary.md` files are reference-only at completion time and MUST NOT be deleted — they remain as immutable historical context.
67
-
68
66
  Read `<assignmentDir>/handoff.md` to see its current content and frontmatter.
69
67
 
70
68
  Append a new handoff entry to the markdown body. Read the current `handoffCount` from the frontmatter and use `handoffCount + 1` as the entry number. The entry must follow this format:
@@ -69,11 +69,7 @@ If either command fails, report the error and stop.
69
69
 
70
70
  ## Step 4: Read Assignment Context and Backfill Workspace
71
71
 
72
- Read the full assignment file. Also read `comments.md` if present (inherited questions / notes).
73
-
74
- For each `dependsOn` entry, read the dependency's `handoff.md` AND `decision-record.md` so upstream decisions carry forward. (`handoff.md` is the **cross-ticket outbound** doc — distinct from session continuity.)
75
-
76
- If `<assignmentDir>/sessions/` exists, also read the most recent `<assignmentDir>/sessions/<sid>/summary.md` (selected by `summary.md` file mtime). This is the **mid-assignment session continuity** artifact written by `/save-session-summary` at the end of a prior session of the same assignment. Treat its `What's Next` and `Load-Bearing Context` sections as resume context. (Note: in Claude Code, the SessionStart hook also stashes this path into context.json as `latestSessionSummaryPath` — same semantics; either source is fine.)
72
+ Read the full assignment file. Also read `comments.md` if present (inherited questions / notes). For each `dependsOn` entry, read the dependency's `handoff.md` AND `decision-record.md` so upstream decisions carry forward.
77
73
 
78
74
  From the assignment frontmatter extract: `title`, `workspace.repository`, `workspace.worktreePath`, `workspace.branch`, `dependsOn`, `priority`.
79
75
 
@@ -159,5 +155,4 @@ Summarize:
159
155
  - Active todos from `## Todos`, including any linked plan files.
160
156
  - The workspace path.
161
157
  - Any inherited comments/questions from `comments.md`.
162
- - **Resume context** (if Step 4 found a `sessions/<sid>/summary.md`): a short block citing the session id and the timestamp of that summary's `updated` frontmatter, followed by its `What's Next` bullets. This is mid-assignment continuity distinct from any cross-ticket handoff.
163
- - Suggested next step: `plan-assignment` to create an implementation plan, or — if a session summary's `What's Next` is concrete — proceed directly with the next step it names.
158
+ - Suggested next step: `plan-assignment` to create an implementation plan.
@@ -50,9 +50,7 @@ Read these files to understand the assignment:
50
50
 
51
51
  Per-project `agent.md` / `claude.md` were removed in protocol v2.0. Agent-level conventions now live at the repo root (`CLAUDE.md` / `AGENTS.md`) and in `~/.syntaur/playbooks/` (already loaded in Step 2).
52
52
 
53
- If the assignment has dependencies (`dependsOn` in frontmatter), read each dependency's `handoff.md` AND `decision-record.md` for integration context and upstream decisions. (`handoff.md` is cross-ticket outbound — distinct from session continuity.)
54
-
55
- If `<assignmentDir>/sessions/` exists, also read the most recent `sessions/<sid>/summary.md` (selected by `summary.md` file mtime). This is mid-assignment continuity from a prior session of the same assignment — its `What's Next`, `Open Questions`, and `Load-Bearing Context` sections are direct planning inputs when resuming work that was already in flight.
53
+ If the assignment has dependencies (`dependsOn` in frontmatter), read each dependency's `handoff.md` AND `decision-record.md` for integration context and upstream decisions.
56
54
 
57
55
  ## Step 4: Explore Workspace (if set)
58
56
 
@@ -26,9 +26,8 @@ Respect file ownership boundaries. The Claude Code and Codex plugins enforce the
26
26
  - `plan*.md` (versioned — `plan.md`, `plan-v2.md`, etc.)
27
27
  - `progress.md` (append-only, timestamped)
28
28
  - `scratchpad.md`
29
- - `handoff.md` (append-only — **assignment-level cross-ticket outbound**)
29
+ - `handoff.md` (append-only)
30
30
  - `decision-record.md` (append-only)
31
- - `sessions/<sessionId>/summary.md` (**session-scoped mid-assignment continuity** — single document per session id, overwritten on save)
32
31
  2. **Project-level shared files:**
33
32
  - `~/.syntaur/projects/<project>/resources/<slug>.md`
34
33
  - `~/.syntaur/projects/<project>/memories/<slug>.md`
@@ -50,22 +49,6 @@ Respect file ownership boundaries. The Claude Code and Codex plugins enforce the
50
49
 
51
50
  Per-project `agent.md` / `claude.md` do NOT exist in protocol v2.0. Agent-level conventions now live at the repo root (`CLAUDE.md` / `AGENTS.md`) and in `~/.syntaur/playbooks/`.
52
51
 
53
- ## Session Continuity vs Cross-Ticket Handoff
54
-
55
- Two related but distinct artifacts. Conflating them is a recurring mistake.
56
-
57
- | Artifact | Scope | When written | Audience | Written by |
58
- |---|---|---|---|---|
59
- | `handoff.md` | Assignment-level | At completion | The next ticket / agent / human reviewer | `complete-assignment` skill |
60
- | `sessions/<sessionId>/summary.md` | Session-scoped | Mid-assignment, before compaction or at session end | A future session of the same agent on the same assignment | `save-session-summary` skill |
61
-
62
- Rules:
63
- - One `summary.md` per session id directory; overwrite on every save.
64
- - Older `sessions/<sid>/summary.md` files accumulate as immutable history — never delete them, even at completion.
65
- - Resume picks the latest by `summary.md` file mtime. The Claude Code SessionStart hook also stashes that absolute path into `.syntaur/context.json` as `latestSessionSummaryPath` for convenience; either source is fine.
66
- - Codex has no `PreCompact` hook — Codex agents invoke `/save-session-summary` manually before compaction or session end.
67
- - `syntaur doctor` intentionally does NOT validate `sessions/` — sessions are optional and absence is not anomalous.
68
-
69
52
  ## Current Assignment Context
70
53
 
71
54
  If `.syntaur/context.json` exists in the current working directory, read it before making changes. Fields you will see:
@@ -77,7 +60,6 @@ If `.syntaur/context.json` exists in the current working directory, read it befo
77
60
  - `workspaceRoot` — absolute path to the code workspace
78
61
  - `sessionId` — real agent-runtime session id (never a synthesized UUID)
79
62
  - `transcriptPath` — absolute path to the agent's rollout/transcript file, if known
80
- - `latestSessionSummaryPath` — absolute path to the most recent `sessions/<sid>/summary.md` (Claude Code SessionStart hook resolves this; `null` if none)
81
63
 
82
64
  ## Required Reading Order
83
65
 
@@ -89,9 +71,8 @@ When starting work on an existing assignment, read these in order:
89
71
  4. `<assignmentDir>/assignment.md`
90
72
  5. `<assignmentDir>/comments.md` if present — inherited questions / notes
91
73
  6. Latest `<assignmentDir>/plan*.md` (pick the newest)
92
- 7. `<assignmentDir>/handoff.md` — cross-ticket outbound history (entries from prior agents/humans handing this assignment off)
93
- 8. The latest `<assignmentDir>/sessions/<sid>/summary.md` if present (mid-assignment resume context from a prior session of this assignment) — selected by `summary.md` file mtime, or via `latestSessionSummaryPath` in context.json on Claude Code
94
- 9. For each `dependsOn` entry: the dependency's `handoff.md` AND `decision-record.md` — upstream integration context and accepted decisions carry forward
74
+ 7. `<assignmentDir>/handoff.md` — history
75
+ 8. For each `dependsOn` entry: the dependency's `handoff.md` AND `decision-record.md` upstream integration context and accepted decisions carry forward
95
76
 
96
77
  ## Lifecycle Commands
97
78
 
@@ -127,7 +108,7 @@ ls ~/.syntaur/playbooks/*.md 2>/dev/null
127
108
  - Append milestones to `progress.md` — do NOT add a `## Progress` section to `assignment.md` (v2.0 moved progress to its own file).
128
109
  - `## Todos` in `assignment.md` is an informal markdown checklist. Items may be simple tasks or markdown links to plan files. When a plan is superseded, mark the old todo as `- [x] ~~Execute [plan](./plan.md)~~ (superseded by plan-v2)` — never delete. `## Todos` is also the landing spot for cross-assignment `syntaur request` entries.
129
110
  - Record questions / notes / feedback via `syntaur comment` — never edit `comments.md` directly. Do NOT set status to `blocked` just because there is an open question; block only for a real external dependency with a `--reason`.
130
- - Write `handoff.md` entries (via `complete-assignment`) with enough context for another agent or human to continue cleanly **across tickets**. Write `sessions/<sid>/summary.md` (via `/save-session-summary`) for mid-assignment continuity within the same assignment across sessions of the same agent. Do not mix the two. Record decisions in `decision-record.md` with Status / Context / Decision / Consequences — downstream dependents auto-load these during grab.
111
+ - Write handoffs with enough context for another agent or human to continue cleanly. Record decisions in `decision-record.md` with Status / Context / Decision / Consequences — downstream dependents auto-load these during grab.
131
112
  - Commit frequently with messages referencing the assignment slug.
132
113
 
133
114
  ## References
@@ -22,9 +22,8 @@ You may only write to files inside your currently-claimed assignment folder:
22
22
  | `plan*.md` | Versioned implementation plans (`plan.md`, `plan-v2.md`, ...). When superseded, the old plan's todo is marked superseded but the file itself is never deleted. |
23
23
  | `progress.md` | Append-only, timestamped progress log (newest first). |
24
24
  | `scratchpad.md` | Working notes. |
25
- | `handoff.md` | Append-only **assignment-level cross-ticket outbound** at completion (written by `complete-assignment`). |
25
+ | `handoff.md` | Append-only handoff log. |
26
26
  | `decision-record.md` | Append-only decision log (Status / Context / Decision / Consequences). |
27
- | `sessions/<session-id>/summary.md` | **Per-session continuity** for resume across sessions of the same agent on this assignment. Single document per session id, overwritten on every save (written by `/save-session-summary`). Not the same as `handoff.md`. |
28
27
 
29
28
  Path patterns:
30
29
  - Project-nested: `~/.syntaur/projects/<project>/assignments/<your-assignment-slug>/`
@@ -22,11 +22,8 @@ Protocol version: **2.0**
22
22
  progress.md # Agent-writable, append-only: timestamped progress log
23
23
  comments.md # CLI-mediated: threaded questions/notes/feedback (via `syntaur comment`)
24
24
  scratchpad.md # Agent-writable: working notes
25
- handoff.md # Agent-writable, append-only: cross-ticket outbound at completion
25
+ handoff.md # Agent-writable, append-only: handoff log
26
26
  decision-record.md # Agent-writable, append-only: decision log
27
- sessions/
28
- <session-id>/
29
- summary.md # Agent-writable: per-session continuity (single doc, overwritten)
30
27
  resources/
31
28
  _index.md # Derived (read-only)
32
29
  <resource-slug>.md # Shared-writable
@@ -37,7 +34,6 @@ Protocol version: **2.0**
37
34
  <assignment-uuid>/ # Standalone assignments: folder = UUID, `project: null`, slug display-only
38
35
  assignment.md # Same schema as project-nested
39
36
  plan*.md, progress.md, comments.md, scratchpad.md, handoff.md, decision-record.md
40
- sessions/<session-id>/summary.md # Same per-session continuity as project-nested
41
37
  playbooks/
42
38
  manifest.md # Derived: playbook listing (read-only)
43
39
  <slug>.md # User-authored: behavioral rules for agents
@@ -84,4 +80,3 @@ Protocol version: **2.0**
84
80
  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 toggled in the dashboard.
85
81
  11. **Cross-assignment work** is requested via `syntaur request <target> "text"` — appends to the target's `## Todos` annotated `(from: <source>)`.
86
82
  12. **Agent sessions** in `syntaur.db` must use real agent-runtime session IDs. Synthesized UUIDs are rejected. Plugins for Claude Code / Codex populate `.syntaur/context.json` with the real id via a SessionStart hook; other agents should source it from their runtime and pass `--session-id` explicitly.
87
- 13. **Session continuity** (mid-assignment) lives at `sessions/<session-id>/summary.md` inside the assignment dir — one document per session id, overwritten on every save (via `/save-session-summary`). On resume, pick the latest by `summary.md` file mtime; on Claude Code, the SessionStart hook also stashes the absolute path in `.syntaur/context.json` as `latestSessionSummaryPath`. Older summaries accumulate as immutable history; never delete them. This is **distinct from** `handoff.md`, which is the assignment-level cross-ticket outbound at completion. `syntaur doctor` intentionally ignores `sessions/` — sessions are optional. Codex has no `PreCompact` hook event; Codex agents invoke `/save-session-summary` manually before compaction or session end.
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: track-server
3
+ description: Use when the user wants to register, refresh, remove, or list tracked tmux dev-server sessions for the Syntaur dashboard. Triggers on "/track-server", "track this server", "register this dev server", or similar — distinct from /track-session which registers Claude Code agent sessions.
4
+ ---
5
+
6
+ # Track Server
7
+
8
+ Track tmux sessions so their development servers show up in the Syntaur dashboard. Distinct from `/track-session`, which registers Claude Code agent sessions.
9
+
10
+ ## Arguments
11
+
12
+ User arguments: `$ARGUMENTS`
13
+
14
+ Supported forms:
15
+
16
+ - `<session-name>`
17
+ - `--refresh [session-name]`
18
+ - `--remove <session-name>`
19
+ - `--list`
20
+
21
+ ## Workflow
22
+
23
+ ### Register
24
+
25
+ 1. Verify the tmux session exists with `tmux has-session -t <name>`.
26
+ 2. If it does not exist, list available sessions with `tmux list-sessions -F '#{session_name}'`.
27
+ 3. Create `~/.syntaur/servers/<sanitized-name>.md` with frontmatter:
28
+
29
+ ```yaml
30
+ ---
31
+ session: <original-name>
32
+ registered: <ISO timestamp>
33
+ last_refreshed: <ISO timestamp>
34
+ ---
35
+ ```
36
+
37
+ 4. Tell the user the session is now tracked.
38
+
39
+ ### Refresh
40
+
41
+ 1. Update `last_refreshed` for the named session, or for every file in `~/.syntaur/servers/` when no name was provided.
42
+
43
+ ### Remove
44
+
45
+ 1. Delete `~/.syntaur/servers/<sanitized-name>.md`.
46
+
47
+ ### List
48
+
49
+ 1. List all tracked session markdown files and show the `session` field from each.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "syntaur",
3
- "version": "0.1.8",
4
- "description": "Run Syntaur project and assignment workflows from Codex, including claiming work, planning, completing handoffs, session tracking, and write-boundary enforcement.",
3
+ "version": "0.8.0",
4
+ "description": "Run Syntaur project and assignment workflows from Codex, including claiming work, planning, completing handoffs, session/server tracking, save-session-summary continuity, and write-boundary enforcement.",
5
5
  "author": {
6
6
  "name": "Brennen"
7
7
  },
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: clear-assignment
3
+ description: >-
4
+ Clear the active Syntaur assignment from the current session without
5
+ transitioning lifecycle state. Use when the user wants to drop, release,
6
+ unclaim, abandon, or clear assignment context — e.g., "clear my assignment",
7
+ "drop this assignment", "release context", "unclaim this", "I'm not actually
8
+ working on this anymore". Does not mark the assignment complete or failed.
9
+ license: MIT
10
+ metadata:
11
+ author: prong-horn
12
+ version: "1.0.0"
13
+ ---
14
+
15
+ # Clear Assignment
16
+
17
+ Drop the active assignment binding from the current workspace. The assignment itself is left untouched in `~/.syntaur/projects/.../assignments/` — only the local `.syntaur/context.json` pointer is cleared so the session is no longer scoped to it.
18
+
19
+ This is the inverse of `grab-assignment`. Unlike `complete-assignment`, it does **not** transition lifecycle state, write a handoff, or close out the work. Use it when:
20
+
21
+ - The user grabbed the wrong assignment.
22
+ - The user wants to switch focus without finishing or formally reviewing the current one.
23
+ - Session context was set up earlier and is now stale.
24
+
25
+ If the assignment is actually done, use `complete-assignment` instead so a handoff is recorded and the lifecycle state advances.
26
+
27
+ ## Input
28
+
29
+ Optional flags from the user:
30
+
31
+ - `--keep-session` — preserve `sessionId` / `transcriptPath` fields in `context.json` (just strip the assignment fields). Default: full delete.
32
+ - `--unassign` — also run `syntaur unassign <slug> --project <project>` so the assignment is no longer claimed by this agent. Default: leave the claim in place (only the local context is cleared). Skip this flag if the CLI does not support `unassign` in the installed version — fall back to leaving the claim alone and tell the user.
33
+
34
+ ## Step 1: Load Context
35
+
36
+ Read `.syntaur/context.json` from the current working directory.
37
+
38
+ - If the file does not exist, tell the user: "No active assignment context to clear." and stop.
39
+ - If the file exists but contains only session fields (`sessionId`, `transcriptPath`) and no `projectSlug` / `assignmentSlug`, tell the user: "No active assignment is bound — only a platform session record exists. Nothing to clear." and stop (unless they explicitly ask to wipe the session record too).
40
+
41
+ Otherwise extract: `projectSlug`, `assignmentSlug`, `assignmentDir`, `title`.
42
+
43
+ ## Step 2: Confirm with the User
44
+
45
+ Show the user what is about to be cleared and confirm before touching anything:
46
+
47
+ > About to clear active assignment context:
48
+ > - Assignment: `<assignmentSlug>` — <title>
49
+ > - Project: `<projectSlug>` (or "standalone" if null)
50
+ > - The assignment itself will NOT be transitioned. Its lifecycle status stays as-is.
51
+ > - Proceed?
52
+
53
+ Stop if the user says no.
54
+
55
+ If lifecycle status is `in_progress` and the user has not passed `--complete-instead`, also note:
56
+
57
+ > Note: this assignment is currently `in_progress`. Clearing context does not change that. If you actually finished it, run `complete-assignment` instead so a handoff is recorded.
58
+
59
+ ## Step 3 (optional): Unassign
60
+
61
+ If the user passed `--unassign`, run:
62
+
63
+ ```bash
64
+ syntaur unassign <assignment-slug> --project <project-slug>
65
+ ```
66
+
67
+ For standalone assignments use the UUID (the folder name) in place of the slug, and omit `--project`.
68
+
69
+ If the CLI rejects the command (older versions may not implement `unassign`), report the error and continue — the local context clear in Step 4 still happens.
70
+
71
+ ## Step 4: Clear the Context File
72
+
73
+ Default behavior — delete the file entirely:
74
+
75
+ ```bash
76
+ rm .syntaur/context.json
77
+ ```
78
+
79
+ If the user passed `--keep-session`, preserve session fields and strip everything else instead:
80
+
81
+ ```bash
82
+ jq '{sessionId, transcriptPath} | with_entries(select(.value != null))' \
83
+ .syntaur/context.json > .syntaur/context.json.tmp \
84
+ && mv .syntaur/context.json.tmp .syntaur/context.json
85
+ ```
86
+
87
+ If the resulting file would be empty (`{}`), delete it instead of leaving an empty stub.
88
+
89
+ Do not delete the `.syntaur/` directory itself — other tooling may use it.
90
+
91
+ ## Step 5: Close Session (optional)
92
+
93
+ If the original `context.json` included a `sessionId` and the Syntaur dashboard is running, mark the session as cleared so the dashboard does not keep showing it as active:
94
+
95
+ ```bash
96
+ curl -s -X PATCH "http://localhost:$(cat ~/.syntaur/dashboard-port 2>/dev/null || echo 4800)/api/agent-sessions/<session-id>/status" \
97
+ -H "Content-Type: application/json" \
98
+ -d '{"status":"cleared","projectSlug":"<project-slug>"}'
99
+ ```
100
+
101
+ If this fails (e.g., dashboard not running, endpoint not present in the installed version), it is non-critical — silently continue.
102
+
103
+ Skip this step entirely when `--keep-session` is set.
104
+
105
+ ## Step 6: Report to User
106
+
107
+ Summarize:
108
+ - Which assignment was cleared (slug + title).
109
+ - That its lifecycle status is unchanged (and what that status currently is, if known from frontmatter).
110
+ - Whether the assignment was unassigned via the CLI or the claim was left in place.
111
+ - Suggested next step: `grab-assignment` to claim a different one, or `complete-assignment` if the previous one was actually finished.
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: complete-assignment
3
+ description: >-
4
+ Write a handoff and transition the current Syntaur assignment to review or completed.
5
+ Use when the user wants to finish an assignment, write a handoff, or submit work for review.
6
+ license: MIT
7
+ metadata:
8
+ author: prong-horn
9
+ version: "1.1.0"
10
+ ---
11
+
12
+ # Complete Assignment
13
+
14
+ Write a handoff for your current Syntaur assignment and transition it to `review` or `completed`.
15
+
16
+ ## Input
17
+
18
+ Optional: the user may pass `--complete` to 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 flag, and inform the user why.
19
+
20
+ ## Step 1: Load Context
21
+
22
+ Read `.syntaur/context.json` from the current working directory.
23
+
24
+ If the file does not exist, tell the user: "No active assignment found. Run `grab-assignment` first."
25
+
26
+ Extract: `projectSlug`, `assignmentSlug`, `assignmentDir`, `projectDir`.
27
+
28
+ ## Step 2: Load Playbooks
29
+
30
+ Read all playbook files from `~/.syntaur/playbooks/`:
31
+
32
+ ```bash
33
+ ls ~/.syntaur/playbooks/*.md 2>/dev/null
34
+ ```
35
+
36
+ Verify your work complies with their rules. If any playbook has completion-related rules (e.g., "run tests before done"), follow them before proceeding.
37
+
38
+ ## Step 3: Verify Acceptance Criteria and Todos
39
+
40
+ Read `<assignmentDir>/assignment.md` and find the `## Acceptance Criteria` and `## Todos` sections.
41
+
42
+ Review each acceptance criterion (checkbox item) AND each todo. Superseded todos marked `- [x] ~~Execute [...](./plan-v<N>.md)~~ (superseded by plan-v<N>)` count as resolved — they do not need to be done again.
43
+
44
+ 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
+
48
+ 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?" — stop if the user says no.
49
+
50
+ ## Step 3.5: Append a Final Progress Entry
51
+
52
+ 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-chronological) under a new `## <ISO 8601 timestamp>` heading:
53
+
54
+ ```markdown
55
+ ## <ISO 8601 timestamp>
56
+
57
+ <One paragraph summarizing the final state of work: what was implemented, what verifications passed, and any deliberate scope exclusions.>
58
+ ```
59
+
60
+ Bump `entryCount` and set `updated` to the current timestamp in `progress.md`'s frontmatter.
61
+
62
+ Do NOT add a `## Progress` section to `assignment.md` — progress entries live exclusively in `progress.md` as of protocol v2.0.
63
+
64
+ ## Step 4: Write Handoff Entry
65
+
66
+ Read `<assignmentDir>/handoff.md` to see its current content and frontmatter.
67
+
68
+ Append a new handoff entry to the markdown body. Read the current `handoffCount` from the frontmatter and use `handoffCount + 1` as the entry number. The entry must follow this format:
69
+
70
+ ```markdown
71
+ ## Handoff <N>: <ISO 8601 timestamp>
72
+
73
+ **From:** <your-agent-name>
74
+ **To:** human
75
+ **Reason:** <Why this handoff is happening, e.g., "Assignment complete, handing off for review.">
76
+
77
+ ### Summary
78
+ <One paragraph summarizing what was accomplished and what remains>
79
+
80
+ ### Current State
81
+ - <What is working>
82
+ - <What is not working or partially done>
83
+ - <Acceptance criteria status: N of M met>
84
+
85
+ ### Next Steps
86
+ - <Recommended next actions for the reviewer or next agent>
87
+
88
+ ### Important Context
89
+ - <Anything the next agent/human needs that is not in the assignment or plan>
90
+ ```
91
+
92
+ Also update the handoff.md frontmatter: set `updated` to the current timestamp and increment the `handoffCount` by 1.
93
+
94
+ ## Step 5: Update Checkboxes (Criteria + Todos)
95
+
96
+ In `<assignmentDir>/assignment.md`, update checkboxes in both the `## Acceptance Criteria` and `## Todos` sections to reflect the current state. Check off items that were completed (change `- [ ]` to `- [x]`).
97
+
98
+ 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 and note which were verified at completion time vs. during development in the handoff.
99
+
100
+ Do NOT uncheck or rewrite superseded todo lines matching `- [x] ~~...~~ (superseded by ...)` — preserve that history intact.
101
+
102
+ ## Step 6: Close Session (optional)
103
+
104
+ If `.syntaur/context.json` includes a `sessionId` and the Syntaur dashboard is running, mark the session as completed:
105
+
106
+ ```bash
107
+ curl -s -X PATCH "http://localhost:$(cat ~/.syntaur/dashboard-port 2>/dev/null || echo 4800)/api/agent-sessions/<session-id>/status" \
108
+ -H "Content-Type: application/json" \
109
+ -d '{"status":"completed","projectSlug":"<project-slug>"}'
110
+ ```
111
+
112
+ If this fails (e.g., dashboard not running), it is non-critical — the session will be reconciled automatically.
113
+
114
+ ## Step 7: Transition Assignment State
115
+
116
+ If the user requested `--complete` and all criteria are met:
117
+
118
+ ```bash
119
+ syntaur complete <assignment-slug> --project <project-slug>
120
+ ```
121
+
122
+ Otherwise, transition to review:
123
+
124
+ ```bash
125
+ syntaur review <assignment-slug> --project <project-slug>
126
+ ```
127
+
128
+ If the command fails, report the error. Common failures:
129
+ - Assignment is not in `in_progress` status
130
+ - Project not found
131
+
132
+ ## Step 8: Clean Up Context
133
+
134
+ Delete the context file:
135
+
136
+ ```bash
137
+ rm .syntaur/context.json
138
+ ```
139
+
140
+ ## Step 9: Report to User
141
+
142
+ Summarize:
143
+ - Assignment slug and title
144
+ - New status (review or completed)
145
+ - Number of acceptance criteria met vs total
146
+ - If transitioned to `review`, a human reviewer will check the work. If any criteria were unmet, they may send it back to `in_progress`.
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: create-assignment
3
+ description: >-
4
+ Create a new Syntaur assignment within a project (or as a standalone one-off).
5
+ Use when the user wants to add a task, create an assignment, or break down
6
+ work within a Syntaur project.
7
+ license: MIT
8
+ metadata:
9
+ author: prong-horn
10
+ version: "1.2.0"
11
+ ---
12
+
13
+ # Create Assignment
14
+
15
+ Create a new assignment — project-nested or standalone.
16
+
17
+ ## Input
18
+
19
+ Expects arguments from the user:
20
+
21
+ - First (required): the assignment title (e.g., `"Add login endpoint"`)
22
+ - `--project <slug>` (required unless `--one-off`): the project to add the assignment to
23
+ - `--one-off` (optional): create a **standalone** assignment at `~/.syntaur/assignments/<uuid>/` with `project: null`. The folder is named by UUID; `slug` is display-only. `--depends-on` is not permitted for standalone assignments.
24
+ - `--slug <slug>` (optional): override the auto-generated assignment slug
25
+ - `--priority <level>` (optional): `low`, `medium` (default), `high`, or `critical`
26
+ - `--type <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.
27
+ - `--depends-on <slug[,slug...]>` (optional, project-nested only): comma-separated list of assignment slugs this depends on
28
+ - `--dir <path>` (optional): override the default project directory
29
+ - `--with-todos` (optional): scaffold a `## Todos` section in `assignment.md`. **Omit unless the user explicitly asks for it.** Todos are normally a plan (added by `plan-assignment`) or populated during planning — not something to pre-create at assignment time. Pass this flag only if the user explicitly says something like "include todos", "with a todo list", "scaffold todos", etc.
30
+
31
+ If no title was provided, ask the user what the assignment should be called.
32
+
33
+ If neither `--project` nor `--one-off` was provided, check `.syntaur/context.json` for an active assignment. If present, default `--project` to that context's `projectSlug` and confirm with the user: "Add this assignment to project `<projectSlug>`?"
34
+
35
+ If no active context and no project flag, ask the user which project to add it to, or whether it should be a one-off.
36
+
37
+ ## Step 1: Run the CLI
38
+
39
+ Build the command from the parsed arguments:
40
+
41
+ ```bash
42
+ syntaur create-assignment "<title>" --project <slug> [--slug <slug>] [--priority <level>] [--type <type>] [--depends-on <slugs>] [--dir <path>] [--with-todos]
43
+ ```
44
+
45
+ Or for a one-off (standalone at `~/.syntaur/assignments/<uuid>/`):
46
+
47
+ ```bash
48
+ syntaur create-assignment "<title>" --one-off [--slug <slug>] [--priority <level>] [--type <type>] [--dir <path>] [--with-todos]
49
+ ```
50
+
51
+ If the command fails (e.g., project not found, slug collision, invalid type), report the error and suggest fixes.
52
+
53
+ ## Step 2: Read the Created Assignment
54
+
55
+ After successful creation, extract the assignment slug (and for standalone, the UUID) and directory from the CLI output. Read the generated `assignment.md`:
56
+
57
+ ```bash
58
+ # Project-nested:
59
+ cat ~/.syntaur/projects/<project-slug>/assignments/<assignment-slug>/assignment.md
60
+
61
+ # Standalone:
62
+ cat ~/.syntaur/assignments/<uuid>/assignment.md
63
+ ```
64
+
65
+ ## Step 3: Guide Next Steps
66
+
67
+ Tell the user:
68
+ - The assignment was created with its slug, priority, type, and location. For standalone assignments, note that the folder is named by UUID (not slug) — `slug` is display-only.
69
+ - 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 the `plan-assignment` skill.
70
+ - Remind the user: `progress.md` is where timestamped progress entries go (NOT `assignment.md`), and `comments.md` is CLI-mediated — write only via `syntaur comment <slug-or-uuid> "body" --type question|note|feedback [--reply-to <id>]`.
71
+ - Suggest editing `assignment.md` to fill in the objective, acceptance criteria, and context. A `## Todos` section is **not** scaffolded by default — it is added automatically by `plan-assignment` (linking the new plan file) or by `syntaur request` (cross-assignment requests). Only the `--with-todos` flag pre-scaffolds an empty `## Todos` section.
72
+ - If dependencies were set, note them. Standalone assignments cannot declare `dependsOn`.
73
+ - Suggest `grab-assignment <project-slug> <assignment-slug>` (or `grab-assignment --id <uuid>` for standalone) to claim and start working on it.