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.
- package/README.md +26 -3
- package/dist/dashboard/server.js +497 -315
- package/dist/dashboard/server.js.map +1 -1
- package/dist/index.js +1240 -550
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
- package/platforms/claude-code/.claude-plugin/plugin.json +1 -1
- package/platforms/claude-code/agents/syntaur-expert.md +35 -20
- package/platforms/claude-code/commands/complete-assignment/complete-assignment.md +20 -0
- package/platforms/claude-code/commands/create-assignment/create-assignment.md +20 -0
- package/platforms/claude-code/commands/create-project/create-project.md +20 -0
- package/platforms/claude-code/commands/grab-assignment/grab-assignment.md +20 -0
- package/platforms/claude-code/commands/plan-assignment/plan-assignment.md +20 -0
- package/platforms/claude-code/commands/track-session/track-session.md +43 -18
- package/platforms/claude-code/hooks/hooks.json +11 -0
- package/platforms/claude-code/hooks/session-cleanup.sh +13 -23
- package/platforms/claude-code/hooks/session-start.sh +80 -0
- package/platforms/codex/.codex-plugin/plugin.json +1 -1
- package/platforms/codex/agents/syntaur-operator.md +6 -4
- package/platforms/codex/scripts/resolve-session.sh +49 -0
- package/statusline/statusline.sh +133 -0
- package/vendor/syntaur-skills/LICENSE +21 -0
- package/vendor/syntaur-skills/README.md +43 -0
- package/vendor/syntaur-skills/skills/complete-assignment/SKILL.md +146 -0
- package/vendor/syntaur-skills/skills/create-assignment/SKILL.md +72 -0
- package/vendor/syntaur-skills/skills/create-project/SKILL.md +56 -0
- package/vendor/syntaur-skills/skills/grab-assignment/SKILL.md +158 -0
- package/vendor/syntaur-skills/skills/plan-assignment/SKILL.md +137 -0
- package/vendor/syntaur-skills/skills/syntaur-protocol/SKILL.md +119 -0
- package/vendor/syntaur-skills/skills/syntaur-protocol/references/file-ownership.md +67 -0
- package/vendor/syntaur-skills/skills/syntaur-protocol/references/protocol-summary.md +82 -0
- package/platforms/claude-code/skills/complete-assignment/SKILL.md +0 -155
- package/platforms/claude-code/skills/create-assignment/SKILL.md +0 -67
- package/platforms/claude-code/skills/grab-assignment/SKILL.md +0 -187
- package/platforms/claude-code/skills/plan-assignment/SKILL.md +0 -148
- package/platforms/claude-code/skills/syntaur-protocol/SKILL.md +0 -86
- package/platforms/codex/skills/complete-assignment/SKILL.md +0 -64
- package/platforms/codex/skills/create-assignment/SKILL.md +0 -49
- package/platforms/codex/skills/grab-assignment/SKILL.md +0 -71
- package/platforms/codex/skills/plan-assignment/SKILL.md +0 -57
- package/platforms/codex/skills/syntaur-protocol/SKILL.md +0 -102
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-assignment
|
|
3
|
+
description: >-
|
|
4
|
+
Create a detailed implementation plan for the current Syntaur assignment.
|
|
5
|
+
Use when the user wants to plan their work, write a plan file, or design an
|
|
6
|
+
approach for an active assignment.
|
|
7
|
+
license: MIT
|
|
8
|
+
metadata:
|
|
9
|
+
author: prong-horn
|
|
10
|
+
version: "1.1.0"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Plan Assignment
|
|
14
|
+
|
|
15
|
+
Create a versioned implementation plan for your current Syntaur assignment. Plans are versioned files: the first is `plan.md`, subsequent ones are `plan-v2.md`, `plan-v3.md`, and so on. Each plan gets a linked todo in the `## Todos` section of `assignment.md`; prior active plan todos are marked superseded (never deleted).
|
|
16
|
+
|
|
17
|
+
## Input
|
|
18
|
+
|
|
19
|
+
Optional: the user may provide focus areas or notes to guide the plan.
|
|
20
|
+
|
|
21
|
+
## Step 1: Load Context
|
|
22
|
+
|
|
23
|
+
Read `.syntaur/context.json` from the current working directory. If the file does not exist, tell the user: "No active assignment found. Run `grab-assignment` first to claim an assignment."
|
|
24
|
+
|
|
25
|
+
Extract:
|
|
26
|
+
- `projectSlug` — the project slug (`null` for standalone assignments)
|
|
27
|
+
- `assignmentSlug` — the assignment slug
|
|
28
|
+
- `assignmentDir` — absolute path to the assignment folder
|
|
29
|
+
- `projectDir` — absolute path to the project folder (may be null for standalone)
|
|
30
|
+
- `workspaceRoot` — absolute path to the workspace (may be null)
|
|
31
|
+
|
|
32
|
+
## Step 2: Load Playbooks
|
|
33
|
+
|
|
34
|
+
Read all playbook files from `~/.syntaur/playbooks/`:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
ls ~/.syntaur/playbooks/*.md 2>/dev/null
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For each file found, read it and follow its directives. Playbooks may contain rules about planning conventions, required steps, or quality expectations that take precedence over default conventions.
|
|
41
|
+
|
|
42
|
+
## Step 3: Read Assignment Details
|
|
43
|
+
|
|
44
|
+
Read these files to understand the assignment:
|
|
45
|
+
|
|
46
|
+
1. `<assignmentDir>/assignment.md` — objective, acceptance criteria, context, and the `## Todos` list
|
|
47
|
+
2. `<assignmentDir>/comments.md` if present — inherited questions, notes, and feedback
|
|
48
|
+
3. `<projectDir>/project.md` — project goal for broader context (skip for standalone)
|
|
49
|
+
4. `<projectDir>/manifest.md` — project navigation index (skip for standalone)
|
|
50
|
+
|
|
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
|
+
|
|
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.
|
|
54
|
+
|
|
55
|
+
## Step 4: Explore Workspace (if set)
|
|
56
|
+
|
|
57
|
+
If `workspaceRoot` is not null:
|
|
58
|
+
|
|
59
|
+
1. Check the workspace directory exists.
|
|
60
|
+
2. Explore the codebase to understand what exists: find key files (`**/*.ts`, `package.json`, `**/*.md`, etc.), search for relevant patterns mentioned in the assignment, read entry points and config.
|
|
61
|
+
3. Note any existing patterns, conventions, or architecture you discover.
|
|
62
|
+
|
|
63
|
+
If `workspaceRoot` is null, skip this step and note in the plan that no workspace is configured.
|
|
64
|
+
|
|
65
|
+
## Step 5: Write the Plan
|
|
66
|
+
|
|
67
|
+
### 5a. Determine the next plan filename
|
|
68
|
+
|
|
69
|
+
List `<assignmentDir>/plan*.md` and pick the target:
|
|
70
|
+
|
|
71
|
+
- If no plan files exist → `plan.md` (version label: "plan").
|
|
72
|
+
- If `plan.md` exists but no `plan-v<N>.md` → `plan-v2.md` (version label: "plan v2").
|
|
73
|
+
- Otherwise pick the smallest `N >= 2` such that `plan-v<N>.md` does not exist (version label: `plan v<N>`).
|
|
74
|
+
|
|
75
|
+
Remember this `planFilename` and `versionLabel` for Steps 5b and 5c.
|
|
76
|
+
|
|
77
|
+
### 5b. Write the plan file
|
|
78
|
+
|
|
79
|
+
Write `<assignmentDir>/<planFilename>` with standard plan frontmatter:
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
---
|
|
83
|
+
assignment: <assignmentSlug>
|
|
84
|
+
status: draft
|
|
85
|
+
created: "<nowTimestamp>"
|
|
86
|
+
updated: "<nowTimestamp>"
|
|
87
|
+
---
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Body sections:
|
|
91
|
+
|
|
92
|
+
1. **Overview** — one paragraph summarizing the approach.
|
|
93
|
+
2. **Tasks** — numbered list; each task has description, files to create/modify (with paths), dependencies on other tasks, and complexity estimate (low/medium/high).
|
|
94
|
+
3. **Acceptance Criteria Mapping** — for each criterion from assignment.md, which task(s) address it.
|
|
95
|
+
4. **Risks and Open Questions** — anything that might block or complicate implementation.
|
|
96
|
+
5. **Testing Strategy** — how to verify the implementation works.
|
|
97
|
+
|
|
98
|
+
**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 decisions.
|
|
99
|
+
|
|
100
|
+
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`.
|
|
101
|
+
|
|
102
|
+
### 5c. Update assignment.md Todos
|
|
103
|
+
|
|
104
|
+
Read `<assignmentDir>/assignment.md` and locate the `## Todos` section.
|
|
105
|
+
|
|
106
|
+
1. **Supersede prior plan todos.** For every unchecked line matching `- [ ] Execute [<label>](./plan.md)` or `- [ ] Execute [<label>](./plan-v<N>.md)`, rewrite as:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
- [x] ~~Execute [<label>](./<old-plan-filename>)~~ (superseded by <versionLabel>)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Never delete the old line — preserve history.
|
|
113
|
+
|
|
114
|
+
2. **Append the new plan todo.** Add a new line to the end of `## Todos`:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
- [ ] Execute [<versionLabel>](./<planFilename>)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
3. **Missing-section fallback.** If `## Todos` 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.
|
|
121
|
+
|
|
122
|
+
Also refresh the assignment frontmatter `updated` timestamp.
|
|
123
|
+
|
|
124
|
+
## Step 6: Report to User
|
|
125
|
+
|
|
126
|
+
After writing the plan:
|
|
127
|
+
|
|
128
|
+
1. Summarize the plan (number of tasks, key decisions).
|
|
129
|
+
2. Note any open questions or risks that need human input.
|
|
130
|
+
3. Call out which plan filename was written and whether any prior plan was superseded.
|
|
131
|
+
4. Suggest the next step: begin implementing the first task, or run `complete-assignment` when all work is done.
|
|
132
|
+
|
|
133
|
+
**Recordkeeping reminders for implementation:**
|
|
134
|
+
- Check off acceptance criteria in `assignment.md` as each one is completed — not in a batch at the end.
|
|
135
|
+
- Append timestamped milestones to `progress.md` (a separate append-only file). Do NOT add a `## Progress` section to `assignment.md` — protocol v2.0 moved progress to its own file.
|
|
136
|
+
- Record questions, notes, or feedback via `syntaur comment <slug-or-uuid> "body" --type question|note|feedback` — never edit `comments.md` directly.
|
|
137
|
+
- Keep `assignment.md` status, todos, and acceptance checkboxes reflecting current state at all times.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: syntaur-protocol
|
|
3
|
+
description: >-
|
|
4
|
+
Use when the user mentions Syntaur, projects, assignments, files under
|
|
5
|
+
~/.syntaur/, assignment.md, plan*.md, progress.md, comments.md, handoff.md,
|
|
6
|
+
.syntaur/context.json, lifecycle states, or write boundaries. Core protocol
|
|
7
|
+
knowledge for any AI agent working within Syntaur (protocol v2.0).
|
|
8
|
+
license: MIT
|
|
9
|
+
metadata:
|
|
10
|
+
author: prong-horn
|
|
11
|
+
version: "1.1.0"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Syntaur Protocol (v2.0)
|
|
15
|
+
|
|
16
|
+
You are working within the Syntaur protocol — a coordination system for AI agents built on markdown files. Follow these rules at all times.
|
|
17
|
+
|
|
18
|
+
## Write Boundary Rules
|
|
19
|
+
|
|
20
|
+
Respect file ownership boundaries. The Claude Code and Codex plugins enforce them via PreToolUse hooks; other agents are on the honor system but the dashboard surfaces violations.
|
|
21
|
+
|
|
22
|
+
### Files you may write
|
|
23
|
+
|
|
24
|
+
1. **Your assignment folder only** (project-nested OR standalone):
|
|
25
|
+
- `assignment.md`
|
|
26
|
+
- `plan*.md` (versioned — `plan.md`, `plan-v2.md`, etc.)
|
|
27
|
+
- `progress.md` (append-only, timestamped)
|
|
28
|
+
- `scratchpad.md`
|
|
29
|
+
- `handoff.md` (append-only)
|
|
30
|
+
- `decision-record.md` (append-only)
|
|
31
|
+
2. **Project-level shared files:**
|
|
32
|
+
- `~/.syntaur/projects/<project>/resources/<slug>.md`
|
|
33
|
+
- `~/.syntaur/projects/<project>/memories/<slug>.md`
|
|
34
|
+
3. **Workspace files** inside the assignment's configured `workspace.worktreePath` / `workspace.repository`.
|
|
35
|
+
4. **Context file:** `.syntaur/context.json` in the current working directory.
|
|
36
|
+
|
|
37
|
+
### Files written only via CLI (never edit directly)
|
|
38
|
+
|
|
39
|
+
- `comments.md` (any assignment) — use `syntaur comment <slug-or-uuid> "body" --type question|note|feedback [--reply-to <id>]`. Questions carry a `resolved` flag toggled in the dashboard.
|
|
40
|
+
- Another assignment's `## Todos` section — use `syntaur request <target> "text" [--from <source>]` to append a todo annotated `(from: <source>)`.
|
|
41
|
+
|
|
42
|
+
### Files you must never write
|
|
43
|
+
|
|
44
|
+
1. `project.md` — human-authored, read-only.
|
|
45
|
+
2. `manifest.md` — derived, rebuilt by tooling.
|
|
46
|
+
3. Any file prefixed with `_` (`_index-*.md`, `_status.md`) — derived.
|
|
47
|
+
4. Other agents' assignment folders (except via the CLI-mediated channels above).
|
|
48
|
+
5. Anything outside the current workspace boundary.
|
|
49
|
+
|
|
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/`.
|
|
51
|
+
|
|
52
|
+
## Current Assignment Context
|
|
53
|
+
|
|
54
|
+
If `.syntaur/context.json` exists in the current working directory, read it before making changes. Fields you will see:
|
|
55
|
+
|
|
56
|
+
- `projectSlug` — containing project slug (`null` for standalone assignments)
|
|
57
|
+
- `assignmentSlug` — assignment slug (for standalone, the UUID is the folder name; slug is display-only)
|
|
58
|
+
- `projectDir` — absolute path to the project folder (`null` for standalone)
|
|
59
|
+
- `assignmentDir` — absolute path to the assignment folder
|
|
60
|
+
- `workspaceRoot` — absolute path to the code workspace
|
|
61
|
+
- `sessionId` — real agent-runtime session id (never a synthesized UUID)
|
|
62
|
+
- `transcriptPath` — absolute path to the agent's rollout/transcript file, if known
|
|
63
|
+
|
|
64
|
+
## Required Reading Order
|
|
65
|
+
|
|
66
|
+
When starting work on an existing assignment, read these in order:
|
|
67
|
+
|
|
68
|
+
1. `~/.syntaur/playbooks/*.md` — behavioral rules (take precedence over defaults)
|
|
69
|
+
2. `<projectDir>/manifest.md` (skip for standalone)
|
|
70
|
+
3. `<projectDir>/project.md` (skip for standalone)
|
|
71
|
+
4. `<assignmentDir>/assignment.md`
|
|
72
|
+
5. `<assignmentDir>/comments.md` if present — inherited questions / notes
|
|
73
|
+
6. Latest `<assignmentDir>/plan*.md` (pick the newest)
|
|
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
|
|
76
|
+
|
|
77
|
+
## Lifecycle Commands
|
|
78
|
+
|
|
79
|
+
- `syntaur assign <slug> --agent <name> --project <project>` — set assignee
|
|
80
|
+
- `syntaur start <slug> --project <project>` — pending → in_progress
|
|
81
|
+
- `syntaur review <slug> --project <project>` — in_progress → review
|
|
82
|
+
- `syntaur complete <slug> --project <project>` — in_progress/review → completed
|
|
83
|
+
- `syntaur block <slug> --project <project> --reason <text>` — block
|
|
84
|
+
- `syntaur unblock <slug> --project <project>` — unblock
|
|
85
|
+
- `syntaur fail <slug> --project <project>` — mark as failed
|
|
86
|
+
- `syntaur create-assignment "<title>" [--type <type>] [--project <slug> | --one-off]` — create project-nested or standalone
|
|
87
|
+
- `syntaur comment <slug-or-uuid> "body" --type question|note|feedback [--reply-to <id>]` — append to `comments.md`
|
|
88
|
+
- `syntaur request <target> "text" [--from <source>]` — append a todo to another assignment's `## Todos`
|
|
89
|
+
- `syntaur track-session --agent <name> --session-id <real-id> [--transcript-path <path>] [--project <p>] [--assignment <a>]` — register an agent session. The session-id must be the real one from the agent runtime — no synthesized UUIDs.
|
|
90
|
+
|
|
91
|
+
## Agent Sessions
|
|
92
|
+
|
|
93
|
+
Sessions are registered in `~/.syntaur/syntaur.db` keyed on the real agent session id. Plugins for Claude Code / Codex include a `SessionStart` hook that auto-merges `sessionId` and `transcriptPath` into an existing `.syntaur/context.json` at the start of every session. Other agents should source the real id from their runtime and pass it to `syntaur track-session` explicitly.
|
|
94
|
+
|
|
95
|
+
## Playbooks
|
|
96
|
+
|
|
97
|
+
Playbooks at `~/.syntaur/playbooks/` are user-defined behavioral rules. Read them before starting work on any assignment and follow their directives. They take precedence over default conventions when they conflict.
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
ls ~/.syntaur/playbooks/*.md 2>/dev/null
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Conventions
|
|
104
|
+
|
|
105
|
+
- 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.
|
|
106
|
+
- Slugs are lowercase, hyphen-separated. For standalone assignments the folder is named by UUID; `slug` is display-only.
|
|
107
|
+
- Update acceptance criteria checkboxes as work lands, not only at the end.
|
|
108
|
+
- Append milestones to `progress.md` — do NOT add a `## Progress` section to `assignment.md` (v2.0 moved progress to its own file).
|
|
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.
|
|
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`.
|
|
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.
|
|
112
|
+
- Commit frequently with messages referencing the assignment slug.
|
|
113
|
+
|
|
114
|
+
## References
|
|
115
|
+
|
|
116
|
+
For the full directory structure, lifecycle state table, and detailed file ownership rules, read:
|
|
117
|
+
|
|
118
|
+
- `references/protocol-summary.md`
|
|
119
|
+
- `references/file-ownership.md`
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# File Ownership Rules (protocol v2.0)
|
|
2
|
+
|
|
3
|
+
## Human-Authored (READ-ONLY for agents)
|
|
4
|
+
|
|
5
|
+
Agents must NEVER modify these files:
|
|
6
|
+
|
|
7
|
+
| File | Location |
|
|
8
|
+
|------|----------|
|
|
9
|
+
| `project.md` | `<project>/project.md` |
|
|
10
|
+
| `CLAUDE.md` / `AGENTS.md` | Repo root (live outside `~/.syntaur/`) |
|
|
11
|
+
| `<slug>.md` | `~/.syntaur/playbooks/<slug>.md` |
|
|
12
|
+
|
|
13
|
+
Per-project `agent.md` / `claude.md` were removed in protocol v2.0. Agent-level conventions live at the repo root in `CLAUDE.md` / `AGENTS.md`, and user-defined behavioral rules live in `~/.syntaur/playbooks/`.
|
|
14
|
+
|
|
15
|
+
## Agent-Writable (YOUR assignment folder ONLY)
|
|
16
|
+
|
|
17
|
+
You may only write to files inside your currently-claimed assignment folder:
|
|
18
|
+
|
|
19
|
+
| File | Purpose |
|
|
20
|
+
|------|---------|
|
|
21
|
+
| `assignment.md` | Assignment record; source of truth for state. Includes `## Todos` checklist. |
|
|
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
|
+
| `progress.md` | Append-only, timestamped progress log (newest first). |
|
|
24
|
+
| `scratchpad.md` | Working notes. |
|
|
25
|
+
| `handoff.md` | Append-only handoff log. |
|
|
26
|
+
| `decision-record.md` | Append-only decision log (Status / Context / Decision / Consequences). |
|
|
27
|
+
|
|
28
|
+
Path patterns:
|
|
29
|
+
- Project-nested: `~/.syntaur/projects/<project>/assignments/<your-assignment-slug>/`
|
|
30
|
+
- Standalone: `~/.syntaur/assignments/<your-assignment-uuid>/` (folder name is the UUID; `slug` is display-only)
|
|
31
|
+
|
|
32
|
+
## CLI-Mediated (any agent via the `syntaur` CLI)
|
|
33
|
+
|
|
34
|
+
These files are never edited directly — write to them only through the CLI so derived indexes and dashboards stay consistent.
|
|
35
|
+
|
|
36
|
+
| Target | Command |
|
|
37
|
+
|--------|---------|
|
|
38
|
+
| `comments.md` (any assignment) | `syntaur comment <slug-or-uuid> "body" --type question\|note\|feedback [--reply-to <id>]` |
|
|
39
|
+
| Another assignment's `## Todos` | `syntaur request <target> "text" [--from <source>]` |
|
|
40
|
+
|
|
41
|
+
## Shared-Writable (any agent or human)
|
|
42
|
+
|
|
43
|
+
| Location | Purpose |
|
|
44
|
+
|----------|---------|
|
|
45
|
+
| `<project>/resources/<slug>.md` | Reference material |
|
|
46
|
+
| `<project>/memories/<slug>.md` | Learnings and patterns |
|
|
47
|
+
|
|
48
|
+
## Derived (NEVER edit)
|
|
49
|
+
|
|
50
|
+
All files prefixed with `_` are derived and rebuilt by tooling:
|
|
51
|
+
|
|
52
|
+
- `manifest.md`
|
|
53
|
+
- `_index-assignments.md`
|
|
54
|
+
- `_index-plans.md`
|
|
55
|
+
- `_index-decisions.md`
|
|
56
|
+
- `_status.md`
|
|
57
|
+
- `resources/_index.md`
|
|
58
|
+
- `memories/_index.md`
|
|
59
|
+
- `~/.syntaur/playbooks/manifest.md`
|
|
60
|
+
|
|
61
|
+
## Workspace Files
|
|
62
|
+
|
|
63
|
+
When working on code (not protocol files), you may write to files within the workspace defined in your assignment frontmatter:
|
|
64
|
+
|
|
65
|
+
- `workspace.worktreePath` or `workspace.repository` defines your code root.
|
|
66
|
+
- You may create and edit source files within that workspace.
|
|
67
|
+
- The `.syntaur/context.json` context file in your working directory is also writable (merge, don't overwrite — the platform SessionStart hook may have populated `sessionId` and `transcriptPath`).
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Syntaur Protocol Summary
|
|
2
|
+
|
|
3
|
+
Protocol version: **2.0**
|
|
4
|
+
|
|
5
|
+
## Directory Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
~/.syntaur/
|
|
9
|
+
config.md
|
|
10
|
+
projects/
|
|
11
|
+
<project-slug>/
|
|
12
|
+
manifest.md # Derived: root navigation (read-only)
|
|
13
|
+
project.md # Human-authored: project overview (read-only)
|
|
14
|
+
_index-assignments.md # Derived (read-only)
|
|
15
|
+
_index-plans.md # Derived (read-only)
|
|
16
|
+
_index-decisions.md # Derived (read-only)
|
|
17
|
+
_status.md # Derived: status rollup (read-only)
|
|
18
|
+
assignments/
|
|
19
|
+
<assignment-slug>/
|
|
20
|
+
assignment.md # Agent-writable: source of truth for state (## Todos checklist)
|
|
21
|
+
plan*.md # Agent-writable: versioned plans (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`)
|
|
24
|
+
scratchpad.md # Agent-writable: working notes
|
|
25
|
+
handoff.md # Agent-writable, append-only: handoff log
|
|
26
|
+
decision-record.md # Agent-writable, append-only: decision log
|
|
27
|
+
resources/
|
|
28
|
+
_index.md # Derived (read-only)
|
|
29
|
+
<resource-slug>.md # Shared-writable
|
|
30
|
+
memories/
|
|
31
|
+
_index.md # Derived (read-only)
|
|
32
|
+
<memory-slug>.md # Shared-writable
|
|
33
|
+
assignments/
|
|
34
|
+
<assignment-uuid>/ # Standalone assignments: folder = UUID, `project: null`, slug display-only
|
|
35
|
+
assignment.md # Same schema as project-nested
|
|
36
|
+
plan*.md, progress.md, comments.md, scratchpad.md, handoff.md, decision-record.md
|
|
37
|
+
playbooks/
|
|
38
|
+
manifest.md # Derived: playbook listing (read-only)
|
|
39
|
+
<slug>.md # User-authored: behavioral rules for agents
|
|
40
|
+
syntaur.db # SQLite: agent session registry keyed on real session_id
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Assignment Lifecycle
|
|
44
|
+
|
|
45
|
+
| Status | Meaning |
|
|
46
|
+
|--------|---------|
|
|
47
|
+
| `pending` | Not yet started |
|
|
48
|
+
| `in_progress` | Actively being worked on |
|
|
49
|
+
| `blocked` | Manually blocked (requires `blockedReason`) |
|
|
50
|
+
| `review` | Work complete, awaiting review |
|
|
51
|
+
| `completed` | Done |
|
|
52
|
+
| `failed` | Could not be completed |
|
|
53
|
+
|
|
54
|
+
## Valid State Transitions
|
|
55
|
+
|
|
56
|
+
| From | Command | To |
|
|
57
|
+
|------|---------|-----|
|
|
58
|
+
| pending | start | in_progress |
|
|
59
|
+
| pending | block | blocked |
|
|
60
|
+
| in_progress | block | blocked |
|
|
61
|
+
| in_progress | review | review |
|
|
62
|
+
| in_progress | complete | completed |
|
|
63
|
+
| in_progress | fail | failed |
|
|
64
|
+
| blocked | unblock | in_progress |
|
|
65
|
+
| review | start | in_progress |
|
|
66
|
+
| review | complete | completed |
|
|
67
|
+
| review | fail | failed |
|
|
68
|
+
|
|
69
|
+
## Key Rules
|
|
70
|
+
|
|
71
|
+
1. **Assignment frontmatter is the single source of truth** for all assignment state.
|
|
72
|
+
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).
|
|
73
|
+
3. **Derived files** (underscore-prefixed, plus `manifest.md`) are never edited manually.
|
|
74
|
+
4. **Slugs** are lowercase, hyphen-separated.
|
|
75
|
+
5. **Dependencies** are declared via `dependsOn` in assignment frontmatter. Only valid within the same project — standalone assignments cannot declare `dependsOn`.
|
|
76
|
+
6. An assignment cannot transition from `pending` to `in_progress` while any dependency is not `completed`.
|
|
77
|
+
7. **Playbooks** in `~/.syntaur/playbooks/` define behavioral rules agents must follow. Read them before starting work.
|
|
78
|
+
8. **Todos** in `## Todos` of `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 `- [x] ~~Execute [plan](./plan.md)~~ (superseded by plan-v2)` — never delete. `## Todos` is also the landing spot for cross-assignment `syntaur request` entries.
|
|
79
|
+
9. **Progress** is appended to `progress.md` as timestamped entries (newest first). Do NOT add a `## Progress` section to `assignment.md` — protocol v2.0 moved progress to its own file.
|
|
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.
|
|
81
|
+
11. **Cross-assignment work** is requested via `syntaur request <target> "text"` — appends to the target's `## Todos` annotated `(from: <source>)`.
|
|
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.
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: complete-assignment
|
|
3
|
-
description: Write a handoff and transition the current Syntaur assignment to review or completed
|
|
4
|
-
argument-hint: "[--complete]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Bash
|
|
7
|
-
- Read
|
|
8
|
-
- Write
|
|
9
|
-
- Edit
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Complete Assignment
|
|
13
|
-
|
|
14
|
-
Write a handoff for your current assignment and transition it to review (or completed).
|
|
15
|
-
|
|
16
|
-
## Arguments
|
|
17
|
-
|
|
18
|
-
User provided: $ARGUMENTS
|
|
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 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
|
-
|
|
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."
|
|
27
|
-
|
|
28
|
-
Extract: `projectSlug`, `assignmentSlug`, `assignmentDir`, `projectDir`.
|
|
29
|
-
|
|
30
|
-
## Step 1.5: Load Playbooks
|
|
31
|
-
|
|
32
|
-
Read all playbook files from `~/.syntaur/playbooks/` — verify your work complies with their rules:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
ls ~/.syntaur/playbooks/*.md 2>/dev/null
|
|
36
|
-
```
|
|
37
|
-
|
|
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
|
-
|
|
40
|
-
## Step 2: Verify Acceptance Criteria and Todos
|
|
41
|
-
|
|
42
|
-
Read `<assignmentDir>/assignment.md` and find the `## Acceptance Criteria` and `## Todos` sections.
|
|
43
|
-
|
|
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
|
-
|
|
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?"
|
|
51
|
-
|
|
52
|
-
If the user says no, stop.
|
|
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
|
-
|
|
68
|
-
## Step 3: Write Handoff Entry
|
|
69
|
-
|
|
70
|
-
Read `<assignmentDir>/handoff.md` to see its current content and frontmatter.
|
|
71
|
-
|
|
72
|
-
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 the protocol-specified format from `docs/protocol/file-formats.md`:
|
|
73
|
-
|
|
74
|
-
```markdown
|
|
75
|
-
---
|
|
76
|
-
## Handoff <N>: <ISO 8601 timestamp>
|
|
77
|
-
|
|
78
|
-
**From:** claude
|
|
79
|
-
**To:** human
|
|
80
|
-
**Reason:** <Why this handoff is happening, e.g., "Assignment complete, handing off for review.">
|
|
81
|
-
|
|
82
|
-
### Summary
|
|
83
|
-
<One paragraph summarizing what was accomplished and what remains>
|
|
84
|
-
|
|
85
|
-
### Current State
|
|
86
|
-
- <What is working>
|
|
87
|
-
- <What is not working or partially done>
|
|
88
|
-
- <Acceptance criteria status: N of M met>
|
|
89
|
-
|
|
90
|
-
### Next Steps
|
|
91
|
-
- <Recommended next actions for the reviewer or next agent>
|
|
92
|
-
|
|
93
|
-
### Important Context
|
|
94
|
-
- <Anything the next agent/human needs that is not in the assignment or plan>
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Use the Edit tool to append this entry to handoff.md (do not overwrite existing content).
|
|
98
|
-
|
|
99
|
-
Also update the handoff.md frontmatter: set `updated` to the current timestamp and increment the `handoffCount` by 1.
|
|
100
|
-
|
|
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]`).
|
|
104
|
-
|
|
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.
|
|
106
|
-
|
|
107
|
-
Do NOT uncheck or rewrite superseded todo lines (those matching `- [x] ~~...~~ (superseded by ...)`) — leave that history intact.
|
|
108
|
-
|
|
109
|
-
## Step 4.5: Close Session
|
|
110
|
-
|
|
111
|
-
Read the context file (`.syntaur/context.json`) to get the `sessionId` and `projectSlug`. Then mark the session as completed via the dashboard API:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
curl -s -X PATCH "http://localhost:$(cat ~/.syntaur/dashboard-port 2>/dev/null || echo 4800)/api/agent-sessions/<session-id>/status" \
|
|
115
|
-
-H "Content-Type: application/json" \
|
|
116
|
-
-d '{"status": "completed", "projectSlug": "<project-slug>"}'
|
|
117
|
-
```
|
|
118
|
-
|
|
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.
|
|
120
|
-
|
|
121
|
-
## Step 5: Transition Assignment State
|
|
122
|
-
|
|
123
|
-
If the user passed `--complete`:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
syntaur complete <assignment-slug> --project <project-slug>
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Otherwise, transition to review:
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
syntaur review <assignment-slug> --project <project-slug>
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Use `dangerouslyDisableSandbox: true` since the CLI writes to `~/.syntaur/`.
|
|
136
|
-
|
|
137
|
-
If the command fails, report the error. Common failures:
|
|
138
|
-
- Assignment is not in `in_progress` status (cannot transition)
|
|
139
|
-
- Project not found
|
|
140
|
-
|
|
141
|
-
## Step 6: Clean Up Context
|
|
142
|
-
|
|
143
|
-
Delete the context file:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
rm .syntaur/context.json
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
## Step 7: Report to User
|
|
150
|
-
|
|
151
|
-
Summarize:
|
|
152
|
-
- Assignment slug and title
|
|
153
|
-
- New status (review or completed)
|
|
154
|
-
- Number of acceptance criteria met vs total
|
|
155
|
-
- Remind: if transitioned to `review`, a human reviewer will check the work. If any criteria were unmet, they may send it back to `in_progress` via `syntaur start`.
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: create-assignment
|
|
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
|
-
allowed-tools:
|
|
6
|
-
- Bash
|
|
7
|
-
- Read
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Create Assignment
|
|
11
|
-
|
|
12
|
-
Create a new assignment within a Syntaur project from Claude Code.
|
|
13
|
-
|
|
14
|
-
## Arguments
|
|
15
|
-
|
|
16
|
-
The user provided: $ARGUMENTS
|
|
17
|
-
|
|
18
|
-
Parse the arguments:
|
|
19
|
-
- First argument (required): the assignment title (e.g., `"Add login endpoint"`)
|
|
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
|
-
- `--slug` (optional): override the auto-generated assignment slug
|
|
23
|
-
- `--priority` (optional): `low`, `medium` (default), `high`, or `critical`
|
|
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
|
|
27
|
-
|
|
28
|
-
If no title was provided, ask the user what the assignment should be called.
|
|
29
|
-
|
|
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>`?"
|
|
31
|
-
|
|
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.
|
|
33
|
-
|
|
34
|
-
## Step 1: Run the CLI
|
|
35
|
-
|
|
36
|
-
Build the command from the parsed arguments. Use `dangerouslyDisableSandbox: true` since the CLI writes to `~/.syntaur/` which is outside the project sandbox.
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
syntaur create-assignment "<title>" --project <slug> [--slug <slug>] [--priority <level>] [--depends-on <slugs>] [--type <type>] [--dir <path>]
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Or for one-off (standalone at `~/.syntaur/assignments/<uuid>/`):
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
syntaur create-assignment "<title>" --one-off [--slug <slug>] [--priority <level>] [--type <type>] [--dir <path>]
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
If the command fails (e.g., project not found, slug collision), report the error and suggest fixes.
|
|
49
|
-
|
|
50
|
-
## Step 2: Read the Created Assignment
|
|
51
|
-
|
|
52
|
-
After successful creation, extract the assignment slug and directory from the CLI output. Read the generated `assignment.md`:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
cat ~/.syntaur/projects/<project-slug>/assignments/<assignment-slug>/assignment.md
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Step 3: Guide Next Steps
|
|
59
|
-
|
|
60
|
-
Tell the user:
|
|
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.
|