@undefineds.co/linx 0.3.4 → 0.3.7

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 (172) hide show
  1. package/README.md +58 -23
  2. package/dist/generated/version.js +1 -1
  3. package/dist/generated/version.js.map +1 -1
  4. package/dist/index.js +334 -162
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/account-session.js +4 -8
  7. package/dist/lib/account-session.js.map +1 -1
  8. package/dist/lib/ai-command.js +228 -178
  9. package/dist/lib/ai-command.js.map +1 -1
  10. package/dist/lib/auto-mode/archive.js +38 -7
  11. package/dist/lib/auto-mode/archive.js.map +1 -1
  12. package/dist/lib/auto-mode/auth.js.map +1 -1
  13. package/dist/lib/auto-mode/display.js +71 -45
  14. package/dist/lib/auto-mode/display.js.map +1 -1
  15. package/dist/lib/auto-mode/format.js +9 -7
  16. package/dist/lib/auto-mode/format.js.map +1 -1
  17. package/dist/lib/auto-mode/hooks/claude.js +12 -2
  18. package/dist/lib/auto-mode/hooks/claude.js.map +1 -1
  19. package/dist/lib/auto-mode/hooks/codex.js +17 -7
  20. package/dist/lib/auto-mode/hooks/codex.js.map +1 -1
  21. package/dist/lib/auto-mode/hooks/index.js +28 -8
  22. package/dist/lib/auto-mode/hooks/index.js.map +1 -1
  23. package/dist/lib/auto-mode/pod-ai.js +20 -37
  24. package/dist/lib/auto-mode/pod-ai.js.map +1 -1
  25. package/dist/lib/auto-mode/pod-approval.js +124 -195
  26. package/dist/lib/auto-mode/pod-approval.js.map +1 -1
  27. package/dist/lib/auto-mode/pod-persistence.js +169 -90
  28. package/dist/lib/auto-mode/pod-persistence.js.map +1 -1
  29. package/dist/lib/auto-mode/runner.js +683 -81
  30. package/dist/lib/auto-mode/runner.js.map +1 -1
  31. package/dist/lib/auto-mode/secretary.js +186 -41
  32. package/dist/lib/auto-mode/secretary.js.map +1 -1
  33. package/dist/lib/auto-mode-command.js +32 -32
  34. package/dist/lib/auto-mode-command.js.map +1 -1
  35. package/dist/lib/chat-api.js +242 -50
  36. package/dist/lib/chat-api.js.map +1 -1
  37. package/dist/lib/codex-plugin/bridge.js +164 -17
  38. package/dist/lib/codex-plugin/bridge.js.map +1 -1
  39. package/dist/lib/codex-plugin/codex-native-proxy.js +370 -34
  40. package/dist/lib/codex-plugin/codex-native-proxy.js.map +1 -1
  41. package/dist/lib/credentials-store.js +33 -42
  42. package/dist/lib/credentials-store.js.map +1 -1
  43. package/dist/lib/linx-cloud-errors.js +61 -0
  44. package/dist/lib/linx-cloud-errors.js.map +1 -0
  45. package/dist/lib/linx-tui-contract.js +8 -5
  46. package/dist/lib/linx-tui-contract.js.map +1 -1
  47. package/dist/lib/login-command.js +9 -2
  48. package/dist/lib/login-command.js.map +1 -1
  49. package/dist/lib/models.js +3 -20
  50. package/dist/lib/models.js.map +1 -1
  51. package/dist/lib/oidc-auth.js +143 -17
  52. package/dist/lib/oidc-auth.js.map +1 -1
  53. package/dist/lib/oidc-session-storage.js +2 -6
  54. package/dist/lib/oidc-session-storage.js.map +1 -1
  55. package/dist/lib/pi-adapter/auto-input-controller.js +988 -0
  56. package/dist/lib/pi-adapter/auto-input-controller.js.map +1 -0
  57. package/dist/lib/pi-adapter/backend-command.js +2 -0
  58. package/dist/lib/pi-adapter/backend-command.js.map +1 -0
  59. package/dist/lib/pi-adapter/backend-credentials.js +80 -0
  60. package/dist/lib/pi-adapter/backend-credentials.js.map +1 -0
  61. package/dist/lib/pi-adapter/branding.js +246 -108
  62. package/dist/lib/pi-adapter/branding.js.map +1 -1
  63. package/dist/lib/pi-adapter/control-state.js +72 -0
  64. package/dist/lib/pi-adapter/control-state.js.map +1 -0
  65. package/dist/lib/pi-adapter/interactive.js +2634 -30
  66. package/dist/lib/pi-adapter/interactive.js.map +1 -1
  67. package/dist/lib/pi-adapter/pod-approval.js +382 -210
  68. package/dist/lib/pi-adapter/pod-approval.js.map +1 -1
  69. package/dist/lib/pi-adapter/pod-mirror-mapping.js +71 -17
  70. package/dist/lib/pi-adapter/pod-mirror-mapping.js.map +1 -1
  71. package/dist/lib/pi-adapter/pod-mirror.js +531 -64
  72. package/dist/lib/pi-adapter/pod-mirror.js.map +1 -1
  73. package/dist/lib/pi-adapter/pod-native.js +81 -85
  74. package/dist/lib/pi-adapter/pod-native.js.map +1 -1
  75. package/dist/lib/pi-adapter/pod-status-output.js +54 -0
  76. package/dist/lib/pi-adapter/pod-status-output.js.map +1 -0
  77. package/dist/lib/pi-adapter/runtime.js +458 -228
  78. package/dist/lib/pi-adapter/runtime.js.map +1 -1
  79. package/dist/lib/pi-adapter/session-control.js +509 -0
  80. package/dist/lib/pi-adapter/session-control.js.map +1 -0
  81. package/dist/lib/pi-adapter/session.js +35 -22
  82. package/dist/lib/pi-adapter/session.js.map +1 -1
  83. package/dist/lib/pi-adapter/stream.js +89 -32
  84. package/dist/lib/pi-adapter/stream.js.map +1 -1
  85. package/dist/lib/pi-adapter/sync-recovery.js +89 -0
  86. package/dist/lib/pi-adapter/sync-recovery.js.map +1 -0
  87. package/dist/lib/pi-adapter/web-fetch.js +13 -14
  88. package/dist/lib/pi-adapter/web-fetch.js.map +1 -1
  89. package/dist/lib/pod-chat-store.js +254 -78
  90. package/dist/lib/pod-chat-store.js.map +1 -1
  91. package/dist/lib/pod-data-session.js +156 -35
  92. package/dist/lib/pod-data-session.js.map +1 -1
  93. package/dist/lib/solid-auth-store.js +27 -0
  94. package/dist/lib/solid-auth-store.js.map +1 -0
  95. package/dist/lib/solid-auth.js +2 -4
  96. package/dist/lib/solid-auth.js.map +1 -1
  97. package/dist/lib/solid-client-credentials-login.js +100 -0
  98. package/dist/lib/solid-client-credentials-login.js.map +1 -0
  99. package/dist/lib/solid-local-store.js +31 -0
  100. package/dist/lib/solid-local-store.js.map +1 -0
  101. package/dist/lib/symphony/archive.js +328 -18
  102. package/dist/lib/symphony/archive.js.map +1 -1
  103. package/dist/lib/symphony/pod-projection.js +2222 -0
  104. package/dist/lib/symphony/pod-projection.js.map +1 -0
  105. package/dist/lib/symphony-command.js +602 -178
  106. package/dist/lib/symphony-command.js.map +1 -1
  107. package/dist/lib/sync-checkpoint-store.js +74 -0
  108. package/dist/lib/sync-checkpoint-store.js.map +1 -0
  109. package/dist/skills/symphony/SKILL.md +665 -0
  110. package/package.json +15 -9
  111. package/vendor/agent-runtime/dist/agent-runtime.d.ts +137 -0
  112. package/vendor/agent-runtime/dist/agent-runtime.js +211 -0
  113. package/vendor/agent-runtime/dist/auto-mode.d.ts +78 -13
  114. package/vendor/agent-runtime/dist/auto-mode.js +288 -31
  115. package/vendor/agent-runtime/dist/control-plane.d.ts +28 -0
  116. package/vendor/agent-runtime/dist/control-plane.js +79 -0
  117. package/vendor/agent-runtime/dist/file-sync.d.ts +157 -0
  118. package/vendor/agent-runtime/dist/file-sync.js +314 -0
  119. package/vendor/agent-runtime/dist/index.d.ts +7 -0
  120. package/vendor/agent-runtime/dist/index.js +7 -0
  121. package/vendor/agent-runtime/dist/reconciler.d.ts +117 -0
  122. package/vendor/agent-runtime/dist/reconciler.js +361 -0
  123. package/vendor/agent-runtime/dist/symphony.d.ts +128 -8
  124. package/vendor/agent-runtime/dist/symphony.js +362 -57
  125. package/vendor/agent-runtime/dist/sync.d.ts +271 -0
  126. package/vendor/agent-runtime/dist/sync.js +550 -0
  127. package/vendor/agent-runtime/dist/thread-reconciler-controller.d.ts +58 -0
  128. package/vendor/agent-runtime/dist/thread-reconciler-controller.js +137 -0
  129. package/vendor/agent-runtime/dist/turn-controller.js +2 -2
  130. package/vendor/agent-runtime/dist/wake-scheduler.d.ts +67 -0
  131. package/vendor/agent-runtime/dist/wake-scheduler.js +194 -0
  132. package/vendor/agent-runtime/package.json +8 -1
  133. package/vendor/pi-web-access/CHANGELOG.md +387 -0
  134. package/vendor/pi-web-access/LICENSE +21 -0
  135. package/vendor/pi-web-access/README.md +352 -0
  136. package/vendor/pi-web-access/activity.ts +101 -0
  137. package/vendor/pi-web-access/banner.png +0 -0
  138. package/vendor/pi-web-access/chrome-cookies.ts +322 -0
  139. package/vendor/pi-web-access/code-search.ts +107 -0
  140. package/vendor/pi-web-access/curator-page.ts +3359 -0
  141. package/vendor/pi-web-access/curator-server.ts +605 -0
  142. package/vendor/pi-web-access/exa.ts +520 -0
  143. package/vendor/pi-web-access/extract.ts +641 -0
  144. package/vendor/pi-web-access/gemini-api.ts +112 -0
  145. package/vendor/pi-web-access/gemini-search.ts +361 -0
  146. package/vendor/pi-web-access/gemini-url-context.ts +126 -0
  147. package/vendor/pi-web-access/gemini-web-config.ts +52 -0
  148. package/vendor/pi-web-access/gemini-web.ts +396 -0
  149. package/vendor/pi-web-access/github-api.ts +196 -0
  150. package/vendor/pi-web-access/github-extract.ts +634 -0
  151. package/vendor/pi-web-access/index.ts +2346 -0
  152. package/vendor/pi-web-access/package.json +45 -0
  153. package/vendor/pi-web-access/pdf-extract.ts +192 -0
  154. package/vendor/pi-web-access/perplexity.ts +195 -0
  155. package/vendor/pi-web-access/pi-web-fetch-demo.mp4 +0 -0
  156. package/vendor/pi-web-access/rsc-extract.ts +338 -0
  157. package/vendor/pi-web-access/skills/librarian/SKILL.md +195 -0
  158. package/vendor/pi-web-access/storage.ts +72 -0
  159. package/vendor/pi-web-access/summary-review.ts +276 -0
  160. package/vendor/pi-web-access/test/gemini-web-cookie-opt-in.test.mjs +41 -0
  161. package/vendor/pi-web-access/test/pdf-extract.test.mjs +95 -0
  162. package/vendor/pi-web-access/utils.ts +44 -0
  163. package/vendor/pi-web-access/video-extract.ts +378 -0
  164. package/vendor/pi-web-access/youtube-extract.ts +310 -0
  165. package/dist/lib/pi-adapter/auth.js +0 -68
  166. package/dist/lib/pi-adapter/auth.js.map +0 -1
  167. package/dist/lib/pi-adapter/pod-tools.js +0 -140
  168. package/dist/lib/pi-adapter/pod-tools.js.map +0 -1
  169. package/dist/skills/drizzle-solid/SKILL.md +0 -340
  170. package/dist/skills/pod-storage/SKILL.md +0 -100
  171. package/dist/skills/solid-modeling/SKILL.md +0 -274
  172. package/dist/skills/xpod-componentsjs/SKILL.md +0 -284
@@ -0,0 +1,665 @@
1
+ ---
2
+ name: symphony
3
+ description: "LinX Symphony control-plane skill for system evolution: maintain control records, judge whether input changes existing design/work, coordinate Secretary/workers, and feed evidence back into system state."
4
+ ---
5
+
6
+ # Symphony
7
+
8
+ Use this when LinX Symphony mode is enabled, when the user says `$symphony`, when
9
+ the Codex project prompt `/symphony` is invoked, or when a coding agent is
10
+ designing, implementing, or reviewing Symphony behavior.
11
+
12
+ This skill is the single Symphony skill. It covers portable control-plane
13
+ semantics and Codex control-lane behavior. It does not require LinX Pod/xpod and
14
+ does not implement product `/symphony`, Pod persistence, backend projection, or
15
+ storage templates.
16
+
17
+ `/symphony` is only a control switch. In product runtime, the objective comes
18
+ from a normal user chat message.
19
+
20
+ ## Core Loop
21
+
22
+ Run this loop before creating work or dispatching workers:
23
+
24
+ ```text
25
+ System Situation
26
+ -> Evolution Judgment
27
+ -> Execution Control
28
+ -> Evidence Feedback
29
+ -> updated System Situation
30
+ ```
31
+
32
+ ## Runtime Boundary
33
+
34
+ Portable runtimes such as Codex or Claude Code use local Markdown/JSON control
35
+ records plus available tools. LinX runtime must store shared control-plane facts
36
+ in its modeled Pod/RDF resources. In LinX product runtime, local files are only
37
+ runtime-private logs, no-Pod recovery material, or RDF/JSON-LD mirrors pulled
38
+ from Pod; they are not an independent Symphony business schema. Do not put Pod
39
+ paths, RDF predicates, URI templates, or LinX-specific synchronization mechanics
40
+ in this skill; they belong in LinX models/adapters, not as the core Symphony
41
+ skill contract.
42
+
43
+ LinX runtime may project the same control records into Pod/xpod as authoritative state
44
+ for shared state recovery and cross-client visibility, but that projection is an
45
+ implementation detail, not as the core Symphony skill contract.
46
+
47
+ The portable Symphony runtime contract is storage-agnostic. It may produce
48
+ control records, work splits, prompts, and reports, but it does not own Pod IO.
49
+ LinX product runtime persists through shared models/repositories. A portable AI
50
+ agent may call `xpod` CLI when that tool is available, but `xpod` is an adapter
51
+ tool surface, not something the core Symphony skill or runtime module requires.
52
+
53
+ In LinX Agent Runtime, Pod authority belongs to the runtime session and should
54
+ be inherited by tools launched inside that session. If a Secretary or worker has
55
+ Pod access, `xpod` commands it runs should use the runtime-provided authority
56
+ bridge, not a separate `xpod auth login` or stale app-local/legacy auth files.
57
+ Never ask the model to handle raw tokens, refresh tokens, client secrets,
58
+ cookies, or DPoP material directly.
59
+
60
+ ## Agent Config And Skill Resources
61
+
62
+ Do not treat an agent's backend, model, credentials, tools, or skills as hidden
63
+ prompt blobs. They are managed resources with runtime snapshots.
64
+
65
+ In LinX runtime, an Agent is a resource/container. Its default runtime config is
66
+ metadata on that Agent container; skills are file or folder resources bound by
67
+ lightweight metadata. A Solid-backed implementation may use a container `.meta`
68
+ document to describe the Agent container itself, but Symphony code and prompts
69
+ must not hardcode those paths or predicates. Use shared models, repositories,
70
+ or xpod/adapters for the concrete storage shape.
71
+
72
+ Treat an Agent root as a context folder with multiple authority surfaces, not as
73
+ one merged config object. System-managed surfaces and user-managed surfaces live
74
+ under the same Agent folder. This is analogous to platform/system instructions
75
+ plus a repository `AGENTS.md`: both are loaded into runtime context, but they
76
+ remain separate sources of truth. Do not describe this as a field-level overlay
77
+ that rewrites the system package or user personalization into one blob.
78
+
79
+ The default Secretary Agent key is the system-reserved `__secretary__`.
80
+ The default Secretary Chat may use the same reserved key under the Chat
81
+ resource base, for example `/.data/chat/__secretary__/index.ttl#this`; this
82
+ does not make the Chat resource an Agent identity. Durable Agent, Skill,
83
+ maker/actor, grant-recipient, and runtime snapshot identity should use the
84
+ `/agents/__secretary__/` container resource. Do not treat `.meta` as the Agent
85
+ identity, and do not introduce non-reserved Secretary slugs.
86
+
87
+ Agent root and Agent identity are separate:
88
+
89
+ - The Agent root is the configuration/resource container.
90
+ - An Agent WebID is needed only when the AI acts as an auditable actor,
91
+ requester, maker, grant recipient, credential holder, or authorization
92
+ subject.
93
+ - Ordinary Skills, Issues, Tasks, Runs, Evidence, Reports, and files use their
94
+ own resource URIs; they do not become WebIDs.
95
+
96
+ Skill content is file-backed. Skill metadata may record enabled state, version,
97
+ source, checksum, load policy, dependencies, and relations, but it must not
98
+ duplicate the full skill text in RDF or runtime config. Agent-scoped skill
99
+ resources are bindings/installations; external or reusable skills are referenced
100
+ through source/version/checksum/root and may be materialized locally per Agent.
101
+ Secretary and workers should refer to configured skill resources and loaded skill versions rather than
102
+ assuming a skill is just an invisible system-prompt section.
103
+
104
+ For the default Secretary, system-managed surfaces include the installed
105
+ Secretary package, built-in skill bindings, migration records, capability
106
+ envelope, and default policy pointers. User-managed surfaces include
107
+ `AGENTS.md`, preferences, user-installed skills, grants, memory policy, and
108
+ forked skill bindings. Upgrades may mutate system-managed surfaces only.
109
+ User-managed surfaces survive upgrades unless the user explicitly accepts a
110
+ migration or edits them. If a system skill is customized, represent it as a
111
+ user-managed fork or override binding with its own source/version/checksum.
112
+
113
+ Runtime startup resolves the Agent default config plus launch/session
114
+ overrides, projects the Agent folder in authority order, then freezes the
115
+ effective backend, model, credential source, skill set, loaded system package
116
+ version, user surface revisions, skill checksums, and authority/tool policy into
117
+ Session/Run metadata. Resume should use that snapshot by default. A different
118
+ backend/model/credential source means a new runtime session or an explicit
119
+ override record, not silent mutation of an old run's meaning.
120
+
121
+ ## Control Lane
122
+
123
+ When Symphony is active in Codex:
124
+
125
+ - The main thread discusses requirements, system situation, design, steering,
126
+ acceptance, and final reports with the user.
127
+ - The main thread updates the relevant control record before non-trivial
128
+ implementation delegation.
129
+ - The main thread owns integration, review, closure, and evidence feedback.
130
+ - Implementation and test-writing should be delegated to bounded workers when a
131
+ suitable worker surface is available.
132
+ - If no worker surface is available, simulate the mode locally and say that full
133
+ delegation is unavailable.
134
+
135
+ ## Control Records
136
+
137
+ Treat Symphony docs as control records, not essays. Keep them readable for
138
+ humans and stable enough for agents to bind work, compare state, and append
139
+ evidence without reconstructing truth from chat.
140
+
141
+ Useful headings:
142
+
143
+ - Status
144
+ - Scope
145
+ - Current Truth
146
+ - Active Work
147
+ - Release Boundary
148
+ - Compatibility Impact
149
+ - Evidence
150
+ - Open Questions
151
+ - Next Step
152
+ - Related Docs
153
+
154
+ Keep current truth separate from history. Put rejected alternatives, stale
155
+ notes, and superseded decisions under explicit headings.
156
+
157
+ Do not keep parallel truth copies. A repository document may summarize or link
158
+ to a control state, but the authoritative state field must live in exactly one
159
+ control record. If a local summary is needed for readability, label it as a
160
+ projection and include the source record and revision or timestamp.
161
+
162
+ Steering does not bypass the control record. When a new message changes active
163
+ work, update the relevant control record first, then deliver the resulting
164
+ delta to workers as a bounded steer, restart, cancellation, or follow-up. Do not
165
+ push raw chat into a worker as hidden scope change.
166
+
167
+ Steering deltas are navigation, not authority. Include the updated record path,
168
+ revision or timestamp when available, changed sections, superseded assumptions,
169
+ and required action. If scope, acceptance, release boundary, compatibility,
170
+ privacy, authority, or blocker rules changed, tell the worker to reread the
171
+ affected authoritative sections before continuing.
172
+
173
+ ## State And Ownership
174
+
175
+ Distinguish these axes instead of collapsing everything into one status:
176
+
177
+ - system state: existing, partial, verified, known-broken, deprecated, stale, or
178
+ superseded;
179
+ - work state: drafting, ready, running, blocked, reviewing, completed, failed,
180
+ or cancelled;
181
+ - roadmap state: candidate, planned, deferred, rejected, or superseded;
182
+ - compatibility impact: compatible, behavior_change, breaking, or
183
+ migration_required.
184
+
185
+ Every mutable state field needs a primary writer:
186
+
187
+ - User owns intent, authority, and final acceptance input.
188
+ - Secretary or main control lane owns System Situation, Evolution Judgment, Spec
189
+ state, Work split/assignment, acceptance, compatibility impact, release
190
+ boundary, and closure.
191
+ - Worker owns progress, observed implementation facts, feasibility findings,
192
+ blockers, Implementation Change Requests, and evidence for assigned Work.
193
+ - Runtime/controller owns Run lifecycle and tool/runtime events.
194
+ - Reviewer/verifier owns findings and verification evidence.
195
+
196
+ Resource boundaries:
197
+
198
+ - Message is an immutable utterance or event, not automatically an Issue.
199
+ - Idea is a lightweight candidate extracted from one or more Messages. It is
200
+ not a requirement, decision, Issue, or Task until promoted.
201
+ - Spec holds desired system change, rationale, non-goals, acceptance, and
202
+ compatibility impact.
203
+ - Work/Task is a bounded execution slice.
204
+ - Run is one execution attempt.
205
+ - Delivery is a proposed result package, not accepted truth.
206
+ - Evidence is append-only proof or finding.
207
+ - ReleasePlan is a rolling publish boundary: what is safe to ship now, what
208
+ remains open after release, and what evidence/status must be updated before
209
+ publishing.
210
+
211
+ Chat, Run state, and Delivery have different jobs:
212
+
213
+ - Chat is the low-latency interaction channel between Secretary and a worker.
214
+ It is for clarification, steering, small decisions, and work-in-progress
215
+ coordination.
216
+ - Run state is the scheduler truth. When a worker asks for input, that Run is
217
+ `waiting_input`; if Secretary cannot resolve it, the owning Task/Issue may
218
+ become `blocked`. The system may continue other work instead of pretending
219
+ the worker is still running.
220
+ - Delivery is the stage boundary. It packages proposed results, patches,
221
+ artifacts, verification, risks, and final reports. It is not ordinary chat and
222
+ not accepted truth by itself.
223
+ - Chat must not replace state. Any chat exchange that changes scope,
224
+ acceptance, compatibility, release boundary, authority, or lifecycle state
225
+ must be reflected in the control record.
226
+ - Delivery must not replace chat. Do not force every small clarification into a
227
+ delivery packet when an interactive worker session is available.
228
+
229
+ If a role needs to change state it does not own, it writes a proposal, finding,
230
+ or Implementation Change Request instead of mutating the authoritative field.
231
+
232
+ Prevent split-brain documentation with field-level ownership:
233
+
234
+ - One mutable fact has one authoritative field and one primary writer.
235
+ - Workers may append execution facts, evidence, delivery notes, and scoped
236
+ implementation documentation, but they do not close work or redefine
237
+ acceptance by writing another document.
238
+ - Secretary/control lane merges worker facts into Issue/Spec/Task status only
239
+ after checking evidence, current revision, and acceptance.
240
+ - Repo docs may explain implementation state, but they must not become a second
241
+ task tracker. Link to the control record instead of duplicating lifecycle
242
+ truth.
243
+
244
+ In LinX runtime, the MVP default is that workers do not directly access Pod.
245
+ Secretary/control lane gives workers a task brief or control-record snapshot,
246
+ and workers return progress, blockers, Evidence, Delivery reports, and
247
+ Implementation Change Requests for Secretary/control lane to persist. Direct
248
+ worker Pod read or restricted write is an explicit granted capability; when
249
+ granted, the write surface is still limited to execution facts such as
250
+ Run/RunStep, progress, blockers, Evidence, Delivery reports, and Implementation
251
+ Change Requests. Workers do not directly close Issues, change acceptance,
252
+ rewrite Spec truth, change roadmap/release boundaries, or create grants.
253
+ Structured Pod data must be read/written via shared models/ORM; do not invent
254
+ raw TTL patches or Pod paths inside the skill. LinX product projection should
255
+ expose this worker access policy on assigned Task/Delivery/Run/session metadata
256
+ so UI, Secretary, and runtime adapters enforce the same boundary instead of
257
+ relying on prompt text alone.
258
+
259
+ Pod and repository docs have different authority. In LinX runtime, Pod
260
+ Issue/Spec/Task records are the control authority for state, scope, acceptance,
261
+ split, ownership, closure, and cross-client coordination. Repository docs are
262
+ the implementation authority for code-adjacent design, behavior, tests,
263
+ examples, migration details, and file-level evidence. Repo work briefs or
264
+ implementation docs may link to Pod Issue/Spec/Task URIs, but they must not
265
+ become a second Issue truth. If implementation evidence contradicts the Pod
266
+ control record, workers write an Implementation Change Request and the control
267
+ lane updates Pod plus repo docs.
268
+
269
+ ## Idea Capture
270
+
271
+ Use Idea as the buffer between fragmented conversation and committed system
272
+ work.
273
+
274
+ When Symphony is active, capture meaningful but uncommitted fragments as Ideas
275
+ when they describe a possible system direction, concern, product capability,
276
+ modeling principle, or improvement area. Do not capture ordinary chat, games,
277
+ or one-off explanations.
278
+
279
+ An Idea record should stay small and explicit:
280
+
281
+ - summary;
282
+ - source messages or source event references;
283
+ - affected area;
284
+ - status: captured, exploring, candidate, promoted, deferred, rejected, or
285
+ superseded;
286
+ - commitment: thought, direction, tentative_decision, or committed;
287
+ - current understanding;
288
+ - open questions;
289
+ - related records;
290
+ - conflicts;
291
+ - next step.
292
+
293
+ Promotion gates:
294
+
295
+ - Promote Idea to Requirement Candidate only after the problem, area, value,
296
+ current understanding, and open questions are explicit.
297
+ - Promote to Spec only after expected behavior, scope, compatibility impact,
298
+ acceptance, and commitment are explicit.
299
+ - Promote to Work/Task only after implementation boundary, evidence plan, and
300
+ blocker rules are explicit.
301
+
302
+ Symphony may automatically capture and merge Ideas, but it must not
303
+ automatically treat an Idea as committed product semantics or dispatchable work.
304
+ If commitment is unclear, keep it as `thought` or `candidate` and continue
305
+ discussion.
306
+
307
+ ## Sufficiency And Escalation
308
+
309
+ Default to AI judgment inside the current control boundary. It is sufficient to
310
+ proceed without asking when the input binds to one active object, the acting role
311
+ owns the state being changed, acceptance/evidence can be derived from current
312
+ records, and the action is reversible or non-destructive.
313
+
314
+ Escalation is necessary only when missing information belongs to another owner
315
+ and cannot be safely inferred. Workers escalate to Secretary/control lane first.
316
+ The control lane asks the user only for user-owned intent, authority, privacy,
317
+ credentials, destructive permission, or final acceptance.
318
+
319
+ Do not ask the user to decide ordinary implementation details, routine evidence
320
+ choices, obvious duplicate binding, or release bookkeeping.
321
+
322
+ ## Control Gates
323
+
324
+ Control gates are internal decision points. Users do not need to name them.
325
+ Secretary and workers must recognize them when normal execution cannot safely
326
+ continue on the current path.
327
+
328
+ Use the smallest sufficient gate set:
329
+
330
+ - `binding`: decide whether input is ordinary chat, an Idea, a new Issue, a bug,
331
+ or a change to existing work.
332
+ - `change`: decide whether active scope, acceptance, compatibility, release
333
+ boundary, or base revision has changed enough to rebase, steer, restart,
334
+ cancel, split, or supersede work.
335
+ - `feasibility`: decide whether the assigned plan still can be implemented
336
+ under current constraints. Workers may trigger this gate; Secretary/control
337
+ lane resolves it.
338
+ - `authority`: decide whether user-owned authority, credentials, privacy,
339
+ approval, grant, destructive permission, or external production access is
340
+ required.
341
+ - `quality`: decide whether evidence is sufficient or the work needs fixes,
342
+ review, retry, or more tests.
343
+ - `acceptance`: decide whether a Delivery can be accepted, rejected, partially
344
+ accepted, reopened, or turned into follow-up work.
345
+
346
+ A gate is not a chat message, Delivery, or mode. Record it only when it changes
347
+ the control path: a control-record update, Run/Task status transition,
348
+ Implementation Change Request, Approval/InputRequest, Evidence, Report, or
349
+ Delivery decision. If it does not change execution or authority, keep it as
350
+ ordinary discussion or evidence.
351
+
352
+ Default ownership:
353
+
354
+ - Secretary/control lane resolves binding, change, feasibility, quality, and
355
+ acceptance gates when current records and evidence are sufficient.
356
+ - Workers report feasibility, quality, blocker, and change signals; they do not
357
+ resolve gates that alter scope, acceptance, authority, release boundary, or
358
+ closure.
359
+ - The human user is asked only for gates that require user-owned intent,
360
+ authority, privacy, credentials, destructive permission, or final acceptance.
361
+
362
+ ## Evolution Judgment
363
+
364
+ For each meaningful user message or system event, bind it before turning it into
365
+ work:
366
+
367
+ - `ordinary_message`: conversation, explanation, game play, or casual chat. Keep
368
+ it as Message; do not create an Issue.
369
+ - `new_concern`: new system concern or capability direction.
370
+ - `update_existing`: change to an existing capability, Spec, Issue, Task, or
371
+ active execution.
372
+ - `steering`: correction while work is in progress.
373
+ - `bug_or_regression`: observed behavior conflicts with expected system state.
374
+ - `conflict`: request would break current product/system semantics.
375
+ - `duplicate`: already covered by open concern or active work.
376
+ - `defer`: should wait until active branch/spec lands.
377
+ - `ask`: binding, authority, target, visibility, or acceptance is ambiguous.
378
+
379
+ If a new requirement arrives while work is active, diff it against the active
380
+ record first:
381
+
382
+ - same intended outcome with narrower detail: update acceptance/context;
383
+ - changed intended outcome: steer or restart work when it changes the intended
384
+ outcome;
385
+ - incompatible with current semantics: mark conflict or breaking impact;
386
+ - unrelated future direction: capture as roadmap candidate/deferred work;
387
+ - duplicate of existing work: link it and avoid dispatching a second task.
388
+
389
+ Then consider whether the ReleasePlan is still coherent. Symphony does not
390
+ manage AI work by human-style time boxes or work-hour estimates. AI can keep
391
+ working and release continuously, but each release checkpoint needs a clear
392
+ publish boundary, explicit evidence, and status feedback.
393
+
394
+ The release tradeoff is whether to keep working or close and publish the
395
+ verified part now. Consider how much more work remains, whether remaining work
396
+ is uncertain or risky, and whether completed work already satisfies an urgent
397
+ coherent need. Prefer closing a verified release and leaving the rest open when
398
+ the completed part is independently valuable.
399
+
400
+ ## Execution Control
401
+
402
+ Create Issue/Task/Delivery/Session/Run objects only when they help control work.
403
+
404
+ Before dispatching workers for non-trivial work, ensure this chain exists or can
405
+ be represented:
406
+
407
+ ```text
408
+ Spec -> Work -> Status -> Evidence
409
+ ```
410
+
411
+ Workers should receive a stable control record or task brief to follow, not raw
412
+ conversation as scope. Each worker task needs one owner, one objective, concrete
413
+ acceptance, source context, workspace/resource boundaries, dependencies,
414
+ blocker conditions, and instructions to report blockers to Secretary/control
415
+ lane rather than asking the human user directly.
416
+
417
+ Every worker handoff must identify the source record and base revision. A
418
+ worker result based on an old revision is still useful evidence, but it must not
419
+ be merged directly into current control state until Secretary/control lane
420
+ rebases it against the latest record.
421
+
422
+ Symphony separates three spaces, but it does not force every space to split the
423
+ same way:
424
+
425
+ - Control space is shared. Secretary, workers, UI, and runtime adapters refer to
426
+ the same Issue, Spec, Task, Delivery, Session, Run, and Evidence records.
427
+ - Runtime session topology is explicit. A worker may collaborate in the same
428
+ conversation/work room as Secretary, or may run in a separate backend session
429
+ reached by runtime input projection or control events. Do not assume one
430
+ topology from the other.
431
+ - Workspace belongs to a Thread, not to an Agent. One independent Thread may
432
+ have one worker and its own worktree. If three AIs are collaborating in the
433
+ same Thread, they should normally share the same workspace so their edits,
434
+ tests, and evidence are coherent. Different Threads may use separate
435
+ worktrees when isolation or conflict control requires it.
436
+
437
+ Worker workspaces are environment-scoped. A worker's workspace is wherever that
438
+ worker runtime is executing: local shell, remote container, Codex, Claude Code,
439
+ CodeBuddy, cloud runner, or another runtime. Workers assigned to the same
440
+ Thread in the same environment should share the same workspace unless isolation
441
+ is explicitly required. The boundary is portability, not exclusivity: do not
442
+ assume Secretary, the user, or sibling workers in other environments can see the
443
+ same absolute path. Align cross-environment file work through control object
444
+ URIs, environment identity, workspace identity, repo-relative paths plus base
445
+ revision, checksums/etags, patch/artifact URIs, and evidence. Workers write in
446
+ their assigned workspace and report patches, artifacts, changed files, base
447
+ revision, and verification; the control lane decides how to apply or replay
448
+ results elsewhere.
449
+
450
+ Do not require fixed worker roles at the start. Use one bounded owner for one
451
+ coherent Work item by default. Role-based worker dispatch is a future LinX
452
+ runtime capability; when implemented, roles should be execution profiles
453
+ selected from contacts or created as AI contacts, and they bind to Work rather
454
+ than splitting Spec by themselves.
455
+
456
+ Interactive worker sessions do not need a Delivery tool for every blocker. When
457
+ Secretary launches or manages the worker session, the worker-facing `user`
458
+ input is a Secretary-controlled projection. If the worker lacks information,
459
+ authority, or a decision, it may ask in that conversation directly; Secretary
460
+ answers from the control record, updates the control record, steers the worker,
461
+ or escalates to the human user when the missing decision belongs to the user.
462
+ Delivery remains the channel for proposed result packages, async handoff,
463
+ artifacts, and final reports, not the required path for ordinary interactive
464
+ clarification.
465
+
466
+ Thread messages and LLM inputs are different layers. A Message records who said
467
+ what in a Thread. Backend `system/user/assistant/tool` inputs are runtime
468
+ projections derived from Thread facts and control records. If Secretary speaks
469
+ on behalf of the user, record Secretary as the maker/source in the Thread and
470
+ let the runtime adapter project that intent into the backend-required role.
471
+ Do not ask workers to fabricate user-authored chat messages just because the
472
+ backend protocol needs a `user` input.
473
+
474
+ Group coordination goes through Thread reconciliation, not direct member
475
+ wakeups:
476
+
477
+ - Chat is the long-lived groupable collaboration surface. Thread is the
478
+ concrete observable work site under a Chat.
479
+ - Messages, control events, Delivery submissions, Inbox items, approvals, and
480
+ schedule ticks are appended to a Thread first.
481
+ - A Reconciler observes Thread state, classifies and deduplicates events,
482
+ applies Thread policy, and creates or skips WakeJobs.
483
+ - A Scheduler runs selected agent runtimes from WakeJobs. Agents append their
484
+ outputs back to the Thread.
485
+ - Secretary is an in-Thread agent role, not the program controller. The
486
+ Reconciler may wake Secretary; Secretary then performs semantic judgment.
487
+ - Worker tools may submit structured events such as `input.required`,
488
+ `approval.required`, `worker.blocked`, `change.requested`, or
489
+ `delivery.submitted`, but those events still go through Reconciler/Scheduler.
490
+ - `auto` and Symphony worker Threads use the same path: input, approval, or
491
+ blocker events wake the same-Thread Secretary first; unresolved requests stay
492
+ pending in Inbox/control state for the human or higher-level Secretary.
493
+ - Inbox is the ledger for input and approval lifecycle, including requests that
494
+ Secretary resolved automatically.
495
+ - Delivery is a stage/result package, not generic message transport. Ordinary
496
+ questions, answers, steering, and checkpoints remain Messages.
497
+ - Schedules are event sources. A schedule tick is appended to a stable schedule
498
+ main Thread and may split a child execution Thread only when work is noisy,
499
+ long-running, worker-owned, or needs separate review.
500
+
501
+ ## Worker Protocol
502
+
503
+ Worker-facing minimum contract:
504
+
505
+ - Treat the worker-facing `user` input as Secretary-controlled unless the task
506
+ brief explicitly says a human is speaking directly.
507
+ - Read the assigned control record or task brief before implementation.
508
+ - Keep ordinary clarification in chat with Secretary.
509
+ - When waiting on Secretary or user-owned authority, report the blocker and
510
+ allow the Run to become `waiting_input`; unresolved work may move the Task or
511
+ Issue to `blocked`.
512
+ - Use Delivery only for stage results, async handoff, artifacts, proposed
513
+ patches, verification evidence, and final reports.
514
+ - Never use chat, Delivery, or repo docs to redefine scope, acceptance,
515
+ compatibility, lifecycle state, or release boundary. Write an Implementation
516
+ Change Request instead.
517
+
518
+ Workers must perform an implementation feasibility recheck before committing to
519
+ execution. This is where downstream work can discover that upstream judgment was
520
+ wrong, incomplete, or too broad.
521
+
522
+ If the plan cannot be fully implemented under the current control record, the
523
+ worker must not silently downgrade acceptance or ship a partial substitute.
524
+ Write an Implementation Change Request with:
525
+
526
+ - the failed upstream assumption;
527
+ - evidence from code, tests, logs, runtime behavior, or dependency inspection;
528
+ - what can be completed safely, if anything;
529
+ - recommended next shape: split, redesign, defer, spike/report, reduce scope, or
530
+ request missing authority;
531
+ - the smallest coherent verified increment if partial progress is useful.
532
+
533
+ Workers may stop at the smallest coherent verified increment only when it still
534
+ satisfies current acceptance or the control lane has revised acceptance.
535
+ Otherwise the correct outcome is blocked/change-request, not incomplete work
536
+ presented as done.
537
+
538
+ Workers keep execution-facing documentation current while they work. They may
539
+ update progress, implementation notes within assigned scope, verification
540
+ evidence, blockers, risks, failed approaches, dependency waits, and proposed
541
+ adjustments. They must not silently update product semantics, acceptance,
542
+ compatibility impact, authority/privacy/visibility decisions, task scope,
543
+ ownership, or split strategy.
544
+
545
+ Worker documentation updates must be either append-only evidence or scoped
546
+ patches to the implementation surface they changed. If a needed documentation
547
+ change would alter scope, acceptance, compatibility, lifecycle state, or release
548
+ boundary, the worker writes an Implementation Change Request and waits for the
549
+ control lane to update the authoritative record.
550
+
551
+ ## Worker Closure And Attempts
552
+
553
+ Do not collapse worker completion, integration, and release into one `done`
554
+ state. A worker thread is a work room and may be reopened or followed up later;
555
+ the terminal object is the current Run, Delivery, or Task decision.
556
+
557
+ Use this minimum lifecycle:
558
+
559
+ - `Run completed`: the worker runtime attempt ended without waiting on more
560
+ input. This does not mean the task is accepted.
561
+ - `Delivery submitted`: the worker packaged a final report, patches/artifacts,
562
+ verification evidence, risks, and remaining work.
563
+ - `Delivery accepted`: Secretary/control lane checked the Delivery against
564
+ acceptance and recorded accepted, rejected, partially accepted, follow-up, or
565
+ reopened.
566
+ - `integrated`: the accepted result has been merged, applied, or otherwise
567
+ verified in the target workspace. If the worker already acted in the target
568
+ workspace, record integration as verified rather than inventing a merge step.
569
+ - `released`: the integrated result entered a release boundary. Release is only
570
+ required when acceptance explicitly includes publishing, packaging, deploy, or
571
+ user-visible availability.
572
+
573
+ Worker closure is therefore:
574
+
575
+ ```text
576
+ no active Run
577
+ + latest Delivery is final
578
+ + Secretary/control lane has recorded an acceptance/rejection/follow-up decision
579
+ ```
580
+
581
+ Do not require release for every worker. Do require Secretary/control lane
582
+ acceptance before closing a Task as completed. User acceptance is required only
583
+ for user-owned intent, product semantic approval, destructive authority,
584
+ external production access, long-lived grants, or final release acceptance
585
+ unless an existing auto policy or grant covers it.
586
+
587
+ Repeated failed attempts must be recorded without creating duplicate Tasks.
588
+
589
+ - `RunStep` records each attempt fact: action tried, environment, command/tool,
590
+ result, error summary, log/artifact pointer, and timestamp.
591
+ - `Evidence` records reusable findings distilled from attempts: failed
592
+ approach, constraint, dependency behavior, blocker, or proof.
593
+ - `ImplementationChangeRequest` records the worker's conclusion that the
594
+ current plan or acceptance cannot be completed as written.
595
+ - `Report` summarizes the attempt history, final result, unresolved risks, and
596
+ recommended next action.
597
+
598
+ Use URI relations for traceability and duplicate avoidance, not filesystem
599
+ symlinks or transcript scanning. A next worker should be able to query relevant
600
+ findings before repeating work:
601
+
602
+ ```text
603
+ RunStep -> run
604
+ RunStep -> task
605
+ RunStep -> delivery
606
+ Evidence -> sourceRunStep
607
+ Evidence -> subject
608
+ Evidence -> blocks / invalidates / supports / recommends
609
+ ImplementationChangeRequest -> basedOn Evidence[]
610
+ Report -> evidence[]
611
+ Delivery -> report
612
+ ```
613
+
614
+ If a failed attempt exposed an independent product bug or future concern, link
615
+ or promote it through Idea/Issue binding. Otherwise keep it as RunStep/Evidence
616
+ under the current work so the system learns without multiplying issues.
617
+
618
+ ## Evidence Feedback
619
+
620
+ Completion is not a worker saying "done". Accept completion only when evidence
621
+ satisfies the intended system change.
622
+
623
+ For non-trivial implementation, Design, Implementation, Tests, Examples, Docs,
624
+ and Evidence should describe the same capability semantics. Accepted work must
625
+ update the relevant control record status and evidence so future workers do not
626
+ need to reconstruct truth from transcript.
627
+
628
+ After execution, update:
629
+
630
+ - what changed;
631
+ - which control record changed and its new status;
632
+ - what remains open;
633
+ - what was confirmed or rejected;
634
+ - what is now stale or superseded;
635
+ - which follow-up should happen next.
636
+
637
+ ## Measurement
638
+
639
+ Record observable events that let later agents judge whether Symphony worked:
640
+ input classification, control-record updates, dispatch/steering, worker
641
+ blockers, Implementation Change Requests, delivery acceptance/rejection,
642
+ release-boundary changes, reopened work, and missing evidence. Metrics events
643
+ must point to control records, runs, deliveries, and evidence; do not duplicate
644
+ raw transcripts, prompts, secrets, or private worker context into metrics.
645
+
646
+ ## Hard Rules
647
+
648
+ - Do not treat every Symphony-mode chat message as an Issue.
649
+ - Do not treat `/symphony` slash arguments as an objective.
650
+ - Do not create work before binding the input to the relevant system object.
651
+ - Do not dispatch workers before updating the relevant control record enough for
652
+ bounded execution.
653
+ - Do not steer active workers through unrecorded chat context.
654
+ - Do not treat breaking changes as ordinary status changes.
655
+ - Do not invent Pod paths, RDF predicates, URI templates, or shared model fields.
656
+ - Do not use runtime Session as Chat.
657
+ - Do not treat worker self-report as sufficient completion evidence.
658
+ - Do not read sibling worker transcripts unless Secretary includes them in a
659
+ Delivery.
660
+
661
+ ## Exit
662
+
663
+ If the user asks to leave Symphony mode, return to normal behavior. Do not keep
664
+ applying the control-lane rule across future turns unless Symphony is explicitly
665
+ active or the user asks to continue it.