syntaur 0.2.0 → 0.3.3

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 (99) hide show
  1. package/dashboard/dist/assets/{_basePickBy-CHKX1r7P.js → _basePickBy-BhaCV7eH.js} +1 -1
  2. package/dashboard/dist/assets/{_baseUniq-CTxTc4MS.js → _baseUniq-CDPcqrs2.js} +1 -1
  3. package/dashboard/dist/assets/{arc-BUo5zftd.js → arc-BP0RxLwl.js} +1 -1
  4. package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-CrJLm-P0.js → architectureDiagram-2XIMDMQ5-BDzvaeJp.js} +1 -1
  5. package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-BK60lBBJ.js → blockDiagram-WCTKOSBZ-ZeL9mROo.js} +1 -1
  6. package/dashboard/dist/assets/{c4Diagram-IC4MRINW-C7oJEvA0.js → c4Diagram-IC4MRINW-7S5bvFLp.js} +1 -1
  7. package/dashboard/dist/assets/channel-CcB_wcgb.js +1 -0
  8. package/dashboard/dist/assets/{chunk-4BX2VUAB-CjUPlzHz.js → chunk-4BX2VUAB-Ca7R4nv5.js} +1 -1
  9. package/dashboard/dist/assets/{chunk-55IACEB6-6HmWguiO.js → chunk-55IACEB6-flEv13FB.js} +1 -1
  10. package/dashboard/dist/assets/{chunk-FMBD7UC4-CLuJnd1b.js → chunk-FMBD7UC4-CfcYWBM6.js} +1 -1
  11. package/dashboard/dist/assets/{chunk-JSJVCQXG-B4d62qWV.js → chunk-JSJVCQXG-Dw4yL0VS.js} +1 -1
  12. package/dashboard/dist/assets/{chunk-KX2RTZJC-AsEKRPq2.js → chunk-KX2RTZJC-B2cDe40G.js} +1 -1
  13. package/dashboard/dist/assets/{chunk-NQ4KR5QH-DQhHHvwY.js → chunk-NQ4KR5QH-LZVm0IWg.js} +1 -1
  14. package/dashboard/dist/assets/{chunk-QZHKN3VN-Ds1TtI3E.js → chunk-QZHKN3VN-Dg0EeHNI.js} +1 -1
  15. package/dashboard/dist/assets/{chunk-WL4C6EOR-C7jE3-cR.js → chunk-WL4C6EOR-v3rXNwXc.js} +1 -1
  16. package/dashboard/dist/assets/classDiagram-VBA2DB6C-BJr38z2g.js +1 -0
  17. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-BJr38z2g.js +1 -0
  18. package/dashboard/dist/assets/clone-Cfs2GUGt.js +1 -0
  19. package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-C9ka5v1m.js → cose-bilkent-S5V4N54A-D-3JzLoS.js} +1 -1
  20. package/dashboard/dist/assets/{dagre-KLK3FWXG-BbgPQBKy.js → dagre-KLK3FWXG-d_mbczhU.js} +1 -1
  21. package/dashboard/dist/assets/{diagram-E7M64L7V-DpdeZFD4.js → diagram-E7M64L7V-BUyAp8pW.js} +1 -1
  22. package/dashboard/dist/assets/{diagram-IFDJBPK2-FlHLQzOV.js → diagram-IFDJBPK2-C8doXcyQ.js} +1 -1
  23. package/dashboard/dist/assets/{diagram-P4PSJMXO-B22NkEF_.js → diagram-P4PSJMXO-BUSmHa55.js} +1 -1
  24. package/dashboard/dist/assets/{erDiagram-INFDFZHY-zSqmtDid.js → erDiagram-INFDFZHY-Bn5_0LPU.js} +1 -1
  25. package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-BP_0XmVV.js → flowDiagram-PKNHOUZH-CnEjerQM.js} +1 -1
  26. package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-8uRyYgZV.js → ganttDiagram-A5KZAMGK-CL94fbyy.js} +1 -1
  27. package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-JFqg8sv4.js → gitGraphDiagram-K3NZZRJ6-4i_PeG8V.js} +1 -1
  28. package/dashboard/dist/assets/{graph-a-PAH599.js → graph-BtoFhoAd.js} +1 -1
  29. package/dashboard/dist/assets/index-DZUGYrvE.css +1 -0
  30. package/dashboard/dist/assets/index-Dv_-SxuL.js +481 -0
  31. package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-C3kq7Nbv.js → infoDiagram-LFFYTUFH-CdUsuNgZ.js} +1 -1
  32. package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-Kqi4EZ-n.js → ishikawaDiagram-PHBUUO56-BjggRlUx.js} +1 -1
  33. package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-CTfv0Wcr.js → journeyDiagram-4ABVD52K-V4AgexlR.js} +1 -1
  34. package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-Dmx0lgvR.js → kanban-definition-K7BYSVSG-ChlylQRf.js} +1 -1
  35. package/dashboard/dist/assets/{layout-KKRbT2Od.js → layout-DLcz9AmA.js} +1 -1
  36. package/dashboard/dist/assets/{linear-5egaBiw7.js → linear-l2xnSHze.js} +1 -1
  37. package/dashboard/dist/assets/{mermaid.core-C9pF_oFQ.js → mermaid.core-DKO1ytRW.js} +4 -4
  38. package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-C7HXYEXt.js → mindmap-definition-YRQLILUH-DTmTPHrT.js} +1 -1
  39. package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-DkdZm-YP.js → pieDiagram-SKSYHLDU-CwK80y8Y.js} +1 -1
  40. package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-DkcRJs5F.js → quadrantDiagram-337W2JSQ-Be1xqW_w.js} +1 -1
  41. package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-BaTDVYTl.js → requirementDiagram-Z7DCOOCP-JcspXCs0.js} +1 -1
  42. package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-DvPLbGV5.js → sankeyDiagram-WA2Y5GQK-nJb1BInq.js} +1 -1
  43. package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-DQoZ2xMK.js → sequenceDiagram-2WXFIKYE-DUrclEgA.js} +1 -1
  44. package/dashboard/dist/assets/{stateDiagram-RAJIS63D-CS4l0OjM.js → stateDiagram-RAJIS63D-CjinnNtF.js} +1 -1
  45. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-yfclw-nM.js +1 -0
  46. package/dashboard/dist/assets/{timeline-definition-YZTLITO2-aC0iCFCW.js → timeline-definition-YZTLITO2-kM-oVLNz.js} +1 -1
  47. package/dashboard/dist/assets/{treemap-KZPCXAKY-Ie-PFjgx.js → treemap-KZPCXAKY-CYziFlrQ.js} +1 -1
  48. package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-CJN3ExTQ.js → vennDiagram-LZ73GAT5-DX0DbxBN.js} +1 -1
  49. package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-DSiDu1CN.js → xychartDiagram-JWTSCODW-BGqM42ZM.js} +1 -1
  50. package/dashboard/dist/index.html +2 -2
  51. package/dist/dashboard/server.d.ts +5 -0
  52. package/dist/dashboard/server.js +2185 -609
  53. package/dist/dashboard/server.js.map +1 -1
  54. package/dist/index.js +2596 -959
  55. package/dist/index.js.map +1 -1
  56. package/examples/playbooks/keep-records-updated.md +14 -8
  57. package/examples/playbooks/read-before-plan.md +8 -5
  58. package/examples/sample-project/_status.md +1 -1
  59. package/examples/sample-project/assignments/design-auth-schema/assignment.md +4 -17
  60. package/examples/sample-project/assignments/design-auth-schema/comments.md +26 -0
  61. package/examples/sample-project/assignments/design-auth-schema/progress.md +20 -0
  62. package/examples/sample-project/assignments/implement-jwt-middleware/assignment.md +4 -17
  63. package/examples/sample-project/assignments/implement-jwt-middleware/comments.md +17 -0
  64. package/examples/sample-project/assignments/implement-jwt-middleware/progress.md +20 -0
  65. package/examples/sample-project/assignments/write-auth-tests/assignment.md +4 -8
  66. package/examples/sample-project/assignments/write-auth-tests/comments.md +10 -0
  67. package/examples/sample-project/assignments/write-auth-tests/progress.md +10 -0
  68. package/package.json +1 -1
  69. package/platforms/claude-code/.claude-plugin/plugin.json +5 -1
  70. package/platforms/claude-code/agents/syntaur-expert.md +46 -15
  71. package/platforms/claude-code/commands/track-session/track-session.md +43 -18
  72. package/platforms/claude-code/hooks/hooks.json +11 -0
  73. package/platforms/claude-code/hooks/session-cleanup.sh +13 -23
  74. package/platforms/claude-code/hooks/session-start.sh +80 -0
  75. package/platforms/claude-code/hooks/statusline.sh +110 -0
  76. package/platforms/claude-code/references/file-ownership.md +15 -3
  77. package/platforms/claude-code/references/protocol-summary.md +19 -5
  78. package/platforms/claude-code/skills/complete-assignment/SKILL.md +14 -0
  79. package/platforms/claude-code/skills/create-assignment/SKILL.md +12 -10
  80. package/platforms/claude-code/skills/grab-assignment/SKILL.md +30 -15
  81. package/platforms/claude-code/skills/plan-assignment/SKILL.md +16 -8
  82. package/platforms/claude-code/skills/syntaur-protocol/SKILL.md +21 -11
  83. package/platforms/codex/.codex-plugin/plugin.json +1 -1
  84. package/platforms/codex/agents/syntaur-operator.md +39 -25
  85. package/platforms/codex/references/file-ownership.md +14 -3
  86. package/platforms/codex/references/protocol-summary.md +19 -5
  87. package/platforms/codex/scripts/resolve-session.sh +49 -0
  88. package/platforms/codex/skills/complete-assignment/SKILL.md +1 -0
  89. package/platforms/codex/skills/create-assignment/SKILL.md +13 -8
  90. package/platforms/codex/skills/grab-assignment/SKILL.md +7 -5
  91. package/platforms/codex/skills/plan-assignment/SKILL.md +8 -4
  92. package/platforms/codex/skills/syntaur-protocol/SKILL.md +26 -13
  93. package/dashboard/dist/assets/channel-DdltvFFH.js +0 -1
  94. package/dashboard/dist/assets/classDiagram-VBA2DB6C-BHqdFE-8.js +0 -1
  95. package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-BHqdFE-8.js +0 -1
  96. package/dashboard/dist/assets/clone-CBJOOeOm.js +0 -1
  97. package/dashboard/dist/assets/index-CoVCLSh2.css +0 -1
  98. package/dashboard/dist/assets/index-yyAIuzrP.js +0 -471
  99. package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-DkBtE1WJ.js +0 -1
@@ -9,9 +9,10 @@ Your job is to work fluently within the Syntaur protocol without breaking owners
9
9
 
10
10
  ## Primary Responsibilities
11
11
 
12
- - Create projects and assignments with the `syntaur` CLI
12
+ - Create projects and assignments (project-nested or standalone) with the `syntaur` CLI
13
13
  - Claim assignments and establish local assignment context
14
- - Keep `assignment.md`, active plan files (`plan.md`, `plan-v2.md`, ...), and `handoff.md` accurate during execution
14
+ - Keep `assignment.md`, active plan files (`plan.md`, `plan-v2.md`, ...), `progress.md`, and `handoff.md` accurate during execution
15
+ - Record questions/notes/feedback via `syntaur comment` and route cross-assignment work via `syntaur request`
15
16
  - Track Codex sessions for the Syntaur dashboard
16
17
  - Set up Codex adapter instructions in the active workspace
17
18
  - Enforce Syntaur write boundaries and lifecycle rules
@@ -20,34 +21,35 @@ Your job is to work fluently within the Syntaur protocol without breaking owners
20
21
 
21
22
  When a task involves Syntaur:
22
23
 
23
- 1. Determine whether the user needs project creation, assignment creation, assignment execution, completion/handoff, or session tracking.
24
+ 1. Determine whether the user needs project creation, assignment creation (project-nested or `--one-off` standalone), assignment execution, completion/handoff, or session tracking.
24
25
  2. If `.syntaur/context.json` exists in the current working directory, read it first.
25
26
  3. If working on a specific assignment, read these in order:
26
- - `<projectDir>/manifest.md`
27
- - `<projectDir>/agent.md`
28
- - `<projectDir>/project.md`
29
- - `<projectDir>/claude.md` if it exists
30
- - `<assignmentDir>/assignment.md`
27
+ - `<projectDir>/manifest.md` (project-nested assignments only)
28
+ - `<projectDir>/project.md` (project-nested assignments only)
29
+ - `<assignmentDir>/assignment.md` — frontmatter now includes `project: <slug> | null` and `type: <classification> | null`
31
30
  - any `<assignmentDir>/plan*.md` files linked from active todos in the `## Todos` section
31
+ - `<assignmentDir>/progress.md` (if present) — reverse-chron progress log
32
+ - `<assignmentDir>/comments.md` (if present) — threaded questions/notes/feedback
32
33
  - `<assignmentDir>/handoff.md`
33
34
  4. Resolve the workspace boundary from `.syntaur/context.json` or `assignment.md` frontmatter before editing code.
34
35
 
36
+ Project-nested assignments live at `~/.syntaur/projects/<slug>/assignments/<aslug>/`. Standalone assignments live at `~/.syntaur/assignments/<uuid>/` — folder named by UUID, `project: null`, `slug` display-only.
37
+
35
38
  ## File Ownership
36
39
 
37
40
  ### Never write
38
41
 
39
42
  - `project.md`
40
- - `agent.md`
41
- - `claude.md`
42
43
  - `manifest.md`
43
44
  - any underscore-prefixed derived file such as `_index-assignments.md`, `_status.md`, `resources/_index.md`, or `memories/_index.md`
44
- - other agents' assignment folders
45
+ - other agents' assignment folders, except via CLI-mediated channels
45
46
 
46
- ### You may write
47
+ ### You may write directly
47
48
 
48
49
  - the current assignment folder only:
49
50
  - `assignment.md`
50
51
  - `plan*.md` (0 or more versioned plan files, e.g., `plan.md`, `plan-v2.md`)
52
+ - `progress.md` (append timestamped entries, newest first — replaces the old `## Progress` section)
51
53
  - `scratchpad.md`
52
54
  - `handoff.md`
53
55
  - `decision-record.md`
@@ -56,23 +58,30 @@ When a task involves Syntaur:
56
58
  - `.syntaur/context.json` in the current working directory
57
59
  - source files inside the assignment workspace boundary
58
60
 
61
+ ### Write only via CLI (never edit directly)
62
+
63
+ - `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.
64
+ - Another assignment's `## Todos` section — use `syntaur request <source> <target> "text"` to append a todo annotated `(from: <source>)`.
65
+
59
66
  ## Protocol Rules
60
67
 
61
- - Assignment frontmatter is the single source of truth for assignment state.
62
- - Slugs are lowercase and hyphen-separated.
68
+ - Assignment frontmatter is the single source of truth for assignment state. `project` is the containing project slug (`null` for standalone); `type` is a classification validated against `config.md` `types.definitions` when present.
69
+ - Slugs are lowercase and hyphen-separated. Standalone assignment folders are named by UUID; `slug` is display-only in that case.
63
70
  - `pending` with unmet `dependsOn` means structural waiting. `blocked` means a real runtime obstacle and requires a `blockedReason`.
71
+ - `dependsOn` is only valid between assignments within the same project — standalone assignments cannot declare dependencies.
64
72
  - Update acceptance criteria and `## Todos` checkboxes as work lands.
73
+ - Append timestamped entries to `progress.md` (not to `assignment.md`) after meaningful milestones.
65
74
  - When requirements shift, supersede the prior plan todo instead of rewriting the old plan file.
66
- - Keep the `## Progress` section in `assignment.md` current after meaningful milestones.
67
75
  - Append handoffs instead of replacing previous handoff entries.
76
+ - Record questions via `syntaur comment ... --type question` — they roll up into `_status.md`'s `openQuestions` counter.
68
77
 
69
78
  ## CLI Reference
70
79
 
71
80
  Use these commands directly when needed:
72
81
 
73
82
  - `syntaur create-project "<title>" [--slug <slug>] [--dir <path>]`
74
- - `syntaur create-assignment "<title>" --project <slug> [--slug <slug>] [--priority <level>] [--depends-on <slugs>] [--dir <path>]`
75
- - `syntaur create-assignment "<title>" --one-off [--slug <slug>] [--priority <level>] [--dir <path>]`
83
+ - `syntaur create-assignment "<title>" --project <slug> [--slug <slug>] [--priority <level>] [--depends-on <slugs>] [--type <type>] [--dir <path>]`
84
+ - `syntaur create-assignment "<title>" --one-off [--slug <slug>] [--priority <level>] [--type <type>] [--dir <path>]` — creates standalone at `~/.syntaur/assignments/<uuid>/`
76
85
  - `syntaur setup [--yes] [--claude] [--codex] [--claude-dir <path>] [--codex-dir <path>] [--codex-marketplace-path <path>] [--dashboard]`
77
86
  - `syntaur assign <assignment-slug> --agent codex --project <project-slug>`
78
87
  - `syntaur start <assignment-slug> --project <project-slug>`
@@ -81,8 +90,10 @@ Use these commands directly when needed:
81
90
  - `syntaur block <assignment-slug> --project <project-slug> --reason <text>`
82
91
  - `syntaur unblock <assignment-slug> --project <project-slug>`
83
92
  - `syntaur fail <assignment-slug> --project <project-slug>`
93
+ - `syntaur comment <assignment-slug-or-uuid> "body" --type question|note|feedback [--reply-to <id>] [--project <slug>]` — append to `comments.md`
94
+ - `syntaur request <target-slug-or-uuid> "text" [--from <source>] [--project <slug>]` — append to target's `## Todos`, annotated `(from: <source>)`
84
95
  - `syntaur uninstall [--all] [--yes]`
85
- - `syntaur track-session --project <project-slug> --assignment <assignment-slug> --agent codex --session-id <id> --path <cwd>`
96
+ - `syntaur track-session --project <project-slug> --assignment <assignment-slug> --agent codex --session-id <real-id> --transcript-path <rollout-path> --path <cwd>` (both `--session-id` and `--transcript-path` must come from the matching Codex rollout file — never synthesize)
86
97
  - `syntaur setup-adapter codex --project <project-slug> --assignment <assignment-slug>`
87
98
 
88
99
  ## Standard Workflows
@@ -92,9 +103,11 @@ Use these commands directly when needed:
92
103
  1. Discover the project and pending assignments.
93
104
  2. Run `syntaur assign ... --agent codex`.
94
105
  3. Run `syntaur start ...`.
95
- 4. Create `.syntaur/context.json` in the working directory.
96
- 5. Register the session with `syntaur track-session`.
97
- 6. If needed, run `syntaur setup-adapter codex --project <slug> --assignment <slug>`.
106
+ 4. Create (or merge into) `.syntaur/context.json` in the working directory. If a prior context file exists, preserve its fields.
107
+ 5. Resolve the real Codex session id and rollout path: `bash ./scripts/resolve-session.sh "$(pwd)"` (relative to the plugin root). Parse `session_id=<id>` and `transcript_path=<abs path>`. If the helper exits non-zero, there is no matching Codex rollout in this cwd — start the Codex session first, then retry. Never `uuidgen`.
108
+ 6. Merge `sessionId` + `transcriptPath` into `.syntaur/context.json`.
109
+ 7. Register the session: `syntaur track-session --project <slug> --assignment <slug> --agent codex --session-id <id> --transcript-path <path> --path "$(pwd)"`.
110
+ 8. If needed, run `syntaur setup-adapter codex --project <slug> --assignment <slug>`.
98
111
 
99
112
  ### Plan an assignment
100
113
 
@@ -109,10 +122,11 @@ Use these commands directly when needed:
109
122
 
110
123
  1. Re-check every acceptance criterion.
111
124
  2. Update any missing checkboxes in `assignment.md`.
112
- 3. Append a new structured handoff entry to `handoff.md`.
113
- 4. Mark the dashboard session completed if `sessionId` exists.
114
- 5. Transition the assignment with `syntaur review` or `syntaur complete`.
115
- 6. Remove `.syntaur/context.json` when the assignment is no longer active.
125
+ 3. Append a final timestamped entry to `progress.md` summarizing the work.
126
+ 4. Append a new structured handoff entry to `handoff.md`.
127
+ 5. Mark the dashboard session completed if `sessionId` exists.
128
+ 6. Transition the assignment with `syntaur review` or `syntaur complete`.
129
+ 7. Remove `.syntaur/context.json` when the assignment is no longer active.
116
130
 
117
131
  ## Decision Rules
118
132
 
@@ -7,8 +7,6 @@ Agents must never modify these files:
7
7
  | File | Location |
8
8
  |------|----------|
9
9
  | `project.md` | `<project>/project.md` |
10
- | `agent.md` | `<project>/agent.md` |
11
- | `claude.md` | `<project>/claude.md` |
12
10
 
13
11
  ## Agent-Writable (Your Assignment Folder Only)
14
12
 
@@ -18,11 +16,24 @@ You may only write to files inside your assigned assignment folder:
18
16
  |------|---------|
19
17
  | `assignment.md` | Assignment record and source of truth for state (includes `## Todos` checklist) |
20
18
  | `plan*.md` | Versioned implementation plans (optional, 0 or more: `plan.md`, `plan-v2.md`, ...) — each linked from a todo in `assignment.md` |
19
+ | `progress.md` | Append-only timestamped progress log (newest first). Replaces the old `## Progress` body section. |
21
20
  | `scratchpad.md` | Working notes |
22
21
  | `handoff.md` | Append-only handoff log |
23
22
  | `decision-record.md` | Append-only decision log |
24
23
 
25
- Path pattern: `~/.syntaur/projects/<project>/assignments/<your-assignment>/`
24
+ Path pattern (project-nested): `~/.syntaur/projects/<project>/assignments/<your-assignment>/`
25
+ Path pattern (standalone): `~/.syntaur/assignments/<your-assignment-uuid>/`
26
+
27
+ ## CLI-Mediated Shared-Writable
28
+
29
+ Do not edit these files directly. Use the listed CLI commands:
30
+
31
+ | File | Mediator |
32
+ |------|----------|
33
+ | `comments.md` (any assignment) | `syntaur comment <slug-or-uuid> "body" [--type question\|note\|feedback] [--reply-to <id>]` |
34
+ | `## Todos` in another assignment's `assignment.md` (cross-assignment request) | `syntaur request <source> <target> "text"` |
35
+
36
+ These are bounded exceptions to the single-writer rule.
26
37
 
27
38
  ## Shared-Writable
28
39
 
@@ -1,5 +1,7 @@
1
1
  # Syntaur Protocol Summary
2
2
 
3
+ Protocol version: **2.0**
4
+
3
5
  ## Directory Structure
4
6
 
5
7
  ```
@@ -13,12 +15,12 @@
13
15
  _index-plans.md # Derived (read-only)
14
16
  _index-decisions.md # Derived (read-only)
15
17
  _status.md # Derived (read-only)
16
- claude.md # Human-authored: Claude-specific instructions (read-only)
17
- agent.md # Human-authored: universal agent instructions (read-only)
18
18
  assignments/
19
19
  <assignment-slug>/
20
20
  assignment.md # Agent-writable: source of truth for state (includes ## Todos checklist)
21
21
  plan*.md # Agent-writable: versioned implementation plans (optional, 0 or more: plan.md, plan-v2.md, ...)
22
+ progress.md # Agent-writable, append-only: timestamped progress log
23
+ comments.md # CLI-mediated: threaded questions/notes/feedback (via `syntaur comment`)
22
24
  scratchpad.md # Agent-writable: working notes
23
25
  handoff.md # Agent-writable: append-only handoff log
24
26
  decision-record.md # Agent-writable: append-only decision log
@@ -28,6 +30,15 @@
28
30
  memories/
29
31
  _index.md # Derived (read-only)
30
32
  <memory-slug>.md # Shared-writable
33
+ assignments/
34
+ <assignment-id>/ # Standalone assignments — folder named by UUID, `project: null`
35
+ assignment.md # Same schema as project-nested, `slug` is display-only
36
+ plan*.md
37
+ progress.md
38
+ comments.md
39
+ scratchpad.md
40
+ handoff.md
41
+ decision-record.md
31
42
  playbooks/
32
43
  manifest.md # Derived: playbook listing (read-only)
33
44
  <slug>.md # User-authored: behavioral rules for agents
@@ -62,10 +73,13 @@
62
73
  ## Key Rules
63
74
 
64
75
  1. Assignment frontmatter is the single source of truth for assignment state.
65
- 2. One folder per project and one subfolder per assignment.
76
+ 2. Project-nested assignments live at `projects/<slug>/assignments/<aslug>/` (folder = slug). Standalone assignments live at `assignments/<uuid>/` (folder = UUID, `project: null`, slug display-only).
66
77
  3. Derived files are never edited manually.
67
78
  4. Slugs are lowercase and hyphen-separated.
68
- 5. Dependencies are declared via `dependsOn` in assignment frontmatter.
79
+ 5. Dependencies are declared via `dependsOn` in assignment frontmatter. Only valid within the same project.
69
80
  6. An assignment cannot transition from `pending` to `in_progress` while any dependency is not `completed`.
70
- 7. The `## Todos` section in `assignment.md` is an informal markdown checklist. Items may be simple tasks or link to plan files. When a plan is superseded, mark the old todo: `- [x] ~~Execute [plan](./plan.md)~~ (superseded by plan-v2)` — never delete it.
81
+ 7. The `## Todos` section in `assignment.md` is an informal markdown checklist. Items may be simple tasks or link to plan files. When a plan is superseded, mark the old todo: `- [x] ~~Execute [plan](./plan.md)~~ (superseded by plan-v2)` — never delete it. `## Todos` also receives cross-assignment requests via `syntaur request`.
71
82
  8. Playbooks in `~/.syntaur/playbooks/` define behavioral rules agents must follow. Read `manifest.md` for a summary, then read each referenced playbook before starting work.
83
+ 9. Progress is appended to `progress.md` as timestamped entries (newest first). Do not add a `## Progress` section to `assignment.md`.
84
+ 10. Comments are appended to `comments.md` via `syntaur comment <slug> "body" [--type question|note|feedback] [--reply-to <id>]`. Never edit `comments.md` directly.
85
+ 11. Cross-assignment work is requested via `syntaur request <source> <target> "text"` — appends to the target's `## Todos` annotated `(from: <source>)`.
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env bash
2
+ # Syntaur Codex resolve-session helper
3
+ # Finds the most-recent Codex rollout file whose session_meta.payload.cwd
4
+ # matches $1 (default $PWD) and emits two lines to stdout:
5
+ # session_id=<id>
6
+ # transcript_path=<absolute path>
7
+ # Exits non-zero with nothing on stdout if no match.
8
+ #
9
+ # Override the search root via CODEX_SESSIONS_DIR (default: $HOME/.codex/sessions).
10
+ # Known limitation: if multiple concurrent Codex sessions share the same cwd,
11
+ # this picks the newest-by-mtime. Users can bypass by passing --session-id and
12
+ # --transcript-path explicitly to `syntaur track-session`.
13
+
14
+ set -o pipefail 2>/dev/null || true
15
+
16
+ command -v jq >/dev/null 2>&1 || { exit 1; }
17
+
18
+ TARGET_CWD="${1:-$PWD}"
19
+ SESSIONS_ROOT="${CODEX_SESSIONS_DIR:-$HOME/.codex/sessions}"
20
+
21
+ shopt -s nullglob 2>/dev/null || true
22
+
23
+ # Expand the glob explicitly via bash. If no files match, `files` stays empty
24
+ # and we exit without invoking ls — guards against `ls -1t` falling back to
25
+ # listing the current directory when the glob strips to zero operands.
26
+ files=("$SESSIONS_ROOT"/*/*/*/rollout-*.jsonl)
27
+ [ "${#files[@]}" -eq 0 ] && exit 1
28
+
29
+ MATCHED_FILE=""
30
+ MATCHED_ID=""
31
+
32
+ while IFS= read -r f; do
33
+ [ -z "$f" ] && continue
34
+ FIRST=$(head -n 1 "$f" 2>/dev/null)
35
+ [ -z "$FIRST" ] && continue
36
+ SESSION_CWD=$(printf '%s' "$FIRST" | jq -r 'select(.type=="session_meta") | .payload.cwd // empty' 2>/dev/null)
37
+ SESSION_ID=$(printf '%s' "$FIRST" | jq -r 'select(.type=="session_meta") | .payload.id // empty' 2>/dev/null)
38
+ if [ "$SESSION_CWD" = "$TARGET_CWD" ] && [ -n "$SESSION_ID" ]; then
39
+ MATCHED_FILE="$f"
40
+ MATCHED_ID="$SESSION_ID"
41
+ break
42
+ fi
43
+ done < <(ls -1t "${files[@]}" 2>/dev/null)
44
+
45
+ [ -z "$MATCHED_FILE" ] && exit 1
46
+
47
+ printf 'session_id=%s\n' "$MATCHED_ID"
48
+ printf 'transcript_path=%s\n' "$MATCHED_FILE"
49
+ exit 0
@@ -17,6 +17,7 @@ If the user passed `--complete`, transition directly to `completed` only when al
17
17
 
18
18
  1. Read `.syntaur/context.json`. If it does not exist, tell the user there is no active assignment.
19
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.
20
21
  3. Read `<assignmentDir>/handoff.md` and append a new handoff entry using the protocol format:
21
22
 
22
23
  ```markdown
@@ -15,10 +15,11 @@ Parse:
15
15
 
16
16
  - First positional argument: assignment title
17
17
  - `--project <slug>` required unless `--one-off`
18
- - `--one-off` optional
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
19
  - `--slug <slug>` optional
20
20
  - `--priority <level>` optional, default `medium`
21
- - `--depends-on <slug[,slug...]>` optional
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)
22
23
  - `--dir <path>` optional
23
24
 
24
25
  If no title was provided, ask the user for it.
@@ -28,17 +29,21 @@ If neither `--project` nor `--one-off` was provided, look for `.syntaur/context.
28
29
  ## Workflow
29
30
 
30
31
  1. Run one of:
31
- - `syntaur create-assignment "<title>" --project <slug> [--slug <slug>] [--priority <level>] [--depends-on <slugs>] [--dir <path>]`
32
- - `syntaur create-assignment "<title>" --one-off [--slug <slug>] [--priority <level>] [--dir <path>]`
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>]`
33
34
  2. If the command fails, report the error and stop.
34
35
  3. Read the generated `assignment.md`.
35
36
  4. Summarize:
36
- - assignment slug
37
- - project slug
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)
38
39
  - priority
40
+ - type
39
41
  - location
40
- - created files: `assignment.md`, `scratchpad.md`, `handoff.md`, `decision-record.md` (plan files are NOT scaffolded — they are created on demand by `plan-assignment`)
41
- 5. Suggest next steps:
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:
42
47
  - fill in the objective, context, acceptance criteria, and any initial todos in the `## Todos` section
43
48
  - or run `plan-assignment` to create a plan file and auto-append a linked todo to `## Todos`
44
49
  - run `grab-assignment` to claim it if work should begin now
@@ -38,7 +38,7 @@ Parse:
38
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
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
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:
41
+ 8. Create or merge `.syntaur/context.json` in the current working directory. If the file already exists, preserve its contents and layer the new assignment fields on top (never overwrite):
42
42
 
43
43
  ```json
44
44
  {
@@ -50,13 +50,15 @@ Parse:
50
50
  "title": "<assignment title>",
51
51
  "branch": "<workspace.branch or null>",
52
52
  "grabbedAt": "<ISO 8601 timestamp>",
53
- "sessionId": "<uuid>"
53
+ "sessionId": "<real-codex-session-id>",
54
+ "transcriptPath": "<absolute path to the matching rollout jsonl>"
54
55
  }
55
56
  ```
56
57
 
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>`
58
+ 9. Register the agent session using the REAL Codex session id and rollout path — never synthesize a UUID:
59
+ - Resolve both by running the plugin-shipped helper: `bash ./scripts/resolve-session.sh "$(pwd)"` (script lives at `platforms/codex/scripts/resolve-session.sh`; referenced via the same relative path used by other Codex hooks in `hooks.json`). Parse the two output lines: `session_id=<id>` and `transcript_path=<abs path>`. If the helper exits non-zero, stop and report "no matching Codex rollout for this cwd — aborting registration. Start a Codex session in this cwd first."
60
+ - Merge `sessionId` + `transcriptPath` into `.syntaur/context.json` (use `jq '. + {sessionId:$sid, transcriptPath:$tp}'` to preserve existing fields).
61
+ - Run: `syntaur track-session --project <project-slug> --assignment <assignment-slug> --agent codex --session-id <id> --transcript-path <path> --path <cwd>`
60
62
  10. Summarize:
61
63
  - assignment slug and title
62
64
  - current status (call it out if the assignment was already past `pending` — e.g., "already in `review`, status unchanged")
@@ -16,10 +16,14 @@ Optional notes from the user: `$ARGUMENTS`
16
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
17
  2. Read:
18
18
  - `<assignmentDir>/assignment.md`
19
- - `<projectDir>/agent.md`
20
- - `<projectDir>/claude.md` if it exists
19
+ - `<assignmentDir>/comments.md` (if it exists — inherited questions / notes)
21
20
  - `<projectDir>/project.md`
22
- 3. If the assignment depends on other assignments, read each dependency handoff for integration context.
21
+ - `<projectDir>/manifest.md`
22
+
23
+ Per-project `agent.md` / `claude.md` were removed in v0.2.0. Repo-level
24
+ `CLAUDE.md` / `AGENTS.md` and `~/.syntaur/playbooks/` take their place;
25
+ read playbooks via `ls ~/.syntaur/playbooks/*.md`.
26
+ 3. If the assignment depends on other assignments, read each dependency's `handoff.md` AND `decision-record.md` for upstream integration context and accepted decisions.
23
27
  4. Explore `workspaceRoot` when it exists:
24
28
  - inspect project structure
25
29
  - find likely implementation files
@@ -54,4 +58,4 @@ After writing the plan:
54
58
  - summarize the number of tasks and key decisions
55
59
  - call out open questions or risks
56
60
  - 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
61
+ - remind yourself to keep `assignment.md` acceptance criteria + todos current during implementation, append milestones to `progress.md` (not `assignment.md`), and record comments via `syntaur comment <slug-or-uuid> "body" --type note|question|feedback`
@@ -11,26 +11,34 @@ You are working within the Syntaur protocol. Follow these rules at all times.
11
11
 
12
12
  Respect file ownership boundaries.
13
13
 
14
- ### Files you may write
14
+ ### Files you may write directly
15
15
 
16
16
  1. Your assignment folder only:
17
17
  - `assignment.md`
18
18
  - `plan*.md` (0 or more versioned plan files, e.g., `plan.md`, `plan-v2.md`)
19
+ - `progress.md` (append timestamped entries, newest first; replaces the old `## Progress` body section)
19
20
  - `scratchpad.md`
20
21
  - `handoff.md`
21
22
  - `decision-record.md`
23
+ - Path (project-nested): `~/.syntaur/projects/<project>/assignments/<your-assignment>/`
24
+ - Path (standalone): `~/.syntaur/assignments/<your-assignment-uuid>/` — folder named by UUID, `project: null`, `slug` display-only
22
25
  2. Project-level shared files:
23
26
  - `~/.syntaur/projects/<project>/resources/<slug>.md`
24
27
  - `~/.syntaur/projects/<project>/memories/<slug>.md`
25
28
  3. Workspace files inside the assignment's configured workspace root
26
29
  4. `.syntaur/context.json` in the current working directory
27
30
 
31
+ ### Files written only via CLI
32
+
33
+ - `comments.md` (any assignment) — use `syntaur comment <slug-or-uuid> "body" --type question|note|feedback [--reply-to <id>]`. Never edit directly.
34
+ - Another assignment's `## Todos` section — use `syntaur request <target> "text"` to append a todo annotated `(from: <source>)`.
35
+
28
36
  ### Files you must never write
29
37
 
30
- 1. `project.md`, `agent.md`, `claude.md`
38
+ 1. `project.md`
31
39
  2. `manifest.md`
32
40
  3. Any file prefixed with `_`
33
- 4. Other agents' assignment folders
41
+ 4. Other agents' assignment folders (except via the CLI-mediated channels above)
34
42
  5. Anything outside the current workspace boundary
35
43
 
36
44
  ## Current Assignment Context
@@ -48,17 +56,17 @@ If `.syntaur/context.json` exists in the current working directory, read it befo
48
56
 
49
57
  When you are working on an existing assignment, read these in order:
50
58
 
51
- 1. `<projectDir>/manifest.md`
52
- 2. `<projectDir>/agent.md`
53
- 3. `<projectDir>/project.md`
54
- 4. `<projectDir>/claude.md` if it exists
55
- 5. `<assignmentDir>/assignment.md`
56
- 6. any `<assignmentDir>/plan*.md` files linked from active todos in the `## Todos` section
59
+ 1. `<projectDir>/manifest.md` (project-nested assignments only)
60
+ 2. `<projectDir>/project.md` (project-nested assignments only)
61
+ 3. `<assignmentDir>/assignment.md` — frontmatter now includes `project: <slug> | null` and `type: <classification> | null`
62
+ 4. any `<assignmentDir>/plan*.md` files linked from active todos in the `## Todos` section
63
+ 5. `<assignmentDir>/progress.md` (if present)
64
+ 6. `<assignmentDir>/comments.md` (if present)
57
65
  7. `<assignmentDir>/handoff.md`
58
66
 
59
67
  ## Lifecycle Commands
60
68
 
61
- Use the `syntaur` CLI for state transitions:
69
+ Use the `syntaur` CLI for state transitions and coordination:
62
70
 
63
71
  - `syntaur assign <slug> --agent <name> --project <project>`
64
72
  - `syntaur start <slug> --project <project>`
@@ -67,6 +75,9 @@ Use the `syntaur` CLI for state transitions:
67
75
  - `syntaur block <slug> --project <project> --reason <text>`
68
76
  - `syntaur unblock <slug> --project <project>`
69
77
  - `syntaur fail <slug> --project <project>`
78
+ - `syntaur create-assignment "<title>" [--type <type>] [--project <slug> | --one-off]`
79
+ - `syntaur comment <slug-or-uuid> "body" --type question|note|feedback [--reply-to <id>]`
80
+ - `syntaur request <target> "text" [--from <source>]`
70
81
 
71
82
  ## Troubleshooting
72
83
 
@@ -74,12 +85,14 @@ If Syntaur state looks inconsistent (missing files, stale manifests, unexpected
74
85
 
75
86
  ## Conventions
76
87
 
77
- - Assignment frontmatter is the single source of truth.
78
- - Slugs are lowercase and hyphen-separated.
88
+ - Assignment frontmatter is the single source of truth. `project` is the containing project slug (`null` for standalone); `type` is a classification validated against `config.md` `types.definitions` when present.
89
+ - Slugs are lowercase and hyphen-separated. For standalone assignments the folder is named by UUID; `slug` is display-only.
79
90
  - Update acceptance criteria and `## Todos` checkboxes as work lands, not only at the end.
80
- - Keep the `## Progress` section in `assignment.md` current after meaningful milestones.
91
+ - Append timestamped entries to `progress.md` after meaningful milestones. Do NOT add a `## Progress` section to `assignment.md`.
92
+ - Record questions/notes/feedback via `syntaur comment` — never edit `comments.md` directly. Do NOT set status to blocked for questions.
81
93
  - When requirements shift, supersede the prior plan todo (`- [x] ~~...~~ (superseded by plan-v<N>)`) instead of rewriting the old plan file.
82
94
  - Write handoffs with enough context for another agent or human to continue cleanly.
95
+ - Use `syntaur request` to route work to another assignment.
83
96
 
84
97
  ## References
85
98
 
@@ -1 +0,0 @@
1
- import{aq as o,ar as n}from"./mermaid.core-C9pF_oFQ.js";const t=(r,a)=>o.lang.round(n.parse(r)[a]);export{t as c};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-WL4C6EOR-C7jE3-cR.js";import{_ as i}from"./mermaid.core-C9pF_oFQ.js";import"./chunk-FMBD7UC4-CLuJnd1b.js";import"./chunk-JSJVCQXG-B4d62qWV.js";import"./chunk-55IACEB6-6HmWguiO.js";import"./chunk-KX2RTZJC-AsEKRPq2.js";import"./index-yyAIuzrP.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-WL4C6EOR-C7jE3-cR.js";import{_ as i}from"./mermaid.core-C9pF_oFQ.js";import"./chunk-FMBD7UC4-CLuJnd1b.js";import"./chunk-JSJVCQXG-B4d62qWV.js";import"./chunk-55IACEB6-6HmWguiO.js";import"./chunk-KX2RTZJC-AsEKRPq2.js";import"./index-yyAIuzrP.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1 +0,0 @@
1
- import{b as r}from"./_baseUniq-CTxTc4MS.js";var e=4;function a(o){return r(o,e)}export{a as c};