@mmerterden/multi-agent-pipeline 20.29.0 → 20.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/README.md +50 -5
  3. package/README.tr.md +64 -5
  4. package/docs/architecture.md +3 -3
  5. package/docs/ecosystem.md +5 -5
  6. package/docs/facts.json +9 -9
  7. package/install/_unattended-profile.mjs +61 -0
  8. package/install/catalog-history.json +1 -1
  9. package/install/claude.mjs +19 -3
  10. package/install/codex.mjs +2 -0
  11. package/install/copilot.mjs +13 -0
  12. package/install/index.mjs +10 -1
  13. package/install/templates/claude-hooks.json +12 -1
  14. package/manifest.json +230 -88
  15. package/package.json +3 -1
  16. package/pipeline/commands/multi-agent/analysis/SKILL.md +4 -4
  17. package/pipeline/commands/multi-agent/autopilot-on/SKILL.md +13 -15
  18. package/pipeline/commands/multi-agent/office-off/SKILL.md +27 -0
  19. package/pipeline/commands/multi-agent/office-on/SKILL.md +51 -0
  20. package/pipeline/commands/multi-agent/office-status/SKILL.md +29 -0
  21. package/pipeline/commands/multi-agent/prune-logs/SKILL.md +4 -1
  22. package/pipeline/commands/multi-agent/review/SKILL.md +4 -3
  23. package/pipeline/commands/multi-agent/scenario-audit/SKILL.md +4 -2
  24. package/pipeline/commands/multi-agent/serve/SKILL.md +4 -2
  25. package/pipeline/commands/multi-agent/stack/SKILL.md +15 -8
  26. package/pipeline/commands/multi-agent/steer/SKILL.md +10 -9
  27. package/pipeline/commands/multi-agent/sync/SKILL.md +15 -3
  28. package/pipeline/commands/multi-agent/test-gen/SKILL.md +29 -3
  29. package/pipeline/contract/CHANGELOG.md +108 -0
  30. package/pipeline/contract/README.md +72 -12
  31. package/pipeline/contract/fixtures/error-invalid-request.json +1 -1
  32. package/pipeline/contract/fixtures/error-unauthorized.json +1 -1
  33. package/pipeline/contract/fixtures/error-unsigned.json +1 -1
  34. package/pipeline/contract/fixtures/launch-plan.json +1 -1
  35. package/pipeline/contract/fixtures/runs-awaiting-question.json +6 -1
  36. package/pipeline/contract/fixtures/runs-empty.json +1 -1
  37. package/pipeline/contract/fixtures/runs-failed.json +6 -1
  38. package/pipeline/contract/fixtures/runs-old-schema.json +6 -1
  39. package/pipeline/contract/fixtures/runs-pr-opened-redacted.json +5 -1
  40. package/pipeline/contract/fixtures/runs-pr-opened.json +6 -1
  41. package/pipeline/contract/fixtures/runs-running.json +6 -1
  42. package/pipeline/contract/manifest.json +506 -27
  43. package/pipeline/contract/types/index.d.ts +829 -4
  44. package/pipeline/lib/bg-launch.mjs +106 -0
  45. package/pipeline/lib/code-digest.mjs +49 -0
  46. package/pipeline/lib/credential-resolve.mjs +42 -2
  47. package/pipeline/multi-agent-refs/cross-cli-contract.md +5 -4
  48. package/pipeline/multi-agent-refs/features/office-threat-model.md +109 -0
  49. package/pipeline/multi-agent-refs/features/unattended-security.md +1 -1
  50. package/pipeline/multi-agent-refs/help/en.md +3 -0
  51. package/pipeline/multi-agent-refs/help/tr.md +3 -0
  52. package/pipeline/multi-agent-refs/phases/modes.md +7 -7
  53. package/pipeline/multi-agent-refs/phases/phase-5-report.md +16 -10
  54. package/pipeline/multi-agent-refs/review-standalone-tracker.md +37 -0
  55. package/pipeline/multi-agent-refs/tracker-contract.md +8 -3
  56. package/pipeline/office/NOTICE.md +45 -0
  57. package/pipeline/office/assets/ARCHIVE_BOXES.png +0 -0
  58. package/pipeline/office/assets/BIN.png +0 -0
  59. package/pipeline/office/assets/BOOKSHELF.png +0 -0
  60. package/pipeline/office/assets/CACTUS.png +0 -0
  61. package/pipeline/office/assets/CLOCK.png +0 -0
  62. package/pipeline/office/assets/COFFEE.png +0 -0
  63. package/pipeline/office/assets/COFFEE_MACHINE.png +0 -0
  64. package/pipeline/office/assets/COFFEE_TABLE.png +0 -0
  65. package/pipeline/office/assets/COUNTER_SINK.png +0 -0
  66. package/pipeline/office/assets/CUSHIONED_BENCH.png +0 -0
  67. package/pipeline/office/assets/CUSHIONED_CHAIR_BACK.png +0 -0
  68. package/pipeline/office/assets/CUSHIONED_CHAIR_FRONT.png +0 -0
  69. package/pipeline/office/assets/CUSHIONED_CHAIR_SIDE.png +0 -0
  70. package/pipeline/office/assets/DESK_FRONT.png +0 -0
  71. package/pipeline/office/assets/DESK_SIDE.png +0 -0
  72. package/pipeline/office/assets/DEVICE_STAND.png +0 -0
  73. package/pipeline/office/assets/DOUBLE_BOOKSHELF.png +0 -0
  74. package/pipeline/office/assets/FILING_CABINET.png +0 -0
  75. package/pipeline/office/assets/FRIDGE.png +0 -0
  76. package/pipeline/office/assets/HANGING_PLANT.png +0 -0
  77. package/pipeline/office/assets/LARGE_PAINTING.png +0 -0
  78. package/pipeline/office/assets/LARGE_PLANT.png +0 -0
  79. package/pipeline/office/assets/MAILBOX.png +0 -0
  80. package/pipeline/office/assets/MOP_BUCKET.png +0 -0
  81. package/pipeline/office/assets/PC_BACK.png +0 -0
  82. package/pipeline/office/assets/PC_FRONT_OFF.png +0 -0
  83. package/pipeline/office/assets/PC_FRONT_ON_1.png +0 -0
  84. package/pipeline/office/assets/PC_FRONT_ON_2.png +0 -0
  85. package/pipeline/office/assets/PC_FRONT_ON_3.png +0 -0
  86. package/pipeline/office/assets/PC_SIDE.png +0 -0
  87. package/pipeline/office/assets/PLANT.png +0 -0
  88. package/pipeline/office/assets/PLANT_2.png +0 -0
  89. package/pipeline/office/assets/POT.png +0 -0
  90. package/pipeline/office/assets/PRINTER.png +0 -0
  91. package/pipeline/office/assets/RECEPTION_DESK.png +0 -0
  92. package/pipeline/office/assets/SERVER_RACK.png +0 -0
  93. package/pipeline/office/assets/SERVER_RACK_2.png +0 -0
  94. package/pipeline/office/assets/SMALL_PAINTING.png +0 -0
  95. package/pipeline/office/assets/SMALL_PAINTING_2.png +0 -0
  96. package/pipeline/office/assets/SMALL_TABLE_FRONT.png +0 -0
  97. package/pipeline/office/assets/SMALL_TABLE_SIDE.png +0 -0
  98. package/pipeline/office/assets/SOFA_BACK.png +0 -0
  99. package/pipeline/office/assets/SOFA_FRONT.png +0 -0
  100. package/pipeline/office/assets/SOFA_SIDE.png +0 -0
  101. package/pipeline/office/assets/TABLE_FRONT.png +0 -0
  102. package/pipeline/office/assets/TOILET_STALL.png +0 -0
  103. package/pipeline/office/assets/VENDING.png +0 -0
  104. package/pipeline/office/assets/WASHBASIN.png +0 -0
  105. package/pipeline/office/assets/WATER_COOLER.png +0 -0
  106. package/pipeline/office/assets/WHITEBOARD.png +0 -0
  107. package/pipeline/office/assets/WOODEN_BENCH.png +0 -0
  108. package/pipeline/office/assets/WOODEN_CHAIR_BACK.png +0 -0
  109. package/pipeline/office/assets/WOODEN_CHAIR_FRONT.png +0 -0
  110. package/pipeline/office/assets/WOODEN_CHAIR_SIDE.png +0 -0
  111. package/pipeline/office/assets/char_0.png +0 -0
  112. package/pipeline/office/assets/char_1.png +0 -0
  113. package/pipeline/office/assets/char_2.png +0 -0
  114. package/pipeline/office/assets/char_3.png +0 -0
  115. package/pipeline/office/assets/char_4.png +0 -0
  116. package/pipeline/office/assets/char_5.png +0 -0
  117. package/pipeline/office/assets/floor_0.png +0 -0
  118. package/pipeline/office/assets/floor_1.png +0 -0
  119. package/pipeline/office/assets/floor_2.png +0 -0
  120. package/pipeline/office/assets/floor_3.png +0 -0
  121. package/pipeline/office/assets/floor_4.png +0 -0
  122. package/pipeline/office/assets/floor_5.png +0 -0
  123. package/pipeline/office/assets/floor_6.png +0 -0
  124. package/pipeline/office/assets/floor_7.png +0 -0
  125. package/pipeline/office/assets/floor_8.png +0 -0
  126. package/pipeline/office/assets/wall_0.png +0 -0
  127. package/pipeline/office/index.html +8431 -0
  128. package/pipeline/office/toolkit.json +3 -0
  129. package/pipeline/schemas/activity-chat.schema.json +78 -0
  130. package/pipeline/schemas/activity-roles.json +48 -0
  131. package/pipeline/schemas/activity-roles.schema.json +49 -0
  132. package/pipeline/schemas/activity.schema.json +613 -0
  133. package/pipeline/schemas/agent-state.schema.json +493 -115
  134. package/pipeline/schemas/autopilot-on-request.schema.json +33 -0
  135. package/pipeline/schemas/autopilot-on.schema.json +111 -0
  136. package/pipeline/schemas/contract-error.schema.json +45 -4
  137. package/pipeline/schemas/issue-maturity.schema.json +68 -0
  138. package/pipeline/schemas/job-change.schema.json +72 -0
  139. package/pipeline/schemas/job-request.schema.json +38 -0
  140. package/pipeline/schemas/launch.json +4 -4
  141. package/pipeline/schemas/ledger.schema.json +202 -0
  142. package/pipeline/schemas/office-credentials.schema.json +71 -0
  143. package/pipeline/schemas/office-jobs.json +253 -0
  144. package/pipeline/schemas/office-jobs.schema.json +62 -0
  145. package/pipeline/schemas/office-memory.schema.json +105 -0
  146. package/pipeline/schemas/office-settings-request.schema.json +30 -0
  147. package/pipeline/schemas/office-settings.schema.json +67 -0
  148. package/pipeline/schemas/permissions.schema.json +47 -0
  149. package/pipeline/schemas/phases.json +10 -2
  150. package/pipeline/schemas/phases.schema.json +86 -19
  151. package/pipeline/schemas/prefs.schema.json +19 -0
  152. package/pipeline/schemas/prs.schema.json +78 -0
  153. package/pipeline/schemas/prune-logs-request.schema.json +26 -0
  154. package/pipeline/schemas/prune-logs.schema.json +52 -0
  155. package/pipeline/schemas/repo-change.schema.json +54 -0
  156. package/pipeline/schemas/repo-request.schema.json +29 -0
  157. package/pipeline/schemas/repos.schema.json +49 -1
  158. package/pipeline/schemas/review-verdict-request.schema.json +20 -0
  159. package/pipeline/schemas/review-verdict.schema.json +62 -0
  160. package/pipeline/schemas/routine-delete.schema.json +59 -0
  161. package/pipeline/schemas/routines.schema.json +38 -0
  162. package/pipeline/schemas/run-evidence.schema.json +29 -0
  163. package/pipeline/schemas/run-results.schema.json +218 -0
  164. package/pipeline/schemas/runs-index.schema.json +257 -46
  165. package/pipeline/schemas/service-read.schema.json +58 -0
  166. package/pipeline/schemas/stack-change.schema.json +82 -0
  167. package/pipeline/schemas/stack-request.schema.json +33 -0
  168. package/pipeline/schemas/stack.schema.json +59 -0
  169. package/pipeline/schemas/steer-request.schema.json +25 -0
  170. package/pipeline/schemas/steer.schema.json +59 -0
  171. package/pipeline/schemas/system-status.schema.json +111 -0
  172. package/pipeline/schemas/tool-call-request.schema.json +19 -0
  173. package/pipeline/schemas/tool-call.schema.json +47 -0
  174. package/pipeline/schemas/tools.schema.json +65 -0
  175. package/pipeline/schemas/unattended-profile.json +7 -2
  176. package/pipeline/scripts/_active-run.mjs +2 -1
  177. package/pipeline/scripts/_cost.mjs +66 -1
  178. package/pipeline/scripts/_office-smoke-lib.sh +115 -0
  179. package/pipeline/scripts/_spawn-async.mjs +77 -0
  180. package/pipeline/scripts/_transcript-tail.mjs +274 -0
  181. package/pipeline/scripts/activity-snapshot.mjs +1223 -0
  182. package/pipeline/scripts/autopilot-control.mjs +214 -9
  183. package/pipeline/scripts/autopilot-runner.mjs +7 -5
  184. package/pipeline/scripts/contract-server.mjs +1853 -197
  185. package/pipeline/scripts/cost-analyze.mjs +2 -53
  186. package/pipeline/scripts/cost-table.json +1 -0
  187. package/pipeline/scripts/gen-mode-dispatch.mjs +3 -1
  188. package/pipeline/scripts/job-launch.mjs +477 -0
  189. package/pipeline/scripts/launch-request.mjs +94 -9
  190. package/pipeline/scripts/office-build.mjs +226 -0
  191. package/pipeline/scripts/office-control.mjs +410 -0
  192. package/pipeline/scripts/office-credentials.mjs +106 -0
  193. package/pipeline/scripts/office-ledger.mjs +409 -0
  194. package/pipeline/scripts/office-memory.mjs +200 -0
  195. package/pipeline/scripts/office-prune.mjs +125 -0
  196. package/pipeline/scripts/office-settings.mjs +145 -0
  197. package/pipeline/scripts/phase-tracker.sh +12 -5
  198. package/pipeline/scripts/prune-logs.sh +53 -2
  199. package/pipeline/scripts/routine-registry.mjs +42 -6
  200. package/pipeline/scripts/run-results.mjs +373 -0
  201. package/pipeline/scripts/runs-index.mjs +62 -2
  202. package/pipeline/scripts/service-read.mjs +244 -0
  203. package/pipeline/scripts/stack-toggle.mjs +285 -0
  204. package/pipeline/scripts/steer-run.mjs +97 -0
  205. package/pipeline/scripts/system-status.mjs +196 -0
  206. package/pipeline/scripts/task-mirror.mjs +150 -0
  207. package/pipeline/scripts/task-mirror.sh +20 -0
  208. package/pipeline/scripts/toolkit-tools.mjs +625 -0
  209. package/pipeline/scripts/transcript-index.mjs +4 -1
  210. package/pipeline/scripts/uninstall.mjs +3 -0
  211. package/pipeline/scripts/work-items.mjs +473 -0
  212. package/pipeline/skills/.skill-manifest.json +23 -11
  213. package/pipeline/skills/.skills-index.json +34 -1
  214. package/pipeline/skills/shared/README.md +6 -3
  215. package/pipeline/skills/shared/core/multi-agent-autopilot-on/SKILL.md +13 -15
  216. package/pipeline/skills/shared/core/multi-agent-office-off/SKILL.md +16 -0
  217. package/pipeline/skills/shared/core/multi-agent-office-on/SKILL.md +21 -0
  218. package/pipeline/skills/shared/core/multi-agent-office-status/SKILL.md +17 -0
  219. package/pipeline/skills/shared/core/multi-agent-prune-logs/SKILL.md +4 -1
  220. package/pipeline/skills/shared/core/multi-agent-review/SKILL.md +19 -0
  221. package/pipeline/skills/shared/core/multi-agent-scenario-audit/SKILL.md +4 -2
  222. package/pipeline/skills/shared/core/multi-agent-serve/SKILL.md +4 -2
  223. package/pipeline/skills/shared/core/multi-agent-stack/SKILL.md +14 -6
  224. package/pipeline/skills/shared/core/multi-agent-steer/SKILL.md +10 -9
  225. package/pipeline/skills/shared/core/multi-agent-sync/SKILL.md +3 -3
  226. package/pipeline/skills/shared/core/multi-agent-test-gen/SKILL.md +26 -3
  227. package/pipeline/skills/skills-index.md +4 -1
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/office-credentials.schema.json",
4
+ "title": "Key cabinet",
5
+ "description": "What GET /v1/credentials returns and `office-credentials.mjs --json` prints: for each credential the pipeline knows by logical name, whether the store holds it and, with probe, whether its service accepted it. Never a value: lib/credential-inventory.sh reads each through the store with stdout discarded. Renewal stays in the terminal (/multi-agent:setup).",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "generatedAt", "probed", "available", "credentials"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "generatedAt": {
16
+ "type": "string",
17
+ "format": "date-time",
18
+ "x-sensitivity": "none"
19
+ },
20
+ "probed": {
21
+ "type": "boolean",
22
+ "x-sensitivity": "none"
23
+ },
24
+ "available": {
25
+ "type": "boolean",
26
+ "x-sensitivity": "none",
27
+ "description": "False when the inventory could not run on this host."
28
+ },
29
+ "credentials": {
30
+ "type": "array",
31
+ "x-sensitivity": "local",
32
+ "items": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["logical", "state", "reachability", "capability"],
36
+ "properties": {
37
+ "logical": {
38
+ "type": "string",
39
+ "pattern": "^[a-z][a-z0-9_]{0,60}$"
40
+ },
41
+ "state": {
42
+ "enum": ["present", "mapped-but-missing", "unmapped"]
43
+ },
44
+ "reachability": {
45
+ "enum": [
46
+ "not-probed",
47
+ "reachable",
48
+ "auth-rejected",
49
+ "unreachable",
50
+ "no-host-configured",
51
+ "well-formed",
52
+ "not-probeable",
53
+ "malformed",
54
+ "no-credential",
55
+ "probe-error",
56
+ "server-error",
57
+ "tier-1-ready",
58
+ "tier-2-ready",
59
+ "tier-1-no-grant",
60
+ "unknown"
61
+ ]
62
+ },
63
+ "capability": {
64
+ "type": ["string", "null"],
65
+ "maxLength": 160
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,253 @@
1
+ {
2
+ "$schema": "./office-jobs.schema.json",
3
+ "contractVersion": "1.0.0",
4
+ "description": "The jobs a person can hand to someone in the office. A solo job is one command one agent does at a desk; a team job is a pipeline run that meets in a room. Each parameter has a kind that job-launch.mjs checks before anything starts, so no job takes free text, and `writes` names what the job changes outside this machine, shown in the confirmation. Commands not listed here stay terminal commands.",
5
+ "jobs": [
6
+ {
7
+ "id": "pipeline",
8
+ "command": "multi-agent",
9
+ "role": "Orchestrator",
10
+ "team": true,
11
+ "launch": "development",
12
+ "params": [
13
+ {
14
+ "name": "input",
15
+ "kind": "work-item",
16
+ "required": true
17
+ }
18
+ ],
19
+ "writes": "branch-pr"
20
+ },
21
+ {
22
+ "id": "autopilot-run",
23
+ "command": "multi-agent",
24
+ "role": "Orchestrator",
25
+ "team": true,
26
+ "launch": "autopilot",
27
+ "params": [
28
+ {
29
+ "name": "input",
30
+ "kind": "work-item",
31
+ "required": true
32
+ }
33
+ ],
34
+ "writes": "branch-pr"
35
+ },
36
+ {
37
+ "id": "analysis",
38
+ "command": "analysis",
39
+ "role": "Planner",
40
+ "team": true,
41
+ "launch": "analysis",
42
+ "params": [
43
+ {
44
+ "name": "input",
45
+ "kind": "work-item",
46
+ "required": true
47
+ }
48
+ ],
49
+ "writes": "none"
50
+ },
51
+ {
52
+ "id": "review",
53
+ "command": "review",
54
+ "role": "Reviewer",
55
+ "team": false,
56
+ "params": [
57
+ {
58
+ "name": "target",
59
+ "kind": "pull-request",
60
+ "required": true
61
+ }
62
+ ],
63
+ "writes": "none"
64
+ },
65
+ {
66
+ "id": "security-review",
67
+ "command": "security-review",
68
+ "role": "Security Auditor",
69
+ "team": false,
70
+ "params": [
71
+ {
72
+ "name": "target",
73
+ "kind": "branch",
74
+ "required": false
75
+ }
76
+ ],
77
+ "writes": "none"
78
+ },
79
+ {
80
+ "id": "diff-explain",
81
+ "command": "diff-explain",
82
+ "role": "Reviewer",
83
+ "team": false,
84
+ "params": [
85
+ {
86
+ "name": "task",
87
+ "kind": "run-id",
88
+ "required": true
89
+ }
90
+ ],
91
+ "writes": "none"
92
+ },
93
+ {
94
+ "id": "review-jira",
95
+ "command": "review-jira",
96
+ "role": "Clarifier",
97
+ "team": false,
98
+ "params": [
99
+ {
100
+ "name": "issue",
101
+ "kind": "jira-key",
102
+ "required": true
103
+ }
104
+ ],
105
+ "writes": "none"
106
+ },
107
+ {
108
+ "id": "review-issue",
109
+ "command": "review-issue",
110
+ "role": "Clarifier",
111
+ "team": false,
112
+ "params": [
113
+ {
114
+ "name": "issue",
115
+ "kind": "github-issue",
116
+ "required": true
117
+ }
118
+ ],
119
+ "writes": "none"
120
+ },
121
+ {
122
+ "id": "estimate",
123
+ "command": "estimate",
124
+ "role": "Planner",
125
+ "team": false,
126
+ "params": [
127
+ {
128
+ "name": "input",
129
+ "kind": "jira-key",
130
+ "required": true
131
+ }
132
+ ],
133
+ "writes": "none"
134
+ },
135
+ {
136
+ "id": "research",
137
+ "command": "research",
138
+ "role": "Explorer",
139
+ "team": false,
140
+ "params": [
141
+ {
142
+ "name": "item",
143
+ "kind": "jira-key",
144
+ "required": true
145
+ }
146
+ ],
147
+ "writes": "none"
148
+ },
149
+ {
150
+ "id": "postmortem",
151
+ "command": "postmortem",
152
+ "role": "Reader",
153
+ "team": false,
154
+ "params": [
155
+ {
156
+ "name": "target",
157
+ "kind": "run-id",
158
+ "required": true
159
+ }
160
+ ],
161
+ "writes": "none"
162
+ },
163
+ {
164
+ "id": "graph",
165
+ "command": "graph",
166
+ "role": "Explorer",
167
+ "team": false,
168
+ "params": [
169
+ {
170
+ "name": "action",
171
+ "kind": "enum",
172
+ "values": ["build", "refresh", "report", "status"],
173
+ "required": true
174
+ }
175
+ ],
176
+ "writes": "none"
177
+ },
178
+ {
179
+ "id": "ios-coding-standard",
180
+ "command": "ios-coding-standard",
181
+ "role": "iOS Architect",
182
+ "team": false,
183
+ "params": [
184
+ {
185
+ "name": "target",
186
+ "kind": "repo-path",
187
+ "required": true
188
+ }
189
+ ],
190
+ "writes": "none"
191
+ },
192
+ {
193
+ "id": "test-gen",
194
+ "command": "test-gen",
195
+ "role": "Test Gap Analyst",
196
+ "team": true,
197
+ "params": [],
198
+ "writes": "branch"
199
+ },
200
+ {
201
+ "id": "doctor",
202
+ "command": "doctor",
203
+ "role": "Sysadmin",
204
+ "team": false,
205
+ "params": [],
206
+ "writes": "none"
207
+ },
208
+ {
209
+ "id": "route-status",
210
+ "command": "route-status",
211
+ "role": "Sysadmin",
212
+ "team": false,
213
+ "params": [],
214
+ "writes": "none"
215
+ },
216
+ {
217
+ "id": "scan",
218
+ "command": "scan",
219
+ "role": "Librarian",
220
+ "team": false,
221
+ "params": [],
222
+ "writes": "none"
223
+ },
224
+ {
225
+ "id": "scenario-audit",
226
+ "command": "scenario-audit",
227
+ "role": "Test Gap Analyst",
228
+ "team": false,
229
+ "params": [
230
+ {
231
+ "name": "scenarios",
232
+ "kind": "repo-path",
233
+ "required": true
234
+ }
235
+ ],
236
+ "writes": "none"
237
+ },
238
+ {
239
+ "id": "review-analysis",
240
+ "command": "review-analysis",
241
+ "role": "Clarifier",
242
+ "team": false,
243
+ "params": [
244
+ {
245
+ "name": "target",
246
+ "kind": "jira-key",
247
+ "required": true
248
+ }
249
+ ],
250
+ "writes": "none"
251
+ }
252
+ ]
253
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/office-jobs.schema.json",
4
+ "title": "Office jobs",
5
+ "description": "The catalog of jobs the office can start (office-jobs.json), read by job-launch.mjs and served by GET /v1/jobs.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "jobs"],
9
+ "properties": {
10
+ "$schema": { "type": "string" },
11
+ "contractVersion": {
12
+ "type": "string",
13
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
14
+ "x-sensitivity": "none"
15
+ },
16
+ "description": { "type": "string" },
17
+ "jobs": {
18
+ "type": "array",
19
+ "x-sensitivity": "none",
20
+ "items": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["id", "command", "role", "team", "params", "writes"],
24
+ "properties": {
25
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" },
26
+ "command": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,40}$" },
27
+ "role": { "type": "string", "minLength": 1 },
28
+ "team": { "type": "boolean" },
29
+ "launch": { "enum": ["development", "analysis", "autopilot"] },
30
+ "available": { "type": "boolean" },
31
+ "reason": { "type": ["string", "null"] },
32
+ "params": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["name", "kind", "required"],
38
+ "properties": {
39
+ "name": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,30}$" },
40
+ "kind": {
41
+ "enum": [
42
+ "work-item",
43
+ "pull-request",
44
+ "branch",
45
+ "run-id",
46
+ "jira-key",
47
+ "github-issue",
48
+ "enum",
49
+ "repo-path"
50
+ ]
51
+ },
52
+ "values": { "type": "array", "items": { "type": "string" } },
53
+ "required": { "type": "boolean" }
54
+ }
55
+ }
56
+ },
57
+ "writes": { "enum": ["none", "branch", "branch-pr", "pr-comments", "issue-comment"] }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,105 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/office-memory.schema.json",
4
+ "title": "Institutional memory",
5
+ "description": "What GET /v1/memory returns and `office-memory.mjs --json` prints: per repository, the code graph's age and size and how many learnings, past review findings and session notes the learning loop holds, with the newest learnings redacted and cut short. An empty shelf is reported, never left out.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "generatedAt", "shelves"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "generatedAt": {
16
+ "type": "string",
17
+ "format": "date-time",
18
+ "x-sensitivity": "none"
19
+ },
20
+ "shelves": {
21
+ "type": "array",
22
+ "maxItems": 60,
23
+ "x-sensitivity": "local",
24
+ "items": {
25
+ "type": "object",
26
+ "additionalProperties": false,
27
+ "required": [
28
+ "repo",
29
+ "graph",
30
+ "learnings",
31
+ "findings",
32
+ "sessionNotes",
33
+ "recent",
34
+ "lastWrite"
35
+ ],
36
+ "properties": {
37
+ "repo": {
38
+ "type": "string"
39
+ },
40
+ "graph": {
41
+ "oneOf": [
42
+ {
43
+ "type": "null"
44
+ },
45
+ {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["builtAt", "ageDays", "sizeKb"],
49
+ "properties": {
50
+ "builtAt": {
51
+ "type": ["string", "null"]
52
+ },
53
+ "ageDays": {
54
+ "type": "integer",
55
+ "minimum": 0
56
+ },
57
+ "sizeKb": {
58
+ "type": "integer",
59
+ "minimum": 0
60
+ }
61
+ }
62
+ }
63
+ ]
64
+ },
65
+ "learnings": {
66
+ "type": "integer",
67
+ "minimum": 0
68
+ },
69
+ "findings": {
70
+ "type": "integer",
71
+ "minimum": 0
72
+ },
73
+ "sessionNotes": {
74
+ "type": "integer",
75
+ "minimum": 0
76
+ },
77
+ "recent": {
78
+ "type": "array",
79
+ "maxItems": 5,
80
+ "items": {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": ["kind", "statement", "at"],
84
+ "properties": {
85
+ "kind": {
86
+ "type": ["string", "null"]
87
+ },
88
+ "statement": {
89
+ "type": "string",
90
+ "maxLength": 120
91
+ },
92
+ "at": {
93
+ "type": ["string", "null"]
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "lastWrite": {
99
+ "type": ["string", "null"]
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/office-settings-request.schema.json",
4
+ "title": "Office settings request",
5
+ "description": "The body of POST /v1/settings. Step 1 names the setting and its new value; step 2 sends only the confirmToken step 1 returned.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "setting": {
16
+ "enum": ["language", "model", "route"],
17
+ "x-sensitivity": "none"
18
+ },
19
+ "value": {
20
+ "enum": ["en", "tr", "on", "off"],
21
+ "x-sensitivity": "none"
22
+ },
23
+ "confirmToken": {
24
+ "type": "string",
25
+ "pattern": "^[A-Za-z0-9_-]{16,128}$",
26
+ "x-sensitivity": "none",
27
+ "description": "The confirmToken the preview returned. Single use, bound to the route."
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/office-settings.schema.json",
4
+ "title": "Office settings",
5
+ "description": "What GET /v1/settings returns and POST /v1/settings returns after a change: the output language, the fable rung and model routing. A preview (the first POST) adds the change it would make and a confirmToken.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "language", "model", "route"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "language": {
16
+ "enum": ["en", "tr"],
17
+ "x-sensitivity": "none"
18
+ },
19
+ "model": {
20
+ "enum": ["on", "off"],
21
+ "x-sensitivity": "none",
22
+ "description": "Whether the fable rung is in play."
23
+ },
24
+ "route": {
25
+ "enum": ["on", "off"],
26
+ "x-sensitivity": "none",
27
+ "description": "Whether model routing is on."
28
+ },
29
+ "change": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["setting", "from", "to"],
33
+ "x-sensitivity": "none",
34
+ "properties": {
35
+ "setting": {
36
+ "enum": ["language", "model", "route"]
37
+ },
38
+ "from": {
39
+ "type": "string"
40
+ },
41
+ "to": {
42
+ "type": "string"
43
+ },
44
+ "freeChain": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "required": ["enabled", "allowTraining"],
48
+ "description": "Present when turning routing on brings back a saved free provider chain: the confirmation names it.",
49
+ "properties": {
50
+ "enabled": { "const": true },
51
+ "allowTraining": { "type": "boolean" }
52
+ }
53
+ }
54
+ }
55
+ },
56
+ "confirmToken": {
57
+ "type": "string",
58
+ "pattern": "^[A-Za-z0-9_-]{16,128}$",
59
+ "x-sensitivity": "none"
60
+ },
61
+ "expiresAt": {
62
+ "type": "string",
63
+ "format": "date-time",
64
+ "x-sensitivity": "none"
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/permissions.schema.json",
4
+ "title": "Pending permission prompts",
5
+ "description": "What GET /v1/permissions returns: the host permission prompts waiting on the user. available is false while the host records none where another process can read them; requests is then empty and reason says so. When available, each request names its session, the tool and a redacted summary.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "available", "reason", "requests"],
9
+ "properties": {
10
+ "contractVersion": {
11
+ "type": "string",
12
+ "pattern": "^1\\.[0-9]+\\.[0-9]+$",
13
+ "x-sensitivity": "none"
14
+ },
15
+ "available": {
16
+ "type": "boolean"
17
+ },
18
+ "reason": {
19
+ "type": ["string", "null"]
20
+ },
21
+ "requests": {
22
+ "type": "array",
23
+ "items": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": ["id", "sessionId", "tool", "summary", "at"],
27
+ "properties": {
28
+ "id": {
29
+ "type": "string"
30
+ },
31
+ "sessionId": {
32
+ "type": "string"
33
+ },
34
+ "tool": {
35
+ "type": "string"
36
+ },
37
+ "summary": {
38
+ "type": "string"
39
+ },
40
+ "at": {
41
+ "type": "string"
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/mmerterden/multi-agent-pipeline/pipeline/schemas/phases.json",
4
- "description": "The phase contract, in one place: the phase ids and names, which phases each mode runs, the per-phase token ceilings and the phase numbers other code compares against. gen-mode-dispatch.mjs, render-work-summary.sh, the autopilot runner, runs-index.mjs, usage-report.mjs and gen-facts.mjs read it; smoke-phase-contract.sh holds every copy that cannot read it (the phase docs and prose counts, agent-state.schema.json, token-budget.json, phase-tracker.sh, phase-banner.sh, gc-abandoned.sh) to it. Adding or merging a phase means editing here. A mode with `commits: false` delivers no commit in its Phase 4 (analysis publishes a document), so lib/run-completion.mjs asks it for no commit evidence before `status: complete`; any other mode commits. Ceilings are measured against the current phase documents, never summed from earlier ones: smoke-token-budget.sh fails a ceiling more than 25% above the measurement.",
4
+ "description": "The phase contract, in one place: the phase ids and names, which phases each mode runs, the per-phase token ceilings and the phase numbers other code compares against. gen-mode-dispatch.mjs, render-work-summary.sh, the autopilot runner, runs-index.mjs, usage-report.mjs and gen-facts.mjs read it; smoke-phase-contract.sh holds every copy that cannot read it (the phase docs and prose counts, agent-state.schema.json, token-budget.json, phase-tracker.sh, phase-banner.sh, gc-abandoned.sh) to it. Adding or merging a phase means editing here. A mode with `names` runs the same six slots under its own step names (analysis gathers evidence and synthesises where development plans and builds), and its tracker and task widget show those names. A mode with `commits: false` delivers no commit in its Phase 4 (analysis publishes a document), so lib/run-completion.mjs asks it for no commit evidence before `status: complete`; any other mode commits. Ceilings are measured against the current phase documents, never summed from earlier ones: smoke-token-budget.sh fails a ceiling more than 25% above the measurement.",
5
5
  "contractVersion": "2.0.0",
6
6
  "phaseSchema": 2,
7
7
  "phaseSchemaNote": "The phase vocabulary generation. metrics.jsonl is append-only and v19.0.0 renumbered the phases, so every line written from v19.0.0 on carries this number and a line without the field is generation 1. Aggregators pick their name table from it; without it phase 3 means Dev in old rows and Review in new ones and no reader can tell them apart.",
@@ -71,7 +71,15 @@
71
71
  "autopilot": true
72
72
  },
73
73
  "analysis": {
74
- "phases": [0, 1, 3, 4, 5],
74
+ "phases": [0, 1, 2, 3, 4, 5],
75
+ "names": {
76
+ "0": "Intake",
77
+ "1": "Evidence",
78
+ "2": "Synthesis",
79
+ "3": "Review",
80
+ "4": "Publish",
81
+ "5": "Report"
82
+ },
75
83
  "autopilot": false,
76
84
  "commits": false
77
85
  }