syntaur 0.3.3 → 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/index.js +650 -155
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
- package/platforms/claude-code/.claude-plugin/plugin.json +1 -5
- package/platforms/claude-code/agents/syntaur-expert.md +30 -18
- 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/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/hooks/statusline.sh +0 -110
- 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 -202
- package/platforms/claude-code/skills/plan-assignment/SKILL.md +0 -156
- 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 -73
- package/platforms/codex/skills/plan-assignment/SKILL.md +0 -61
- package/platforms/codex/skills/syntaur-protocol/SKILL.md +0 -102
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-project
|
|
3
|
+
description: >-
|
|
4
|
+
Create a new Syntaur project with full scaffolding (manifest, indexes,
|
|
5
|
+
resources, memories). Use when the user wants to start a new project or
|
|
6
|
+
initiative in Syntaur.
|
|
7
|
+
license: MIT
|
|
8
|
+
metadata:
|
|
9
|
+
author: prong-horn
|
|
10
|
+
version: "1.1.0"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Create Project
|
|
14
|
+
|
|
15
|
+
Create a new Syntaur project with full scaffolding.
|
|
16
|
+
|
|
17
|
+
## Input
|
|
18
|
+
|
|
19
|
+
Expects arguments from the user:
|
|
20
|
+
|
|
21
|
+
- First (required): the project title (e.g., `"Build Auth System"`)
|
|
22
|
+
- `--slug <slug>` (optional): override the auto-generated slug
|
|
23
|
+
- `--dir <path>` (optional): override the default project directory
|
|
24
|
+
- `--workspace <workspace>` (optional): workspace grouping label (e.g., `syntaur`, `reeva`)
|
|
25
|
+
|
|
26
|
+
If no title was provided, ask the user what the project should be called.
|
|
27
|
+
|
|
28
|
+
## Step 1: Run the CLI
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
syntaur create-project "<title>" [--slug <slug>] [--dir <path>] [--workspace <workspace>]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If the command fails (e.g., slug collision, empty title), report the error and suggest fixes.
|
|
35
|
+
|
|
36
|
+
## Step 2: Read the Created Project
|
|
37
|
+
|
|
38
|
+
Extract the project slug and directory from the CLI output. Read the generated `project.md` to confirm structure:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
cat ~/.syntaur/projects/<slug>/project.md
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Step 3: Guide Next Steps
|
|
45
|
+
|
|
46
|
+
Tell the user:
|
|
47
|
+
|
|
48
|
+
- The project was created with its slug and location (`~/.syntaur/projects/<slug>/`).
|
|
49
|
+
- Key files scaffolded:
|
|
50
|
+
- `project.md` — human-authored goal and context (edit this).
|
|
51
|
+
- `manifest.md` — derived root navigation (do not edit directly).
|
|
52
|
+
- `_index-assignments.md`, `_index-plans.md`, `_index-decisions.md`, `_status.md` — derived indexes.
|
|
53
|
+
- `resources/_index.md` and `memories/_index.md` — shared-writable area scaffolding.
|
|
54
|
+
- Per-project `agent.md` / `claude.md` are NOT created — protocol v2.0 removed them. Agent-level conventions live at the repo root in `CLAUDE.md` / `AGENTS.md`, and user-defined behavioral rules live in `~/.syntaur/playbooks/<slug>.md`.
|
|
55
|
+
- Suggest they edit `project.md` to fill in the goal, scope, and context sections.
|
|
56
|
+
- Suggest running `create-assignment "<title>" --project <slug>` to add assignments to this project. Or `create-assignment "<title>" --one-off` for standalone work at `~/.syntaur/assignments/<uuid>/`.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grab-assignment
|
|
3
|
+
description: >-
|
|
4
|
+
Discover and claim a pending Syntaur assignment from a project (or a
|
|
5
|
+
standalone one-off). Use when the user wants to start working on a Syntaur
|
|
6
|
+
assignment, claim a task, or set up their working context.
|
|
7
|
+
license: MIT
|
|
8
|
+
metadata:
|
|
9
|
+
author: prong-horn
|
|
10
|
+
version: "1.1.0"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Grab Assignment
|
|
14
|
+
|
|
15
|
+
Claim a pending Syntaur assignment and set up the current workspace.
|
|
16
|
+
|
|
17
|
+
## Input
|
|
18
|
+
|
|
19
|
+
Expects up to two arguments from the user:
|
|
20
|
+
|
|
21
|
+
- First (required): the project slug (e.g., `build-auth-system`), OR `--id <uuid>` to claim a standalone assignment at `~/.syntaur/assignments/<uuid>/`.
|
|
22
|
+
- Second (optional, project-nested only): a specific assignment slug to grab. If omitted, list available pending assignments and pick one.
|
|
23
|
+
|
|
24
|
+
## Pre-flight Check
|
|
25
|
+
|
|
26
|
+
Check if `.syntaur/context.json` already exists in the current working directory.
|
|
27
|
+
|
|
28
|
+
- If it exists AND contains BOTH `projectSlug` and `assignmentSlug`, it represents an active assignment. Warn the user: "You already have an active assignment: `<assignmentSlug>` in project `<projectSlug>`. Grabbing a new one will replace this context. Proceed?" — stop if the user says no.
|
|
29
|
+
- If it exists but only has session fields (`sessionId`, `transcriptPath`) and no project/assignment, it was populated by the platform's SessionStart hook (Claude Code, etc.) and does NOT represent an active assignment. Proceed silently and merge assignment fields on top in Step 5.
|
|
30
|
+
|
|
31
|
+
## Step 1: Discover the Project (project-nested path)
|
|
32
|
+
|
|
33
|
+
For a project-nested grab, read the project entry files:
|
|
34
|
+
|
|
35
|
+
- `~/.syntaur/projects/<project-slug>/manifest.md`
|
|
36
|
+
- `~/.syntaur/projects/<project-slug>/project.md`
|
|
37
|
+
|
|
38
|
+
Note the `workspace` field in `project.md` frontmatter if present. Per-project `agent.md` / `claude.md` were removed in protocol v2.0 — repo-level `CLAUDE.md` / `AGENTS.md` and user playbooks under `~/.syntaur/playbooks/` take their place. Step 7 loads playbooks.
|
|
39
|
+
|
|
40
|
+
For a standalone grab (`--id <uuid>`), skip this step — there is no parent project.
|
|
41
|
+
|
|
42
|
+
## Step 2: Find Assignments
|
|
43
|
+
|
|
44
|
+
List assignment directories:
|
|
45
|
+
|
|
46
|
+
- Project-nested: `~/.syntaur/projects/<project-slug>/assignments/`
|
|
47
|
+
- Standalone: the single directory at `~/.syntaur/assignments/<uuid>/`
|
|
48
|
+
|
|
49
|
+
Do NOT filter by status — every assignment is grabbable. If a slug was provided, verify the directory exists. If no specific assignment was requested, read each `assignment.md` frontmatter and present the list with title, priority, and current status (highlighting `pending` as the likely default). Ask the user to choose unless there is exactly one obvious candidate.
|
|
50
|
+
|
|
51
|
+
## Step 3: Claim the Assignment
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Always safe at any status; does not transition state:
|
|
55
|
+
syntaur assign <assignment-slug> --agent <your-agent-name> --project <project-slug>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If the current status is `pending`, also run:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
syntaur start <assignment-slug> --project <project-slug>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Skip `start` for any non-`pending` status — grabbing must never rewind a `review`, `completed`, or `failed` assignment.
|
|
65
|
+
|
|
66
|
+
> **Agent identity:** Use an identifier for your agent platform — e.g., `claude`, `cursor`, `codex`, `opencode`.
|
|
67
|
+
|
|
68
|
+
If either command fails, report the error and stop.
|
|
69
|
+
|
|
70
|
+
## Step 4: Read Assignment Context and Backfill Workspace
|
|
71
|
+
|
|
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.
|
|
73
|
+
|
|
74
|
+
From the assignment frontmatter extract: `title`, `workspace.repository`, `workspace.worktreePath`, `workspace.branch`, `dependsOn`, `priority`.
|
|
75
|
+
|
|
76
|
+
If `workspace.repository` and `workspace.worktreePath` are both null, set them to the current working directory. Write boundaries use this path, so it must never be null while an agent is writing code.
|
|
77
|
+
|
|
78
|
+
## Step 5: Create or Merge Context File
|
|
79
|
+
|
|
80
|
+
Merge assignment context into `.syntaur/context.json`. Never overwrite — if the file already exists (e.g., platform SessionStart hook populated `sessionId` / `transcriptPath`), preserve those fields.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
mkdir -p .syntaur
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Prepare the assignment payload:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"projectSlug": "<project-slug or null for standalone>",
|
|
91
|
+
"assignmentSlug": "<assignment-slug>",
|
|
92
|
+
"projectDir": "/absolute/path/to/project or null",
|
|
93
|
+
"assignmentDir": "/absolute/path/to/assignment",
|
|
94
|
+
"workspaceRoot": "<workspace path or current working directory>",
|
|
95
|
+
"title": "<assignment title>",
|
|
96
|
+
"branch": "<workspace.branch or null>",
|
|
97
|
+
"grabbedAt": "<ISO 8601 timestamp>"
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Merge it on top of whatever context.json already contains:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
if [ -f .syntaur/context.json ]; then
|
|
105
|
+
jq --slurpfile new <(echo "$NEW_CONTEXT_JSON") '. + $new[0]' .syntaur/context.json > .syntaur/context.json.tmp \
|
|
106
|
+
&& mv .syntaur/context.json.tmp .syntaur/context.json
|
|
107
|
+
else
|
|
108
|
+
echo "$NEW_CONTEXT_JSON" > .syntaur/context.json
|
|
109
|
+
fi
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Use absolute paths (expand `~` to the home directory). If `workspace.repository` is a remote URL (e.g. `https://github.com/...`), set `workspaceRoot` to the current working directory instead.
|
|
113
|
+
|
|
114
|
+
## Step 6: Register Agent Session (real IDs only — no UUIDs)
|
|
115
|
+
|
|
116
|
+
`syntaur track-session` requires a `--session-id` from the agent runtime. Synthetic UUIDs are rejected. Source the real id in this order:
|
|
117
|
+
|
|
118
|
+
1. If `.syntaur/context.json` already has `sessionId` (platform SessionStart hook populated it), use it and the companion `transcriptPath` if present.
|
|
119
|
+
2. Otherwise, fall back to the per-agent lookup:
|
|
120
|
+
- **Claude Code**: the most-recently-modified `~/.claude/sessions/*.json` whose `cwd` matches `$(pwd)` — read its `sessionId`. The transcript path is `~/.claude/projects/<encoded-cwd>/<session-id>.jsonl` (omit if the file is absent).
|
|
121
|
+
- **Codex**: the most-recently-modified file under `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl` whose first-line `session_meta.payload.cwd` matches `$(pwd)`. Use `payload.id` as the session id and the full rollout path as the transcript path.
|
|
122
|
+
- **Other agents**: use whatever real session identifier the runtime exposes. Do not invent one.
|
|
123
|
+
3. If no real id can be resolved, stop and tell the user to restart the session so the platform hook can populate it, or to run `/rename <assignment-slug>` (Claude Code) and retry.
|
|
124
|
+
|
|
125
|
+
After resolving, merge `sessionId` + `transcriptPath` back into context.json. Then register:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
syntaur track-session \
|
|
129
|
+
--project <project-slug> --assignment <assignment-slug> \
|
|
130
|
+
--agent <your-agent-name> \
|
|
131
|
+
--session-id <real-id> \
|
|
132
|
+
--transcript-path <path-if-known> \
|
|
133
|
+
--path $(pwd)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Omit `--transcript-path` entirely (don't pass an empty string) if no transcript path was resolved.
|
|
137
|
+
|
|
138
|
+
## Step 7: Load Playbooks
|
|
139
|
+
|
|
140
|
+
Read all playbook files from `~/.syntaur/playbooks/` and treat their content as active behavioral rules:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
ls ~/.syntaur/playbooks/*.md 2>/dev/null
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
For each file, read it and follow its directives. Playbooks take precedence over default conventions when they conflict.
|
|
147
|
+
|
|
148
|
+
## Step 8: Report to User
|
|
149
|
+
|
|
150
|
+
Summarize:
|
|
151
|
+
- Which assignment was grabbed (slug + title). Note if it was standalone (folder is the UUID, `slug` display-only).
|
|
152
|
+
- Current status (call it out explicitly if the assignment was already past `pending`).
|
|
153
|
+
- The objective (first paragraph from assignment.md body).
|
|
154
|
+
- The acceptance criteria (checkbox list).
|
|
155
|
+
- Active todos from `## Todos`, including any linked plan files.
|
|
156
|
+
- The workspace path.
|
|
157
|
+
- Any inherited comments/questions from `comments.md`.
|
|
158
|
+
- Suggested next step: `plan-assignment` to create an implementation plan.
|
|
@@ -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.
|