@zq-silk/yui 0.15.7 → 0.15.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +194 -399
- package/ARCHITECTURE.zh-CN.md +151 -0
- package/README.md +306 -1131
- package/dist/agent/adapterCatalog.js +15 -2
- package/dist/agent/agent.js +23 -3
- package/dist/agent/argumentPolicy.js +7 -1
- package/dist/agent/connectionPlan.js +62 -0
- package/dist/agent/executionComponents.js +158 -0
- package/dist/agent/launchEnvironment.js +31 -3
- package/dist/agent/managedRuntimeEnvironment.js +3 -5
- package/dist/{turn/turn.js → agentRun/agentRun.js} +166 -109
- package/dist/{turn/turnIdentity.js → agentRun/runIdentity.js} +4 -4
- package/dist/artifacts/artifactCapability.js +74 -0
- package/dist/artifacts/artifactCommitLock.js +249 -0
- package/dist/artifacts/artifactPaths.js +151 -0
- package/dist/artifacts/gitArtifactRef.js +146 -0
- package/dist/artifacts/managedGit.js +332 -0
- package/dist/artifacts/taskArtifactRepository.js +277 -0
- package/dist/brief/taskBrief.js +12 -0
- package/dist/cli/agentConfigurationPicker.js +13 -0
- package/dist/cli/commandCatalog.js +165 -74
- package/dist/cli/interactionCandidates.js +5 -5
- package/dist/cli/interactionPolicy.js +38 -8
- package/dist/cli/invocationRouter.js +1 -1
- package/dist/cli/managedDiagnostics.js +28 -0
- package/dist/cli/operatorWizard.js +1 -7
- package/dist/cli/roleOptionOrder.js +27 -0
- package/dist/cli/roleWizard.js +50 -14
- package/dist/cli/updateOrchestrator.js +1 -1
- package/dist/cli/updatePorts.js +3 -4
- package/dist/cli.js +245 -95
- package/dist/commands/agentCommands.js +72 -14
- package/dist/commands/capabilityCommands.js +9 -6
- package/dist/commands/configCommands.js +20 -20
- package/dist/commands/deliveryGuardPreflight.js +2 -2
- package/dist/commands/executionAuditCommands.js +24 -24
- package/dist/commands/globalRoleCommands.js +1 -1
- package/dist/commands/grantCommands.js +4 -4
- package/dist/commands/operatorCommands.js +34 -9
- package/dist/commands/projectCommands.js +4 -4
- package/dist/commands/resourcesCommands.js +2 -2
- package/dist/commands/roleConfiguration.js +25 -5
- package/dist/commands/roleRuntimeGuard.js +4 -5
- package/dist/commands/sessionCommands.js +3 -7
- package/dist/commands/taskActivationCommands.js +281 -0
- package/dist/commands/taskActor.js +28 -49
- package/dist/commands/taskCommands.js +1461 -720
- package/dist/commands/taskContextCommand.js +39 -583
- package/dist/commands/taskExecutionCommands.js +32 -32
- package/dist/commands/taskInputCommands.js +40 -104
- package/dist/commands/taskIntegrationCommands.js +3 -2
- package/dist/commands/taskIntegrationQueueCommands.js +1 -1
- package/dist/commands/taskNextActionCommand.js +8 -8
- package/dist/commands/taskOverviewCommand.js +33 -45
- package/dist/commands/taskRemoteDeliveryCommand.js +2 -2
- package/dist/commands/taskRoleRuntimeStatus.js +133 -102
- package/dist/commands/telemetryCommands.js +36 -38
- package/dist/config/configCatalog.js +4 -4
- package/dist/config/yuiConfig.js +8 -8
- package/dist/context/contextSnapshot.js +10 -10
- package/dist/context/dispatchContext.js +11 -11
- package/dist/context/roleSessionContext.js +6 -3
- package/dist/context/{turnContextPack.js → runContextPack.js} +158 -81
- package/dist/context/{turnInputContract.js → runInputContract.js} +73 -60
- package/dist/context/sessionBootstrapManifest.js +21 -2
- package/dist/context/sourceRunContext.js +30 -0
- package/dist/context/taskContext.js +481 -0
- package/dist/context/wakeNotification.js +27 -27
- package/dist/controller/agentRuntimeObserver.js +21 -24
- package/dist/controller/capabilityBridge.js +17 -6
- package/dist/controller/clientRuntime.js +65 -92
- package/dist/controller/controller.js +120 -188
- package/dist/controller/fileSchedulerStoreAdapter.js +787 -887
- package/dist/controller/jobControl.js +54 -85
- package/dist/controller/resourceInventory.js +8 -27
- package/dist/controller/resourceInventoryLinux.js +12 -13
- package/dist/controller/runtime.js +529 -479
- package/dist/controller/runtimeEventInbox.js +55 -25
- package/dist/controller/runtimeEventProcessor.js +22 -31
- package/dist/controller/{runtimeHookTurnFence.js → runtimeHookRunFence.js} +91 -115
- package/dist/controller/runtimeLaunchCoordinator.js +80 -426
- package/dist/controller/runtimeObservationHook.js +14 -18
- package/dist/controller/sessionNotify.js +16 -24
- package/dist/controller/sessionOwnerReconciliation.js +168 -50
- package/dist/controller/structuredProviderObservation.js +138 -99
- package/dist/coordination/workMailbox.js +3 -3
- package/dist/coordination/workMailboxQueue.js +36 -33
- package/dist/core/boundedRpc.js +8 -1
- package/dist/core/controllerClient.js +20 -1
- package/dist/core/controllerServer.js +4 -4
- package/dist/doctor/doctor.js +13 -2
- package/dist/domain/agentResultTransport.js +9 -9
- package/dist/execution/codexThreadNaming.js +2 -8
- package/dist/execution/executionHealth.js +51 -63
- package/dist/execution/reviewMainRun.js +137 -0
- package/dist/execution/workItemExecution.js +28 -29
- package/dist/execution/workItemExecutionProjection.js +99 -107
- package/dist/execution/workItemMainRun.js +141 -0
- package/dist/executor/agentAdapter.js +227 -20
- package/dist/executor/agentConfigurationCatalog.js +126 -4
- package/dist/executor/agentConfigurationProbe.js +162 -4
- package/dist/executor/agentExecutor.js +79 -78
- package/dist/executor/effectiveLaunch.js +105 -18
- package/dist/executor/executorRegistry.js +29 -44
- package/dist/executor/fileRoleLaunchPlanner.js +229 -154
- package/dist/executor/workspacePreflightClassification.js +16 -16
- package/dist/grant/capabilityGrant.js +6 -3
- package/dist/input/inputRequest.js +12 -10
- package/dist/integration/gitIntegrationService.js +4 -11
- package/dist/integration/integrationQueueService.js +4 -4
- package/dist/interaction/operatorPresentation.js +1 -1
- package/dist/kernel/builtinCapabilities.js +255 -12
- package/dist/kernel/capabilityRegistry.js +64 -18
- package/dist/kernel/instanceHost.js +12 -1
- package/dist/kernel/kernelPorts.js +2 -2
- package/dist/lifecycle/canonicalLifecycleEvent.js +44 -49
- package/dist/lifecycle/exactRunTerminalization.js +449 -0
- package/dist/message/message.js +118 -6
- package/dist/message/messageContinuation.js +204 -0
- package/dist/observability/executionAudit.js +70 -72
- package/dist/observability/faultClassification.js +2 -2
- package/dist/observability/orchestrationMetrics.js +8 -8
- package/dist/operator/operatorSessionHistory.js +1 -7
- package/dist/output/agentConfigurationPresentation.js +8 -3
- package/dist/output/agentRunConfigurationPresentation.js +128 -0
- package/dist/output/rolePresentation.js +54 -3
- package/dist/plugins/pluginChild.js +104 -0
- package/dist/plugins/pluginIntent.js +26 -0
- package/dist/plugins/pluginInterpreter.js +43 -0
- package/dist/plugins/pluginPackage.js +101 -0
- package/dist/plugins/pluginProcess.js +112 -0
- package/dist/plugins/pluginService.js +388 -0
- package/dist/profile/agentProfile.js +1 -1
- package/dist/repository/gitWorkspace.js +26 -4
- package/dist/repository/project.js +19 -4
- package/dist/repository/taskBaseFreshness.js +13 -13
- package/dist/repository/taskWorkspaceCoordinator.js +20 -27
- package/dist/repository/taskWorkspacePreparer.js +344 -83
- package/dist/resources/autoResourceGc.js +3 -3
- package/dist/resources/liveReferences.js +3 -3
- package/dist/resources/projectResource.js +75 -0
- package/dist/resources/projectResourceService.js +343 -0
- package/dist/resources/resourceDiscovery.js +6 -6
- package/dist/resources/resourceGc.js +1 -1
- package/dist/resources/resourceRegistrar.js +1 -1
- package/dist/resources/resourceTypes.js +1 -1
- package/dist/review/deltaRecheck.js +3 -3
- package/dist/review/reviewAcceptance.js +16 -16
- package/dist/review/reviewDecision.js +7 -7
- package/dist/review/reviewRound.js +21 -20
- package/dist/review/reviewerAvailability.js +2 -2
- package/dist/role/role.js +51 -7
- package/dist/role/taskRoleUpdate.js +30 -0
- package/dist/runtime/acpProtocol.js +425 -0
- package/dist/runtime/acpSession.js +731 -0
- package/dist/runtime/acpSessionConfiguration.js +260 -0
- package/dist/runtime/agentDriver.js +30 -11
- package/dist/runtime/agentEndpoint.js +278 -0
- package/dist/runtime/agentEndpointIdentity.js +86 -0
- package/dist/runtime/agentEndpointOwnership.js +239 -0
- package/dist/runtime/agentError.js +2 -10
- package/dist/runtime/agentHost.js +565 -314
- package/dist/runtime/agentRunConfiguration.js +258 -0
- package/dist/runtime/builtinAgentDrivers.js +134 -18
- package/dist/runtime/builtinAgentErrorMappers.js +55 -3
- package/dist/runtime/builtinTranscriptUsage.js +1 -1
- package/dist/runtime/claude-process-owner +0 -0
- package/dist/runtime/codexAppServerRuntime.js +38 -30
- package/dist/runtime/codexInteractiveHost.js +41 -6
- package/dist/runtime/continuationManager.js +2 -6
- package/dist/runtime/executionEnvironment.js +30 -0
- package/dist/runtime/firstProgressAdvisory.js +11 -11
- package/dist/runtime/index.js +4 -3
- package/dist/runtime/jsonLineChannel.js +109 -0
- package/dist/runtime/launchBroker.js +91 -16
- package/dist/runtime/launchDiagnostics.js +2 -2
- package/dist/runtime/lifecycleReservation.js +10 -18
- package/dist/runtime/managedCaller.js +61 -17
- package/dist/runtime/nativeSessionControl.js +102 -0
- package/dist/runtime/ports.js +6 -21
- package/dist/runtime/processExitObservation.js +8 -7
- package/dist/runtime/promptEnvelope.js +17 -6
- package/dist/runtime/providerContinuation.js +3 -9
- package/dist/runtime/providerContinuationReconciliationService.js +4 -13
- package/dist/runtime/providerControl.js +2 -7
- package/dist/runtime/providerRuntimeIdentity.js +110 -222
- package/dist/runtime/providerRuntimeReconciler.js +5 -9
- package/dist/runtime/runtimeBinding.js +0 -1
- package/dist/runtime/runtimeContinuationProjection.js +4 -7
- package/dist/runtime/runtimeDeadlines.js +9 -0
- package/dist/runtime/runtimeHealthPolicy.js +1 -1
- package/dist/runtime/runtimeObservation.js +29 -65
- package/dist/runtime/runtimeProjection.js +43 -51
- package/dist/runtime/runtimeSessionCandidate.js +1 -3
- package/dist/runtime/sessionLaunchRequest.js +3 -7
- package/dist/runtime/sessionOwnerIdentity.js +7 -54
- package/dist/runtime/sessionOwnerRegistry.js +22 -17
- package/dist/runtime/sessionReconciliation.js +4 -8
- package/dist/runtime/sessionTerminationGuard.js +70 -259
- package/dist/runtime/sessionTokenMetrics.js +5 -16
- package/dist/runtime/structuredProviderHost.js +237 -117
- package/dist/runtime/taskRuntimeIsolation.js +39 -122
- package/dist/runtime/tmuxAdapters.js +39 -86
- package/dist/scheduler/activeRoleRunDelivery.js +354 -0
- package/dist/scheduler/leaderWakeupProcessor.js +75 -266
- package/dist/scheduler/operatorInputNotificationProcessor.js +1 -1
- package/dist/scheduler/ports.js +80 -9
- package/dist/scheduler/{roleTurnLiveness.js → roleRunLiveness.js} +26 -30
- package/dist/scheduler/{roleTurnStall.js → roleRunStall.js} +128 -139
- package/dist/scheduler/taskExecutionProjection.js +120 -124
- package/dist/scheduler/taskObservabilityProjection.js +29 -29
- package/dist/scheduler/taskWake.js +11 -4
- package/dist/scheduler/wakeReason.js +9 -1
- package/dist/setup/setupCommand.js +3 -7
- package/dist/storage/migrations/agentRunContract.js +159 -0
- package/dist/storage/migrations/artifactsToGit.js +338 -0
- package/dist/storage/migrations/removeRuntimeGeneration.js +207 -0
- package/dist/storage/migrations/submitIntent.js +126 -0
- package/dist/storage/sqliteSchema.js +467 -7
- package/dist/storage/sqliteStore.js +355 -220
- package/dist/storage/storageVersions.js +1 -1
- package/dist/storage/storeRpc.js +10 -5
- package/dist/storage/taskStore.js +13 -11
- package/dist/storage/upgrade/upgradeOrchestrator.js +5 -7
- package/dist/surface/surfaceContributions.js +102 -0
- package/dist/task/completionReadiness.js +32 -6
- package/dist/task/deliveryGuard.js +16 -16
- package/dist/task/draftPlan.js +72 -12
- package/dist/task/nextAction.js +144 -128
- package/dist/task/remoteDelivery.js +6 -6
- package/dist/task/task.js +184 -18
- package/dist/task/taskActivation.js +327 -0
- package/dist/task/taskActivationService.js +408 -0
- package/dist/task/taskRecordReference.js +5 -4
- package/dist/task/taskRecordRetirement.js +1 -1
- package/dist/task/taskSubmission.js +236 -0
- package/dist/telemetry/sqliteTelemetryStore.js +55 -68
- package/dist/telemetry/telemetryConfig.js +14 -14
- package/dist/telemetry/telemetryWiring.js +2 -2
- package/dist/web/assets/assetManifest.js +2 -0
- package/dist/web/assets/client/app.js +121 -20
- package/dist/web/assets/client/components.js +87 -54
- package/dist/web/assets/client/i18n.js +83 -41
- package/dist/web/assets/client/markdown.js +1 -1
- package/dist/web/assets/client/taskSurface.js +442 -0
- package/dist/web/assets/client/view.js +49 -44
- package/dist/web/assets/shell.js +1 -1
- package/dist/web/assets/styles/cards.js +22 -4
- package/dist/web/controllerWeb.js +60 -0
- package/dist/web/webMutation.js +28 -0
- package/dist/web/webServer.js +133 -8
- package/dist/web/webSnapshot.js +81 -74
- package/dist/web/webTaskSurface.js +64 -0
- package/dist/workItem/dependencyGate.js +1 -1
- package/dist/workItem/workItem.js +84 -48
- package/dist/workspace/workItemChangeSetManager.js +16 -9
- package/docs/agent-result-consumption.md +96 -0
- package/docs/agent-result-consumption.zh-CN.md +81 -0
- package/docs/agent-runtime-drivers.md +93 -0
- package/docs/agent-runtime-drivers.zh-CN.md +77 -0
- package/docs/architecture/README.md +50 -0
- package/docs/architecture/README.zh-CN.md +43 -0
- package/docs/architecture/capabilities-and-resources.md +118 -0
- package/docs/architecture/capabilities-and-resources.zh-CN.md +83 -0
- package/docs/managed-turn-and-session-runtime.md +224 -0
- package/docs/managed-turn-and-session-runtime.zh-CN.md +180 -0
- package/docs/observability/README.md +83 -0
- package/docs/observability/README.zh-CN.md +71 -0
- package/docs/plugin-sdk.md +393 -0
- package/docs/plugin-sdk.zh-CN.md +293 -0
- package/docs/provider-runtime.md +165 -0
- package/docs/provider-runtime.zh-CN.md +132 -0
- package/docs/release-workflow.md +305 -0
- package/docs/release-workflow.zh-CN.md +237 -0
- package/docs/roles-and-configuration.md +115 -0
- package/docs/roles-and-configuration.zh-CN.md +96 -0
- package/docs/sqlite-control-plane-design.md +78 -0
- package/docs/sqlite-control-plane-design.zh-CN.md +62 -0
- package/docs/task-dag-semantics.md +80 -0
- package/docs/task-dag-semantics.zh-CN.md +59 -0
- package/docs/task-delivery.md +105 -0
- package/docs/task-delivery.zh-CN.md +82 -0
- package/docs/task-local-identity.md +8 -6
- package/docs/task-local-identity.zh-CN.md +58 -0
- package/docs/testing/verification-levels.md +88 -0
- package/docs/testing/verification-levels.zh-CN.md +69 -0
- package/i18n/README.zh-CN.md +270 -722
- package/package.json +3 -2
- package/skills/yui-leader/SKILL.md +88 -304
- package/skills/yui-leader/references/execution.md +303 -0
- package/skills/yui-leader/references/integration.md +39 -0
- package/skills/yui-leader/references/planning.md +109 -0
- package/skills/yui-leader/references/replicated-execution.md +42 -0
- package/skills/yui-leader/references/task-plugins.md +37 -0
- package/skills/yui-operator/SKILL.md +46 -62
- package/skills/yui-reviewer/SKILL.md +35 -36
- package/skills/yui-runtime/SKILL.md +88 -24
- package/skills/yui-runtime/references/publication.md +22 -0
- package/skills/yui-runtime/references/recovery.md +64 -0
- package/skills/yui-worker/SKILL.md +37 -39
- package/dist/cli/roleOptionCatalog.js +0 -68
- package/dist/context/sourceTurnContext.js +0 -30
- package/dist/execution/reviewMainTurn.js +0 -161
- package/dist/execution/workItemMainTurn.js +0 -164
- package/dist/lifecycle/exactTurnTerminalization.js +0 -407
- package/dist/runtime/preallocatedNativeSession.js +0 -13
- package/dist/runtime/runtimeStopReceipt.js +0 -42
- package/dist/scheduler/activeRoleTurnDelivery.js +0 -315
package/README.md
CHANGED
|
@@ -2,1213 +2,388 @@
|
|
|
2
2
|
|
|
3
3
|
# Yui
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
[](https://github.com/zhangqian-silk/yui/actions/workflows/ci.yml)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
[](#contributing)
|
|
10
|
+
|
|
11
|
+
Give your Agents work to carry forward, not just another chat to answer.
|
|
12
|
+
|
|
13
|
+
Yui is a local control plane for coding Agents. Describe what you want to an
|
|
14
|
+
Operator in plain language: it identifies the relevant Project, tells new work
|
|
15
|
+
from a follow-up, and turns each request into a Task owned by a Leader that
|
|
16
|
+
plans, delegates and brings results and decisions back. Intent, progress and
|
|
17
|
+
results live outside any single conversation, so work continues from the Task —
|
|
18
|
+
not from terminal windows you juggle or details you have to remember.
|
|
19
|
+
|
|
20
|
+
**Highlights**
|
|
21
|
+
|
|
22
|
+
- **Durable by design** — Tasks, decisions and results live in one local SQLite
|
|
23
|
+
store, so work survives crashes and restarts and continues from the Task, not
|
|
24
|
+
a chat log.
|
|
25
|
+
- **One conversation, many Tasks** — the Operator turns plain-language requests
|
|
26
|
+
into new Tasks or follow-ups; no ticket IDs or terminal-window juggling.
|
|
27
|
+
- **A Leader owns each outcome** — it plans, splits work into WorkItems,
|
|
28
|
+
delegates to Workers and Reviewers, and closes the loop; you can talk to it
|
|
29
|
+
directly anytime.
|
|
30
|
+
- **Bring your own Agent** — Codex CLI, Claude Code CLI and ACP peers run behind
|
|
31
|
+
one boundary and stay replaceable without losing the Task.
|
|
32
|
+
- **Local-first and private** — everything runs on your machine for one trusted
|
|
33
|
+
user; the Web view is loopback and read-only.
|
|
34
|
+
- **Isolated by default** — repository work happens in managed Git worktrees;
|
|
35
|
+
the stable checkout stays read-only.
|
|
36
|
+
|
|
37
|
+
> **Status:** pre-1.0 (0.15.x). CLI surfaces and configuration may still change
|
|
38
|
+
> between releases; each upgrade migrates valid existing Homes.
|
|
39
|
+
|
|
40
|
+
[Quick start](#quick-start) · [Working through conversation](#working-through-conversation) · [Architecture](#architecture) · [Design principles](#design-principles)
|
|
10
41
|
|
|
11
|
-
|
|
12
|
-
engine. Its core owns durable identity, user authority, workspace isolation,
|
|
13
|
-
and atomic state changes. Provider Sessions and runtime observations support
|
|
14
|
-
execution and continuity, but they are not competing sources of Task truth.
|
|
15
|
-
|
|
16
|
-
The current implementation restores the useful Role/Agent/session and CLI framework without restoring the later data-maintenance, lease, schedule, and recovery-ledger systems.
|
|
17
|
-
|
|
18
|
-
The [target architecture handbook](docs/architecture/README.md) preserves the
|
|
19
|
-
2026-09-06 design baseline for the upcoming refactor; it does not describe
|
|
20
|
-
already implemented behavior.
|
|
42
|
+
## Quick start
|
|
21
43
|
|
|
22
|
-
|
|
44
|
+
You need Linux x64 with glibc, Git, tmux, and Node.js `^20.17.0`, `^22.9.0` or
|
|
45
|
+
`^24.0.0`. For the simplest setup, have Codex CLI or Claude Code CLI installed
|
|
46
|
+
and ready to use with your own account. Yui coordinates those Agents; it does
|
|
47
|
+
not supply model access.
|
|
23
48
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
49
|
+
For Claude, Yui passes through your authentication environment and native
|
|
50
|
+
configuration directory; Claude selects the API key or login method using its
|
|
51
|
+
own settings. Replacing a Session does not reset your login or initialization.
|
|
52
|
+
Native first-run confirmations may still require your input.
|
|
28
53
|
|
|
29
|
-
|
|
54
|
+
### 1. Install
|
|
30
55
|
|
|
31
56
|
```sh
|
|
32
57
|
npm install -g @zq-silk/yui
|
|
33
|
-
yui setup
|
|
34
|
-
yui doctor
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
`setup` is intentionally minimal. It verifies tmux, reuses or creates one
|
|
38
|
-
available Agent, creates the default workspace outside Yui home, and configures
|
|
39
|
-
both Operator and Leader so the user can start Yui and execute Tasks. It does
|
|
40
|
-
not create Worker, Reviewer, Profile, or review-policy configuration, and does
|
|
41
|
-
not ask for model/effort, permission, or shell completion. The required
|
|
42
|
-
Operator and Leader bindings use Yui's adapter default permission strategy
|
|
43
|
-
(`bypass`); further changes belong under `config role`. Running setup again
|
|
44
|
-
preserves already usable Operator and Leader Roles. A successful setup starts
|
|
45
|
-
the current Home's detached Controller before it returns.
|
|
46
|
-
|
|
47
|
-
All persistent configuration is under `yui config`. `config show` reports the
|
|
48
|
-
complete effective state, while `config --help` introduces each domain and
|
|
49
|
-
shows examples. The Operator can read the same structured catalog with
|
|
50
|
-
`config describe`, explain current values, effects, choices, and activation
|
|
51
|
-
behavior, then apply only changes the user confirms.
|
|
52
|
-
|
|
53
|
-
Durable settings are grouped by responsibility: `config system` for Home
|
|
54
|
-
defaults and presentation, `config runtime` for Controller health, concurrency,
|
|
55
|
-
launch, and delivery mechanics, `config workflow` for Leader/context/review
|
|
56
|
-
policy, `config resources` for quarantine and GC, and `config tools` for tmux
|
|
57
|
-
and diagnostic telemetry. Configured Agents, global Roles, Profiles, and shell
|
|
58
|
-
completion remain the sibling `config agent|role|profile|completion` domains.
|
|
59
|
-
Use `show`, `set`, and `clear` consistently within each durable-settings domain.
|
|
60
|
-
|
|
61
|
-
Runtime catalogs are refreshed per command and cached under Yui home. If a live probe times out or fails, Yui shows the last cache for the same Agent launch context and clearly marks it as potentially stale; without a matching cache, it offers CLI defaults and custom values. `yui config agent capabilities <id>` exposes the same one-pass catalog, including models, model-specific efforts, and other runtime choices such as permissions, search availability, profiles, settings sources, and service tiers.
|
|
62
|
-
|
|
63
|
-
`completion` is also interactive, with or without an explicit shell:
|
|
64
|
-
|
|
65
|
-
```sh
|
|
66
|
-
yui config completion
|
|
67
|
-
yui config completion zsh
|
|
68
58
|
```
|
|
69
59
|
|
|
70
|
-
|
|
60
|
+
### 2. Set up, yourself or with an Agent
|
|
71
61
|
|
|
72
|
-
|
|
62
|
+
Run the interactive setup:
|
|
73
63
|
|
|
74
64
|
```sh
|
|
75
|
-
export YUI_HOME=/absolute/path/to/yui-home
|
|
76
65
|
yui setup
|
|
77
66
|
```
|
|
78
67
|
|
|
79
|
-
|
|
80
|
-
and knowledge, and Controller discovery files. Stable Project checkouts and
|
|
81
|
-
managed worktrees live under the configured workspace, outside Yui home.
|
|
82
|
-
Legacy `schema.json` and `state.json` files are evidence only. Runtime storage
|
|
83
|
-
accepts only the exact current contract; supported earlier storage versions
|
|
84
|
-
enter only through the explicit upgrade boundary.
|
|
85
|
-
|
|
86
|
-
Every Task-owned record family allocates a monotonically increasing local ID
|
|
87
|
-
inside its Task. Different Tasks may therefore both contain `work-item-1`,
|
|
88
|
-
`turn-1`, or `input-1`. A managed Task session may use that short local ID
|
|
89
|
-
because `YUI_TASK_ID` supplies the scope. Outside a Task session, use the
|
|
90
|
-
qualified form `<task-id>/<local-id>`; Yui never searches every Task for a bare
|
|
91
|
-
ID. Commands that already take a Task explicitly, such as `task work create`
|
|
92
|
-
and `task integration start`, keep their subordinate IDs local to that Task.
|
|
93
|
-
Candidate IDs are local to their WorkItem and carry both Task and WorkItem
|
|
94
|
-
provenance.
|
|
95
|
-
|
|
96
|
-
Yui has one Home storage version, recorded by the append-only SQLite migration
|
|
97
|
-
ledger. Every CLI reports both its current storage version and its minimum
|
|
98
|
-
supported migration version. Runtime admission still has only two outcomes:
|
|
99
|
-
exact current, or rejected; a Controller never migrates storage while serving
|
|
100
|
-
work. `yui upgrade --dry-run` is read-only. `yui upgrade` quiesces a running
|
|
101
|
-
Controller, creates a consistent backup, applies every missing migration in
|
|
102
|
-
one transaction, validates the current contract, and then restarts the
|
|
103
|
-
Controller when it was running before the upgrade.
|
|
104
|
-
|
|
105
|
-
`yui update` stages and pins one exact package, runs that staged binary's
|
|
106
|
-
storage preflight, stops the exact old Controller, activates the same artifact,
|
|
107
|
-
applies the staged release's migration chain when required, verifies the
|
|
108
|
-
installed binary and current Home, and starts the replacement Controller. A
|
|
109
|
-
Home inside the staged release's supported range can upgrade directly across
|
|
110
|
-
multiple versions without installing intermediate releases. A newer Home, a
|
|
111
|
-
Home below the migration floor, an incomplete migration ledger, or malformed
|
|
112
|
-
data fails closed without a guessed repair.
|
|
113
|
-
|
|
114
|
-
Yui 0.15.0 establishes storage version 1 and the migration floor. Homes created
|
|
115
|
-
by earlier releases, including 0.14.2, are not on this compatibility line:
|
|
116
|
-
preserve them for inspection with their matching Yui release or initialize a
|
|
117
|
-
new Home. From 0.15.0 onward, each release retains the complete chain, so later
|
|
118
|
-
`yui update` invocations can cross versions directly.
|
|
119
|
-
|
|
120
|
-
See [Task-local identity](docs/task-local-identity.md) for the current reference
|
|
121
|
-
contract.
|
|
122
|
-
|
|
123
|
-
Schema work across Tasks is not serialized: any Task may propose the next
|
|
124
|
-
storage migration on its own isolated branch without waiting for another Task's
|
|
125
|
-
schema change to land. The later-integrating branch owns the reconciliation:
|
|
126
|
-
rebase onto the latest project head, preserve every already released migration
|
|
127
|
-
unchanged, allocate the next contiguous storage version, resolve schema and code
|
|
128
|
-
conflicts, and re-run the bounded validation. A migration may update physical
|
|
129
|
-
tables and current record payloads together; it must not introduce another
|
|
130
|
-
writable compatibility axis.
|
|
131
|
-
|
|
132
|
-
Yui provides four reusable Worker Profile definitions through
|
|
133
|
-
`yui config profile reset`; minimum setup makes each one inherit the current
|
|
134
|
-
Global Worker runtime:
|
|
135
|
-
|
|
136
|
-
```text
|
|
137
|
-
worker explorer implementer reviewer
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Profiles are versioned Worker templates with two independent parts: portable
|
|
141
|
-
behavior (prompt instructions, Skills, and access intent) and runtime intent.
|
|
142
|
-
Runtime either follows the current Global Worker binding dynamically, or names
|
|
143
|
-
one explicit Agent with optional model and effort. `profile list` and `profile
|
|
144
|
-
show` resolve the effective Agent from current configuration and display the
|
|
145
|
-
Global Worker launch revision when inherited; that read does not rewrite or
|
|
146
|
-
revise the Profile. Profiles do not own Sessions or workspaces.
|
|
147
|
-
When an explicit Profile's Agent has a Global Worker binding, active or
|
|
148
|
-
dormant, its other binding settings come from that binding; an unbound Agent
|
|
149
|
-
uses provider defaults. A Worker binding referenced this way cannot be unbound
|
|
150
|
-
until the Profile is updated, changed to inheritance, or removed. The Profile
|
|
151
|
-
still owns model and effort, and omitting either means the provider default
|
|
152
|
-
rather than the Worker's value.
|
|
153
|
-
|
|
154
|
-
Creating a Task Role from a Profile freezes the Profile behavior and its fully
|
|
155
|
-
resolved runtime binding into the Role. Later Profile or Global Worker changes
|
|
156
|
-
do not rewrite existing Task Roles. On `task role add`, model, effort, and
|
|
157
|
-
other Agent settings require `--agent` so Yui can validate and persist one
|
|
158
|
-
complete explicit binding atomically. When `--profile` and `--agent` are both
|
|
159
|
-
present during creation, the Agent must match the Profile's resolved Agent;
|
|
160
|
-
the Profile runtime remains the base binding and explicit Agent settings
|
|
161
|
-
override corresponding fields. On `task role update`, omitted `--agent`
|
|
162
|
-
updates the active binding, while a provided `--agent` updates that binding
|
|
163
|
-
without activating it; only `task role bind` switches the active Agent. An
|
|
164
|
-
explicit Profile must resolve to that update target, where its runtime is the
|
|
165
|
-
base binding and explicit Agent settings override corresponding fields. An
|
|
166
|
-
inherited Worker Profile used by itself may update portable Role behavior
|
|
167
|
-
without retargeting a differently bound Agent; if `--agent` or Agent settings
|
|
168
|
-
are also present, its currently resolved Worker Agent must match the target.
|
|
169
|
-
Applying a Profile replaces the portable fields owned by AgentProfile
|
|
170
|
-
(`defaultAccess`, description, instructions, skills, and access-derived
|
|
171
|
-
constraints); explicit Role options in the same command apply afterward.
|
|
172
|
-
This Yui Agent Profile is separate from a Codex native config profile also
|
|
173
|
-
named `--profile`.
|
|
174
|
-
|
|
175
|
-
## Quick start
|
|
176
|
-
|
|
177
|
-
Bind a Project and create a Draft Task:
|
|
68
|
+
Or ask the coding Agent you already use:
|
|
178
69
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
yui project update app --alias app-cli
|
|
183
|
-
yui project refresh app
|
|
184
|
-
yui project list
|
|
185
|
-
|
|
186
|
-
yui task create "Fix CSV escaping" --project app --type bugfix
|
|
187
|
-
yui task create "Ship CSV export" --project app --type feature
|
|
188
|
-
yui task update <task-id> --priority high --tags release,csv --due-at 2026-08-01T00:00:00Z
|
|
189
|
-
yui task update <task-id> --clear-priority --clear-tags --clear-due-at
|
|
190
|
-
yui task message update <task-id>/<message-id> --body-file updated-message.md --wake-policy none
|
|
191
|
-
yui task work edit <task-id>/<work-item-id> --objective "Revised outcome" \
|
|
192
|
-
--accept "New observable criterion"
|
|
193
|
-
yui task work retire <task-id>/<work-item-id> --summary "Removed from the current Draft"
|
|
194
|
-
yui task show <task-id>
|
|
195
|
-
yui task context <task-id>
|
|
196
|
-
yui task activate <task-id>
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
A Draft stores planning state and Project bindings only; it does not adopt a
|
|
200
|
-
writable managed Workspace. `task activate` prepares every bound Project first,
|
|
201
|
-
then commits the Task's `active` status and Task-owned Workspace together. A
|
|
202
|
-
preparation or consistency failure leaves the Task Draft and reports the
|
|
203
|
-
workspace diagnosis instead of exposing a partially adopted execution root.
|
|
204
|
-
Draft Message and WorkItem edits replace only the named mutable fields while
|
|
205
|
-
preserving record identity and audit history. Repeated options replace the
|
|
206
|
-
whole collection; matching `--clear-*` flags make an empty collection explicit.
|
|
207
|
-
Retired records remain visible in history but leave the current Draft. A
|
|
208
|
-
retired WorkItem never satisfies a dependency and does not redirect downstream
|
|
209
|
-
dependencies through its optional replacement; fix the remaining Draft before
|
|
210
|
-
activation. These Draft-only mutations do not create, stop, or clean runtime
|
|
211
|
-
resources, and activation validates the current dependency graph, Roles, and
|
|
212
|
-
Project scope before any Workspace is adopted.
|
|
213
|
-
|
|
214
|
-
Task type describes intent rather than selecting an execution protocol.
|
|
215
|
-
Software Projects use `bugfix` or `feature`: a bugfix is Leader-owned; if it
|
|
216
|
-
grows into independently owned delivery requirements, reclassify it as a
|
|
217
|
-
feature before creating WorkItems. The Leader decides whether a feature is
|
|
218
|
-
small enough to deliver on Task main or large enough for independently owned WorkItems. A WorkItem is
|
|
219
|
-
one substantial requirement for one Worker, not a development step, test run,
|
|
220
|
-
review finding, or local fix. Multiple WorkItems are useful only when distinct
|
|
221
|
-
Workers can advance meaningful requirements independently. A WorkItem's
|
|
222
|
-
governing Candidate defines its delivery obligation: each writable Project's
|
|
223
|
-
exact start and result commits must be represented by a committed Integration
|
|
224
|
-
before Task-final Review or completion. Older Candidate, ChangeSet, and queue
|
|
225
|
-
records remain audit evidence without keeping the Task open.
|
|
226
|
-
|
|
227
|
-
`project refresh` is the explicit network operation for a stable Project checkout. It fetches the
|
|
228
|
-
configured stable branch directly from the Project remote URL and advances only through a clean,
|
|
229
|
-
verified fast-forward. Refresh requires matching stable and development branches, treats untracked
|
|
230
|
-
files as dirty, preserves ignored files, and refuses missing remotes or refs and diverged checkouts.
|
|
231
|
-
When the configured branch is `HEAD`, refresh resolves the remote's symbolic default branch for that
|
|
232
|
-
operation and requires the checkout to be on that branch; detached or mismatched checkouts fail.
|
|
233
|
-
|
|
234
|
-
### Project lifecycle
|
|
235
|
-
|
|
236
|
-
Divergence and end-of-life are explicit, Operator-authority operations with fail-closed gates.
|
|
237
|
-
Every destructive command refuses a managed Task Session (run it from an Operator or user
|
|
238
|
-
terminal), an active Task binding, a dirty checkout, and an unreachable or unverified remote.
|
|
70
|
+
> Yui is installed. Help me run `yui setup` in an interactive terminal,
|
|
71
|
+
> choose an available Agent, and check the result with `yui doctor`.
|
|
72
|
+
> Ask me about any account or setup choices you need.
|
|
239
73
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
yui project replace app --discard-local
|
|
245
|
-
yui project retire app --reason "superseded by app-ng"
|
|
246
|
-
yui project delete app --confirm app
|
|
247
|
-
yui project delete app --checkout --confirm app
|
|
248
|
-
```
|
|
74
|
+
Setup establishes the Operator—the Agent you talk to—and a default Task Leader,
|
|
75
|
+
then starts the local Controller. You can begin with those two roles and
|
|
76
|
+
configure Workers or Reviewers later. If your Agent cannot operate an interactive
|
|
77
|
+
terminal, run setup yourself; it only handles the initial configuration.
|
|
249
78
|
|
|
250
|
-
|
|
251
|
-
a dry run: it fetches and verifies the remote baseline, and when the checkout has diverged it
|
|
252
|
-
refuses while listing the exact local commits that would be discarded. With `--discard-local` it
|
|
253
|
-
hard-resets the clean checkout to the verified remote commit (a plain fast-forward when the
|
|
254
|
-
checkout is merely behind). `project replace` goes further for Home-managed checkouts: it clones
|
|
255
|
-
the remote into a staging directory, verifies both branches, copies the Yui-local refs
|
|
256
|
-
(`refs/heads/yui/`, `refs/yui/archive/`) so historical evidence keeps resolving, then swaps the
|
|
257
|
-
checkout on disk while the catalog record keeps its path. Replace refuses linked worktrees (Task
|
|
258
|
-
or Integration workspaces) and dirty checkouts, and requires `--discard-local`. The swap is
|
|
259
|
-
recoverable: the previous checkout is parked at a backup path and restored on any failure, a
|
|
260
|
-
catalog refusal rolls the swap back, and a crash mid-swap is healed on the next run (a crash
|
|
261
|
-
before the swap leaves only a removable staging clone).
|
|
262
|
-
|
|
263
|
-
`project retire` is the auditable soft deprecation: it records who retired the Project, when, and
|
|
264
|
-
why, while retaining the catalog record, checkout, and every historical
|
|
265
|
-
Task/Turn/Review/Integration/Publication reference. A retired Project cannot be refreshed,
|
|
266
|
-
updated, migrated, reset, replaced, maintained through Knowledge writes (add/retire/propose/
|
|
267
|
-
accept/reject), or bound to new Tasks, WorkItems, or Integrations; Knowledge reads (`list`,
|
|
268
|
-
`show`, `proposals list/show`) stay open so the evidence stays auditable.
|
|
269
|
-
`project delete` is the separate hard-removal decision: it requires a retired Project, an exact
|
|
270
|
-
`--confirm <project-id>` acknowledgment, and fails closed while any Task record references the
|
|
271
|
-
Project. `--checkout` additionally removes the Home-managed checkout (external checkouts are
|
|
272
|
-
user-owned and must be removed manually): it first refuses linked worktrees and dirty checkouts,
|
|
273
|
-
then moves the checkout to a tombstone before removing the catalog record, restoring it on any
|
|
274
|
-
failure so the catalog and checkout never disagree unrecoverably. `project show` and
|
|
275
|
-
`project list` display the lifecycle status and retirement record.
|
|
276
|
-
|
|
277
|
-
Use `task context` as the first detailed read of an existing Task. It combines the Task, Brief, active Decisions, recent Milestones, Roles, current and recent WorkItems with their Turns, recent Messages, open and resolved InputRequests, and recent Events. Terminal output keeps histories and long text compact; `yui --json task context <task-id>` returns the complete records in the top-level `data` field.
|
|
278
|
-
|
|
279
|
-
Leader wakeups stay deliberately small: the wake envelope carries only the
|
|
280
|
-
aggregated wake reasons, a delta window, and read pointers. The durable wake
|
|
281
|
-
ledger is the on-demand read for what changed:
|
|
79
|
+
### 3. Start a conversation
|
|
282
80
|
|
|
283
81
|
```sh
|
|
284
|
-
yui task wake list <task-id>
|
|
285
|
-
yui task wake show <task-id> <wake-id>
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
`wake list` shows the dispatch history with status, reasons, and consuming
|
|
289
|
-
Turn; `wake show` renders one wake's delta window — the Events, Messages, and
|
|
290
|
-
Turns recorded between its cursors. A human or Agent can still force a wake
|
|
291
|
-
with `yui task wake <task-id> --force --reason "<text>"`.
|
|
292
|
-
|
|
293
|
-
Human-facing timestamps default to Beijing time (`Asia/Shanghai`) while durable
|
|
294
|
-
records and `--json` data remain UTC/RFC 3339. Inspect or change the IANA
|
|
295
|
-
timezone with:
|
|
296
|
-
|
|
297
|
-
```sh
|
|
298
|
-
yui config show
|
|
299
|
-
yui config system set time-zone Europe/London
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
WorkItem review is one global, optional rule that reuses an existing Global
|
|
303
|
-
Role's Agent, model, permissions, prompt, and Skills:
|
|
304
|
-
|
|
305
|
-
```sh
|
|
306
|
-
yui config workflow set review --role reviewer --trigger always
|
|
307
|
-
yui config show
|
|
308
|
-
yui config workflow clear review
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
For Project-backed software delivery, use `--trigger final` to supply the
|
|
312
|
-
default Reviewer Role when the Leader decides the complete frozen Task result
|
|
313
|
-
needs an independent Review:
|
|
314
|
-
|
|
315
|
-
```sh
|
|
316
|
-
yui config workflow set review --role reviewer --trigger final
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
Every result entering Leader acceptance is one explicit candidate on its
|
|
320
|
-
existing WorkItem. The current global rule applies to the next candidate in
|
|
321
|
-
every existing or new Task; that candidate snapshots the rule, so later
|
|
322
|
-
`set`/`clear` changes do not rewrite an in-flight decision.
|
|
323
|
-
`always` starts a ReviewRound for every candidate, including a completed Role Turn
|
|
324
|
-
or a Leader-managed direct result; `leader` leaves the candidate awaiting
|
|
325
|
-
acceptance so the Leader can accept it directly or run
|
|
326
|
-
`yui task work review <task-id>/<work-item-id>`. A configured review rule therefore keeps
|
|
327
|
-
Leader-managed candidates awaiting a decision instead of marking them done.
|
|
328
|
-
`final` does not create WorkItem ReviewRounds or decide Task topology. The
|
|
329
|
-
Leader explicitly requests a Task-scoped Review, unless an immutable Task
|
|
330
|
-
contract requires one. The Round snapshots the exact Task-main Project heads
|
|
331
|
-
directly, so even a Leader-owned Task with no WorkItem can be reviewed without
|
|
332
|
-
locking the mutable Task workspace. A changed frozen head needs a new semantic
|
|
333
|
-
Round; the same Reviewer Session continues in its
|
|
334
|
-
stable workspace, while every Turn remains bound to its exact Round and head.
|
|
335
|
-
The Reviewer follows Project Policy/Knowledge and reports reachable, material,
|
|
336
|
-
actionable findings across the complete Task.
|
|
337
|
-
A ReviewRound freezes the Candidate's exact Git commit and updates the
|
|
338
|
-
Reviewer Role's stable writable workspace to that head while recording exact
|
|
339
|
-
Round-owned workspace evidence. Its Turn may edit,
|
|
340
|
-
test, and optionally commit diagnostic evidence there, but never changes the
|
|
341
|
-
Candidate or Worker workspace and never creates another WorkItem, Candidate,
|
|
342
|
-
ChangeSet, or recursive review. The result wakes the Leader, who decides whether
|
|
343
|
-
to route evidence to the original Worker, accept, reject and redispatch that
|
|
344
|
-
Worker in its existing Session, review again, or request user input.
|
|
345
|
-
A failed review remains visible evidence and wakes the Leader, but does not
|
|
346
|
-
take that decision away from the Leader.
|
|
347
|
-
|
|
348
|
-
An explicit WorkItem Candidate or Task-final Review is direct unless the
|
|
349
|
-
Leader names Producer Roles. Policy-triggered WorkItem Review remains direct
|
|
350
|
-
by default:
|
|
351
|
-
|
|
352
|
-
```sh
|
|
353
|
-
yui task work review <task-id>/<work-item-id>
|
|
354
|
-
yui task work review <task-id>/<work-item-id> \
|
|
355
|
-
--lane-role security-reviewer --lane-role correctness-reviewer
|
|
356
|
-
|
|
357
|
-
yui task review request <task-id> --role reviewer
|
|
358
|
-
yui task review request <task-id> --role reviewer \
|
|
359
|
-
--lane-role security-reviewer --lane-role correctness-reviewer
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
Direct Review creates one main Reviewer Turn with no ExecutionGroup or Lane.
|
|
363
|
-
Replicated Review requires at least two distinct Producer Roles, all inspecting
|
|
364
|
-
the identical frozen Assignment in isolated Lane workspaces. Yui waits for
|
|
365
|
-
every Lane to settle and requires at least two successful Producer results
|
|
366
|
-
before creating one idempotent main Reviewer synthesis Turn. Successful
|
|
367
|
-
Producers are never rerun during Lane or main retry. Producer output is durable
|
|
368
|
-
non-authoritative evidence; only the exact completed main Reviewer Turn
|
|
369
|
-
completes the Round. The Leader reads that Turn's original result and decides
|
|
370
|
-
what it means.
|
|
371
|
-
|
|
372
|
-
Task context and next-action expose the Review shape, every frozen Project
|
|
373
|
-
commit, its relation to the current candidate, Producer and main Turns, and
|
|
374
|
-
their owned workspaces. A request that fails after Round creation retains the ReviewRound
|
|
375
|
-
and reports its exact reason; the Leader opens that Round and decides whether
|
|
376
|
-
to retry, inspect or clean the workspace, use another Reviewer, or continue
|
|
377
|
-
other work.
|
|
378
|
-
An active Task-final Review freezes only its own candidate; it does not prevent
|
|
379
|
-
the Leader from processing new input or advancing a later candidate. Delta
|
|
380
|
-
Recheck is always available when Yui can prove an accepted contiguous baseline
|
|
381
|
-
and exact diff. Yui does not select a mode from generic size thresholds;
|
|
382
|
-
`requires-full-review` returns to the Leader without creating another Round.
|
|
383
|
-
Candidate history, every ReviewRound, and the Leader decision remain grouped
|
|
384
|
-
under the original WorkItem. A rejected result creates a new Candidate on the
|
|
385
|
-
next dispatch while reusing the original execution Role, Session, and
|
|
386
|
-
workspace.
|
|
387
|
-
|
|
388
|
-
Yui Core supplies lifecycle and exact-scope safety; generic role Skills supply
|
|
389
|
-
portable collaboration behavior; Project Policy/Knowledge supplies
|
|
390
|
-
project-specific build, test, migration, release, and review rules; the Task
|
|
391
|
-
Contract supplies the current objective and acceptance. Project-backed Workers
|
|
392
|
-
commit and leave the Develop workspace clean before ending the Provider Turn.
|
|
393
|
-
Yui stores the final Turn result and freezes each writable Project's HEAD in the Candidate
|
|
394
|
-
snapshot; ReviewRound worktrees are recreated from those exact commits even if
|
|
395
|
-
Develop later advances during repair.
|
|
396
|
-
|
|
397
|
-
Task identity follows one bounded outcome, not the number of repositories
|
|
398
|
-
involved. A repository-backed Task may bind multiple Projects, each with its
|
|
399
|
-
own base ref. Yui exposes them under one Task workspace root:
|
|
400
|
-
|
|
401
|
-
```text
|
|
402
|
-
<workspace>/tasks/<task-id>/main/
|
|
403
|
-
├── backend/
|
|
404
|
-
├── frontend/
|
|
405
|
-
└── shared-sdk/
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
`<workspace>/tasks/<task-id>/main` is a logical multi-Project container, not a
|
|
409
|
-
Git repository. Each Project child is the supported Git cwd (for example
|
|
410
|
-
`<workspace>/tasks/<task-id>/main/yui`) and points to that Project's managed
|
|
411
|
-
worktree at `<workspace>/worktree/<project>/<task-id>/main`. Run Git commands
|
|
412
|
-
inside the relevant Project child. With one bound Project, the native Agent
|
|
413
|
-
starts in its managed worktree so Agent-native project configuration and Skills
|
|
414
|
-
are discovered normally. With multiple Projects, it starts at the logical root
|
|
415
|
-
and receives every Project worktree through the provider's native
|
|
416
|
-
additional-directory mechanism. Create all known
|
|
417
|
-
bindings together, or let the active Task Leader add one when the same outcome
|
|
418
|
-
expands:
|
|
419
|
-
|
|
420
|
-
```sh
|
|
421
|
-
yui task create "Update authentication" \
|
|
422
|
-
--project backend --project frontend \
|
|
423
|
-
--base backend=develop --base frontend=main \
|
|
424
|
-
--type feature
|
|
425
|
-
yui task project add <task-id> shared-sdk --base main
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
Project-backed Tasks record the local baseline, redacted remote identity, and
|
|
429
|
-
the remote-tracking commit observed when their main workspace is created.
|
|
430
|
-
Inspect delivery freshness with:
|
|
431
|
-
|
|
432
|
-
```sh
|
|
433
|
-
yui task base status <task-id>
|
|
434
|
-
yui task base status <task-id> --refresh
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
The default check is offline and uses local remote-tracking refs. `--refresh`
|
|
438
|
-
is the explicit authorization to query the configured remote; Yui never
|
|
439
|
-
fetches, rebases, merges, or force-pushes as a hidden side effect of Task
|
|
440
|
-
completion. Behind, diverged, or unavailable remote state is reported as
|
|
441
|
-
delivery-risk evidence for the Leader; it does not replace the Leader's choice
|
|
442
|
-
of delivery base. A dirty Task workspace remains a completion blocker.
|
|
443
|
-
|
|
444
|
-
Implementation WorkItems declare the Projects they may modify. Their workspace
|
|
445
|
-
keeps the same relative layout, creates isolated worktrees only for that write
|
|
446
|
-
scope, and exposes the other Task Projects as context from Task main. Yui puts
|
|
447
|
-
the exact writable and context-only Project lists into the managed dispatch and
|
|
448
|
-
the `yui-worker` Skill requires the Agent to honor that boundary. Native Agent
|
|
449
|
-
permissions remain session-wide, while Profile `access` is a behavior hint,
|
|
450
|
-
not a provider sandbox or write grant. Every managed Role binding defaults to
|
|
451
|
-
`permission.strategy=bypass`, including `explorer`, so provider prompts do not
|
|
452
|
-
block normal work. Profiles and Skills constrain behavior; exact WorkItem or
|
|
453
|
-
ReviewRound scope and the matching managed workspace are the only authority to
|
|
454
|
-
modify Project files. A Role may instead choose `default` or `configured` and
|
|
455
|
-
retain any supported subset of the provider's native permission options.
|
|
456
|
-
|
|
457
|
-
Workspace ownership is independent from the executor Role. Yui persists one
|
|
458
|
-
owner-keyed `ManagedWorkspace` for Task main, each WorkItem Develop checkout,
|
|
459
|
-
each ReviewRound, and each IntegrationAttempt; dispatch attaches a snapshot.
|
|
460
|
-
The delivery chain is `isolate -> Candidate -> ReviewRound -> ChangeSet capture
|
|
461
|
-
-> Integration -> accept -> cleanup`. Review worktrees start at the frozen
|
|
462
|
-
Candidate commit and never become a Develop ChangeSet source.
|
|
463
|
-
|
|
464
|
-
Write scope may only expand. The Leader supplies the complete old-plus-new set
|
|
465
|
-
after a Worker reports that another repository is required; an
|
|
466
|
-
existing writable Project cannot be removed:
|
|
467
|
-
|
|
468
|
-
```sh
|
|
469
|
-
yui task work create <task-id> "Update contract" \
|
|
470
|
-
--project backend --project frontend --role implementer
|
|
471
|
-
yui task work scope <task-id>/<work-item-id> \
|
|
472
|
-
--project backend --project frontend --project shared-sdk
|
|
473
|
-
yui task work isolate <task-id>/<work-item-id>
|
|
474
|
-
yui task work reject <task-id>/<work-item-id> \
|
|
475
|
-
--summary "Write scope expanded; continue in the refreshed workspace."
|
|
476
|
-
yui task work dispatch <task-id>/<work-item-id>
|
|
477
|
-
yui task integration start <task-id> --work-item <work-item-id> \
|
|
478
|
-
--project backend --strategy cherry-pick --check "<validation command>"
|
|
479
|
-
yui task integration cleanup <task-id>/<integration-id>
|
|
480
|
-
yui task work cleanup <task-id>/<work-item-id> --integrated
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
The WorkItem Candidate records its exact start and result commits. Integration
|
|
484
|
-
remains a single-Project Git transaction, so the Leader integrates each Project
|
|
485
|
-
independently and chooses fast-forward, cherry-pick, merge, or manual
|
|
486
|
-
application. Acceptance succeeds only after every writable Project result has
|
|
487
|
-
a committed Integration, including an explicit successful no-op when the
|
|
488
|
-
result is already represented. Use `--abandon` only for deliberate discard.
|
|
489
|
-
Dirty worktrees are retained. Native Agent Sessions may be scoped to their
|
|
490
|
-
launch directory, so Yui retires a stopped Role Session whenever the Role moves
|
|
491
|
-
between Task main and an isolated WorkItem worktree. The next dispatch starts a
|
|
492
|
-
Session in the new workspace while durable Yui records preserve context.
|
|
493
|
-
|
|
494
|
-
Submit information through Operator:
|
|
495
|
-
|
|
496
|
-
```sh
|
|
497
|
-
yui operator submit "Compare CSV and JSON compatibility" --task <task-id>
|
|
498
|
-
yui operator submit "Investigate a smaller cache design"
|
|
499
|
-
yui operator status
|
|
500
|
-
yui operator list
|
|
501
|
-
yui operator resume
|
|
502
|
-
yui operator resume --last
|
|
503
|
-
yui operator new
|
|
504
82
|
yui operator enter
|
|
505
83
|
```
|
|
506
84
|
|
|
507
|
-
|
|
508
|
-
from its durable progress:
|
|
85
|
+
Tell the Operator what you want to work on:
|
|
509
86
|
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
yui task execution start <task-id>
|
|
513
|
-
```
|
|
87
|
+
> My project is at `/absolute/path/to/app`. Help me add CSV export.
|
|
88
|
+
> First clarify the scope, then implement and verify it. Don't publish anything.
|
|
514
89
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
Without `--task`, `operator submit` creates a new Draft. Drafts accept planning changes but must be activated before Agent execution.
|
|
521
|
-
Operator resolves every request against the Project catalog and existing Task
|
|
522
|
-
context. Follow-up requirements, fixes, reviews, and questions for the same
|
|
523
|
-
bounded outcome stay in that Task even when they involve multiple Projects.
|
|
524
|
-
A distinct outcome, ownership boundary, or lifecycle creates a separate Task.
|
|
525
|
-
Features, bugs, and questions use the same
|
|
526
|
-
Task/WorkItem model rather than separate workflow types.
|
|
527
|
-
`operator status` shows exactly one GlobalRole-selected writer separately from
|
|
528
|
-
retained historical conversations. `operator list` shows recent conversations in fixed most-recently-updated order using
|
|
529
|
-
their Agent and readable title or preview; native provider session IDs remain
|
|
530
|
-
internal. Until an adapter supplies that metadata, Yui shows the provider plus
|
|
531
|
-
a stable short Yui reference so untitled conversations remain distinguishable.
|
|
532
|
-
`operator resume` opens the lightweight numbered history list, while `--last`
|
|
533
|
-
resumes the newest entry directly. Starting a conversation is never a resume
|
|
534
|
-
choice: the explicit `operator new` command starts a clean conversation and
|
|
535
|
-
preserves the previous one in history.
|
|
536
|
-
|
|
537
|
-
Create a Task-bound Worker instance from a Profile's resolved runtime and
|
|
538
|
-
dispatch a WorkItem:
|
|
90
|
+
The Operator can register the Project and organize the request into a Task.
|
|
91
|
+
Its Leader handles planning and execution within your instructions. You can
|
|
92
|
+
ask questions, refine the requirement, or bring another request to the same
|
|
93
|
+
Operator without learning Task IDs or internal commands.
|
|
539
94
|
|
|
540
|
-
|
|
541
|
-
yui config role show worker
|
|
542
|
-
yui config profile show implementer
|
|
543
|
-
yui task role add <task-id> implementer --profile implementer
|
|
544
|
-
yui task role show <task-id> implementer
|
|
545
|
-
|
|
546
|
-
yui task work create <task-id> "Implement the exporter" \
|
|
547
|
-
--project app --role implementer
|
|
548
|
-
yui task work isolate <task-id>/<work-item-id>
|
|
549
|
-
yui task work dispatch <task-id>/<work-item-id> --input "Implement and run focused tests"
|
|
550
|
-
```
|
|
95
|
+
## Working through conversation
|
|
551
96
|
|
|
552
|
-
|
|
553
|
-
workspace. To request independent production attempts over exactly the same
|
|
554
|
-
frozen Assignment, provide at least two distinct Task Roles; one role is
|
|
555
|
-
rejected, roles cannot repeat, and the assignee cannot be a Lane:
|
|
97
|
+
### Let the Agent organize the work
|
|
556
98
|
|
|
557
|
-
|
|
558
|
-
yui task work dispatch <task-id>/<work-item-id> \
|
|
559
|
-
--input "Implement and run focused tests" \
|
|
560
|
-
--lane-role producer-a --lane-role producer-b
|
|
561
|
-
```
|
|
99
|
+
You can bring a mixture of new requests, corrections and questions:
|
|
562
100
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
as `needs-attention`. The Leader retries or explicitly settles that exact Turn:
|
|
101
|
+
> The CSV export also needs to preserve leading zeros in account numbers.
|
|
102
|
+
> Separately, investigate why login is slow. Prioritize the export first.
|
|
566
103
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
104
|
+
The Operator uses existing Task context to decide what belongs together and
|
|
105
|
+
what deserves an independent Task. It can organize work by Project, type,
|
|
106
|
+
priority and tags. A follow-up need not become a new Task, and a Task need not
|
|
107
|
+
be split into a WorkItem for every implementation step.
|
|
571
108
|
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
show`, `task work list`, Task context, and the Web control room derive execution
|
|
578
|
-
shape, recovery targets, synthesis eligibility, main Turn, Candidate provenance,
|
|
579
|
-
next action, and owner from the same persisted facts. Missing facts stay
|
|
580
|
-
`unknown` or `unobserved`; token, duration, and tool-call totals are display-only.
|
|
581
|
-
|
|
582
|
-
Permission is one adapter-specific enum configuration on each Agent binding:
|
|
583
|
-
`default` follows the provider, `bypass` compiles the provider's supported
|
|
584
|
-
bypass flag, and `configured` retains whichever native options are explicitly
|
|
585
|
-
set. Codex options are `sandbox` and `approval`; Claude options are `mode`,
|
|
586
|
-
`allowedTools`, and `disallowedTools`. Provider permission is independent from
|
|
587
|
-
Profile behavior and Project write authority: only an exact WorkItem scope and
|
|
588
|
-
matching managed workspace grant normal Project writes. A ReviewRound is the only non-WorkItem write
|
|
589
|
-
purpose and must match its Turn, reviewRoundId, frozen base, and
|
|
590
|
-
ReviewRound-owned main workspace or exact isolated Producer Lane workspace;
|
|
591
|
-
every mismatch fails closed. Its diagnostic commit
|
|
592
|
-
is visible history but is
|
|
593
|
-
explicitly rejected by capture, ChangeSet, Integration, and acceptance paths.
|
|
594
|
-
The Reviewer's final Provider response is its complete free-form Markdown or
|
|
595
|
-
JSON result. Yui stores that text unchanged and does not parse headings, field
|
|
596
|
-
names, checks, severities, findings, or verdicts. Core-owned workspace and Git
|
|
597
|
-
evidence remains separate from Agent prose. Dirty uncommitted diagnosis may end
|
|
598
|
-
without a commit; the worktree is retained and cleanup refuses it until it is
|
|
599
|
-
clean.
|
|
600
|
-
|
|
601
|
-
Every Role desired launch change increments its revision and applies only to a
|
|
602
|
-
future launch. Each Turn and native Role Session stores the complete actual
|
|
603
|
-
agent, adapter, model, effort, Profile access intent, exact writable Projects,
|
|
604
|
-
permission strategy and native options, workspace, context, and source desired revision. Updating,
|
|
605
|
-
switching, or clearing Role overrides never
|
|
606
|
-
hot-mutates an existing process. When the Role has a live Session,
|
|
607
|
-
`task role update`, `config role update`, and `config agent update` report that
|
|
608
|
-
Session once and require `--yes`, so the change is recorded in the knowledge
|
|
609
|
-
that it applies to the next activation; stopping the Session applies it
|
|
610
|
-
immediately instead. `task context`, Role views, Turn history,
|
|
611
|
-
Events, and Web show desired/effective revisions, Profile intent, permission, and
|
|
612
|
-
pending next-launch drift.
|
|
613
|
-
|
|
614
|
-
Both Codex and Claude deliver a managed Turn through the Provider's native Turn
|
|
615
|
-
terminal. Yui stores the final assistant response as the exact Turn result,
|
|
616
|
-
submits the WorkItem for Leader review, and queues the Leader. It does not
|
|
617
|
-
accept the WorkItem. A Leader never wakes itself; any pending Operator or Worker
|
|
618
|
-
wake remains durable until the Leader is idle.
|
|
619
|
-
|
|
620
|
-
If the outcome cannot be determined, label the handoff `uncertain`,
|
|
621
|
-
`incomplete`, `blocked`, or `requiring Leader judgment` and submit the most
|
|
622
|
-
complete truthful identities, actions, repository state, checks and errors,
|
|
623
|
-
lifecycle boundary, unfinished work, open decisions, risks, confidence, and
|
|
624
|
-
bounded next options. The Turn result is immutable execution evidence only; it
|
|
625
|
-
does not imply acceptance, WorkItem completion, ChangeSet capture,
|
|
626
|
-
Integration, or Task completion.
|
|
627
|
-
|
|
628
|
-
For one substantial feature requirement, the Leader may create a WorkItem and
|
|
629
|
-
give it to a native subagent or Task Role Worker. A small Task or bugfix stays
|
|
630
|
-
on Task main. Do not create a WorkItem merely to record implementation steps,
|
|
631
|
-
tests, review, or follow-up fixes:
|
|
109
|
+
The Leader owns delivery: small work can stay with the Leader; independent
|
|
110
|
+
requirements can go to configured Workers; a Reviewer can inspect the result
|
|
111
|
+
when appropriate. Agents choose the plan and delegation. The Controller
|
|
112
|
+
delivers the scheduled work, observes execution and returns results to the
|
|
113
|
+
responsible Agent—without requiring you to relay messages between sessions.
|
|
632
114
|
|
|
633
|
-
|
|
634
|
-
yui task work create <task-id> "Implement the export API" \
|
|
635
|
-
--objective "Deliver the independently acceptable export API requirement" \
|
|
636
|
-
--accept "The API contract and focused validation are complete"
|
|
637
|
-
yui task work update <task-id>/<work-item-id> running
|
|
638
|
-
yui config profile show reviewer
|
|
639
|
-
```
|
|
115
|
+
### Configure by asking
|
|
640
116
|
|
|
641
|
-
|
|
642
|
-
runtime; there is no Yui subagent launch command and Yui does not manage the
|
|
643
|
-
child Session. The Leader must select and read an explicit Worker Profile,
|
|
644
|
-
using `worker` when no specialist fits, and include its revision, instructions,
|
|
645
|
-
Skills, access expectations, validation, and supported model/effort hints in
|
|
646
|
-
the child brief. Agent bindings on Task Roles are ignored: the child inherits
|
|
647
|
-
the Leader Agent, credentials, and conversation context. The Leader reviews the
|
|
648
|
-
returned result and records the actual execution facts:
|
|
117
|
+
Stay in the Operator conversation to change how Yui works:
|
|
649
118
|
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
--summary "executor=subagent; profile=reviewer@3; model=inherited; round=1; result=reviewed; checks=npm test passed"
|
|
653
|
-
```
|
|
119
|
+
> Show me the available Agents and models. Suggest a setup for planning,
|
|
120
|
+
> implementation and review, then apply it after I confirm.
|
|
654
121
|
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
122
|
+
The Operator reads the actual configuration and supported choices before
|
|
123
|
+
making changes. You can ask it to change a model, bind another Agent, adjust
|
|
124
|
+
review preferences or explain a setting. It should tell you what changes,
|
|
125
|
+
whether it affects future launches or a live Session, and which choices need
|
|
126
|
+
your confirmation. You do not need to hand-edit configuration files.
|
|
660
127
|
|
|
661
|
-
|
|
662
|
-
An insufficient result is rejected with feedback and redispatched in the same
|
|
663
|
-
workspace. An acceptable result is captured and integrated in a candidate
|
|
664
|
-
worktree. Checks run there, and the target advances only if its recorded HEAD
|
|
665
|
-
still matches:
|
|
128
|
+
### Pick up where you left off
|
|
666
129
|
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
--work-item <work-item-id> \
|
|
670
|
-
--strategy cherry-pick \
|
|
671
|
-
--check "npm test"
|
|
672
|
-
```
|
|
130
|
+
> What is still active? Which tasks need my decision? Continue the CSV task
|
|
131
|
+
> from its saved state and summarize what remains.
|
|
673
132
|
|
|
674
|
-
|
|
133
|
+
Tasks retain requirements, decisions and results independently of the native
|
|
134
|
+
chat history. Yui delivers durable updates to the Operator; the Agent can
|
|
135
|
+
recover context and continue compatible sessions, or choose a new execution
|
|
136
|
+
when necessary. A failed process does not erase the Task, and an uncertain
|
|
137
|
+
submission is not silently repeated.
|
|
675
138
|
|
|
676
|
-
|
|
139
|
+
For a visual overview, run `yui web` in another terminal. The local Web view
|
|
140
|
+
shows the same tasks and pending questions; it is not a separate task system.
|
|
677
141
|
|
|
678
|
-
|
|
679
|
-
yui task integration resolve <task-id>/<integration-id> \
|
|
680
|
-
--option manual-resolution \
|
|
681
|
-
--rationale "Preserve the public contract while combining both implementations"
|
|
682
|
-
yui task integration continue <task-id>/<integration-id>
|
|
683
|
-
```
|
|
142
|
+
## Architecture
|
|
684
143
|
|
|
685
|
-
|
|
686
|
-
|
|
144
|
+
Under the hood, Yui keeps every durable fact in one local SQLite store and lets
|
|
145
|
+
Agents act on it through small, explicit operations. Here is the same system
|
|
146
|
+
from a few different angles:
|
|
687
147
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
148
|
+
- [Product structure](#product-structure) — the durable objects you work with
|
|
149
|
+
- [How work flows](#how-work-flows) — the closed loop around a Task
|
|
150
|
+
- [User message flow](#user-message-flow) — what happens when you send a message
|
|
151
|
+
- [Core modules](#core-modules) — the long-lived runtime pieces
|
|
152
|
+
- [Layered design](#layered-design) — responsibilities, top to bottom
|
|
153
|
+
- [Lifecycle](#lifecycle) — states a Task and WorkItem move through
|
|
691
154
|
|
|
692
|
-
|
|
693
|
-
and `task work retire <task>/<work> --summary "..."` to retire obsolete work,
|
|
694
|
-
optionally naming a replacement. WorkItem and Integration
|
|
695
|
-
worktrees and check logs remain available as evidence until explicit cleanup.
|
|
155
|
+
### Product structure
|
|
696
156
|
|
|
697
|
-
|
|
698
|
-
operational projections without deleting their audit records:
|
|
157
|
+
What Yui organizes for you — durable objects, not processes:
|
|
699
158
|
|
|
700
|
-
```
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
For long-running Tasks, the Leader keeps Yui—not a native transcript—as the
|
|
713
|
-
recovery authority. The Task Brief owns the overall technical approach,
|
|
714
|
-
including how coordinated Project changes fit together. WorkItems own the
|
|
715
|
-
executable per-Project modifications and acceptance checks. The Leader updates
|
|
716
|
-
Brief focus and Leader summary before ending each Provider Turn, records material choices as
|
|
717
|
-
Decisions, adds phase outcomes as Milestones, and promotes only cross-Task
|
|
718
|
-
stable facts to Project Knowledge.
|
|
719
|
-
|
|
720
|
-
When an active Leader Turn cannot continue without a user decision, it creates a durable InputRequest and ends its Provider Turn with a truthful blocked result:
|
|
721
|
-
|
|
722
|
-
```sh
|
|
723
|
-
yui task input request <task-id> --question "Which format should be the default?" \
|
|
724
|
-
--choice csv="CSV" --choice json="JSON" --blocks work-item:<work-item-id>
|
|
725
|
-
yui task input list
|
|
726
|
-
yui task input show <task-id>/<input-id>
|
|
727
|
-
yui task input answer <task-id>/<input-id> --choice csv
|
|
728
|
-
```
|
|
729
|
-
|
|
730
|
-
Requests are user-required by default and remain open until answered or cancelled. When the Agent has a safe recommendation, it may attach a choice fallback and explicit timeout:
|
|
731
|
-
|
|
732
|
-
```sh
|
|
733
|
-
yui task input request <task-id> --question "Which format should be the default?" \
|
|
734
|
-
--choice csv="CSV" --choice json="JSON" \
|
|
735
|
-
--recommend csv --timeout-seconds 300
|
|
736
|
-
```
|
|
737
|
-
|
|
738
|
-
The recommendation is shown to the user. If no answer arrives, the nearest-deadline timer wakes the Controller to atomically apply that exact choice and queue the fixed Leader session to resume. Free-text and user-required requests never auto-resolve.
|
|
739
|
-
|
|
740
|
-
`task input list` is the authoritative global open-input Inbox; add a Task ID to scope it, or `--all` to include answered and cancelled requests. Task completion, retirement, Leader attention, stalls, and open input are queued to the global Operator mailbox only as immutable TaskEvent or InputRequest references. The Controller merges one pending mailbox batch into one receipt-backed `[Yui updates]` user message for an existing ready Operator; the Operator reads the referenced records through the CLI and decides what is worth presenting. A running or unavailable Operator is never started or interrupted: the whole batch remains durable and is retried after native turn completion or a later Controller pass. This path is a user message, not a tool call, and it never inspects or classifies Agent terminal text. Answers may be submitted by the user or Operator. An open request prevents unrelated pending wakes and Task completion or archival. The originating Leader may instead run `yui task input cancel <task-id> <input-id> --reason "..."`; cancellation queues that fixed Leader session to resume.
|
|
741
|
-
|
|
742
|
-
Inspect the result:
|
|
743
|
-
|
|
744
|
-
```sh
|
|
745
|
-
yui task context <task-id>
|
|
746
|
-
```
|
|
747
|
-
|
|
748
|
-
Use the narrower `task work`, `task message`, `task turn`, and Task Knowledge commands when you need one collection or record.
|
|
749
|
-
|
|
750
|
-
Record a Task's confirmed PR/MR delivery state with one idempotent command:
|
|
751
|
-
|
|
752
|
-
```sh
|
|
753
|
-
yui task publication upsert <task-id> --project <project> \
|
|
754
|
-
--provider github --repository <owner/name> --kind pull-request --id <number> \
|
|
755
|
-
--url <url> --state open --reported
|
|
756
|
-
```
|
|
757
|
-
|
|
758
|
-
The required provider/repository/external ID selects the current Publication.
|
|
759
|
-
The first upsert creates it. Later upserts inherit omitted metadata and omitted
|
|
760
|
-
merge evidence only while the full evidence context remains unchanged. That
|
|
761
|
-
context is the local commit, PR/MR state, remote commit, evidence text, and
|
|
762
|
-
merge time. If any explicitly supplied context value differs, omitted
|
|
763
|
-
verification resets to `reported` and omitted merge-evidence fields are
|
|
764
|
-
cleared; changing the local commit without an explicit state also resets the
|
|
765
|
-
Publication to `open`. Resupplying identical values remains idempotent. Each
|
|
766
|
-
semantic change appends a new immutable record linked to the previous version,
|
|
767
|
-
while identical input creates no event. `list`, `show`, and `task context`
|
|
768
|
-
retain the complete history. This records facts already known to the caller;
|
|
769
|
-
it does not query a provider or replace Review, Integration, or Task completion
|
|
770
|
-
gates.
|
|
771
|
-
|
|
772
|
-
Verify one current GitHub or GitLab Publication against the real PR/MR state:
|
|
773
|
-
|
|
774
|
-
```sh
|
|
775
|
-
yui task publication verify <task-id>/<publication-id>
|
|
776
|
-
```
|
|
777
|
-
|
|
778
|
-
Verification is an explicit external read. GitHub uses a trusted, PATH-pinned
|
|
779
|
-
local `gh` executable; GitLab uses a trusted, PATH-pinned local `glab`
|
|
780
|
-
executable. Both reuse the CLI's existing authentication, and Yui stores no
|
|
781
|
-
provider token. The command requires the current unsuperseded Publication to
|
|
782
|
-
record the exact Task delivery head, then requires the provider to report the
|
|
783
|
-
same PR/MR head as merged and expose the integrated remote commit. It rechecks
|
|
784
|
-
the Task head and Publication after the remote call before appending a new
|
|
785
|
-
immutable `verified` record. Missing provider CLIs, unavailable
|
|
786
|
-
authentication, ambiguous provider output, open/closed PRs or MRs, moved
|
|
787
|
-
heads, and concurrent local changes fail without recording verification.
|
|
788
|
-
GitLab repositories may use nested namespaces; a recorded self-hosted MR URL
|
|
789
|
-
selects that GitLab host.
|
|
790
|
-
|
|
791
|
-
Query whether every delivered Project head is represented by a current merged
|
|
792
|
-
Publication:
|
|
793
|
-
|
|
794
|
-
```sh
|
|
795
|
-
yui task remote-delivery <task-id>
|
|
796
|
-
yui task remote-delivery <task-id> --json
|
|
797
|
-
```
|
|
798
|
-
|
|
799
|
-
This is a read-only derived projection, not a Task status or writable `merged`
|
|
800
|
-
flag. Active and reopened Tasks use the current clean Task-main heads and mark
|
|
801
|
-
them provisional; completed and archived Tasks use the latest frozen
|
|
802
|
-
`task.completed` heads. For each Project, Yui reports the expected local
|
|
803
|
-
commit, the matching current unsuperseded Publication, PR/MR state,
|
|
804
|
-
verification, and remote commit. Aggregate coverage is `none`, `unavailable`,
|
|
805
|
-
`pending`, `partial`, or `merged`, with independent `allMerged` and
|
|
806
|
-
`allVerified` values.
|
|
807
|
-
Only a current Publication whose `localCommit` exactly matches the expected
|
|
808
|
-
head and whose state is `merged` contributes merged coverage. Missing commits,
|
|
809
|
-
open/closed records, stale heads, and superseded Publications never imply
|
|
810
|
-
remote delivery. Projects whose Task head equals their managed base need no
|
|
811
|
-
Publication. `task show`, `task context`, `task next-action`, and the Web detail
|
|
812
|
-
projection use this same selector.
|
|
813
|
-
`Archive --integrated coverage` requires both `allMerged=true` and
|
|
814
|
-
`allVerified=true`.
|
|
815
|
-
|
|
816
|
-
When a valid older completed Task has no frozen completion heads, Yui reports
|
|
817
|
-
`unavailable` and keeps integrated archive fail-closed. Reopen and complete the
|
|
818
|
-
Task again to record exact heads, then retry archive. Yui does not guess the
|
|
819
|
-
missing head from a Publication or worktree, and `--force` never overrides
|
|
820
|
-
missing head evidence.
|
|
821
|
-
|
|
822
|
-
When the requested outcome is finished, complete the Task to stop automatic Leader wakes without deleting its sessions or Task main worktree:
|
|
823
|
-
|
|
824
|
-
```sh
|
|
825
|
-
yui task complete <task-id> --summary "CSV export shipped and verified"
|
|
826
|
-
yui task complete <task-id> --summary-file delivery.txt --refresh-remote
|
|
827
|
-
yui task reopen <task-id>
|
|
828
|
-
```
|
|
829
|
-
|
|
830
|
-
When a verified squash-merge Publication records a remote commit that is
|
|
831
|
-
ancestry-divergent from the unchanged local Task head, a user or global Operator
|
|
832
|
-
may explicitly authorize completion against its identical Git tree:
|
|
833
|
-
|
|
834
|
-
```sh
|
|
835
|
-
yui task complete <task-id> --summary-file delivery.txt \
|
|
836
|
-
--accept-published-tree <publication-id>
|
|
837
|
-
```
|
|
838
|
-
|
|
839
|
-
This is an independent exact-tree authorization. Yui requires the current,
|
|
840
|
-
unsuperseded Publication to be merged and verified, its local commit to equal
|
|
841
|
-
the physical Task head, its remote commit to be ancestry-divergent, and both
|
|
842
|
-
commits to resolve to the same exact tree. When a Task-final Review obligation
|
|
843
|
-
exists, completion also requires the latest semantic Round to attest the
|
|
844
|
-
accepted Task head; otherwise completion does not invent a ReviewRound.
|
|
845
|
-
`--refresh-remote` fetches
|
|
846
|
-
the remote object graph before resolving that Publication commit. For a Task
|
|
847
|
-
governed by a durable final-review contract, the stored contract continues to
|
|
848
|
-
require its Reviewer policy, but compatible CLI and Controller updates do not
|
|
849
|
-
need to reproduce its historical control-plane digest. Tasks without that
|
|
850
|
-
contract retain the one-step explicit completion path. The Task event
|
|
851
|
-
audit records the authorization and, on completion, the accepted Project,
|
|
852
|
-
Publication, optional ReviewRound, both commits, and tree.
|
|
853
|
-
|
|
854
|
-
Completed Tasks reject messages, dispatch, Provider authority changes, retry,
|
|
855
|
-
and late Turn delivery until explicitly reopened, while retaining Task main for
|
|
856
|
-
inspection or integration. Terminal WorkItem, Review, Integration, and Lane
|
|
857
|
-
worktrees are non-blocking completion advisories, but they must be settled
|
|
858
|
-
before archive. Every isolated WorkItem worktree is explicitly cleaned as
|
|
859
|
-
integrated or abandoned; that cleanup also removes its managed branch. Archive
|
|
860
|
-
requires `--integrated` or `--abandon` to state the Task main outcome and is
|
|
861
|
-
allowed only after Task main is clean. `--integrated` additionally requires
|
|
862
|
-
remote-delivery `allMerged=true` and `allVerified=true`; Task completion or a
|
|
863
|
-
reported merge alone is never treated as verified remote delivery. When every
|
|
864
|
-
exact Task head is merged but one or more Publications remain `reported`, the
|
|
865
|
-
command identifies those Publications and refuses archive. An explicitly
|
|
866
|
-
authorized `task archive <task-id> --integrated --force` may override only that
|
|
867
|
-
verification gap and records the override in the archive event; it never
|
|
868
|
-
bypasses missing, stale, open, or closed merge evidence. An intentional
|
|
869
|
-
non-merge uses the existing explicit `--abandon` path. Archive removes managed
|
|
870
|
-
worktrees but retains Task and WorkItem records. The Task main branch is
|
|
871
|
-
retained as a recovery artifact instead of being silently deleted.
|
|
872
|
-
Task lifecycle completion/selection only suggests valid source states: Draft for activate, active for complete, and completed for reopen.
|
|
873
|
-
|
|
874
|
-
## Sessions and tmux
|
|
875
|
-
|
|
876
|
-
Managed Task Agents use the [hybrid Provider runtime](docs/provider-runtime.md).
|
|
877
|
-
Provider conversations remain ordinary user conversations. Yui adds the Role
|
|
878
|
-
Skill and Session Manifest pointer, then sends Task work through provider-native
|
|
879
|
-
structured requests. Managed prompts are never delivered as terminal bytes.
|
|
880
|
-
|
|
881
|
-
Codex establishes the App Server WebSocket protocol through `app-server proxy`
|
|
882
|
-
to create or resume an ordinary thread on the shared native daemon. The thread
|
|
883
|
-
remains visible and directly usable in Desktop. Task execution stop terminates
|
|
884
|
-
Yui's Agent Host and proxy while leaving the daemon and thread untouched; start
|
|
885
|
-
creates a fresh proxy attachment.
|
|
886
|
-
If the proxy disconnects, the Host may attach a bounded replacement client and
|
|
887
|
-
reconcile the exact owned Turn from native history. A failed fresh attachment
|
|
888
|
-
is released instead of becoming a cleanup prerequisite for later Turns.
|
|
889
|
-
Claude Code keeps its independent stream-json process. Agent Host is the sole
|
|
890
|
-
writer to that process, so a completed stream write accepts the Turn; the
|
|
891
|
-
later provider `result` event settles it. An uncertain write becomes
|
|
892
|
-
`delivery-unknown` and is never automatically retried.
|
|
893
|
-
|
|
894
|
-
Task Role observation and takeover are explicit:
|
|
895
|
-
|
|
896
|
-
```sh
|
|
897
|
-
yui task role view <task-id> <role>
|
|
898
|
-
yui task role takeover <task-id> <role>
|
|
899
|
-
yui task role release <task-id> <role>
|
|
900
|
-
```
|
|
901
|
-
|
|
902
|
-
For an independently hosted Provider such as Claude, these commands are the
|
|
903
|
-
supported human-control boundary. A Codex Role uses an ordinary shared thread
|
|
904
|
-
and may be operated directly in Desktop; an active Desktop Turn creates bounded
|
|
905
|
-
backpressure for Yui rather than a failed Turn.
|
|
906
|
-
|
|
907
|
-
Turn is the only durable Role scheduling state. Conversation state does not
|
|
908
|
-
carry a second current-Turn pointer. A Yui-dispatched Provider Turn carries the
|
|
909
|
-
durable Turn id that correlates its visible input and terminal result; a direct
|
|
910
|
-
Provider Turn is recorded as direct conversation history without entering the
|
|
911
|
-
scheduling pointer. A native Turn terminal completes that Turn, after which Yui
|
|
912
|
-
may claim the next Turn and submit it through the same Session.
|
|
913
|
-
TaskRole itself stores identity and desired launch configuration, not runtime
|
|
914
|
-
status; Role status shown by CLI/Web is derived from the active Turn plus
|
|
915
|
-
Session/Driver lifecycle facts.
|
|
916
|
-
|
|
917
|
-
Global Operator and global Role sessions remain native interactive CLIs. Codex
|
|
918
|
-
connects that TUI to the default shared App Server, so the same thread can move
|
|
919
|
-
between Yui and Desktop without transferring a rollout writer or losing its
|
|
920
|
-
Global Context entry. A thin Host in the same pane transparently forwards the
|
|
921
|
-
native TUI's App Server connection and acknowledges its exact `thread/start`
|
|
922
|
-
or `thread/resume` response. Yui records that Thread ID before the first user
|
|
923
|
-
Turn, without depending on `notify`, scanning history, or creating a bootstrap
|
|
924
|
-
message. The attachment outlives Controller restarts but exits with the TUI:
|
|
925
|
-
|
|
926
|
-
```sh
|
|
927
|
-
yui session enter <global-role>
|
|
928
|
-
```
|
|
929
|
-
|
|
930
|
-
`yui update` accepts either the current Home contract or any valid historical
|
|
931
|
-
contract at or above the staged CLI's minimum supported migration version.
|
|
932
|
-
Unsupported newer Homes and Homes below that floor remain untouched.
|
|
933
|
-
|
|
934
|
-
tmux fixes a pane's history capacity when that pane is created. Existing panes
|
|
935
|
-
retain their configured capacity; managed runtime output remains observable in
|
|
936
|
-
the Agent Host pane without becoming lifecycle or acknowledgement evidence.
|
|
937
|
-
|
|
938
|
-
Each Role, including Operator and a Task-bound Worker instance, can bind multiple
|
|
939
|
-
configured Agents, has one active Agent, and keeps a separate native session per
|
|
940
|
-
Agent binding. Multiple bindings may use the same adapter for different accounts,
|
|
941
|
-
models, profiles, or environment sources. They are ready-to-switch configurations,
|
|
942
|
-
not parallel writers: the active binding remains the unique authority. Operator can
|
|
943
|
-
keep multiple conversations for each binding. `operator new` and
|
|
944
|
-
`operator resume` reuse the single Operator tmux pane: when a process is
|
|
945
|
-
running, Yui asks before stopping it and switching the conversation. On a
|
|
946
|
-
cross-Agent switch, the saved model and effort are reused unless the user
|
|
947
|
-
explicitly chooses to update them.
|
|
948
|
-
|
|
949
|
-
Window existence does not imply a running Agent: `pane_dead=0` is live and
|
|
950
|
-
`pane_dead=1` is an exited, retained diagnostic pane. Status reads never delete
|
|
951
|
-
that evidence, and unreadable state is an error rather than proof of exit.
|
|
952
|
-
An explicit launch can rebuild the exact dead window; tmux refuses to replace
|
|
953
|
-
a live pane. An unidentified live Operator still cannot be overwritten.
|
|
954
|
-
|
|
955
|
-
The Role's active binding is desired state for the next launch. A
|
|
956
|
-
running Turn and its native Session continue under their immutable
|
|
957
|
-
effective snapshot even if the Role is edited or switched. Resume is refused
|
|
958
|
-
only when continuation is impossible: no recoverable native Session, a
|
|
959
|
-
different Agent or adapter, or a different physical workspace. Desired launch
|
|
960
|
-
configuration such as model, effort, permission, Role context, Skills, or
|
|
961
|
-
declared write scope shapes the next activation instead of ending the Session,
|
|
962
|
-
and Turn-scoped facts such as ReviewRound identity or candidate commits never
|
|
963
|
-
affect reuse. When continuation is impossible Yui starts a new Session after
|
|
964
|
-
the old process has stopped and keeps the terminal Session's immutable
|
|
965
|
-
effective snapshot in history. Managed
|
|
966
|
-
Sessions invoke the ordinary `yui` command; their Manifest and durable
|
|
967
|
-
Role/Turn fences authenticate scope while protocol and storage compatibility
|
|
968
|
-
allow a CLI package or Controller upgrade in place. Exact internal callbacks
|
|
969
|
-
remain fenced to their originating runtime snapshot.
|
|
970
|
-
|
|
971
|
-
Use `yui config role unbind <global-role> <agent-id>` or `yui task role unbind <task-id> <role> <agent-id>` to retire a dormant binding. The active binding and any non-stopped native session are rejected; a stopped session record is removed atomically with the binding.
|
|
972
|
-
|
|
973
|
-
Claude session IDs are preallocated at launch. Codex discovers its native
|
|
974
|
-
thread identity from App Server responses. Managed Task Turns use structured
|
|
975
|
-
Provider observations for both CLIs. Global Codex uses the native TUI's exact
|
|
976
|
-
App Server startup response and the existing Host acknowledgement. Legacy
|
|
977
|
-
global `notify` callbacks cannot register a Session or change its lifecycle.
|
|
978
|
-
|
|
979
|
-
Automated lifecycle and delivery decisions use structured Provider events or
|
|
980
|
-
supported Hook payloads, persisted identities, usage snapshots, tmux process state, receipts, and pane
|
|
981
|
-
fences. Yui never
|
|
982
|
-
parses prompt glyphs, progress text, trust dialogs, or other Agent terminal
|
|
983
|
-
output to infer readiness or success. `captureRole()` remains an explicit
|
|
984
|
-
human-facing transcript read and has no lifecycle authority.
|
|
985
|
-
|
|
986
|
-
The [AgentRuntime Driver architecture](docs/agent-runtime-drivers.md) keeps
|
|
987
|
-
native Codex/Claude event names at the edge. Core consumes exact-fenced
|
|
988
|
-
Session, Turn, operation, waiting, host, and activity observations. A positive
|
|
989
|
-
token delta is evidence of recent runtime activity; an unchanged counter is
|
|
990
|
-
not. A live tmux pane proves only that the host exists. Runtime activity and
|
|
991
|
-
durable workflow progress use independent clocks, so token/tool/resource
|
|
992
|
-
movement cannot conceal a workflow that is not advancing.
|
|
993
|
-
|
|
994
|
-
Stable Role context never creates a separate bootstrap Turn. Task execution Turns use the generic Leader or Worker Skill, while review Turns use the generic Reviewer Skill based on durable Turn purpose rather than a configured Role name. The provider either carries the Skill through a safe additive native context channel or points to it from the ordinary Task delivery. These Yui-owned Role Skills define portable orchestration only. Project Skills remain ordinary versioned files in the Project and are discovered, selected, and loaded by the Agent through its native project mechanism; Yui does not scan, parse, copy, or inject them.
|
|
995
|
-
|
|
996
|
-
Managed Codex keeps the user's native developer instructions unchanged. The ordinary Task message includes a compact absolute Session Manifest pointer, and the manifest identifies the matching Yui-owned Role Skill for Codex to read on demand. Model, effort, permission, workspace, and shell settings are supplied to `thread/start` or `thread/resume` through the shared App Server daemon; a Codex native config profile is rejected because it cannot be isolated to one shared-daemon thread. The underlying Codex config file is never mutated. App Server notifications are the managed thread's lifecycle authority; Yui installs no managed Codex Hook and does not claim `notify`. Interactive Codex Sessions may still use Yui's structured `notify` callback, and Doctor reports any effective configuration conflict. `skills.config` is not misused because it only enables or disables already-discovered Skills. Claude receives the same Yui-owned Role Skill content from a private `0600` managed context file rather than a large or sensitive argv value; retries and resumes reuse the purpose-specific Role path. Non-Operator global Roles stay neutral and receive no Task orchestration Skill. Operator therefore opens at an empty native composer, so the user's text remains its first user message. Leader wakeups and Worker or Reviewer Turn assignments remain real mailbox-delivered work messages.
|
|
997
|
-
|
|
998
|
-
## Controller and failure handling
|
|
999
|
-
|
|
1000
|
-
One background Controller runs per `YUI_HOME`:
|
|
1001
|
-
|
|
1002
|
-
```sh
|
|
1003
|
-
yui controller status
|
|
1004
|
-
yui controller status --all
|
|
1005
|
-
yui controller status --all --verbose
|
|
1006
|
-
yui controller cleanup
|
|
1007
|
-
yui controller cleanup --all
|
|
1008
|
-
yui controller stop
|
|
1009
|
-
yui controller restart
|
|
159
|
+
```text
|
|
160
|
+
Global
|
|
161
|
+
├─ Operator ── the Agent you converse with; spans all Projects & Tasks
|
|
162
|
+
└─ Projects
|
|
163
|
+
└─ Project ── a managed codebase + its Project Knowledge
|
|
164
|
+
└─ Task ── one bounded outcome you asked for
|
|
165
|
+
├─ Brief ......... objective · boundaries · approach
|
|
166
|
+
├─ Roles ......... Leader (owns it) · Workers · Reviewers
|
|
167
|
+
├─ WorkItems ..... independently acceptable requirements
|
|
168
|
+
│ └─ AgentRun .. one requested execution ─▶ Result
|
|
169
|
+
├─ Messages ...... durable conversation + Decisions
|
|
170
|
+
└─ Review / Integration ─▶ accepted delivery
|
|
1010
171
|
```
|
|
1011
172
|
|
|
1012
|
-
|
|
1013
|
-
shows a bounded summary of the current Controller, owned Agent sessions, residual
|
|
1014
|
-
resources, and live anomalies. `--all` also discovers other same-user Yui homes
|
|
1015
|
-
from running processes; `--verbose` expands the resource details. `--json`
|
|
1016
|
-
returns the complete typed snapshot even when the human view is abbreviated.
|
|
173
|
+
### How work flows
|
|
1017
174
|
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
175
|
+
```text
|
|
176
|
+
You
|
|
177
|
+
│ describe work · answer questions · refine scope
|
|
178
|
+
▼
|
|
179
|
+
Operator ── reads your intent, then either:
|
|
180
|
+
│ • opens a NEW Task, or
|
|
181
|
+
│ • APPENDS to an existing Task (a follow-up)
|
|
182
|
+
▼
|
|
183
|
+
Task ── owned by one Leader, who runs the closed loop:
|
|
184
|
+
│
|
|
185
|
+
│ plan ─▶ split into WorkItems ─▶ deliver ─▶ review ─▶ close
|
|
186
|
+
│
|
|
187
|
+
│ each WorkItem is advanced by the Leader itself, or delegated:
|
|
188
|
+
│ ├──▶ Worker another Agent implements it
|
|
189
|
+
│ └──▶ Reviewer checks the result before it is accepted
|
|
190
|
+
│
|
|
191
|
+
▼
|
|
192
|
+
Results and decisions come back to you — and you can talk to the Leader
|
|
193
|
+
directly about a task's details anytime.
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### User message flow
|
|
197
|
+
|
|
198
|
+
What happens when you send one message — the Controller only wakes Agents; the
|
|
199
|
+
durable record always lives in the store:
|
|
1025
200
|
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
201
|
+
```text
|
|
202
|
+
── Inbound ────────────────────────────────────────────────────────────────
|
|
203
|
+
You ─▶ Operator ─▶ records a Task (new, or a follow-up) + a Message ─▶ yui.db
|
|
204
|
+
│
|
|
205
|
+
Controller wakes the Leader
|
|
206
|
+
▼
|
|
207
|
+
── Work ───────────────────────────────────────────────────────────────────
|
|
208
|
+
Leader reads Context ─▶ acts itself, or delegates to Workers / Reviewers
|
|
209
|
+
─▶ writes results · decisions · messages ─▶ yui.db
|
|
210
|
+
│
|
|
211
|
+
Controller wakes the Operator
|
|
212
|
+
▼
|
|
213
|
+
── Outbound ───────────────────────────────────────────────────────────────
|
|
214
|
+
yui.db ─▶ Operator reads the updates ─▶ replies to You
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Core modules
|
|
218
|
+
|
|
219
|
+
The long-lived runtime pieces. You only ever talk to the Operator; Agents and
|
|
220
|
+
the Controller are what touch the store:
|
|
1031
221
|
|
|
1032
|
-
|
|
222
|
+
```text
|
|
223
|
+
You
|
|
224
|
+
│ natural-language conversation with the Operator
|
|
225
|
+
│ (you never drive the Controller or the store yourself)
|
|
226
|
+
▼
|
|
227
|
+
Agent sessions · in tmux
|
|
228
|
+
│ Operator ── the Agent you talk to; routes requests into Tasks
|
|
229
|
+
│ Leader · Workers · Reviewers ── plan, deliver and review the work
|
|
230
|
+
│ each drives a native Agent via AgentHost / AgentEndpoint / Driver:
|
|
231
|
+
│ Codex CLI (App Server) · Claude Code CLI (stream-json) · ACP peers
|
|
232
|
+
│
|
|
233
|
+
│ Agents read Context and make atomic changes (yui operations)
|
|
234
|
+
▼
|
|
235
|
+
┌─ yui.db — SQLite (WAL) · single source of truth · one txn per change
|
|
236
|
+
│ Tasks · WorkItems · AgentRuns · Messages · Decisions · Results
|
|
237
|
+
└─ Project Knowledge · configuration
|
|
238
|
+
▲
|
|
239
|
+
│ reads & records runtime facts; wakes and delivers work to the sessions
|
|
240
|
+
│
|
|
241
|
+
Controller · one per Home
|
|
242
|
+
delivery · Scheduler · jobs · capability host · Web listener
|
|
243
|
+
it moves work and records facts — it never judges an answer
|
|
244
|
+
|
|
245
|
+
Agents work in Projects: read-only checkout + isolated worktrees.
|
|
246
|
+
Web view (yui web): a loopback, read-only projection of the store.
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### Layered design
|
|
250
|
+
|
|
251
|
+
Each layer owns one responsibility and exposes small, explicit capabilities —
|
|
252
|
+
never a fixed workflow:
|
|
1033
253
|
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
254
|
+
```text
|
|
255
|
+
Experience — how you interact
|
|
256
|
+
CLI (Operator) · Web (loopback, read-only) · native Agent sessions
|
|
257
|
+
collect input · show facts · confirm actions · invoke capabilities
|
|
258
|
+
▼
|
|
259
|
+
Intelligence — who decides
|
|
260
|
+
Operator: recognize requests, split Tasks
|
|
261
|
+
Leader: plan · delegate · judge · complete one Task
|
|
262
|
+
Workers · Reviewers (behavior comes from Roles & Skills)
|
|
263
|
+
▼
|
|
264
|
+
Capability — the atomic operations Yui exposes
|
|
265
|
+
deliver: Task · WorkItem · Decision · Candidate · Review
|
|
266
|
+
context: Context · Message · InputRequest · Project Knowledge
|
|
267
|
+
config: Roles · Agent config · Project · Plugin
|
|
268
|
+
execute: dispatch · inspect · stop · resources · Artifact
|
|
269
|
+
▼
|
|
270
|
+
Execution — how work actually runs
|
|
271
|
+
AgentHost / AgentEndpoint / Driver, each in a tmux session
|
|
272
|
+
Codex CLI (App Server) · Claude Code CLI (stream-json) · ACP peers
|
|
273
|
+
managed Git worktrees · adopted environments
|
|
274
|
+
▼
|
|
275
|
+
Kernel — durable authority: yui.db (SQLite, WAL)
|
|
276
|
+
storage · identity · permissions · operation facts · instance host
|
|
277
|
+
|
|
278
|
+
▲ plugins extend the Capability layer through the Capability Registry
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Lifecycle
|
|
282
|
+
|
|
283
|
+
Status is one authority per object; execution and waiting are runtime facts, not
|
|
284
|
+
extra states:
|
|
1040
285
|
|
|
1041
|
-
|
|
286
|
+
```text
|
|
287
|
+
Task draft ─▶ active ─▶ completed ─▶ archived
|
|
288
|
+
└────▶ cancelled ─▶ archived
|
|
1042
289
|
|
|
1043
|
-
|
|
290
|
+
WorkItem open ─▶ accepted ─▶ retired
|
|
1044
291
|
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
yui jobs retry leader-recovery:<task-id>
|
|
1048
|
-
yui task reconcile <task-id>
|
|
1049
|
-
yui task turn retry <failed-turn-id>
|
|
1050
|
-
yui task turn settle <failed-turn-id>
|
|
292
|
+
Draft holds planning only; activation adopts a delivery workspace.
|
|
293
|
+
Archive needs settled work and clean worktrees; it cannot reopen.
|
|
1051
294
|
```
|
|
1052
295
|
|
|
1053
|
-
|
|
296
|
+
## Design principles
|
|
1054
297
|
|
|
1055
|
-
|
|
1056
|
-
current failed Producer Lane Turn. Only then does the Lane become failed and the
|
|
1057
|
-
settled Group become eligible for WorkItem or Review synthesis when at least
|
|
1058
|
-
two Producer results succeeded. The same command retains its narrow repair for an obsolete failed
|
|
1059
|
-
Reviewer Turn whose Task-final ReviewRound is stranded on an old frozen
|
|
1060
|
-
candidate; that repair never creates a retry Round.
|
|
298
|
+
### Agents make decisions; Yui makes work durable
|
|
1061
299
|
|
|
1062
|
-
|
|
300
|
+
Yui is a local control plane and context API, not a fixed workflow engine.
|
|
301
|
+
The Operator recognizes and routes requests. A Leader owns each Task's outcome
|
|
302
|
+
and chooses planning, delegation, review and recovery. The Controller handles
|
|
303
|
+
delivery and runtime facts; it does not decide whether an Agent's answer is
|
|
304
|
+
good enough.
|
|
1063
305
|
|
|
1064
|
-
|
|
306
|
+
Tasks, messages, decisions, original execution results and Project Knowledge
|
|
307
|
+
are durable context. Agents read and update that context through small,
|
|
308
|
+
scoped CLI operations. Session and process state support execution, but do not
|
|
309
|
+
replace the record of what the user asked for.
|
|
1065
310
|
|
|
1066
|
-
|
|
311
|
+
### Separate the task from the conversation
|
|
1067
312
|
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
313
|
+
A Task is the outcome; a WorkItem is an independently acceptable requirement;
|
|
314
|
+
a Session is a native conversation; an AgentRun is an explicitly requested
|
|
315
|
+
execution. Keeping them separate lets you discuss a Task without starting work,
|
|
316
|
+
continue a requirement across executions, and inspect the original result
|
|
317
|
+
without confusing “the Agent finished speaking” with “the work was accepted.”
|
|
1072
318
|
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
and terminal endpoints.
|
|
1078
|
-
|
|
1079
|
-
The Web surface can answer an open InputRequest through the same durable CLI
|
|
1080
|
-
mutation used by Terminal users. It can also attach to the existing Operator,
|
|
1081
|
-
Leader, or Worker tmux pane through a native xterm client. Closing the browser
|
|
1082
|
-
terminal detaches only that tmux client; the Agent process and conversation
|
|
1083
|
-
continue running in tmux. The Web surface does not duplicate transcripts or
|
|
1084
|
-
maintain another session state.
|
|
1085
|
-
|
|
1086
|
-
The dashboard opens on an overview cockpit: four operational metrics (active
|
|
1087
|
-
tasks, open inputs waiting on you, completed tasks, and the total), a
|
|
1088
|
-
cross-task attention inbox that surfaces every open InputRequest with its
|
|
1089
|
-
question and urgency so you can answer without drilling in, and the list of
|
|
1090
|
-
currently active tasks. Each task row carries a derived execution status
|
|
1091
|
-
(progressing, needs attention, blocked, recovering) so stalled or failed
|
|
1092
|
-
work is visible before you open a task. Selecting a task opens an anchored
|
|
1093
|
-
detail view (Summary, Focus, Work items, Turns, Roles, History, Messages)
|
|
1094
|
-
with a sticky tab bar that tracks the visible section. The Summary tab leads
|
|
1095
|
-
with an execution band that consolidates the Task's owner, current action,
|
|
1096
|
-
attention list, blockers, and fail-closed indicators; Work items surface
|
|
1097
|
-
their current ExecutionGroup with per-lane status, Candidates, and
|
|
1098
|
-
retirement disposition; Turns show purpose, execution lineage, final result,
|
|
1099
|
-
and Leader disposition; Reviews show direct or replicated shape, frozen
|
|
1100
|
-
Assignment, Producer Lane state, main synthesis Turn, and authoritative result.
|
|
1101
|
-
|
|
1102
|
-
The control room supports English and Simplified Chinese, selecting an initial locale from the browser and remembering manual changes. The theme selector switches between the dark Control Room, the light Paper Ledger, and the dark-blue Atlas themes. Both choices are stored only in browser `localStorage`; they do not modify `YUI_HOME`.
|
|
1103
|
-
|
|
1104
|
-
## Management commands
|
|
1105
|
-
|
|
1106
|
-
The restored management surface includes:
|
|
319
|
+
A Draft can hold planning before adopting a delivery workspace. For repository
|
|
320
|
+
work, changes happen in managed worktrees rather than the stable Project
|
|
321
|
+
checkout. The Leader evaluates results and coordinates review and integration
|
|
322
|
+
against the actual scope.
|
|
1107
323
|
|
|
1108
|
-
|
|
1109
|
-
yui update
|
|
1110
|
-
yui upgrade [--dry-run]
|
|
1111
|
-
yui config agent add|list|show|capabilities|update|remove
|
|
1112
|
-
yui config role add|list|show|update|remove|bind|unbind
|
|
1113
|
-
yui config profile add|list|show|update|remove|reset
|
|
1114
|
-
yui config completion [bash|zsh|fish]
|
|
1115
|
-
yui session enter|record|replace|reconcile
|
|
1116
|
-
yui session stop --all
|
|
1117
|
-
yui project add|clone|refresh|update|discover|list|show|knowledge
|
|
1118
|
-
yui project reset|replace|retire|delete
|
|
1119
|
-
```
|
|
324
|
+
### Keep execution replaceable and authority explicit
|
|
1120
325
|
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
and start the replacement Controller. Unsupported Homes block preflight and
|
|
1126
|
-
remain untouched.
|
|
326
|
+
Codex CLI, Claude Code CLI and ACP connections—including a Claude Agent SDK
|
|
327
|
+
bridge—share an execution boundary while retaining their native capabilities
|
|
328
|
+
and conversations. Configured intent and what the running Agent actually reports
|
|
329
|
+
are distinct facts; Yui does not pretend every integration behaves identically.
|
|
1127
330
|
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
line and are never rewritten.
|
|
331
|
+
When a Task needs an additional capability, its Leader can create and validate a
|
|
332
|
+
Task-local plugin and explicitly activate it within existing authority.
|
|
333
|
+
Executable plugins need specific execution grants. Results can be saved
|
|
334
|
+
independently of the plugin or Session that produced them.
|
|
1133
335
|
|
|
1134
|
-
|
|
336
|
+
Yui is designed for one trusted local user. It is not an OS sandbox or a remote
|
|
337
|
+
multi-user service. Publishing, granting new access and other external effects
|
|
338
|
+
still require the corresponding authority.
|
|
1135
339
|
|
|
1136
|
-
##
|
|
340
|
+
## How Yui compares
|
|
1137
341
|
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
342
|
+
| | Chat-only agent | Agent CLI + tmux, by hand | Yui |
|
|
343
|
+
| --- | --- | --- | --- |
|
|
344
|
+
| Work survives the session | no | your own notes | durable Tasks in one store |
|
|
345
|
+
| New request vs. follow-up | you decide | you decide | the Operator routes it |
|
|
346
|
+
| Multi-step delegation | manual | manual | Leader → WorkItems → Workers/Reviewers |
|
|
347
|
+
| Swap model/agent mid-task | context lost | manual re-setup | replaceable behind one boundary |
|
|
348
|
+
| Parallel work isolation | — | you manage branches | managed Git worktrees |
|
|
349
|
+
| Where the truth lives | the chat log | scattered | one SQLite source of truth |
|
|
1143
350
|
|
|
1144
|
-
|
|
1145
|
-
## Development
|
|
351
|
+
## Learn more
|
|
1146
352
|
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
353
|
+
The [architecture overview](ARCHITECTURE.md) explains the end-to-end design.
|
|
354
|
+
The [documentation map](docs/architecture/README.md) links the current contracts
|
|
355
|
+
for configuration, execution, delivery, storage and plugins. Use `yui --help`
|
|
356
|
+
when you want to operate the CLI directly.
|
|
1151
357
|
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
are temporary development evidence and are removed when the change is complete;
|
|
1156
|
-
they do not accumulate as permanent regression tests. See
|
|
1157
|
-
[the verification policy](./docs/testing/verification-levels.md).
|
|
358
|
+
Yui stores its control-plane data under `~/.yui` by default; `YUI_HOME` selects
|
|
359
|
+
another instance. See [storage and upgrades](docs/sqlite-control-plane-design.md)
|
|
360
|
+
before moving between builds or updating an existing Home.
|
|
1158
361
|
|
|
1159
|
-
|
|
362
|
+
## Contributing
|
|
1160
363
|
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
yui
|
|
1165
|
-
|
|
364
|
+
Start with [CONTRIBUTING.md](CONTRIBUTING.md) for the full workflow, and please
|
|
365
|
+
follow our [Code of Conduct](CODE_OF_CONDUCT.md). In short: in a source
|
|
366
|
+
checkout, run `npm ci` and `npm test`. Read
|
|
367
|
+
`.agents/skills/develop-yui/SKILL.md` and the
|
|
368
|
+
[verification policy](docs/testing/verification-levels.md).
|
|
369
|
+
Source builds also need a Linux C compiler and static libc development libraries
|
|
370
|
+
for the Claude process owner. Published packages include that executable;
|
|
371
|
+
npm users do not need to compile it.
|
|
1166
372
|
|
|
1167
|
-
|
|
373
|
+
To exercise your checkout, run `make install-local`, then use the absolute
|
|
374
|
+
`<checkout>/output/dev/bin/yui` launcher. It defaults to an isolated Home under
|
|
375
|
+
that checkout; run its `setup` before stateful use. Do not use the global `yui`
|
|
376
|
+
or `make link` to validate local changes. Live-model, paid or shared-resource
|
|
377
|
+
tests require an explicit request for those resources.
|
|
1168
378
|
|
|
1169
|
-
|
|
1170
|
-
make unlink
|
|
1171
|
-
```
|
|
1172
|
-
|
|
1173
|
-
To run this checkout in isolation without changing the global `yui`, build only
|
|
1174
|
-
its local launcher instead of linking:
|
|
1175
|
-
|
|
1176
|
-
```sh
|
|
1177
|
-
make install-local
|
|
1178
|
-
./output/dev/bin/yui doctor
|
|
1179
|
-
```
|
|
1180
|
-
|
|
1181
|
-
`make install-local` writes a self-contained launcher at `output/dev/bin/yui`
|
|
1182
|
-
and never touches the user-level `yui` command. The launcher resolves its own
|
|
1183
|
-
checkout and defaults `YUI_HOME` to this checkout's `output/dev/home`. The
|
|
1184
|
-
Controller socket is derived from that Home's durable `homeId` at the fixed
|
|
1185
|
-
Linux path `/tmp/yui-<uid>/<homeId>.sock`; discovery also binds the physical
|
|
1186
|
-
Home directory, so caller `TMPDIR`, path aliases, and copied runtime records
|
|
1187
|
-
cannot redirect control requests. The tmux server namespace and state remain
|
|
1188
|
-
scoped to the selected Home, so the checkout stays separate from other
|
|
1189
|
-
checkouts and the global install.
|
|
1190
|
-
It is idempotent, so re-run it after pulling new code (then run
|
|
1191
|
-
`./output/dev/bin/yui controller restart` if a Controller is already running).
|
|
1192
|
-
Call the launcher by its absolute path for a stable per-checkout entry point;
|
|
1193
|
-
exporting `output/dev/bin` onto `PATH` is a per-shell convenience only.
|
|
1194
|
-
|
|
1195
|
-
`make install-local` builds `dist/` and writes exactly one file—the launcher
|
|
1196
|
-
itself. It does not modify `PATH` and does not create the data home, so run
|
|
1197
|
-
`./output/dev/bin/yui setup` once before commands that need state. Because a
|
|
1198
|
-
bare `yui` is resolved through `PATH` and not by the current directory, working
|
|
1199
|
-
inside this checkout does not make a bare `yui` use the local launcher; it still
|
|
1200
|
-
runs whatever `PATH` finds. Select this instance with the absolute launcher
|
|
1201
|
-
path, or, for one interactive shell only, prepend it to `PATH`:
|
|
1202
|
-
|
|
1203
|
-
```sh
|
|
1204
|
-
export PATH="$PWD/output/dev/bin:$PATH" # this shell only; not for automation
|
|
1205
|
-
```
|
|
379
|
+
## Community and support
|
|
1206
380
|
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
381
|
+
- Questions, bugs and feature requests: open a
|
|
382
|
+
[GitHub issue](https://github.com/zhangqian-silk/yui/issues).
|
|
383
|
+
- Security: see the [security policy](SECURITY.md). Yui targets one trusted
|
|
384
|
+
local user and is not an OS sandbox or a remote service; please report
|
|
385
|
+
sensitive issues privately instead of opening a public issue.
|
|
1211
386
|
|
|
1212
387
|
## License
|
|
1213
388
|
|
|
1214
|
-
[MIT](
|
|
389
|
+
[MIT](LICENSE)
|