syntaur 0.3.0 → 0.4.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 (41) hide show
  1. package/README.md +26 -3
  2. package/dist/dashboard/server.js +497 -315
  3. package/dist/dashboard/server.js.map +1 -1
  4. package/dist/index.js +1240 -550
  5. package/dist/index.js.map +1 -1
  6. package/package.json +8 -2
  7. package/platforms/claude-code/.claude-plugin/plugin.json +1 -1
  8. package/platforms/claude-code/agents/syntaur-expert.md +35 -20
  9. package/platforms/claude-code/commands/complete-assignment/complete-assignment.md +20 -0
  10. package/platforms/claude-code/commands/create-assignment/create-assignment.md +20 -0
  11. package/platforms/claude-code/commands/create-project/create-project.md +20 -0
  12. package/platforms/claude-code/commands/grab-assignment/grab-assignment.md +20 -0
  13. package/platforms/claude-code/commands/plan-assignment/plan-assignment.md +20 -0
  14. package/platforms/claude-code/commands/track-session/track-session.md +43 -18
  15. package/platforms/claude-code/hooks/hooks.json +11 -0
  16. package/platforms/claude-code/hooks/session-cleanup.sh +13 -23
  17. package/platforms/claude-code/hooks/session-start.sh +80 -0
  18. package/platforms/codex/.codex-plugin/plugin.json +1 -1
  19. package/platforms/codex/agents/syntaur-operator.md +6 -4
  20. package/platforms/codex/scripts/resolve-session.sh +49 -0
  21. package/statusline/statusline.sh +133 -0
  22. package/vendor/syntaur-skills/LICENSE +21 -0
  23. package/vendor/syntaur-skills/README.md +43 -0
  24. package/vendor/syntaur-skills/skills/complete-assignment/SKILL.md +146 -0
  25. package/vendor/syntaur-skills/skills/create-assignment/SKILL.md +72 -0
  26. package/vendor/syntaur-skills/skills/create-project/SKILL.md +56 -0
  27. package/vendor/syntaur-skills/skills/grab-assignment/SKILL.md +158 -0
  28. package/vendor/syntaur-skills/skills/plan-assignment/SKILL.md +137 -0
  29. package/vendor/syntaur-skills/skills/syntaur-protocol/SKILL.md +119 -0
  30. package/vendor/syntaur-skills/skills/syntaur-protocol/references/file-ownership.md +67 -0
  31. package/vendor/syntaur-skills/skills/syntaur-protocol/references/protocol-summary.md +82 -0
  32. package/platforms/claude-code/skills/complete-assignment/SKILL.md +0 -155
  33. package/platforms/claude-code/skills/create-assignment/SKILL.md +0 -67
  34. package/platforms/claude-code/skills/grab-assignment/SKILL.md +0 -187
  35. package/platforms/claude-code/skills/plan-assignment/SKILL.md +0 -148
  36. package/platforms/claude-code/skills/syntaur-protocol/SKILL.md +0 -86
  37. package/platforms/codex/skills/complete-assignment/SKILL.md +0 -64
  38. package/platforms/codex/skills/create-assignment/SKILL.md +0 -49
  39. package/platforms/codex/skills/grab-assignment/SKILL.md +0 -71
  40. package/platforms/codex/skills/plan-assignment/SKILL.md +0 -57
  41. package/platforms/codex/skills/syntaur-protocol/SKILL.md +0 -102
@@ -1,187 +0,0 @@
1
- ---
2
- name: grab-assignment
3
- description: Load a Syntaur assignment into the current working context
4
- argument-hint: <project-slug> [assignment-slug]
5
- allowed-tools:
6
- - Bash
7
- - Read
8
- - Write
9
- - Glob
10
- - Grep
11
- ---
12
-
13
- # Grab Assignment
14
-
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.
18
-
19
- ## Arguments
20
-
21
- The user provided: $ARGUMENTS
22
-
23
- Parse the arguments:
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).
26
-
27
- ## Pre-flight Check
28
-
29
- 1. Check if `.syntaur/context.json` already exists in the current working directory.
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?"
31
- - If the user says no, stop.
32
-
33
- ## Step 1: Discover the Project
34
-
35
- Read the project directory to understand what is available:
36
-
37
- ```bash
38
- ls ~/.syntaur/projects/<project-slug>/
39
- ```
40
-
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
-
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
-
49
- ## Step 2: Find Assignments
50
-
51
- List assignment directories:
52
-
53
- ```bash
54
- ls ~/.syntaur/projects/<project-slug>/assignments/
55
- ```
56
-
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.
58
-
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).
60
-
61
- ## Step 3: Claim the Assignment
62
-
63
- Read the assignment frontmatter first to learn its current `status`:
64
-
65
- ```bash
66
- cat ~/.syntaur/projects/<project-slug>/assignments/<assignment-slug>/assignment.md
67
- ```
68
-
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.
70
-
71
- ```bash
72
- syntaur assign <assignment-slug> --agent claude --project <project-slug>
73
- ```
74
-
75
- **Only if the current status is `pending`**, also run `syntaur start` to transition it to `in_progress`:
76
-
77
- ```bash
78
- syntaur start <assignment-slug> --project <project-slug>
79
- ```
80
-
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:
88
- - `title` -- the assignment title
89
- - `workspace.repository` -- the code repository path (may be null)
90
- - `workspace.worktreePath` -- the worktree path (may be null)
91
- - `workspace.branch` -- the branch name (may be null)
92
- - `dependsOn` -- list of dependency slugs
93
- - `priority` -- priority level
94
-
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.
104
-
105
- ### Set workspace if not configured
106
-
107
- If `workspace.repository` and `workspace.worktreePath` are both null, set them to the current working directory (`$(pwd)`). This is critical because the write boundary hook uses the workspace path to determine which files the agent is allowed to edit. Without it, all code edits outside the assignment directory will be blocked.
108
-
109
- Use the Edit tool to update the assignment.md frontmatter:
110
- ```yaml
111
- workspace:
112
- repository: /absolute/path/to/cwd
113
- worktreePath: /absolute/path/to/cwd
114
- ```
115
-
116
- ## Step 5: Create Context File
117
-
118
- Write `.syntaur/context.json` in the current working directory with the assignment context. First ensure the directory exists:
119
-
120
- ```bash
121
- mkdir -p .syntaur
122
- ```
123
-
124
- Then write the JSON file with this structure:
125
-
126
- ```json
127
- {
128
- "projectSlug": "<project-slug>",
129
- "assignmentSlug": "<assignment-slug>",
130
- "projectDir": "/Users/<username>/.syntaur/projects/<project-slug>",
131
- "assignmentDir": "/Users/<username>/.syntaur/projects/<project-slug>/assignments/<assignment-slug>",
132
- "workspaceRoot": "<workspace.worktreePath if set, else workspace.repository if it is a local path, else current working directory>",
133
- "title": "<assignment title>",
134
- "branch": "<workspace.branch or null>",
135
- "grabbedAt": "<ISO 8601 timestamp>"
136
- }
137
- ```
138
-
139
- Use absolute paths (expand `~` to the actual home directory). Note: `workspace.repository` may be a remote URL (e.g., `https://github.com/...`) -- only use it as `workspaceRoot` if it starts with `/` (local path). If it is a URL, set `workspaceRoot` to the current working directory.
140
-
141
- **IMPORTANT:** The `workspaceRoot` must NEVER be null when the agent will be writing code. If no workspace was configured, default to the current working directory.
142
-
143
- ## Step 5.5: Register Agent Session
144
-
145
- After creating the context file, register this session in the project's agent session log so it appears in the dashboard.
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:
148
- ```bash
149
- ls -t ~/.claude/sessions/*.json | head -5
150
- ```
151
- Read the most recent file(s) and find the one whose `cwd` matches `$(pwd)`. Extract the `sessionId` field — this is the real Claude Code session ID that can be used with `claude --resume <sessionId>` to resume this exact conversation.
152
-
153
- If you cannot find a matching session file (e.g., no file matches the cwd, or the sessions directory is empty), ask the user to run `/rename <assignment-slug>` to name the current session after the assignment. Then store the assignment slug as the session name in context.json (`"sessionName": "<assignment-slug>"`) instead of `sessionId`. The user can later resume with `claude --resume <assignment-slug>`.
154
-
155
- 2. Run the track-session command (use `dangerouslyDisableSandbox: true` since it writes to `~/.syntaur/`):
156
- ```bash
157
- syntaur track-session --project <projectSlug> --assignment <assignmentSlug> --agent claude --session-id <claude-session-id> --path $(pwd)
158
- ```
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.
161
-
162
- ## Step 5.6: Load Playbooks
163
-
164
- Read all playbook files from `~/.syntaur/playbooks/` and treat their content as active behavioral rules for this assignment:
165
-
166
- ```bash
167
- ls ~/.syntaur/playbooks/*.md 2>/dev/null
168
- ```
169
-
170
- For each `.md` file found, read it and internalize the rules in its body section. These are user-defined behavioral policies that you must follow throughout your work on this assignment. Playbooks take precedence over default conventions when they conflict.
171
-
172
- If no playbook files exist, skip this step.
173
-
174
- ## Step 6: Report to User
175
-
176
- Summarize what was done:
177
- - Which assignment was grabbed
178
- - Its current status (note if it was already past `pending` — e.g., "already in `review`, status unchanged")
179
- - The objective (first paragraph from assignment.md body)
180
- - The acceptance criteria (the checkbox list)
181
- - Active todos from the `## Todos` section (if any), with links to any referenced plan files
182
- - The workspace path (if set)
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
@@ -1,148 +0,0 @@
1
- ---
2
- name: plan-assignment
3
- description: Create an implementation plan for the current Syntaur assignment
4
- argument-hint: "[focus area or notes]"
5
- allowed-tools:
6
- - Bash
7
- - Read
8
- - Write
9
- - Edit
10
- - Glob
11
- - Grep
12
- ---
13
-
14
- # Plan Assignment
15
-
16
- Create a detailed implementation plan for your current Syntaur assignment.
17
-
18
- ## Arguments
19
-
20
- Optional notes from the user: $ARGUMENTS
21
-
22
- ## Step 1: Load Context
23
-
24
- Read `.syntaur/context.json` from the current working directory.
25
-
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
-
28
- Extract from the context file:
29
- - `projectSlug` -- the project slug
30
- - `assignmentSlug` -- the assignment slug
31
- - `assignmentDir` -- absolute path to the assignment folder
32
- - `projectDir` -- absolute path to the project folder
33
- - `workspaceRoot` -- absolute path to the workspace (may be null)
34
-
35
- ## Step 1.5: Load Playbooks
36
-
37
- Read all playbook files from `~/.syntaur/playbooks/` — these contain user-defined behavioral rules you must follow:
38
-
39
- ```bash
40
- ls ~/.syntaur/playbooks/*.md 2>/dev/null
41
- ```
42
-
43
- For each file found, read it and follow its directives. Playbooks may contain rules about planning conventions, required steps, or quality expectations that apply to this plan.
44
-
45
- ## Step 2: Read Assignment Details
46
-
47
- Read the following files to understand the assignment:
48
-
49
- 1. Read `<assignmentDir>/assignment.md` -- extract the objective, acceptance criteria, context section, and any Q&A
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
-
54
- If the assignment has dependencies (`dependsOn` in frontmatter), read the handoff.md from each dependency's assignment folder for integration context:
55
- - `<projectDir>/assignments/<dep-slug>/handoff.md`
56
-
57
- ## Step 3: Explore Workspace (if set)
58
-
59
- If `workspaceRoot` is not null:
60
-
61
- 1. Check if the workspace directory exists:
62
- ```bash
63
- ls <workspaceRoot>
64
- ```
65
- 2. Explore the codebase structure to understand what exists:
66
- - Use `Glob` to find key files (e.g., `**/*.ts`, `**/package.json`, `**/*.md`)
67
- - Use `Grep` to search for relevant patterns mentioned in the assignment
68
- - Read key files like `package.json`, `tsconfig.json`, or entry points
69
- 3. Note any existing patterns, conventions, or architecture you discover
70
-
71
- If `workspaceRoot` is null, skip this step and note in the plan that no workspace is configured.
72
-
73
- ## Step 4: Write the Plan
74
-
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
-
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:
101
-
102
- 1. **Overview** -- one paragraph summarizing the approach
103
- 2. **Tasks** -- numbered list of implementation tasks, each with:
104
- - Description of what to do
105
- - Files to create or modify (with paths)
106
- - Dependencies on other tasks
107
- - Estimated complexity (low/medium/high)
108
- 3. **Acceptance Criteria Mapping** -- for each criterion from assignment.md, which task(s) address it
109
- 4. **Risks and Open Questions** -- anything that might block or complicate implementation
110
- 5. **Testing Strategy** -- how to verify the implementation works
111
-
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.
137
-
138
- ## Step 5: Report to User
139
-
140
- After writing the plan:
141
- 1. Summarize the plan (number of tasks, key decisions)
142
- 2. Note any open questions or risks that need human input
143
- 3. Suggest next step: begin implementing the first task, or run `/complete-assignment` when all work is done
144
-
145
- **Remind the agent about recordkeeping during implementation:**
146
- - Check off acceptance criteria in `assignment.md` as each one is completed, not in a batch at the end
147
- - Update the `## Progress` section in `assignment.md` after each meaningful milestone
148
- - The assignment file is a live document — it should reflect current state at all times
@@ -1,86 +0,0 @@
1
- ---
2
- name: syntaur-protocol
3
- description: This skill should be used when the user mentions "syntaur", "assignment", "project", works with files under ~/.syntaur/, references assignment.md, plan.md, handoff.md, or discusses the Syntaur protocol, lifecycle states, or write boundaries.
4
- version: 0.1.0
5
- ---
6
-
7
- # Syntaur Protocol Knowledge
8
-
9
- You are working within the Syntaur protocol. Follow these rules at all times.
10
-
11
- ## Write Boundary Rules (CRITICAL)
12
-
13
- You MUST respect file ownership boundaries. Violations will be blocked by the PreToolUse hook.
14
-
15
- ### Files you may WRITE directly:
16
- 1. **Your assignment folder** -- only the assignment you are currently working on:
17
- - `assignment.md`, `plan*.md` (0 or more versioned plan files), `progress.md`, `scratchpad.md`, `handoff.md`, `decision-record.md`
18
- - Path (project-nested): `~/.syntaur/projects/<project>/assignments/<your-assignment>/`
19
- - Path (standalone): `~/.syntaur/assignments/<your-assignment-uuid>/` — folder named by UUID, `project: null`, `slug` display-only
20
- 2. **Shared resources and memories** at the project level:
21
- - `~/.syntaur/projects/<project>/resources/<slug>.md`
22
- - `~/.syntaur/projects/<project>/memories/<slug>.md`
23
- 3. **Your workspace** -- source code files within the workspace defined in your assignment's frontmatter (`workspace.worktreePath` or `workspace.repository`)
24
- 4. **Context file** -- `.syntaur/context.json` in the current working directory
25
-
26
- ### Files written only via CLI (never edit directly):
27
- - `comments.md` (any assignment) — use `syntaur comment <slug-or-uuid> "body" --type question|note|feedback [--reply-to <id>]`. Never edit directly. Questions carry a `resolved` flag toggled in the dashboard.
28
- - Another assignment's `## Todos` section — use `syntaur request <target> "text"` to append a todo annotated `(from: <source>)`.
29
-
30
- ### Files you must NEVER write:
31
- 1. `project.md` -- human-authored, read-only
32
- 2. `manifest.md` -- derived, rebuilt by tooling
33
- 3. Any file prefixed with `_` (`_index-*.md`, `_status.md`) -- derived
34
- 4. Other agents' assignment folders (except via the CLI-mediated channels above)
35
- 5. Any files outside your workspace boundary
36
-
37
- ## Current Assignment Context
38
-
39
- If `.syntaur/context.json` exists in the current working directory, read it to determine:
40
- - `projectSlug` -- which project you are working on
41
- - `assignmentSlug` -- which assignment is yours
42
- - `projectDir` -- absolute path to the project folder
43
- - `assignmentDir` -- absolute path to your assignment folder
44
- - `workspaceRoot` -- absolute path to your code workspace (if set)
45
-
46
- ## Protocol References
47
-
48
- For detailed protocol information, read these files:
49
- - **Protocol summary:** `${CLAUDE_PLUGIN_ROOT}/references/protocol-summary.md`
50
- - **File ownership rules:** `${CLAUDE_PLUGIN_ROOT}/references/file-ownership.md`
51
-
52
- ## Lifecycle Commands
53
-
54
- Use the `syntaur` CLI for state transitions and coordination:
55
- - `syntaur assign <slug> --agent <name> --project <project>` -- set assignee
56
- - `syntaur start <slug> --project <project>` -- pending -> in_progress
57
- - `syntaur review <slug> --project <project>` -- in_progress -> review
58
- - `syntaur complete <slug> --project <project>` -- in_progress/review -> completed
59
- - `syntaur block <slug> --project <project> --reason <text>` -- block an assignment
60
- - `syntaur unblock <slug> --project <project>` -- unblock
61
- - `syntaur fail <slug> --project <project>` -- mark as failed
62
- - `syntaur create-assignment "<title>" [--type <type>] [--project <slug> | --one-off]` -- create project-nested or standalone assignment
63
- - `syntaur comment <slug-or-uuid> "body" --type question|note|feedback [--reply-to <id>]` -- append to `comments.md`
64
- - `syntaur request <target> "text" [--from <source>]` -- append a todo to another assignment's `## Todos`
65
-
66
- ## Troubleshooting
67
-
68
- If Syntaur state looks inconsistent (missing files, stale manifests, unexpected hook blocks), run `syntaur doctor` to diagnose. The `/doctor-syntaur` slash command wraps it and helps interpret results.
69
-
70
- ## Playbooks
71
-
72
- Playbooks are user-defined behavioral rules stored in `~/.syntaur/playbooks/`. Each playbook is a markdown file with imperative rules that agents must follow. When you begin work on any assignment, read all playbook files and follow their directives. Playbooks take precedence over default conventions when they conflict.
73
-
74
- ```bash
75
- ls ~/.syntaur/playbooks/*.md 2>/dev/null
76
- ```
77
-
78
- ## Conventions
79
-
80
- - Assignment frontmatter is the single source of truth for state. `project` is the containing project slug (`null` for standalone); `type` is a classification validated against `config.md` `types.definitions` when present.
81
- - Slugs are lowercase, hyphen-separated. For standalone assignments, the folder is named by UUID; `slug` is display-only.
82
- - Always read `project.md` at the project level (when project-nested) before starting work.
83
- - Append timestamped entries to `progress.md` as work lands — do NOT add a `## Progress` section to `assignment.md`.
84
- - Record questions/notes/feedback via `syntaur comment` — never edit `comments.md` directly. Do NOT set status to blocked for questions.
85
- - Use `syntaur request` to route work to another assignment.
86
- - Commit frequently with messages referencing the assignment slug.
@@ -1,64 +0,0 @@
1
- ---
2
- name: complete-assignment
3
- description: Use when the user wants to write a Syntaur handoff, close the current session, and transition the assignment to review or completed.
4
- ---
5
-
6
- # Complete Assignment
7
-
8
- Write a handoff for the current Syntaur assignment and transition it to `review` or `completed`.
9
-
10
- ## Arguments
11
-
12
- User arguments: `$ARGUMENTS`
13
-
14
- If the user passed `--complete`, transition directly to `completed` only when all acceptance criteria are met AND all todos are either checked or marked superseded. Otherwise transition to `review`.
15
-
16
- ## Workflow
17
-
18
- 1. Read `.syntaur/context.json`. If it does not exist, tell the user there is no active assignment.
19
- 2. Read `<assignmentDir>/assignment.md` and evaluate every item in the `## Acceptance Criteria` section AND every item in the `## Todos` section. Superseded todos (marked `- [x] ~~...~~ (superseded by ...)`) count as resolved. If any acceptance criterion is unmet OR any todo is still `- [ ]` and not superseded, warn the user before proceeding.
20
- 2.5. Append a final entry to `<assignmentDir>/progress.md` (reverse-chron, newest first) under a new `## <ISO 8601 timestamp>` heading summarizing the final state of the work. Bump `entryCount` and `updated` in the frontmatter. Do NOT add a `## Progress` section to `assignment.md` — progress entries live exclusively in `progress.md` as of protocol v2.0.
21
- 3. Read `<assignmentDir>/handoff.md` and append a new handoff entry using the protocol format:
22
-
23
- ```markdown
24
- ## Handoff <N>: <ISO 8601 timestamp>
25
-
26
- **From:** codex
27
- **To:** human
28
- **Reason:** <Why this handoff is happening>
29
-
30
- ### Summary
31
- <One paragraph>
32
-
33
- ### Current State
34
- - <What is working>
35
- - <What is not working or still partial>
36
- - <Acceptance criteria status: N of M met>
37
-
38
- ### Next Steps
39
- - <Recommended follow-up actions>
40
-
41
- ### Important Context
42
- - <Anything the next person needs to know>
43
- ```
44
-
45
- 4. Update the handoff frontmatter:
46
- - set `updated` to the current timestamp
47
- - increment `handoffCount`
48
- 5. Update acceptance criteria and todo checkboxes in `assignment.md` to match reality. Do NOT modify superseded todo lines (those matching `- [x] ~~...~~ (superseded by ...)`).
49
- 6. If `.syntaur/context.json` includes `sessionId`, mark that session as completed through the dashboard API:
50
-
51
- ```bash
52
- curl -s -X PATCH "http://localhost:$(cat ~/.syntaur/dashboard-port 2>/dev/null || echo 4800)/api/agent-sessions/<session-id>/status" \
53
- -H "Content-Type: application/json" \
54
- -d '{"status":"completed","projectSlug":"<project-slug>"}'
55
- ```
56
-
57
- 7. Transition the assignment:
58
- - `syntaur complete <assignment-slug> --project <project-slug>` when `--complete` is allowed
59
- - otherwise `syntaur review <assignment-slug> --project <project-slug>`
60
- 8. Delete `.syntaur/context.json`.
61
- 9. Summarize:
62
- - new status
63
- - acceptance criteria met vs total
64
- - any criteria still unmet or follow-up risk
@@ -1,49 +0,0 @@
1
- ---
2
- name: create-assignment
3
- description: Use when the user wants to create a new Syntaur assignment inside a project or as a one-off project plus assignment.
4
- ---
5
-
6
- # Create Assignment
7
-
8
- Create a new Syntaur assignment from Codex.
9
-
10
- ## Arguments
11
-
12
- User arguments: `$ARGUMENTS`
13
-
14
- Parse:
15
-
16
- - First positional argument: assignment title
17
- - `--project <slug>` required unless `--one-off`
18
- - `--one-off` optional — creates a **standalone** assignment at `~/.syntaur/assignments/<uuid>/` with `project: null`. Folder named by UUID; `slug` is display-only. `--depends-on` is not permitted for standalone assignments.
19
- - `--slug <slug>` optional
20
- - `--priority <level>` optional, default `medium`
21
- - `--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.
22
- - `--depends-on <slug[,slug...]>` optional (project-nested only)
23
- - `--dir <path>` optional
24
-
25
- If no title was provided, ask the user for it.
26
-
27
- If neither `--project` nor `--one-off` was provided, look for `.syntaur/context.json` in the current working directory. If present, default the project to that context's `projectSlug` and tell the user you are using it.
28
-
29
- ## Workflow
30
-
31
- 1. Run one of:
32
- - `syntaur create-assignment "<title>" --project <slug> [--slug <slug>] [--priority <level>] [--depends-on <slugs>] [--type <type>] [--dir <path>]`
33
- - `syntaur create-assignment "<title>" --one-off [--slug <slug>] [--priority <level>] [--type <type>] [--dir <path>]`
34
- 2. If the command fails, report the error and stop.
35
- 3. Read the generated `assignment.md`.
36
- 4. Summarize:
37
- - assignment slug (for standalone assignments, also report the UUID — the folder is named by UUID, not slug)
38
- - project slug (or `null` for standalone)
39
- - priority
40
- - type
41
- - location
42
- - created files: `assignment.md`, `progress.md`, `comments.md`, `scratchpad.md`, `handoff.md`, `decision-record.md` (plan files are NOT scaffolded — they are created on demand by `plan-assignment`)
43
- 5. Remind the user:
44
- - Progress entries go into `progress.md` via direct appends (not into `assignment.md`).
45
- - Comments are appended via `syntaur comment <slug-or-uuid> "body" --type question|note|feedback` — never edit `comments.md` directly.
46
- 6. Suggest next steps:
47
- - fill in the objective, context, acceptance criteria, and any initial todos in the `## Todos` section
48
- - or run `plan-assignment` to create a plan file and auto-append a linked todo to `## Todos`
49
- - run `grab-assignment` to claim it if work should begin now
@@ -1,71 +0,0 @@
1
- ---
2
- name: grab-assignment
3
- description: Use when the user wants to load a Syntaur assignment into context, create .syntaur/context.json, and register a Codex session. Works regardless of assignment status.
4
- ---
5
-
6
- # Grab Assignment
7
-
8
- Load a Syntaur assignment into the current working context and register this Codex session.
9
-
10
- **Grabbing is non-destructive.** It never fails because of status. Any status (`pending`, `in_progress`, `blocked`, `review`, `completed`, `failed`) can be grabbed — grabbing just sets up context and registers the session. Only a `pending` assignment additionally transitions to `in_progress`; any other status is left untouched.
11
-
12
- ## Arguments
13
-
14
- User arguments: `$ARGUMENTS`
15
-
16
- Parse:
17
-
18
- - First positional argument: project slug
19
- - Second positional argument: optional assignment slug
20
-
21
- ## Workflow
22
-
23
- 1. If `.syntaur/context.json` already exists in the current working directory, read it and warn that claiming another assignment will replace the active context.
24
- 2. Read the project entry files:
25
- - `~/.syntaur/projects/<project-slug>/manifest.md`
26
- - `~/.syntaur/projects/<project-slug>/project.md`
27
- - `~/.syntaur/projects/<project-slug>/agent.md`
28
- - `~/.syntaur/projects/<project-slug>/claude.md` if it exists
29
- 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 8), include `"workspace": "<value>"` if the project has a workspace.
30
- 3. Discover assignments under `~/.syntaur/projects/<project-slug>/assignments/`. Do **not** filter by status — every assignment is grabbable.
31
- 4. If no assignment slug was provided:
32
- - list assignments with title, priority, and current status (highlight `pending` ones as the default candidates)
33
- - ask the user to choose unless there is exactly one obvious candidate
34
- If a slug *was* provided, verify the directory exists. Its status does not matter; do not block on it.
35
- 5. Read the chosen assignment's `assignment.md` — its frontmatter for `status`, and its markdown body for the objective, acceptance criteria, and `## Todos` section (active todos indicate outstanding work and may link to plan files to execute). If `dependsOn` is non-empty, also read each dep's `handoff.md` AND `decision-record.md` to inherit upstream context and decisions.
36
- 6. Claim the assignment:
37
- - Always: `syntaur assign <assignment-slug> --agent codex --project <project-slug>` (safe at any status; does not transition state)
38
- - **Only if current status is `pending`**: `syntaur start <assignment-slug> --project <project-slug>` to transition it to `in_progress`. Skip this command for any other status — grabbing must not rewind a `review`, `completed`, or `failed` assignment.
39
- If `syntaur assign` fails (e.g., project not found, invalid slug), report and stop. Do not treat a non-pending status as a failure.
40
- 7. If the assignment has no workspace configured, set `workspace.repository` and `workspace.worktreePath` to the current working directory so write boundaries are meaningful.
41
- 8. Create `.syntaur/context.json` in the current working directory with:
42
-
43
- ```json
44
- {
45
- "projectSlug": "<project-slug>",
46
- "assignmentSlug": "<assignment-slug>",
47
- "projectDir": "/absolute/path/to/project",
48
- "assignmentDir": "/absolute/path/to/assignment",
49
- "workspaceRoot": "/absolute/path/to/workspace",
50
- "title": "<assignment title>",
51
- "branch": "<workspace.branch or null>",
52
- "grabbedAt": "<ISO 8601 timestamp>",
53
- "sessionId": "<uuid>"
54
- }
55
- ```
56
-
57
- 9. Register the agent session:
58
- - generate a UUID
59
- - run `syntaur track-session --project <project-slug> --assignment <assignment-slug> --agent codex --session-id <uuid> --path <cwd>`
60
- 10. Summarize:
61
- - assignment slug and title
62
- - current status (call it out if the assignment was already past `pending` — e.g., "already in `review`, status unchanged")
63
- - objective
64
- - acceptance criteria
65
- - active todos from the `## Todos` section (if any), including any plan files they link to
66
- - workspace path
67
- 11. Suggest a next step appropriate to status:
68
- - `pending` / `in_progress`: `plan-assignment`
69
- - `blocked`: investigate `blockedReason`
70
- - `review`: inspect the implementation and help verify acceptance criteria
71
- - `completed` / `failed`: read the handoff; grab is probably for reference or reopen
@@ -1,57 +0,0 @@
1
- ---
2
- name: plan-assignment
3
- description: Use when the user wants a detailed implementation plan written as a versioned plan file for the current Syntaur assignment.
4
- ---
5
-
6
- # Plan Assignment
7
-
8
- Create an implementation plan for the current Syntaur assignment. Plans are versioned files: the first is `plan.md`, later ones 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.
9
-
10
- ## Arguments
11
-
12
- Optional notes from the user: `$ARGUMENTS`
13
-
14
- ## Workflow
15
-
16
- 1. Read `.syntaur/context.json` from the current working directory. If it does not exist, tell the user to claim an assignment first.
17
- 2. Read:
18
- - `<assignmentDir>/assignment.md`
19
- - `<projectDir>/agent.md`
20
- - `<projectDir>/claude.md` if it exists
21
- - `<projectDir>/project.md`
22
- 3. If the assignment depends on other assignments, read each dependency handoff for integration context.
23
- 4. Explore `workspaceRoot` when it exists:
24
- - inspect project structure
25
- - find likely implementation files
26
- - note conventions and architecture
27
- 5. Determine the next plan filename:
28
- - List `<assignmentDir>/plan*.md`.
29
- - If none exist, target is `plan.md` (version label: "plan").
30
- - Otherwise pick the smallest `N >= 2` such that `plan-v<N>.md` does not exist (version label: `plan v<N>`).
31
- 6. Write `<assignmentDir>/<planFilename>` with standard plan frontmatter (`assignment`, `status: draft`, `created`, `updated`) and a body containing the sections below. If the file already exists (only possible for `plan.md` on first re-run), preserve frontmatter, flip `status` from `draft` to `in_progress`, update `updated`, and replace only the body.
32
- 7. Update `<assignmentDir>/assignment.md`:
33
- - Find unchecked todos matching `- [ ] Execute [<label>](./plan*.md)`. Rewrite each as `- [x] ~~Execute [<label>](./<old-filename>)~~ (superseded by <versionLabel>)`. Never delete the old line.
34
- - Append a new todo: `- [ ] Execute [<versionLabel>](./<planFilename>)`.
35
- - If `## Todos` is missing (legacy assignment), insert it right after `## Acceptance Criteria` with a short guidance comment and the new todo line.
36
- - Refresh the assignment frontmatter `updated` timestamp.
37
-
38
- ## Plan Contents
39
-
40
- Write these sections:
41
-
42
- 1. Overview
43
- 2. Tasks
44
- 3. Acceptance Criteria Mapping
45
- 4. Risks and Open Questions
46
- 5. Testing Strategy
47
-
48
- **Decision capture:** While planning, record meaningful choices (library picks, schema design, architectural calls, rejected alternatives) as numbered entries in `<assignmentDir>/decision-record.md` using `## Decision N: <short title>` with Status (proposed/accepted), Context, Decision, Consequences. Downstream assignments that depend on this one auto-load these on grab.
49
-
50
- ## Reporting
51
-
52
- After writing the plan:
53
-
54
- - summarize the number of tasks and key decisions
55
- - call out open questions or risks
56
- - note which plan filename was written and which prior plan (if any) was superseded
57
- - remind yourself to keep `assignment.md` progress, acceptance criteria, and todos current during implementation