cloving 0.3.20 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{LICENSE.md → LICENSE} +1 -1
- package/README.md +606 -182
- package/dist/src/authority/budgets.d.ts +12 -0
- package/dist/src/authority/budgets.js +42 -0
- package/dist/src/authority/commands.d.ts +7 -0
- package/dist/src/authority/commands.js +271 -0
- package/dist/src/authority/details.d.ts +28 -0
- package/dist/src/authority/details.js +33 -0
- package/dist/src/authority/dispatch-decision.d.ts +40 -0
- package/dist/src/authority/dispatch-decision.js +47 -0
- package/dist/src/authority/effect-requests.d.ts +2 -0
- package/dist/src/authority/effect-requests.js +139 -0
- package/dist/src/authority/effect-results.d.ts +4 -0
- package/dist/src/authority/effect-results.js +236 -0
- package/dist/src/authority/events.d.ts +2 -0
- package/dist/src/authority/events.js +45 -0
- package/dist/src/authority/gate-reduction.d.ts +8 -0
- package/dist/src/authority/gate-reduction.js +109 -0
- package/dist/src/authority/gates.d.ts +48 -0
- package/dist/src/authority/gates.js +77 -0
- package/dist/src/authority/history-state.d.ts +15 -0
- package/dist/src/authority/history-state.js +61 -0
- package/dist/src/authority/history.d.ts +13 -0
- package/dist/src/authority/history.js +37 -0
- package/dist/src/authority/instants.d.ts +3 -0
- package/dist/src/authority/instants.js +38 -0
- package/dist/src/authority/leases.d.ts +15 -0
- package/dist/src/authority/leases.js +113 -0
- package/dist/src/authority/operations.d.ts +101 -0
- package/dist/src/authority/operations.js +75 -0
- package/dist/src/authority/reconciliation.d.ts +29 -0
- package/dist/src/authority/reconciliation.js +156 -0
- package/dist/src/authority/reducer.d.ts +41 -0
- package/dist/src/authority/reducer.js +139 -0
- package/dist/src/authority/reduction-state.d.ts +36 -0
- package/dist/src/authority/reduction-state.js +68 -0
- package/dist/src/authority/reduction.d.ts +6 -0
- package/dist/src/authority/reduction.js +160 -0
- package/dist/src/authority/status-closure.d.ts +4 -0
- package/dist/src/authority/status-closure.js +57 -0
- package/dist/src/authority/status-effects.d.ts +17 -0
- package/dist/src/authority/status-effects.js +43 -0
- package/dist/src/authority/status-input.d.ts +45 -0
- package/dist/src/authority/status-input.js +9 -0
- package/dist/src/authority/status.d.ts +32 -0
- package/dist/src/authority/status.js +256 -0
- package/dist/src/authority/stop-sequence.d.ts +37 -0
- package/dist/src/authority/stop-sequence.js +91 -0
- package/dist/src/authority/transitions.d.ts +63 -0
- package/dist/src/authority/transitions.js +124 -0
- package/dist/src/broker/actor/adapter-calls.d.ts +13 -0
- package/dist/src/broker/actor/adapter-calls.js +34 -0
- package/dist/src/broker/actor/adapter-outcomes.d.ts +28 -0
- package/dist/src/broker/actor/adapter-outcomes.js +80 -0
- package/dist/src/broker/actor/authority-actor.d.ts +25 -0
- package/dist/src/broker/actor/authority-actor.js +169 -0
- package/dist/src/broker/actor/authority-changes.d.ts +31 -0
- package/dist/src/broker/actor/authority-changes.js +46 -0
- package/dist/src/broker/actor/authority-connection.d.ts +15 -0
- package/dist/src/broker/actor/authority-connection.js +44 -0
- package/dist/src/broker/actor/authority-conversion.d.ts +10 -0
- package/dist/src/broker/actor/authority-conversion.js +72 -0
- package/dist/src/broker/actor/authority-delivery.d.ts +13 -0
- package/dist/src/broker/actor/authority-delivery.js +162 -0
- package/dist/src/broker/actor/authority-logger.d.ts +2 -0
- package/dist/src/broker/actor/authority-logger.js +19 -0
- package/dist/src/broker/actor/authority-policy.d.ts +9 -0
- package/dist/src/broker/actor/authority-policy.js +11 -0
- package/dist/src/broker/actor/authority-queries.d.ts +45 -0
- package/dist/src/broker/actor/authority-queries.js +85 -0
- package/dist/src/broker/actor/authority-receipts.d.ts +28 -0
- package/dist/src/broker/actor/authority-receipts.js +84 -0
- package/dist/src/broker/actor/authority-release.d.ts +13 -0
- package/dist/src/broker/actor/authority-release.js +69 -0
- package/dist/src/broker/actor/authority-runtime.d.ts +60 -0
- package/dist/src/broker/actor/authority-runtime.js +204 -0
- package/dist/src/broker/actor/authority-session.d.ts +67 -0
- package/dist/src/broker/actor/authority-session.js +251 -0
- package/dist/src/broker/actor/authority-settings.d.ts +33 -0
- package/dist/src/broker/actor/authority-settings.js +63 -0
- package/dist/src/broker/actor/authority-upgrades.d.ts +16 -0
- package/dist/src/broker/actor/authority-upgrades.js +12 -0
- package/dist/src/broker/actor/authority-watchdog.d.ts +14 -0
- package/dist/src/broker/actor/authority-watchdog.js +41 -0
- package/dist/src/broker/actor/authority.d.ts +14 -0
- package/dist/src/broker/actor/authority.js +115 -0
- package/dist/src/broker/actor/delivery-intents.d.ts +68 -0
- package/dist/src/broker/actor/delivery-intents.js +77 -0
- package/dist/src/broker/actor/delivery-plan.d.ts +2 -0
- package/dist/src/broker/actor/delivery-plan.js +109 -0
- package/dist/src/broker/actor/delivery-results.d.ts +11 -0
- package/dist/src/broker/actor/delivery-results.js +63 -0
- package/dist/src/broker/actor/effect-delivery.d.ts +19 -0
- package/dist/src/broker/actor/effect-delivery.js +118 -0
- package/dist/src/broker/actor/effect-plan.d.ts +41 -0
- package/dist/src/broker/actor/effect-plan.js +173 -0
- package/dist/src/broker/actor/effect-queries.d.ts +27 -0
- package/dist/src/broker/actor/effect-queries.js +80 -0
- package/dist/src/broker/actor/effect-turn.d.ts +25 -0
- package/dist/src/broker/actor/effect-turn.js +84 -0
- package/dist/src/broker/actor/pin-check.d.ts +6 -0
- package/dist/src/broker/actor/pin-check.js +12 -0
- package/dist/src/broker/actor/runtime-parts.d.ts +23 -0
- package/dist/src/broker/actor/runtime-parts.js +34 -0
- package/dist/src/broker/actor/stop-plan.d.ts +20 -0
- package/dist/src/broker/actor/stop-plan.js +46 -0
- package/dist/src/broker/actor/stop-turn.d.ts +17 -0
- package/dist/src/broker/actor/stop-turn.js +42 -0
- package/dist/src/broker/actor/turn-draft.d.ts +31 -0
- package/dist/src/broker/actor/turn-draft.js +138 -0
- package/dist/src/broker/actor/turn-plan.d.ts +17 -0
- package/dist/src/broker/actor/turn-plan.js +136 -0
- package/dist/src/broker/actor/turn-refusals.d.ts +8 -0
- package/dist/src/broker/actor/turn-refusals.js +35 -0
- package/dist/src/broker/actor/turn-staging.d.ts +78 -0
- package/dist/src/broker/actor/turn-staging.js +34 -0
- package/dist/src/broker/actor/turn-state.d.ts +34 -0
- package/dist/src/broker/actor/turn-state.js +208 -0
- package/dist/src/broker/authority-admission.d.ts +21 -0
- package/dist/src/broker/authority-admission.js +70 -0
- package/dist/src/broker/authority-restore.d.ts +30 -0
- package/dist/src/broker/authority-restore.js +165 -0
- package/dist/src/broker/decision-restore.d.ts +16 -0
- package/dist/src/broker/decision-restore.js +158 -0
- package/dist/src/broker/decision-upgrade.d.ts +3 -0
- package/dist/src/broker/decision-upgrade.js +12 -0
- package/dist/src/broker/effect-restore.d.ts +20 -0
- package/dist/src/broker/effect-restore.js +111 -0
- package/dist/src/broker/effect-upgrade.d.ts +3 -0
- package/dist/src/broker/effect-upgrade.js +9 -0
- package/dist/src/broker/operation-digest.d.ts +1 -0
- package/dist/src/broker/operation-digest.js +4 -0
- package/dist/src/broker/socket-address.d.ts +9 -0
- package/dist/src/broker/socket-address.js +14 -0
- package/dist/src/broker/workflow-pin.d.ts +2 -0
- package/dist/src/broker/workflow-pin.js +5 -0
- package/dist/src/chats/analysis-batches.d.ts +24 -0
- package/dist/src/chats/analysis-batches.js +83 -0
- package/dist/src/chats/analysis-contract.d.ts +80 -0
- package/dist/src/chats/analysis-contract.js +16 -0
- package/dist/src/chats/analysis-data.d.ts +3 -0
- package/dist/src/chats/analysis-data.js +85 -0
- package/dist/src/chats/analysis-input.d.ts +12 -0
- package/dist/src/chats/analysis-input.js +83 -0
- package/dist/src/chats/analysis-links.d.ts +2 -0
- package/dist/src/chats/analysis-links.js +25 -0
- package/dist/src/chats/analysis-prompt.d.ts +10 -0
- package/dist/src/chats/analysis-prompt.js +16 -0
- package/dist/src/chats/analysis-proposal.d.ts +2 -0
- package/dist/src/chats/analysis-proposal.js +32 -0
- package/dist/src/chats/analysis-provenance.d.ts +4 -0
- package/dist/src/chats/analysis-provenance.js +99 -0
- package/dist/src/chats/analysis-shape.d.ts +3 -0
- package/dist/src/chats/analysis-shape.js +228 -0
- package/dist/src/chats/analysis.d.ts +3 -0
- package/dist/src/chats/analysis.js +42 -0
- package/dist/src/chats/corpus-input.d.ts +5 -0
- package/dist/src/chats/corpus-input.js +288 -0
- package/dist/src/chats/destination.d.ts +4 -0
- package/dist/src/chats/destination.js +96 -0
- package/dist/src/chats/import.d.ts +15 -0
- package/dist/src/chats/import.js +243 -0
- package/dist/src/chats/input-file.d.ts +3 -0
- package/dist/src/chats/input-file.js +32 -0
- package/dist/src/chats/normalize.d.ts +29 -0
- package/dist/src/chats/normalize.js +155 -0
- package/dist/src/chats/previous-import.d.ts +5 -0
- package/dist/src/chats/previous-import.js +34 -0
- package/dist/src/chats/reader.d.ts +21 -0
- package/dist/src/chats/reader.js +118 -0
- package/dist/src/chats/redact-import.d.ts +14 -0
- package/dist/src/chats/redact-import.js +141 -0
- package/dist/src/chats/redaction.d.ts +41 -0
- package/dist/src/chats/redaction.js +161 -0
- package/dist/src/chats/revision-input.d.ts +3 -0
- package/dist/src/chats/revision-input.js +180 -0
- package/dist/src/chats/revision.d.ts +48 -0
- package/dist/src/chats/revision.js +94 -0
- package/dist/src/chats/selection.d.ts +25 -0
- package/dist/src/chats/selection.js +109 -0
- package/dist/src/chats/source.d.ts +23 -0
- package/dist/src/chats/source.js +135 -0
- package/dist/src/chats/structure.d.ts +57 -0
- package/dist/src/chats/structure.js +216 -0
- package/dist/src/cli/arguments.d.ts +31 -0
- package/dist/src/cli/arguments.js +235 -0
- package/dist/src/cli/client.d.ts +16 -0
- package/dist/src/cli/client.js +159 -0
- package/dist/src/cli/commands.d.ts +17 -0
- package/dist/src/cli/commands.js +271 -0
- package/dist/src/cli/main.d.ts +2 -0
- package/dist/src/cli/main.js +127 -0
- package/dist/src/cli/render.d.ts +10 -0
- package/dist/src/cli/render.js +254 -0
- package/dist/src/cli/runtime-arguments.d.ts +73 -0
- package/dist/src/cli/runtime-arguments.js +248 -0
- package/dist/src/cli/runtime-directory.d.ts +4 -0
- package/dist/src/cli/runtime-directory.js +25 -0
- package/dist/src/cli/toolchain.d.ts +3 -0
- package/dist/src/cli/toolchain.js +74 -0
- package/dist/src/cli/usage-render.d.ts +3 -0
- package/dist/src/cli/usage-render.js +28 -0
- package/dist/src/cli/usage.d.ts +5 -0
- package/dist/src/cli/usage.js +156 -0
- package/dist/src/cli/validate.d.ts +38 -0
- package/dist/src/cli/validate.js +116 -0
- package/dist/src/cli/watch-actions.d.ts +10 -0
- package/dist/src/cli/watch-actions.js +58 -0
- package/dist/src/cli/watch-board-view.d.ts +54 -0
- package/dist/src/cli/watch-board-view.js +201 -0
- package/dist/src/cli/watch-board.d.ts +15 -0
- package/dist/src/cli/watch-board.js +179 -0
- package/dist/src/cli/watch-card-client.d.ts +1 -0
- package/dist/src/cli/watch-card-client.js +44 -0
- package/dist/src/cli/watch-card-forms.d.ts +2 -0
- package/dist/src/cli/watch-card-forms.js +33 -0
- package/dist/src/cli/watch-card-reply.d.ts +5 -0
- package/dist/src/cli/watch-card-reply.js +34 -0
- package/dist/src/cli/watch-card-view.d.ts +40 -0
- package/dist/src/cli/watch-card-view.js +86 -0
- package/dist/src/cli/watch-client.d.ts +1 -0
- package/dist/src/cli/watch-client.js +118 -0
- package/dist/src/cli/watch-element.d.ts +11 -0
- package/dist/src/cli/watch-element.js +6 -0
- package/dist/src/cli/watch-model.d.ts +29 -0
- package/dist/src/cli/watch-model.js +278 -0
- package/dist/src/cli/watch-navigation.d.ts +9 -0
- package/dist/src/cli/watch-navigation.js +40 -0
- package/dist/src/cli/watch-page.d.ts +1 -0
- package/dist/src/cli/watch-page.js +258 -0
- package/dist/src/cli/watch-paths.d.ts +2 -0
- package/dist/src/cli/watch-paths.js +52 -0
- package/dist/src/cli/watch-phases.d.ts +7 -0
- package/dist/src/cli/watch-phases.js +148 -0
- package/dist/src/cli/watch-pr-board.d.ts +3 -0
- package/dist/src/cli/watch-pr-board.js +26 -0
- package/dist/src/cli/watch-pr-command.d.ts +15 -0
- package/dist/src/cli/watch-pr-command.js +37 -0
- package/dist/src/cli/watch-pr-identity.d.ts +20 -0
- package/dist/src/cli/watch-pr-identity.js +62 -0
- package/dist/src/cli/watch-pr-observer.d.ts +19 -0
- package/dist/src/cli/watch-pr-observer.js +108 -0
- package/dist/src/cli/watch-pr-settings.d.ts +8 -0
- package/dist/src/cli/watch-pr-settings.js +47 -0
- package/dist/src/cli/watch-reads.d.ts +28 -0
- package/dist/src/cli/watch-reads.js +248 -0
- package/dist/src/cli/watch-render.d.ts +153 -0
- package/dist/src/cli/watch-render.js +102 -0
- package/dist/src/cli/watch-run-input.d.ts +14 -0
- package/dist/src/cli/watch-run-input.js +49 -0
- package/dist/src/cli/watch-server.d.ts +13 -0
- package/dist/src/cli/watch-server.js +214 -0
- package/dist/src/cli/watch-start-view.d.ts +18 -0
- package/dist/src/cli/watch-start-view.js +77 -0
- package/dist/src/cli/watch-stream.d.ts +11 -0
- package/dist/src/cli/watch-stream.js +128 -0
- package/dist/src/cli/watch-turn.d.ts +30 -0
- package/dist/src/cli/watch-turn.js +135 -0
- package/dist/src/cli/watch-usage.d.ts +6 -0
- package/dist/src/cli/watch-usage.js +65 -0
- package/dist/src/cli/watch-view.d.ts +54 -0
- package/dist/src/cli/watch-view.js +267 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +104 -0
- package/dist/src/daemon/analysis-launch.d.ts +5 -0
- package/dist/src/daemon/analysis-launch.js +81 -0
- package/dist/src/daemon/analysis-token.d.ts +6 -0
- package/dist/src/daemon/analysis-token.js +88 -0
- package/dist/src/daemon/analysis-worker.d.ts +22 -0
- package/dist/src/daemon/analysis-worker.js +219 -0
- package/dist/src/daemon/chats-files.d.ts +15 -0
- package/dist/src/daemon/chats-files.js +113 -0
- package/dist/src/daemon/chats-worker.d.ts +12 -0
- package/dist/src/daemon/chats-worker.js +200 -0
- package/dist/src/daemon/claude-turn.d.ts +38 -0
- package/dist/src/daemon/claude-turn.js +216 -0
- package/dist/src/daemon/claude-worker.d.ts +29 -0
- package/dist/src/daemon/claude-worker.js +276 -0
- package/dist/src/daemon/codex-stream.d.ts +4 -0
- package/dist/src/daemon/codex-stream.js +129 -0
- package/dist/src/daemon/daemon.d.ts +49 -0
- package/dist/src/daemon/daemon.js +195 -0
- package/dist/src/daemon/delivery-router.d.ts +10 -0
- package/dist/src/daemon/delivery-router.js +34 -0
- package/dist/src/daemon/github-calls.d.ts +29 -0
- package/dist/src/daemon/github-calls.js +127 -0
- package/dist/src/daemon/github-issue-methods.d.ts +3 -0
- package/dist/src/daemon/github-issue-methods.js +99 -0
- package/dist/src/daemon/github-issue-privacy.d.ts +6 -0
- package/dist/src/daemon/github-issue-privacy.js +131 -0
- package/dist/src/daemon/github-merge.d.ts +18 -0
- package/dist/src/daemon/github-merge.js +259 -0
- package/dist/src/daemon/github-methods.d.ts +5 -0
- package/dist/src/daemon/github-methods.js +202 -0
- package/dist/src/daemon/github-operation.d.ts +38 -0
- package/dist/src/daemon/github-operation.js +57 -0
- package/dist/src/daemon/github-ticket-status.d.ts +3 -0
- package/dist/src/daemon/github-ticket-status.js +268 -0
- package/dist/src/daemon/github-worker.d.ts +17 -0
- package/dist/src/daemon/github-worker.js +281 -0
- package/dist/src/daemon/host-environment.d.ts +8 -0
- package/dist/src/daemon/host-environment.js +14 -0
- package/dist/src/daemon/issue-queue.d.ts +10 -0
- package/dist/src/daemon/issue-queue.js +254 -0
- package/dist/src/daemon/notify-message.d.ts +14 -0
- package/dist/src/daemon/notify-message.js +48 -0
- package/dist/src/daemon/notify.d.ts +12 -0
- package/dist/src/daemon/notify.js +161 -0
- package/dist/src/daemon/operation-journal.d.ts +43 -0
- package/dist/src/daemon/operation-journal.js +55 -0
- package/dist/src/daemon/retrying-turn.d.ts +9 -0
- package/dist/src/daemon/retrying-turn.js +185 -0
- package/dist/src/daemon/ticket-registration.d.ts +33 -0
- package/dist/src/daemon/ticket-registration.js +177 -0
- package/dist/src/daemon/ticket-source.d.ts +17 -0
- package/dist/src/daemon/ticket-source.js +36 -0
- package/dist/src/daemon/work-tree.d.ts +26 -0
- package/dist/src/daemon/work-tree.js +206 -0
- package/dist/src/effect-authorization.d.ts +21 -0
- package/dist/src/effect-authorization.js +14 -0
- package/dist/src/execution-pin.d.ts +4 -0
- package/dist/src/execution-pin.js +68 -0
- package/dist/src/host/start-delivery.d.ts +41 -0
- package/dist/src/host/start-delivery.js +68 -0
- package/dist/src/host/step-bridge-host.d.ts +79 -0
- package/dist/src/host/step-bridge-host.js +205 -0
- package/dist/src/host/step-claims.d.ts +31 -0
- package/dist/src/host/step-claims.js +85 -0
- package/dist/src/host/world-host.d.ts +21 -0
- package/dist/src/host/world-host.js +51 -0
- package/dist/src/host/world-reconciliation.d.ts +39 -0
- package/dist/src/host/world-reconciliation.js +81 -0
- package/dist/src/host/world-runs.d.ts +14 -0
- package/dist/src/host/world-runs.js +69 -0
- package/dist/src/operation-identity.d.ts +7 -0
- package/dist/src/operation-identity.js +59 -0
- package/dist/src/protocol.d.ts +35 -0
- package/dist/src/protocol.js +64 -0
- package/dist/src/resource-files.d.ts +1 -0
- package/dist/src/resource-files.js +29 -0
- package/dist/src/service/changes.d.ts +11 -0
- package/dist/src/service/changes.js +32 -0
- package/dist/src/service/decision-handler.d.ts +9 -0
- package/dist/src/service/decision-handler.js +233 -0
- package/dist/src/service/event-handler.d.ts +10 -0
- package/dist/src/service/event-handler.js +70 -0
- package/dist/src/service/expiry.d.ts +13 -0
- package/dist/src/service/expiry.js +53 -0
- package/dist/src/service/gateway.d.ts +21 -0
- package/dist/src/service/gateway.js +120 -0
- package/dist/src/service/registry.d.ts +40 -0
- package/dist/src/service/registry.js +13 -0
- package/dist/src/service/replies.d.ts +26 -0
- package/dist/src/service/replies.js +56 -0
- package/dist/src/service/run-handlers.d.ts +4 -0
- package/dist/src/service/run-handlers.js +263 -0
- package/dist/src/service/service.d.ts +58 -0
- package/dist/src/service/service.js +212 -0
- package/dist/src/service/submission-handler.d.ts +4 -0
- package/dist/src/service/submission-handler.js +206 -0
- package/dist/src/service/transport.d.ts +16 -0
- package/dist/src/service/transport.js +141 -0
- package/dist/src/service/worker-port.d.ts +85 -0
- package/dist/src/service/worker-port.js +126 -0
- package/dist/src/service/worker-totals.d.ts +3 -0
- package/dist/src/service/worker-totals.js +28 -0
- package/dist/src/step-bridge.d.ts +57 -0
- package/dist/src/step-bridge.js +4 -0
- package/dist/src/steps/decision-gate.d.ts +2 -0
- package/dist/src/steps/decision-gate.js +8 -0
- package/dist/src/steps/load-cycle.d.ts +10 -0
- package/dist/src/steps/load-cycle.js +11 -0
- package/dist/src/steps/protected-effect.d.ts +2 -0
- package/dist/src/steps/protected-effect.js +8 -0
- package/dist/src/storage/decision-rows.d.ts +54 -0
- package/dist/src/storage/decision-rows.js +72 -0
- package/dist/src/storage/decision-snapshots.d.ts +17 -0
- package/dist/src/storage/decision-snapshots.js +25 -0
- package/dist/src/storage/domain-changes.d.ts +48 -0
- package/dist/src/storage/domain-changes.js +213 -0
- package/dist/src/storage/domain-rows.d.ts +85 -0
- package/dist/src/storage/domain-rows.js +129 -0
- package/dist/src/storage/domain-schema.d.ts +32 -0
- package/dist/src/storage/domain-schema.js +193 -0
- package/dist/src/storage/effect-changes.d.ts +5 -0
- package/dist/src/storage/effect-changes.js +105 -0
- package/dist/src/storage/effect-rows.d.ts +67 -0
- package/dist/src/storage/effect-rows.js +74 -0
- package/dist/src/storage/effect-schema.d.ts +1 -0
- package/dist/src/storage/effect-schema.js +59 -0
- package/dist/src/storage/statements.d.ts +9 -0
- package/dist/src/storage/statements.js +8 -0
- package/dist/src/submission.d.ts +42 -0
- package/dist/src/submission.js +71 -0
- package/dist/src/ticket-status.d.ts +8 -0
- package/dist/src/ticket-status.js +45 -0
- package/dist/src/token-prices.d.ts +19 -0
- package/dist/src/token-prices.js +76 -0
- package/dist/src/turn-profile.d.ts +13 -0
- package/dist/src/turn-profile.js +100 -0
- package/dist/src/worker-usage.d.ts +22 -0
- package/dist/src/worker-usage.js +44 -0
- package/dist/src/workflow-admission.d.ts +45 -0
- package/dist/src/workflow-admission.js +151 -0
- package/dist/src/workflow-candidate.d.ts +29 -0
- package/dist/src/workflow-candidate.js +59 -0
- package/dist/src/workflow-contracts.d.ts +29 -0
- package/dist/src/workflow-contracts.js +110 -0
- package/dist/src/workflow-declaration.d.ts +11 -0
- package/dist/src/workflow-declaration.js +59 -0
- package/dist/src/workflow-resources.d.ts +8 -0
- package/dist/src/workflow-resources.js +14 -0
- package/dist/src/workflows.d.ts +6 -0
- package/dist/src/workflows.js +4 -0
- package/dist/tools/compile-workflows.d.ts +1 -0
- package/dist/tools/compile-workflows.js +33 -0
- package/dist/tools/self-host-processes.d.ts +10 -0
- package/dist/tools/self-host-processes.js +156 -0
- package/dist/tools/self-host-workflows.d.ts +15 -0
- package/dist/tools/self-host-workflows.js +78 -0
- package/dist/tools/self-host.d.ts +1 -0
- package/dist/tools/self-host.js +261 -0
- package/dist/tools/self-update-host.d.ts +13 -0
- package/dist/tools/self-update-host.js +88 -0
- package/dist/tools/self-update.d.ts +11 -0
- package/dist/tools/self-update.js +177 -0
- package/dist/tools/workflow-manifest.d.ts +3 -0
- package/dist/tools/workflow-manifest.js +34 -0
- package/dist/workflows/analyze-chats.d.ts +10 -0
- package/dist/workflows/analyze-chats.declaration.json +9 -0
- package/dist/workflows/analyze-chats.js +73 -0
- package/dist/workflows/develop-prd.d.ts +7 -0
- package/dist/workflows/develop-prd.js +97 -0
- package/dist/workflows/develop-ticket.d.ts +9 -0
- package/dist/workflows/develop-ticket.js +202 -0
- package/dist/workflows/issue-labels.d.ts +16 -0
- package/dist/workflows/issue-labels.js +70 -0
- package/dist/workflows/ticket-prompts.d.ts +35 -0
- package/dist/workflows/ticket-prompts.js +133 -0
- package/package.json +84 -75
- package/dist/abstract_gpt/index.js +0 -55
- package/dist/cloving_gpt/adapters/Adapter.js +0 -2
- package/dist/cloving_gpt/adapters/azureopenai.js +0 -69
- package/dist/cloving_gpt/adapters/claude.js +0 -128
- package/dist/cloving_gpt/adapters/gemini.js +0 -135
- package/dist/cloving_gpt/adapters/gpt4all.js +0 -29
- package/dist/cloving_gpt/adapters/index.js +0 -2
- package/dist/cloving_gpt/adapters/mistral.js +0 -128
- package/dist/cloving_gpt/adapters/ollama.js +0 -128
- package/dist/cloving_gpt/adapters/openai.js +0 -100
- package/dist/cloving_gpt/index.js +0 -192
- package/dist/commands/analyze.js +0 -47
- package/dist/commands/chat.js +0 -14
- package/dist/commands/check.js +0 -7
- package/dist/commands/commit.js +0 -44
- package/dist/commands/config.js +0 -167
- package/dist/commands/describe.js +0 -235
- package/dist/commands/generate/code.js +0 -21
- package/dist/commands/generate/commit.js +0 -11
- package/dist/commands/generate/context.js +0 -82
- package/dist/commands/generate/docs.js +0 -11
- package/dist/commands/generate/documentation.js +0 -11
- package/dist/commands/generate/fizzbuzz.js +0 -35
- package/dist/commands/generate/init.js +0 -15
- package/dist/commands/generate/review.js +0 -11
- package/dist/commands/generate/sh.js +0 -95
- package/dist/commands/generate/shell.js +0 -11
- package/dist/commands/generate/unit_tests.js +0 -11
- package/dist/commands/init.js +0 -13
- package/dist/commands/models.js +0 -22
- package/dist/commands/project/build.js +0 -88
- package/dist/commands/project/complete.js +0 -12
- package/dist/commands/project/init.js +0 -82
- package/dist/commands/project/plan.js +0 -108
- package/dist/commands/proxy.js +0 -11
- package/dist/commands/review.js +0 -50
- package/dist/commands/tokens.js +0 -75
- package/dist/commands/unit_tests.js +0 -150
- package/dist/commands/update.js +0 -7
- package/dist/file2.js +0 -4
- package/dist/index.js +0 -136
- package/dist/managers/BlockManager.js +0 -120
- package/dist/managers/ChatManager.js +0 -653
- package/dist/managers/ChunkManager.js +0 -32
- package/dist/managers/CodeManager.js +0 -185
- package/dist/managers/CommitManager.js +0 -78
- package/dist/managers/DocsManager.js +0 -88
- package/dist/managers/DocumentationManager.js +0 -114
- package/dist/managers/InitManager.js +0 -230
- package/dist/managers/ProxyManager.js +0 -210
- package/dist/managers/ReviewManager.js +0 -131
- package/dist/managers/ShellManager.js +0 -163
- package/dist/managers/StreamManager.js +0 -308
- package/dist/managers/UnitTestManager.js +0 -243
- package/dist/managers/src/managers/ProxyManager.js +0 -1
- package/dist/newfile.js +0 -2
- package/dist/package.json +0 -86
- package/dist/utils/command_utils.js +0 -384
- package/dist/utils/config_utils.js +0 -249
- package/dist/utils/gitUtils.js +0 -42
- package/dist/utils/git_utils.js +0 -217
- package/dist/utils/modelUtils.js +0 -7
- package/dist/utils/model_utils.js +0 -7
- package/dist/utils/prompt_utils.js +0 -333
- package/dist/utils/prompts/CODEGEN_COULDNT_APPLY.md +0 -5
- package/dist/utils/prompts/CODEGEN_EXAMPLES.md +0 -82
- package/dist/utils/prompts/CODEGEN_INSTRUCTIONS.md +0 -43
- package/dist/utils/prompts/DOCS_INSTRUCTIONS.md +0 -9
- package/dist/utils/prompts/INIT_INSTRUCTIONS.md +0 -132
- package/dist/utils/prompts/REVIEW_INSTRUCTIONS.md +0 -49
- package/dist/utils/prompts/SHELL_INSTRUCTIONS.md +0 -15
- package/dist/utils/prompts/SPECIAL_FILES.md +0 -66
- package/dist/utils/prompts/index.js +0 -27
- package/dist/utils/string_utils.js +0 -505
- package/dist/utils/types.js +0 -2
package/README.md
CHANGED
|
@@ -1,264 +1,688 @@
|
|
|
1
1
|
# Cloving
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The world's easiest software factory.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Build a software factory with simple TypeScript for your project, and your project can build itself.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The end of vibe coding. This is agentic engineering.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
A workflow file in TypeScript is the factory. It sets the steps: a worker turn in a work tree, a pull request, a review and a merge. Cloving keeps the state of each run and a record of each step. A GitHub step continues after a restart of the service. A worker turn in work stops at a restart. Cloving builds itself through `develop-issue` in this repository.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Cloving
|
|
12
12
|
|
|
13
|
-
Cloving
|
|
13
|
+
Cloving is a local durable development workflow service in TypeScript. You give it a ticket or the text of a task. A Claude Code worker does the work on a new git branch in its own work tree. Then you, or a review on GitHub, decide about the work. The service records each run, each event and each decision on your computer.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
This pre-release has one supervised slice: a service for one git repository, a workflow host, a Claude Code worker, a GitHub worker and review rounds. `cloving --help` lists the commands.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
What works now:
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
- `cloving start` starts the service for one git repository, with the workflow host, the Claude worker and a watch page.
|
|
20
|
+
- Three workflows from one workflow file: `develop-prompt`, `develop-ticket` and `develop-issue`.
|
|
21
|
+
- In a run of `develop-ticket` or `develop-prompt`, the operator approves or denies the work of each round. A run has a maximum of three rounds.
|
|
22
|
+
- In a run of `develop-issue`, Greptile reviews the pull request. The GitHub worker merges the pull request at the confidence score 5/5, with no human approval.
|
|
23
|
+
- Cloving develops itself through `develop-issue`, with a Greptile review and an automatic merge.
|
|
24
|
+
- The watch page shows the runs, the events and the work of the Claude worker as it occurs.
|
|
25
|
+
- `cloving chats import -- FILE_A FILE_B` imports selected Claude Code transcripts into private runtime files without a service.
|
|
26
|
+
- `cloving chats redact IMPORT_ID` creates a redacted corpus and a separate counts manifest without a service.
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
What does not work yet:
|
|
25
29
|
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
30
|
+
- The Claude worker is not confined. It runs as the current user.
|
|
31
|
+
- An approval does not merge the branch. You merge the branch yourself.
|
|
32
|
+
- `cloving start` loads only the workflow file `workflows/develop-ticket.ts`. A new workflow file also needs changes of the code (see "Develop a workflow").
|
|
33
|
+
- Cloving cannot make a workflow from your earlier chats yet. The issues [#42](https://github.com/cloving-ai/cloving-ai/issues/42), [#43](https://github.com/cloving-ai/cloving-ai/issues/43) and [#44](https://github.com/cloving-ai/cloving-ai/issues/44) are open for this work. Until then, the prompt "Find workflows in your chats" is a guide for a coding agent.
|
|
34
|
+
- This pre-release package is not published to npm.
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
### Import selected chats
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
Chat import, redaction and analysis file operations currently require macOS. On Linux, the chat commands return `platform-unsupported` with exit status `1` before file access. The analysis file adapter also refuses with `platform-unsupported` before reading payloads.
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
```sh
|
|
41
|
+
cloving chats import -- TRANSCRIPT_A.jsonl TRANSCRIPT_B.jsonl
|
|
42
|
+
cloving chats import --previous-import IMPORT_ID -- TRANSCRIPT_A.jsonl TRANSCRIPT_B.jsonl
|
|
43
|
+
cloving chats import --root PROJECTS_A --root PROJECTS_B --exclude-project project-skip -- TRANSCRIPT_A.jsonl
|
|
44
|
+
```
|
|
37
45
|
|
|
38
|
-
|
|
39
|
-
- Git
|
|
40
|
-
- API access to AI chat models (e.g., OpenAI GPT-4, Claude, Ollama, etc.)
|
|
46
|
+
Select files positionally, projects folders with repeatable `--root`, or both. Relative paths use the current directory. At least one file or root is required. After `--`, every argument is a literal file path, including names that look like options. The command does not expand globs; your shell can expand an unquoted glob. A source must be a regular file of at most 10 MiB (10,485,760 bytes). Symbolic links are refused. Sources keep their original bytes.
|
|
41
47
|
|
|
42
|
-
|
|
48
|
+
Each root explicitly selects a projects folder. Claude Code normally stores projects below its configuration folder, whose default name is `.claude` below the home folder; `CLAUDE_CONFIG_DIR` can change that location. Cloving never discovers a root from configuration or reads settings to expand your selection. This layout does not guarantee supported transcript formats or complete history. [Claude Code session storage](https://code.claude.com/docs/en/sessions#where-transcripts-are-stored) and [subagent storage](https://code.claude.com/docs/en/sub-agents) describe the source layout.
|
|
43
49
|
|
|
44
|
-
|
|
50
|
+
`--exclude-project NAME` matches a direct project folder name exactly, preserving case. Repeat it for several names. Exclusions require roots and never affect positional files. Names cannot contain separators, parent-directory markers or glob patterns. An excluded subtree produces one `project-excluded` entry; its children are never listed or opened.
|
|
45
51
|
|
|
46
|
-
|
|
52
|
+
Positional files retain their order and repetitions and come before scanned files. Roots sort by canonical path, retaining repeated selections with stable ties. Entries sort by relative path using JavaScript string order. Scans select regular files ending in lowercase `.jsonl`; other filenames produce `unsupported-extension` without a content read. Root children have depth one. Session files at depth two and subagent files at depth four fit the limit. Folders at depth four are pending with `depth-limit` and disclose no descendant inventory.
|
|
47
53
|
|
|
48
|
-
|
|
54
|
+
Across all roots, at most 100 eligible scanned candidates receive a source-read attempt. A failed open, oversized file, invalid encoding or unsupported transcript still consumes a slot. Repeated roots and overlapping selections consume separate slots; positional files are outside this budget. All metadata candidates are ordered before slots are allocated. Later candidates are pending with `file-limit` and are never opened. Select a pending file explicitly in a later import. The supported macOS scanner refuses links in roots, ancestors and entries, canonical containment escapes, Git repository roots (including worktrees and bare repositories), and source or ancestor identity changes before reading bytes. Inaccessible directories produce unreadable subtree entries. Directory enumeration also refuses raced links; an unavailable kernel protection fails closed.
|
|
49
55
|
|
|
50
|
-
|
|
51
|
-
npm install cloving -g
|
|
52
|
-
```
|
|
56
|
+
Each import accepts at most 50 MiB (52,428,800 bytes) of normalized corpus JSONL, measured as UTF-8 including newline separators. Repeated selections count toward this total. This bounds the message content retained for structure analysis. Exceeding the limit returns `output-failed` with exit code `1`, leaves no completed coverage manifest and may leave partial data files. Select fewer sources for each import; copy and conflict comparisons apply within each import.
|
|
53
57
|
|
|
54
|
-
|
|
58
|
+
The supported Claude Code JSONL subset has `user` and `assistant` envelopes with a matching `message.role`. Content can be a string or an ordered array of `text`, `tool_use` and `tool_result` blocks. Records preserve the role, timestamp, session ID, tool fields and original block positions. Missing timestamps and session IDs become `null`. Thinking blocks and non-message metadata are omitted and counted. Unknown message shapes or blocks refuse the entire source. Claude Code's internal transcript format can change between versions.
|
|
55
59
|
|
|
56
|
-
|
|
60
|
+
Each import creates `chats/IMPORT_ID/corpus.jsonl`, `structure.json` and `coverage.json` below the resolved Cloving runtime directory. Selection uses a nonempty `CLOVING_RUNTIME_DIR`, then `XDG_RUNTIME_DIR/cloving`, then `XDG_STATE_HOME/cloving/run`, then `HOME/.local/state/cloving/run`. Relative settings resolve against the current directory. Destinations inside a Git repository are refused, including through symbolic links. New directories have mode `0700`; files have mode `0600`. These permissions add no encryption or redaction.
|
|
57
61
|
|
|
58
|
-
|
|
62
|
+
New corpus records have `schemaVersion: 2` and a `sourceId` of `sha256:HEX:OFFSET`. The digest covers the exact source bytes. The offset is the zero-based byte position of the source line. `text` joins the message's text blocks with a newline; `blocks` retains each supported block's `position`. Tool result content is copied as JSON data. Positional-only imports retain coverage version 1 with its ordered `files` array. Imports containing roots write coverage version 2 with ordered `roots`, `exclusions`, fixed `limits` and ordered `entries`. Each entry identifies its zero-based positional or sorted-root selection, file or subtree kind, resolved path, status, fixed reason code, digest when available, record count and omission counts (`metadataRecords` and `thinkingBlocks`). Excluded and pending subtree entries count only themselves. Scanned oversized files are `unsupported` with `file-too-large`; positional oversized files retain `too-large`, including mixed imports. Refused sources contribute no records. Included sources also record `byteSize`, measured from the exact hashed bytes. Both coverage versions accept legacy entries without sizes. The final coverage manifest appears only after the corpus, structure and optional revision files close successfully. Output failure leaves no completed coverage manifest; partial data files may remain.
|
|
59
63
|
|
|
60
|
-
|
|
61
|
-
npx cloving [command]
|
|
62
|
-
```
|
|
64
|
+
Use `--previous-import IMPORT_ID` before `--` to compare with one earlier import in the resolved runtime chats folder. It accepts one UUID v4 ID, using the same syntax as redaction. Missing, repeated and malformed values are usage errors (`missing-value`, `repeated-previous-import` and `invalid-import-id`). At least one current file or root is still required. The earlier coverage manifest must be valid and carry the same ID; completed partial imports are allowed. Existing revisions must also be valid with a positive safe revision number that can be incremented. Missing coverage, invalid metadata or linked inputs return `previous-import-refused`, exit `1`, a null import ID and zero counts before selection, source reads or new output.
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
Comparison writes private `revision.json` with `schemaVersion: 1`, `importId`, `previousImportId`, `evidenceRevision`, `counts` and ordered `entries`. An earlier import without a revision starts revision `1`; otherwise its revision increases by one. Each entry stores `path`, `root` (null for positional selections), `before` and `after` evidence, one `status` and one fixed `reason`. Absent evidence is null; present evidence contains a nullable digest and optional byte size. No message text is stored. Counts always include `new`, `missing`, `unchanged`, `changed`, `truncated` and `extended`, including zeros.
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
Selections match only by stored source path and selected root path, resolving each manifest's root indexes independently. Repeated keys pair in order. Current entries come first, followed by unmatched earlier entries in their earlier order. New selections are `new`; absent or currently refused selections are `missing`. Equal non-null digests are `unchanged`. An unavailable earlier digest or size makes differing evidence `changed`. Fewer bytes are `truncated`; more bytes are `extended` only when SHA-256 of exactly the earlier byte count equals the earlier digest. Other differences are `changed`. Prefixes use the same bounded source read; no source is reopened. Earlier entries never select sources or invent subtree descendants. Missing or truncated evidence forces `import-partial` and exit `1`. Revisions do not merge corpora, establish complete history or invoke later analysis. Without the option, no revision file is created and the summary retains its existing shape.
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
Version 2 preserves nonempty envelope `uuid` strings exactly, with `null` for unknown identity. It preserves boolean `isSidechain` flags, otherwise `null`. A nonempty `parentUuid` string is an observed link and explicit `null` is an observed root. Absent, empty or invalid parents are omitted and remain unknown. Import retains all supported branches and side chains and never uses API message IDs, paths, content or neighbors to infer identity.
|
|
69
71
|
|
|
70
|
-
1.
|
|
71
|
-
```bash
|
|
72
|
-
git clone https://github.com/cloving-ai/cloving-cli.git
|
|
73
|
-
```
|
|
72
|
+
The version 1 structure sidecar references each occurrence by zero-based `recordIndex` and `sourceId`, including repeated selections with the same source ID. It contains no message content or source paths. Known identity matches across the import mark copies of the earliest occurrence with equal role, text and blocks, ignoring object member order while preserving array order and exact JSON number tokens. All records stay in the corpus. Different content for one identity produces a conflict group containing every variant and its copies; no variant wins.
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
cd cloving-cli
|
|
78
|
-
```
|
|
74
|
+
Structure groups nodes and observed links within known sessions. Null and empty session IDs remain separate, unlinked occurrences. Links with conflicting observed parents or unknown child identity are marked ambiguous. Forks require multiple distinct known child IDs through unambiguous links. Missing parent targets are counted once per session and target ID, separately from unknown parent fields. Cyclic groups include all observed links, including ambiguous links; their IDs form strongly connected groups in occurrence order. Counts include records, known sessions, forks, copies, conflict groups, unknown identities and missing parent targets, including zeros. `historyCompleteness` is always `"unknown"`: selected history and even an explicit root cannot establish complete history. Omitted metadata parents remain unresolved.
|
|
79
75
|
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
yarn install
|
|
83
|
-
yarn link
|
|
84
|
-
```
|
|
76
|
+
Console output contains counts, fixed codes and an opaque import ID. Source paths, exclusion names, event and session IDs, and transcript text stay in the private files. Root imports add `excluded` and `pending` entry totals. `refused` counts unreadable, unsupported and positional oversized entries. Exit code `0` and `import-complete` mean no refused or pending entries and, when comparing revisions, no missing or truncated evidence; exclusions alone permit success without comparison. Code `1` and `import-partial` mean refused, pending, missing or truncated entries when output completes. Output failures return code `1`, a null import ID and zeroed counts. Code `2` means invalid usage, before source or destination access. Importing performs only structural comparison; it makes no model or network call and does not execute transcript instructions. Full quality admission and release qualification remain pending.
|
|
85
77
|
|
|
86
|
-
|
|
78
|
+
### Protected chat analysis files
|
|
87
79
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
The daemon provides `chats` capability methods `read-analysis` and `save-analysis` only to the registered `analyze-chats` workflow. A declaration must explicitly name `chats`; existing workflows retain their capabilities. Start one analysis with `cloving run analyze-chats --input input.json`, where the file contains exactly `{ "importId": "11111111-1111-4111-8111-111111111111" }` using your redacted import ID. The declared workflow charges three effect units for sequential read, one model turn and save. No evidence path is accepted.
|
|
81
|
+
|
|
82
|
+
`read-analysis` takes `{ importId }`, with the same lowercase UUID v4 syntax as redaction and the import ID as its protected target. It reads only `redaction.json`, `redacted.jsonl` and `structure.json` from the resolved runtime import directory. Its completed result contains `{ snapshot }`, whose `importId`, `redaction`, `corpus` and `structure` fields are strings. Keep these strings in private durable state; parsing and serializing corpus numbers can lose their exact tokens. Original corpus, coverage, revision and transcript content are never analysis inputs.
|
|
83
|
+
|
|
84
|
+
Each evidence file is bounded before retention. The redacted corpus, serialized snapshot, complete escaped model document (`{ prompt: analysisModelInput(snapshot) }`) and final serialized save payload must each fit 65,536 UTF-8 bytes. The model-input formatter includes instructions and the full sidecar. Overflow returns `analysis-too-large`; transport limits are unchanged. Missing redaction manifest or corpus returns `redaction-required`, malformed nonempty import IDs return `invalid-import-id`, and invalid or unsafe evidence returns `analysis-input-refused`. Manifest counts and identity fields must match the corpus. Sidecar validation retains original copy/conflict classes, using class markers rather than redacted content to check structure consistency.
|
|
91
85
|
|
|
92
|
-
|
|
86
|
+
`save-analysis` takes `{ importId, cycleId, snapshot, reply }`. The reply is JSON text and validation uses the captured snapshot even if the files later change. Invalid JSON returns `analysis-invalid-json`; candidate refusal retains the validator's unique codes in declaration order. Accepted output writes and closes private `proposal-CYCLE_ID.txt` before creating `analysis-CYCLE_ID.json` as the completion marker. The JSON is the complete validator result, including every citation, counterevidence item and limitation. The deterministic plain-text proposal is at most 4,000 characters. Matching duplicate saves retain bytes and receipt identity; a matching proposal without a marker may finish. Conflicting or incomplete existing outputs remain unchanged and return `analysis-output-failed`. A proposal alone is not completed analysis. New files have mode `0600`; destinations and linked files use the import protections.
|
|
93
87
|
|
|
94
|
-
|
|
88
|
+
The pure batch preparer validates a captured snapshot, selects the longest consecutive whole-record prefix within 65,536-byte encoded launch and adapter documents, and refuses a fifth batch. It preserves record bytes, global occurrence indexes and captured copy/conflict classes, includes the earlier result as data, and measures the fixed instruction and prompt encoding shared with the restricted launcher. Raw metadata remains bounded at 65,536 bytes and the input corpus at 52,428,800 bytes. Workflow integration, streaming capture, cumulative merge, immutable coverage checkpoints, batch save bounds and restart across batches remain pending; the running workflow retains its single-snapshot limits above.
|
|
95
89
|
|
|
96
|
-
|
|
90
|
+
Analysis reuse after an evidence revision is unavailable. `earlierAnalysisId` is not a supported analysis input, and `analysis:IMPORT_ID:CYCLE_ID` identifies a saved result without establishing checkpoint coverage. Import revisions classify source changes but do not map analysis citations or transfer analyzed record ranges. Reuse requires an implemented and verified batch pipeline with result merging, committed complete or partial coverage checkpoints, replay binding and durable question/answer follow-up. The pure batch preparer and saved validator results do not satisfy that prerequisite.
|
|
97
91
|
|
|
98
|
-
|
|
92
|
+
A candidate with `openQuestion` currently returns `analysis-input-refused` from `save-analysis`, reconciliation and stop without creating output. The pure question validator is implemented; private drafts, durable analysis questions, expiry and answer follow-up are pending. The workflow still uses one turn and three effect units.
|
|
99
93
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
Success returns `{ kind: "handoff_requested", cycleId, promotionId }`, where `promotionId` is an opaque analysis reference. It grants no execution or publication authority. The file adapter performs no git work, network request or model call. Redaction can leave private values, and validator acceptance checks shape and cited occurrences rather than factual accuracy. History completeness remains unknown and independent observations remain unestablished.
|
|
95
|
+
|
|
96
|
+
The analysis turn always uses the `claude` executable on the search path, including with `CLOVING_WORKER=codex`. Development workflows keep their configured worker. Analysis requires Claude Code major version 2, at least 2.1.302, with every required launch flag in its help text; an unavailable or unsupported CLI returns `analysis-worker-unavailable`. It accepts no `analyze-chats` profile or development-command override.
|
|
97
|
+
|
|
98
|
+
To configure subscription login:
|
|
99
|
+
|
|
100
|
+
1. Run `claude setup-token` once and store the token in your secret manager.
|
|
101
|
+
2. Set `CLOVING_ANALYSIS_TOKEN_COMMAND` before starting the daemon. Its value is a JSON array of one or more nonempty strings naming a program and its arguments, for example `CLOVING_ANALYSIS_TOKEN_COMMAND='["op","read","op://Development/Claude Analysis/token"]' cloving start`. The command must print only the stored token on stdout.
|
|
102
|
+
3. Start an `analyze-chats` run. Immediately before each new turn, Cloving runs the command without a shell, with a 10-second deadline and a 4,096-byte limit shared by stdout and stderr. After removing one final line break, stdout must contain 1–512 printable ASCII characters without spaces or control characters. An unset or malformed setting, command failure, timeout, excessive output or invalid token blocks with `analysis-worker-unavailable` and a fixed cause category.
|
|
103
|
+
|
|
104
|
+
The fetched token goes only to the analysis process as `CLAUDE_CODE_OAUTH_TOKEN`. Cloving does not put it in its environment, development workers, logs or stored results, and does not fetch it for CLI probes or completed-turn replay. Analysis excludes `ANTHROPIC_API_KEY`, including a key present in the daemon environment. Cloving does not read the macOS keychain.
|
|
105
|
+
|
|
106
|
+
The fixed launch removes built-in tools with `--tools ""` and denies MCP tools separately, with an empty strict MCP configuration. Safe and restricted modes disable discovery; skills, hooks, project instructions, plugins, session persistence and Chrome integration are disabled. The command runs once with a five-dollar budget in an empty private directory and uses a separate fixed system instruction and encoded evidence input. Only this turn contacts the model. See the [Claude CLI controls](https://code.claude.com/docs/en/cli-reference) and [subscription authentication](https://code.claude.com/docs/en/authentication).
|
|
107
|
+
|
|
108
|
+
Replies of at most 16,000 UTF-8 bytes are retained completely for validation. Larger replies return `analysis-reply-too-large`; unsuccessful turns return `analysis-turn-failed`. Both retain available usage. A completed private worker result is written before its report, so durable replay can reuse it. An interrupted or unknown completion never starts a replacement turn. Analysis creates no raw stdout/stderr turn logs or generic text summary. Worker records and accepted outputs remain private; operational views expose codes, counts, usage and opaque identities. Temporary CLI data is removed when the turn completes. Acceptance grants no execution, publication or workflow-generation authority.
|
|
109
|
+
|
|
110
|
+
### Redact an imported corpus
|
|
111
|
+
|
|
112
|
+
```sh
|
|
113
|
+
cloving chats redact IMPORT_ID
|
|
103
114
|
```
|
|
104
115
|
|
|
105
|
-
|
|
116
|
+
Use the UUID v4 import ID printed by `chats import`. This command uses the same runtime directory selection and needs no service. It accepts version 1 and version 2 corpus records and coverage manifests. It validates coverage without reopening transcript paths. Original corpus, coverage and structure files remain unchanged.
|
|
117
|
+
|
|
118
|
+
The command writes `redacted.jsonl` and `redaction.json` beside the originals. New files have mode `0600`. Existing outputs are refused. The manifest records rule version `1`, record count, category counts (including zeros), and total replacements. It contains no matched values or replacement map. The manifest is written only after the redacted corpus closes successfully. A failure can leave an incomplete redacted corpus; there is no restart recovery.
|
|
106
119
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
120
|
+
`HOME` supplies the home folder. The rules replace home paths (including tilde forms), e-mail addresses, supported GitHub, Anthropic and OpenAI tokens, complete private-key blocks, and URLs with user information. `CLOVING_PRIVATE_TEXTS` adds literal texts with case ignored. For this command, an unset setting or `[]` adds no texts. Malformed lists, non-string entries and blank entries are refused. The issue-posting workflows still require a nonempty private-text list.
|
|
121
|
+
|
|
122
|
+
Redaction inspects message text, text blocks and nested tool input and result strings, including member names. Overlapping matches count once, with priority given to private keys, credential URLs, home paths, tokens, e-mail addresses, then private texts. Both stored copies of message text count. Source references, schema versions, identity fields, parent-field presence, record order and exact number tokens remain intact. The structure sidecar is private metadata outside redaction scope and is not a redacted export. Member-name collisions are refused.
|
|
123
|
+
|
|
124
|
+
Console output contains only fixed codes, counts and the import ID. Exit code `0` means success, `1` means processing failure, and `2` means invalid usage. Originals and metadata remain outside redaction scope. Both originals and outputs remain private runtime data. Redaction makes no model or network call and does not execute transcript instructions. It neither guarantees removal of every private value nor authorizes later model use.
|
|
125
|
+
|
|
126
|
+
### Validate process analysis data
|
|
127
|
+
|
|
128
|
+
The pure `validateAnalysis(candidate, { records, structure })` function in `src/chats/analysis.ts` validates one version 1 process candidate against an ordered redacted corpus and its matching pre-redaction, in-memory `ImportStructure`. The evidence object keeps the API within the repository's two-parameter quality limit. Stored sidecar envelopes are not this input type. This pure validator makes no model call.
|
|
129
|
+
|
|
130
|
+
Candidates declare IDs and descriptions for inputs, ordered stages, branches, bounded loops, artifacts, stopping conditions, gates and non-gates. Branch links use `sourceStageId` and `targetStageId`; loops use ordered `stageIds` and `exhaustedStoppingConditionId`. Stages, gates and loops declare a claim `kind`, `sourceRefs` and `counterevidenceRefs`. References identify exact occurrences by `recordIndex` and `sourceId`. Copies add no support; observed repetition needs two directly cited original source IDs. Routine repair, accidental interruption and tool-imposed confirmation require matching non-gate classifications.
|
|
131
|
+
|
|
132
|
+
Version 1 also accepts an optional `openQuestion` object containing only `claimId`, `description`, `sourceRefs` and `choices`. It names a stage, gate or loop claim and cites distinct known occurrences from that claim's support and counterevidence, with no unrelated references. Two to four choices each contain only a unique nonempty `id` and an inert `description`. Malformed or multiple questions return `invalid-question`; absent claims or missing declared conflict return `question-without-conflict`. Missing and unknown sources retain their existing codes, as do recursive authority fields. Validation checks the declared relations and makes no claim that the prose describes a real conflict. A validated question remains unresolved analysis data.
|
|
133
|
+
|
|
134
|
+
Acceptance returns the candidate plus limitations preserving conflict groups, unknown history and unestablished independence. Refusal returns only fixed, unique codes in declaration order. Candidate fields are closed; authority and executable fields are refused, and descriptions remain inert. Validation does not certify redaction, evidence authenticity, inference quality, publication safety or permission for any action. Evidence content and exact numeric tokens remain unchanged. Full product admission remains pending CLV-002 through CLV-004.
|
|
135
|
+
|
|
136
|
+
## Install
|
|
137
|
+
|
|
138
|
+
Cloving supports macOS and Linux on arm64 and x64, with the Node and npm ranges in `package.json`. Workflow admission still requires exactly Node 26.9.0. CI runs the developer gate and packed-install checks on macOS 15 arm64 and Ubuntu 24.04 x64 with Node 26.9.0 and npm 11.19.1. Chat import and redaction currently require macOS; other platforms return `platform-unsupported` before file access. Windows is unsupported.
|
|
139
|
+
|
|
140
|
+
A run needs these tools:
|
|
141
|
+
|
|
142
|
+
- `git`.
|
|
143
|
+
- The `claude` command of Claude Code on the search path. The Claude worker runs it as the current user.
|
|
144
|
+
- For `develop-issue` only: the `gh` command with a login, and a GitHub repository that Greptile reviews. The worker uses the `gh` login and the git credentials of the current user.
|
|
145
|
+
|
|
146
|
+
Once the operator publishes this package, install the executable with:
|
|
147
|
+
|
|
148
|
+
```sh
|
|
149
|
+
npm install --global cloving --ignore-scripts
|
|
150
|
+
cloving --version
|
|
110
151
|
```
|
|
111
|
-
Options:
|
|
112
|
-
- `-s, --silent`: Run without asking for confirmation of submitting prompts
|
|
113
|
-
- `-m, --model <model>`: Select the model to use
|
|
114
152
|
|
|
115
|
-
|
|
153
|
+
This package replaces the older Cloving CLI under the same npm name. The registry currently serves that older CLI; the command above is for after this release is published. The installed package includes startup, the watch command, bundled workflows and the SDK compiler integration. It starts without a source checkout or development dependencies, using the installed runtime dependencies. Installation runs no scripts and starts no service.
|
|
116
154
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
155
|
+
For checkout development, get the code and install the dependencies:
|
|
156
|
+
|
|
157
|
+
```sh
|
|
158
|
+
git clone https://github.com/cloving-ai/cloving-ai.git ~/cloving
|
|
159
|
+
cd ~/cloving
|
|
160
|
+
npm ci --ignore-scripts
|
|
120
161
|
```
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
162
|
+
|
|
163
|
+
The runtime dependencies include the Workflow SDK (`workflow`), its directive compiler (`@workflow/builders`), Solid Objects (`solid-objects`), Entities (`entities`) and Preact (`preact`), which the watch page loads. Startup runs the SDK compiler to transform workflow and step directives. Development dependencies are needed to build the package, but an installed tarball runs without them.
|
|
164
|
+
|
|
165
|
+
### The `cloving` command
|
|
166
|
+
|
|
167
|
+
For checkout development, put a launcher for `src/cli.ts` in a directory of the search path. The launcher must use exactly Node 26.9.0. This example is for a checkout in `~/cloving` and a launcher in `~/.local/bin`:
|
|
168
|
+
|
|
169
|
+
```sh
|
|
170
|
+
mkdir -p ~/.local/bin
|
|
171
|
+
cat > ~/.local/bin/cloving <<'EOF'
|
|
172
|
+
#!/bin/sh
|
|
173
|
+
exec node "$HOME/cloving/src/cli.ts" "$@"
|
|
174
|
+
EOF
|
|
175
|
+
chmod +x ~/.local/bin/cloving
|
|
176
|
+
cloving --version
|
|
124
177
|
```
|
|
125
|
-
Options:
|
|
126
|
-
- `-s, --silent`: Run without asking for confirmation
|
|
127
|
-
- `-m, --model <model>`: Select the model to use
|
|
128
178
|
|
|
129
|
-
|
|
179
|
+
If the `node` program of the search path has a different version, write the full path of the correct `node` program in the launcher.
|
|
180
|
+
|
|
181
|
+
To install a built tarball, build and pack it in the checkout:
|
|
130
182
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
183
|
+
```sh
|
|
184
|
+
npm run build
|
|
185
|
+
npm pack --ignore-scripts
|
|
134
186
|
```
|
|
135
|
-
Options:
|
|
136
|
-
- `-s, --silent`: Run without asking for confirmation
|
|
137
|
-
- `-m, --model <model>`: Select the model to use
|
|
138
187
|
|
|
139
|
-
|
|
188
|
+
Then install the resulting tarball in your project using its absolute location:
|
|
140
189
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
cloving
|
|
190
|
+
```sh
|
|
191
|
+
npm install --ignore-scripts --omit=dev /path/to/TARBALL
|
|
192
|
+
./node_modules/.bin/cloving --help
|
|
193
|
+
./node_modules/.bin/cloving start
|
|
144
194
|
```
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
cloving
|
|
195
|
+
|
|
196
|
+
The installed executable includes JavaScript for startup, the watch command and bundled workflows. It uses the installed runtime dependencies, including the SDK compiler, without a source checkout. Runtime state and generated workflow artifacts use the configured runtime location outside the installation. Installation scripts are unnecessary. The checkout launcher above remains supported, including its existing checkout self-update behavior; installing a tarball does not add package self-updates.
|
|
197
|
+
|
|
198
|
+
For a project-local tarball installation, use `./node_modules/.bin/cloving` wherever the examples below say `cloving`, or add your project's `node_modules/.bin` to the search path. After a build, `npm link` also supplies the executable.
|
|
199
|
+
|
|
200
|
+
## First run
|
|
201
|
+
|
|
202
|
+
This first run uses `develop-prompt` on a test repository. It needs no ticket command and no GitHub repository.
|
|
203
|
+
|
|
204
|
+
1. Make a test repository with one commit:
|
|
205
|
+
|
|
206
|
+
```sh
|
|
207
|
+
mkdir ~/cloving-trial
|
|
208
|
+
cd ~/cloving-trial
|
|
209
|
+
git init
|
|
210
|
+
echo "A test project." > README.md
|
|
211
|
+
git add README.md
|
|
212
|
+
git commit -m "Start the test project"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
2. In terminal 1, in the test repository, start the service. Keep this terminal open:
|
|
216
|
+
|
|
217
|
+
```sh
|
|
218
|
+
cloving start
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
`cloving start` copies the workflow file into a host project, compiles it there, and starts the service. Then it prints the commands for a second terminal.
|
|
222
|
+
|
|
223
|
+
3. Open the watch page on `http://127.0.0.1:3663/`.
|
|
224
|
+
|
|
225
|
+
4. In terminal 2, submit a run:
|
|
226
|
+
|
|
227
|
+
```sh
|
|
228
|
+
cloving run develop-prompt --prompt "Add a file HELLO.md with one line of text."
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
The command prints a committed receipt with the run ID. A receipt does not mean completed work.
|
|
232
|
+
|
|
233
|
+
5. The Claude worker does one Claude Code turn. Then the run opens one approval. Show the pending decisions:
|
|
234
|
+
|
|
235
|
+
```sh
|
|
236
|
+
cloving questions
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
The output has the approval text and the values that a decision command needs. The approval text has the round, the ticket ID, the branch, the commits, the changed files and the report of the worker.
|
|
240
|
+
|
|
241
|
+
6. Read the diff before you decide. In the test repository, `git diff HEAD...BRANCH` shows the work of the branch.
|
|
242
|
+
|
|
243
|
+
7. Approve or deny the work:
|
|
244
|
+
|
|
245
|
+
```sh
|
|
246
|
+
cloving approve DECISION_REF --expected-revision N --generation N --subject-digest DIGEST
|
|
247
|
+
cloving deny DECISION_REF --text "FEEDBACK" --expected-revision N --generation N --subject-digest DIGEST
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
An approval completes the run. It does not merge the branch, so merge the branch yourself, for example with `git merge BRANCH`. A denial with a feedback text starts one more round.
|
|
251
|
+
|
|
252
|
+
8. `cloving status` lists the runs. `cloving status RUN_ID` shows one run with its reason, evidence and next action.
|
|
253
|
+
|
|
254
|
+
### The service and its settings
|
|
255
|
+
|
|
256
|
+
`cloving start` starts one Cloving service for the git repository of the current directory, with the workflow host, the Claude worker and the watch page. `--repository` selects a different repository. Stop the service with Control-C. A stop of the service stops a turn in work; submit that ticket again.
|
|
257
|
+
|
|
258
|
+
The client commands find the service with no setting, because the two sides use the same default runtime directory (`~/.local/state/cloving/run`). `CLOVING_RUNTIME_DIR` selects a different place for the two sides. The directory above the runtime directory holds the authority state, the Local World data, the turn records and the git work trees.
|
|
259
|
+
|
|
260
|
+
`cloving watch` serves a local page on `http://127.0.0.1:3663/` (`--port` selects a different port). The page shows the runs, the events, the work of the Claude worker as it occurs, and each pending decision with its approve and deny commands. `cloving start` starts the page too; `CLOVING_WATCH_PORT` selects its port, and the value `off` starts none.
|
|
261
|
+
|
|
262
|
+
Each workflow board with supported inputs has **+ Add a card** at the bottom of its first column, including an empty board. It opens an inline form: **Issue number** for `develop-issue`, **Ticket ID** for `develop-ticket`, **Idea** for `develop-prd` and **Task** for `develop-prompt`. Declared workflows such as `analyze-chats` use the string fields in their bundled declaration. Unsupported inputs have no control. Select **Add card**, press Enter in a one-line field, or Command/Control+Enter in a text area to send. **Cancel** and Esc close the form. The service reply shows the admitted run ID or a refusal code; admitted cards arrive through the existing live stream. For `workflow-active`, add `cloving: ready` to the issue to queue it.
|
|
263
|
+
|
|
264
|
+
The form sends the same run request as the CLI and retains its random command ID for retries, including a lost reply. Retry the same form to avoid duplicate runs. The write endpoint accepts at most 16 KiB of JSON, requires the page's random token, matching Origin and a loopback/localhost Host with the bound port, and allows no cross-origin preflight. `CLOVING_WATCH_ACTIONS=off` removes both the form control and the endpoint; actions are enabled by default. The **Start a run** section remains available with prompts to copy into agents. Decisions and other run actions still use their displayed CLI commands.
|
|
265
|
+
|
|
266
|
+
`cloving start` reads its settings from the environment. `cloving start --help` gives the form and the default of each setting:
|
|
267
|
+
|
|
268
|
+
- `CLOVING_RUNTIME_DIR`: the runtime directory.
|
|
269
|
+
- `CLOVING_TICKET_COMMAND`: the ticket command (see "Daily development").
|
|
270
|
+
- `CLOVING_NOTIFY_COMMAND`: a JSON list naming a command to notify the operator about pending decisions, blocked runs and failed runs. It has no default.
|
|
271
|
+
- `CLOVING_NEXT_COMMAND`: a JSON list of a command and its arguments that prints the next ready ticket ID for `--next`. It has no default.
|
|
272
|
+
- `CLOVING_ANALYSIS_TOKEN_COMMAND`: a JSON command array that prints the subscription token just before an analysis turn (see "Protected chat analysis files"). It has no default.
|
|
273
|
+
- `CLOVING_CLAUDE_COMMAND`: a replacement of the `claude` command of the worker.
|
|
274
|
+
- `CLOVING_PROFILES`: a JSON file of named Claude turn profiles, read once when the service starts.
|
|
275
|
+
- `CLOVING_WATCH_ACTIONS`: `off` disables starting runs from the board; default `on`.
|
|
276
|
+
- `CLOVING_WATCH_PORT`: the port of the watch page, or `off`.
|
|
277
|
+
- `CLOVING_WATCH_REPOSITORY`: repository context for a separate watch process. `start` sets this from its service repository. The watch process uses its local origin and has no current-directory default.
|
|
278
|
+
- `CLOVING_OWNERSHIP_LEASE_SECONDS` and `CLOVING_HOST_BOUND`: limits of the workflow host.
|
|
279
|
+
- `CLOVING_GH_COMMAND`, `CLOVING_CHECK_COMMAND` and `CLOVING_PRIVATE_TEXTS`: settings of `develop-issue`; the GitHub command and private-text list also apply to `develop-prd`.
|
|
280
|
+
|
|
281
|
+
A command setting is a JSON list of texts, for example `CLOVING_CHECK_COMMAND='["npm", "test"]'`.
|
|
282
|
+
|
|
283
|
+
The notify command receives no added argument. Its standard input receives one JSON object with `event`, `runId`, `workflowId`, `subject` and `body`. The body contains the decision or outcome text already shown by `cloving questions` or `cloving status`, with complete response commands, up to 4000 characters. The daemon checks every 15 seconds and records each event before calling the command. The first check with no notification record only records existing events. Records survive restarts; a failed command is logged once and never retried. Commands have 30 seconds to finish. A stop after recording an event but before sending it can lose that notification, and decisions opened and closed between checks can be missed.
|
|
284
|
+
|
|
285
|
+
## Daily development
|
|
286
|
+
|
|
287
|
+
`cloving start` copies the TypeScript files in `workflows/` into a host project and compiles them there. The bundled workflows are:
|
|
288
|
+
|
|
289
|
+
- `develop-prompt` takes the text of a task. Use it for a small task with no ticket, or for a first try in a new repository.
|
|
290
|
+
- `develop-ticket` takes a ticket ID and reads the ticket itself. Use it for the normal work on a ticket, when you want to read each diff and merge the branch yourself.
|
|
291
|
+
- `develop-issue` takes a ticket ID too, and sends the work through a GitHub pull request. Use it for a small ticket with clear criteria, in a GitHub repository that Greptile reviews and that has a check command. It is the workflow of the continuous process.
|
|
292
|
+
- `develop-prd` takes an idea, researches the code and web, reviews a draft PRD, and posts it as a GitHub issue. Set `CLOVING_PRIVATE_TEXTS` to a nonempty JSON list before starting the daemon. A refused post preserves the worktree and draft. A successful post removes the worktree and adds no label; read the issue and add `cloving: ready` when it is ready for implementation.
|
|
293
|
+
|
|
294
|
+
```sh
|
|
295
|
+
cloving start # terminal 1, in the repository
|
|
296
|
+
cloving run develop-ticket --ticket TICKET_ID # terminal 2
|
|
297
|
+
cloving run develop-issue --ticket TICKET_ID # the work goes through a pull request
|
|
298
|
+
cloving run develop-issue --next # select the next ready ticket
|
|
299
|
+
cloving run develop-prompt --prompt "the text of the task"
|
|
300
|
+
cloving run develop-prd --prompt "Show the cost of each run on the watch page"
|
|
301
|
+
cloving watch # the live page, also started by cloving start
|
|
302
|
+
cloving questions
|
|
303
|
+
cloving approve DECISION_REF --expected-revision N --generation N --subject-digest DIGEST
|
|
304
|
+
cloving deny DECISION_REF --text "FEEDBACK" --expected-revision N --generation N --subject-digest DIGEST
|
|
158
305
|
```
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
306
|
+
|
|
307
|
+
The rule: read the diff before you approve.
|
|
308
|
+
|
|
309
|
+
Claude turns have web research tools by default, an empty GitHub CLI configuration folder, and no GitHub token environment variables. This is not a sandbox: a turn can still find other credentials. The PRD refusal rules catch the listed private text and common sensitive forms; unlisted private names can pass. A `post-uncertain` result requires checking GitHub before trying another run.
|
|
310
|
+
|
|
311
|
+
### The ticket command
|
|
312
|
+
|
|
313
|
+
`CLOVING_TICKET_COMMAND` (a JSON list of texts) names the ticket command. The contract of a ticket command:
|
|
314
|
+
|
|
315
|
+
- It gets a ticket ID as its last argument and prints the text of the ticket.
|
|
316
|
+
- For `develop-issue`, a first line that starts with `# ` gives the title of the pull request. With no such line, the title is `Cloving task <cycle ID>`.
|
|
317
|
+
- For `develop-issue`, a line `GitHub issue: <owner>/<repository>#<number>` makes the pull request reference that issue. Cloving closes it after a merge only when the worker reports complete work.
|
|
318
|
+
|
|
319
|
+
The daemon runs the ticket command when it admits a run. The printed text becomes the stored input of the run, so a later change of the ticket does not change the run. A ticket that the command does not give is refused with `ticket-not-available`. With no ticket command, `develop-ticket` is refused with `ticket-source-not-configured`. A ticket ID has letters, digits and the characters `. _ : -` only.
|
|
320
|
+
|
|
321
|
+
This example ticket command reads a GitHub issue. Save it as `~/.local/bin/github-ticket`, and make it executable:
|
|
322
|
+
|
|
323
|
+
```sh
|
|
324
|
+
#!/bin/sh
|
|
325
|
+
set -eu
|
|
326
|
+
repository=OWNER/REPOSITORY
|
|
327
|
+
title=$(gh issue view "$1" --repo "$repository" --json title --jq .title)
|
|
328
|
+
body=$(gh issue view "$1" --repo "$repository" --json body --jq .body)
|
|
329
|
+
printf '# %s\n\nGitHub issue: %s#%s\n\n%s\n' "$title" "$repository" "$1" "$body"
|
|
162
330
|
```
|
|
163
|
-
Options:
|
|
164
|
-
- `-s, --silent`: Run without asking for confirmation of submitting prompts
|
|
165
|
-
- `-m, --model <model>`: Select the model to use
|
|
166
|
-
- `-p, --prompt <prompt>`: Specify the prompt to use
|
|
167
331
|
|
|
168
|
-
|
|
332
|
+
Then start the service with the setting:
|
|
169
333
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
cloving chat
|
|
334
|
+
```sh
|
|
335
|
+
CLOVING_TICKET_COMMAND='["github-ticket"]' cloving start
|
|
173
336
|
```
|
|
174
|
-
Options:
|
|
175
|
-
- `-f, --files <filenames...>`: Specify filenames of files with context to use for the chat
|
|
176
|
-
- `-t, --temperature <temperature>`: Set the temperature for the model (default 0.2)
|
|
177
|
-
- `-m, --model <model>`: Select the model to use
|
|
178
337
|
|
|
179
|
-
|
|
338
|
+
`cloving run develop-issue --next` and `cloving run develop-ticket --next` use the reserved ticket ID `next`, just like `--ticket next`. Set `CLOVING_NEXT_COMMAND` to a JSON list naming your selection command and its arguments. The daemon adds no argument. The command chooses a ready ticket in your tracker and prints its ID; the daemon trims it and reads the ticket with `CLOVING_TICKET_COMMAND`. Both commands share the resolver's 30-second deadline. Selection logic stays in your command, and each invocation submits only one run.
|
|
339
|
+
|
|
340
|
+
An empty selection gives `no-ready-ticket`; a failed command gives `next-ticket-not-available`. Missing configuration gives `next-source-not-configured`. Multiple IDs, an invalid ID, or `next` as the selected ID give `invalid-ticket-id`. Use only one of `--next`, `--ticket`, `--prompt` and `--input`.
|
|
341
|
+
|
|
342
|
+
### Review rounds of `develop-ticket` and `develop-prompt`
|
|
343
|
+
|
|
344
|
+
Worker turns retry an exact Codex capacity refusal or a Claude overload after 60 seconds, then 180 seconds, for at most three attempts. Each retry keeps the work tree, profile, model, budget and limits, and asks the worker to continue from the current work. The step keeps one operation identity and sums usage across attempts. Private turn journals retain each attempt. Stopping during a wait returns `stopped`; a daemon restart fails the recorded operation for existing recovery. The same retry rule applies to the restricted analysis turn in `analyze-chats`. Other failures are not retried.
|
|
180
345
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
346
|
+
A run of `develop-ticket` or `develop-prompt` has one to three review rounds. Each round does one Claude Code turn in the work tree of the run, on the branch `cloving/<ticket id>-…`, and then opens one approval. The first round makes the work tree. The approval text has the round, the ticket ID, the branch, the commits, the changed files and the report of the worker. Read the diff before you decide. The decision has these results:
|
|
347
|
+
|
|
348
|
+
- An approval completes the run. It does not merge the branch. Merge the branch yourself.
|
|
349
|
+
- A denial with a feedback text (`--text`) in round 1 or 2 starts the next round. The Claude worker gets the feedback text and adds commits to the same branch.
|
|
350
|
+
- A denial with no text, or a denial in round 3, ends the run.
|
|
351
|
+
|
|
352
|
+
The worker is not confined. It runs the `claude` command of the search path as the current user, with file edits and shell commands permitted in the work tree and a spend limit of 5 USD for each turn. `CLOVING_CLAUDE_COMMAND` (a JSON list of texts) replaces the command.
|
|
353
|
+
|
|
354
|
+
Single-run status (`cloving status RUN_ID`, also with `--json`) and watch show each worker command call and its run totals. Token counts retain the reported input, cache read and output categories separately. Codex input includes cached tokens; cache read tokens are not added to input tokens. These selected counts are not complete billing usage or a record of all subagent work. Missing or invalid fields show `Token usage not known`. Costs show the worker-reported USD price when available, otherwise `≈ 7.82 USD (estimate)` when an estimate is available, otherwise `Price not known`; a reported zero shows `0.00 USD`. Totals for an unfinished run are labeled `so far`. JSON uses `null` for unknown numeric values, retains the total reported price field `claudeCostUsd`, and adds `costDisplay` to the run and each worker turn.
|
|
355
|
+
|
|
356
|
+
The built-in table uses standard short-context prices read on **2026-10-18** from the [OpenAI pricing page](https://openai.com/api/pricing/), in USD per million tokens:
|
|
357
|
+
|
|
358
|
+
| Model | Input | Cached input | Output |
|
|
359
|
+
| --- | ---: | ---: | ---: |
|
|
360
|
+
| `gpt-6.1-sol` | 2.00 | 0.10 | 10.00 |
|
|
361
|
+
| `gpt-6-astra` | 10.00 | 1.00 | 50.00 |
|
|
362
|
+
|
|
363
|
+
`CLOVING_TOKEN_PRICES` accepts a JSON object mapping model names to non-negative finite `input`, `cachedInput` and `output` prices per million tokens. Its entries override matching built-in entries and retain the others. Estimates use the reported model or the worker command's model argument, with `estimatedCostUsd` totals only when every ended turn has an estimate. There is no live price lookup; estimates do not change budgets or limits.
|
|
364
|
+
|
|
365
|
+
`CLOVING_WORKER` selects `claude` (the default) or `codex`. With `codex`, `CLOVING_CODEX_COMMAND` replaces the native Codex command and must still emit native Codex events. A shared-format wrapper uses `CLOVING_CLAUDE_COMMAND` with the `claude` worker selection. Its last JSONL result supplies `total_cost_usd` and `usage.input_tokens`, `usage.cache_read_input_tokens` and `usage.output_tokens`, including on errors. Report only the usage and price of that command call; the wrapper must normalize resumed sessions or multi-input accounting. Cloving does not infer the output format from the executable or model name or reconstruct missing usage from old logs.
|
|
366
|
+
|
|
367
|
+
Set `CLOVING_PROFILES` to a file such as:
|
|
368
|
+
|
|
369
|
+
```json
|
|
370
|
+
{
|
|
371
|
+
"profiles": {
|
|
372
|
+
"checker": {
|
|
373
|
+
"env": { "REVIEW_ONLY": "1", "TURN_NAME": "{turn}" },
|
|
374
|
+
"allowedTools": ["Read", "Grep", "Skill", "Agent"],
|
|
375
|
+
"maxBudgetUsd": 15,
|
|
376
|
+
"workflows": ["review-loop"]
|
|
377
|
+
},
|
|
378
|
+
"fixer": { "env": { "TURN_NAME": "{turn}" } }
|
|
379
|
+
}
|
|
380
|
+
}
|
|
184
381
|
```
|
|
185
|
-
Options:
|
|
186
|
-
- `-f, --files <filenames...>`: Specify filenames of files with context to use for generating code
|
|
187
|
-
- `-t, --temperature <temperature>`: Set the temperature for the model (default 0.2)
|
|
188
|
-
- `-m, --model <model>`: Select the model to use
|
|
189
382
|
|
|
190
|
-
|
|
383
|
+
A workflow selects a profile with a `protectedEffect` request for capability `claude` and method `run-turn:checker` or `run-turn:fixer`. Profile names contain 1–119 ASCII letters, digits, hyphens or underscores. All fields are optional; `model` and `permissionMode` also override the corresponding Claude command flags. Unspecified fields keep the service defaults, and `run-turn` keeps the original command. Flags after `--` remain unchanged.
|
|
384
|
+
|
|
385
|
+
`workflows` restricts a profile to the service's registered workflow IDs; omitting it allows every workflow. Each turn receives its run ID and journal operation key joined with a hyphen in `CLOVING_TURN_ID`. That value replaces each `{turn}` in profile environment values. Variables added by one profile do not carry into the next turn. The four GitHub token variables and `GH_CONFIG_DIR` are forbidden in profiles; turns retain an empty GitHub configuration directory. Invalid files stop startup with `invalid-profiles`. Turns refuse unknown profiles with `unknown-profile`, disallowed workflows with `profile-not-allowed`, and Codex profiles with `profile-needs-claude`.
|
|
386
|
+
|
|
387
|
+
To run a Claude or Codex turn on an existing branch, a custom workflow sets
|
|
388
|
+
the effect target to `branch:feature-search`. The service finds that branch's
|
|
389
|
+
linked work tree in its own repository. The main checkout is excluded. Before
|
|
390
|
+
each turn, the work tree must be clean, including untracked files, submodule
|
|
391
|
+
changes and executable bits. Index entries marked assume-unchanged or
|
|
392
|
+
skip-worktree are refused even when unchanged. Missing or mismatched work trees
|
|
393
|
+
fail with `branch-worktree-not-found`; dirty work trees fail with
|
|
394
|
+
`branch-worktree-not-clean`. Branches beginning with `cloving/` and work trees
|
|
395
|
+
inside the managed work-tree directory fail with `branch-reserved`.
|
|
396
|
+
|
|
397
|
+
Cloving only inspects an existing branch work tree; the turn itself can edit
|
|
398
|
+
and commit there. Cloving does not create, stash, reset, clean, remove or delete
|
|
399
|
+
it or its branch. Results count commits and changed files from the first turn
|
|
400
|
+
of that run and target, including after a worker restart. Sequential runs have
|
|
401
|
+
separate starting commits; concurrent runs on one branch do not isolate their
|
|
402
|
+
commits. Index flags inside submodules and other settings that hide changes
|
|
403
|
+
are outside these checks. Every GitHub worker method refuses `branch:` targets
|
|
404
|
+
with `branch-target-not-supported`, so this target adds no Cloving push or merge
|
|
405
|
+
step. The bundled development workflows keep their existing targets.
|
|
406
|
+
|
|
407
|
+
### Pull requests of `develop-issue`
|
|
408
|
+
|
|
409
|
+
A run of `develop-issue` opens no approval. The GitHub worker makes the work tree from the newest commit of the default branch of `origin`. After the Claude turn, the worker pushes the branch and opens a pull request. The title and the referenced issue come from the ticket text (see "The ticket command"). The pull request body uses `Refs owner/repository#N`, so the merge itself does not close the issue. Then the worker waits for the Greptile review of the pushed commit, and asks for a review with a comment after 5 minutes.
|
|
410
|
+
|
|
411
|
+
When the ticket names a GitHub issue, the workflow adds `cloving: in progress` after preparing the work tree and removes `cloving: ready` and `cloving: blocked`. A blocked run adds `cloving: blocked` and removes `cloving: in progress`. Start and blocked label failures leave the run's outcome unchanged. Cloving creates the labels it adds or removes with the fixed color `ededed`; existing labels have their color and description reset by `gh label create --force`.
|
|
412
|
+
|
|
413
|
+
The last worker report must end with exactly one line: `Ticket status: complete` or `Ticket status: partial`. A partial report must put `Remaining:` immediately before a list with one `- ` item per line, followed by the status line. The worker records the parsed status and remaining items before shortening the summary, so summary limits cannot remove those fields. If the preserved fields exceed the result byte limit, the turn fails with `claude-result-too-large` and retains bounded cost metadata; the full report stays in the private turn log. Older recorded turns still use summary parsing. Missing, repeated, unknown or malformed status reports count as partial with the remaining item "The worker report has no ticket status line."
|
|
414
|
+
|
|
415
|
+
After a merge, a protected GitHub operation updates the issue body and labels. Complete work closes the issue with reason `completed` and adds "Completed in pull request #M." to `## Cloving status`. Partial work keeps the issue open and appends `- Pull request #M: partial. Remaining: ...` to that section at the end of the body, preserving earlier partial lines and other body text. Items are separated by semicolons. The issue privacy check runs before new remaining text is written; a refusal uses "Remaining work is in the private run report." instead. No issue comment is posted. Status writes add and remove only workflow labels, preserving unrelated label edits. Before a body write, Cloving rereads the issue and refuses a changed body with `github-issue-conflict`; the merged outcome records `issueUpdate: failed`. GitHub does not support conditional PATCH requests for this endpoint, so this check cannot make the read and write atomic.
|
|
191
416
|
|
|
192
|
-
|
|
417
|
+
Partial work removes `cloving: in progress` and adds `cloving: ready`, so the next queue cycle can select the same issue and read its remaining work from the issue body. The third partial run adds `cloving: blocked` instead of `cloving: ready`. Completion removes these workflow labels. Status operations reconcile the pull request number in the stored history after a restart to avoid duplicate writes. The effect limit stays at 20 units: the post-merge status operation replaces the final label operation.
|
|
193
418
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
419
|
+
Partial history comes only from a hidden HTML comment at the end of the issue body, beginning with `cloving-status`. Its JSON object has `version: 1`, a `partialRuns` array of pull request numbers and remaining-item lists, and an optional `completedPullRequest`. Double hyphens and greater-than signs in JSON strings are escaped so they cannot end the comment. Each write regenerates the readable section from this data and replaces the exact previously generated section. Other Markdown stays unchanged, including status examples, lists, tables, HTML and unclosed fences. Missing, broken or unknown metadata counts as zero earlier partial runs and is replaced on the next write; readable text is never used to reconstruct history. A block followed by other issue text is left unchanged and counts as missing terminal metadata.
|
|
420
|
+
|
|
421
|
+
Partial history, including its JSON block, is bounded by the 48,000-byte ticket-read limit, reserving 2,048 bytes for the title, issue reference and worker notes. If the new remaining items do not fit, Cloving uses the private-report notice above. If even the notice cannot fit alongside the existing body and history, the issue update fails without requeueing it. Retries check the same size limit before restoring queue labels. Review and merge-fix turns receive the previous report's remaining items, including preserved items from shortened summaries, and must reassess each item before reporting completion.
|
|
422
|
+
|
|
423
|
+
Merged runs retain `handoff_requested` with `ticketStatus: complete` or `partial`, visible in `cloving status` and watch. If the issue update fails, `issueUpdate: failed` is also shown. The queue reports each terminal run without a successful handoff and continues, stopping after three such runs in a row. A successful handoff resets the count; the queue journal preserves the count and run IDs across daemon restarts. Inspect failed GitHub operations and reconcile their issues before requeueing them. A later partial run does not mark an earlier blocked ticket as done.
|
|
424
|
+
|
|
425
|
+
To resume a queue stopped at this limit, stop the service with Control-C, inspect the failures and reconcile the affected issues, then run `cloving start --reset-queue` with the same repository, runtime and queue settings. This clears the failure streak once and preserves tracked commands. Ordinary restarts, including automatic self-updates, preserve the count. Resetting the queue does not change issue labels or retry blocked issues.
|
|
426
|
+
|
|
427
|
+
At the confidence score 5/5, the worker merges the pull request with a merge commit, with no human approval. Then it removes the remote branch, the work tree and the local branch. With a lower score, the Claude worker gets the summary and the findings of the review for one more round. After three such rounds, or after 60 minutes with no review, the run stops and the pull request stays open.
|
|
428
|
+
|
|
429
|
+
The watch board keeps blocked `develop-issue` runs in `Stopped`. A qualifying later local run shows `Done in a later run`. Otherwise, the board reads the recorded pull request with `CLOVING_GH_COMMAND` (default `gh`). The service supplies its repository, and the board checks the local origin and the recorded PR identity. A confirmed merge shows `PR merged #N`; a read failure shows `PR status unavailable`. Other PR states keep `Needs attention`. These marks do not change the run outcome.
|
|
430
|
+
|
|
431
|
+
Reads run in the background, one at a time, with a five-second limit. Board loads can refresh unresolved PRs at least 60 seconds after the previous attempt started. Confirmed merges remain cached until the watch process stops. A later normal page load shows each result.
|
|
432
|
+
|
|
433
|
+
The GitHub worker does not push a change that has the path of the home folder in a file or in a commit message. `CLOVING_PRIVATE_TEXTS` (a JSON list of texts) adds more texts to refuse, with no difference between capital and small letters. `CLOVING_CHECK_COMMAND` (a JSON list of texts) names a check that must pass in the work tree before a merge. `CLOVING_GH_COMMAND` replaces the `gh` command. The worker uses the `gh` login and the git credentials of the current user.
|
|
434
|
+
|
|
435
|
+
## Continuous process
|
|
436
|
+
|
|
437
|
+
In a continuous process, Cloving develops one ticket after the next with `develop-issue`. Use one terminal session for the service that stays open, for example a `tmux` session. Do these steps for each issue:
|
|
438
|
+
|
|
439
|
+
1. Write a small issue: one behavior, clear criteria that a test can check, and the first tests. The prompt "Write a ticket for Cloving" helps.
|
|
440
|
+
2. Run it: `cloving run develop-issue --ticket ISSUE_NUMBER`.
|
|
441
|
+
3. Follow the run on the watch page, or with `cloving status RUN_ID` and `cloving events RUN_ID --follow`.
|
|
442
|
+
4. Check the merge. The run completes when the GitHub worker merges the pull request. The watch page shows the number of the pull request of the run (`PR_NUMBER`). It is also `pullRequest.number` of the run in `http://127.0.0.1:3663/data.json`. The pull request number and the issue number are different.
|
|
443
|
+
- Make sure that the pull request is merged: `gh pr view PR_NUMBER --json state,mergedAt`.
|
|
444
|
+
- Check the ticket status and issue: `gh issue view ISSUE_NUMBER --json state,body,labels`. Complete work closes the issue; partial work stays open and requeues until the third partial run blocks it.
|
|
445
|
+
5. Update the local `main`: `git switch main`, then `git pull --ff-only`.
|
|
446
|
+
6. When the repository is the Cloving checkout itself, also restart the service, so that it runs the new code. Stop it with Control-C, then start it again with the same settings.
|
|
447
|
+
7. Go to the next issue.
|
|
448
|
+
|
|
449
|
+
When a run stops and the pull request stays open, read the review. Fix the work yourself, or write a smaller issue.
|
|
450
|
+
|
|
451
|
+
Know these limits before you start:
|
|
452
|
+
|
|
453
|
+
- The cost limit of each Claude turn is 5 USD. A run of `develop-issue` can have up to four Claude turns. `CLOVING_CLAUDE_COMMAND` changes the command and its limit.
|
|
454
|
+
- The text of a pull request is public in a public repository. The worker gets an instruction to write no local file path in a file or in a commit message.
|
|
455
|
+
- `CLOVING_PRIVATE_TEXTS` adds texts that the GitHub worker refuses to push, for example the names of private projects. The path of the home folder is always refused.
|
|
456
|
+
- `CLOVING_CHECK_COMMAND` names the checks of the repository. Set it, because a merge at 5/5 has no human approval. With no setting, the merge occurs with no check.
|
|
457
|
+
|
|
458
|
+
## Prompts for a coding agent
|
|
459
|
+
|
|
460
|
+
Copy a prompt, replace the words in capital letters, and give it to a coding agent.
|
|
461
|
+
|
|
462
|
+
### Set up Cloving for a repository
|
|
463
|
+
|
|
464
|
+
```text
|
|
465
|
+
Set up Cloving for my repository REPOSITORY_PATH. Ask me for each value that you do not know. Do not push, publish or merge anything in this setup.
|
|
466
|
+
|
|
467
|
+
1. Check the platform: macOS or Linux on arm64 or x64, with the Node and npm versions of "engines" in package.json of Cloving. Check that git and the claude command work. If I want develop-issue, check that gh has a login and that Greptile reviews the GitHub repository.
|
|
468
|
+
2. If I have no Cloving checkout, clone https://github.com/cloving-ai/cloving-ai.git to ~/cloving. In the checkout, run: npm ci --ignore-scripts
|
|
469
|
+
3. Write a launcher ~/.local/bin/cloving that runs src/cli.ts of the checkout with the correct node program, and make it executable. Do not use npm link, and do not install the npm package with the name cloving. Make sure that ~/.local/bin is on the search path and that "cloving --version" works.
|
|
470
|
+
4. Ask me which tracker has my tickets. Write a ticket command for that tracker in ~/.local/bin. The command gets a ticket ID as its last argument and prints the text of the ticket. For develop-issue, the first line is "# " and the title, and one line is "GitHub issue: OWNER/REPOSITORY#NUMBER". Test the command with one ticket ID, and show me the output.
|
|
471
|
+
5. Start the service in a terminal session that stays open, for example a tmux session. In that session, in my repository, run: CLOVING_TICKET_COMMAND='["TICKET_COMMAND"]' cloving start
|
|
472
|
+
For develop-issue, also set CLOVING_CHECK_COMMAND to the checks of my repository. Give me the address of the watch page.
|
|
473
|
+
6. Make a first run with develop-prompt and a small task that I agree to. Show me the output of "cloving questions" and the diff of the branch. Do not approve or deny. I decide.
|
|
474
|
+
7. Then run my first ticket: cloving run develop-ticket --ticket TICKET_ID
|
|
475
|
+
Show me the diff again before I decide.
|
|
197
476
|
```
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
477
|
+
|
|
478
|
+
### Run a continuous process
|
|
479
|
+
|
|
480
|
+
```text
|
|
481
|
+
Run a continuous process with Cloving and develop-issue in my repository REPOSITORY_PATH. The Cloving service runs in the terminal session SESSION_NAME. Do the issues ISSUE_LIST one at a time, in this order.
|
|
482
|
+
|
|
483
|
+
For each issue:
|
|
484
|
+
1. Read the issue. Do not change it.
|
|
485
|
+
2. Run: cloving run develop-issue --ticket ISSUE_NUMBER
|
|
486
|
+
ISSUE_NUMBER is the number of the issue. Record the run ID.
|
|
487
|
+
3. Follow the run with "cloving status RUN_ID" and "cloving events RUN_ID --follow".
|
|
488
|
+
4. When the run completes, get the number of its pull request (PR_NUMBER). It is pullRequest.number of the run in http://127.0.0.1:3663/data.json, and the watch page shows it too. Then:
|
|
489
|
+
- Make sure that the pull request is merged: gh pr view PR_NUMBER --json state,mergedAt
|
|
490
|
+
- Check the issue state, remaining work and queue labels: gh issue view ISSUE_NUMBER --json state,body,labels
|
|
491
|
+
5. Update the local main branch: git switch main, then git pull --ff-only
|
|
492
|
+
6. If the repository is the Cloving checkout itself, restart the service in its terminal session, so that it runs the new code. Stop it with Control-C, then start it again with the same settings.
|
|
493
|
+
7. Run the checks of the repository on the new main branch.
|
|
494
|
+
8. Add a record of the run to RECORD_FILE, outside the repository: the issue, the run ID, the pull request, the merge commit, the number of rounds and the result of the checks.
|
|
495
|
+
9. Go to the next issue.
|
|
496
|
+
|
|
497
|
+
Stop and ask me when:
|
|
498
|
+
- an issue is not small, or has no criteria that a test can check;
|
|
499
|
+
- a run stops, or its pull request stays open;
|
|
500
|
+
- the checks fail on the main branch after a merge;
|
|
501
|
+
- a step needs a change of the settings or of the credentials, or work in a different repository;
|
|
502
|
+
- a step needs a force push, a change of the history, or a publication.
|
|
503
|
+
|
|
504
|
+
Do not merge a pull request yourself. Do not approve or deny for me.
|
|
201
505
|
```
|
|
202
|
-
Options:
|
|
203
|
-
- `-f, --files <filenames...>`: Specify filenames of files to estimate tokens for
|
|
204
506
|
|
|
205
|
-
###
|
|
507
|
+
### Write a ticket for Cloving
|
|
508
|
+
|
|
509
|
+
```text
|
|
510
|
+
Help me write a ticket for Cloving. A Claude Code worker gets the full text of the ticket and no other context. Ask me questions until each part is clear. Then write the ticket in Markdown with these parts:
|
|
511
|
+
|
|
512
|
+
# TITLE
|
|
513
|
+
One line. For develop-issue, it becomes the title of the pull request.
|
|
514
|
+
GitHub issue: OWNER/REPOSITORY#NUMBER
|
|
515
|
+
Only for develop-issue. The pull request references this issue; complete work closes it after the merge.
|
|
516
|
+
## Problem
|
|
517
|
+
What is wrong now, with facts.
|
|
518
|
+
## Desired outcome
|
|
519
|
+
What is true when the work is done.
|
|
520
|
+
## Concrete scenario
|
|
521
|
+
One example from the start to the end, with real values.
|
|
522
|
+
## Scope
|
|
523
|
+
The changes, with the names of the files, commands and functions that you know.
|
|
524
|
+
## Non-goals
|
|
525
|
+
What the work must not change.
|
|
526
|
+
## Acceptance criteria
|
|
527
|
+
A numbered list. A test can check each criterion.
|
|
528
|
+
## First tests
|
|
529
|
+
The first tests to write. Each test fails before the change.
|
|
530
|
+
|
|
531
|
+
Rules:
|
|
532
|
+
- One ticket has one behavior. If the work needs more than one pull request, split the ticket.
|
|
533
|
+
- Write no secret, no private data and no local file path. For develop-issue, the ticket text and the branch become public.
|
|
534
|
+
- Use one term for one thing.
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
### Find workflows in your chats
|
|
538
|
+
|
|
539
|
+
```text
|
|
540
|
+
Find workflows in my chats with coding agents, and write a draft Cloving workflow for one of them.
|
|
206
541
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
542
|
+
Rules:
|
|
543
|
+
- Read only the chats that I select. Ask me for the list first. Do not read other chats.
|
|
544
|
+
- Keep the chat text and private data out of the repository. Do not copy chat text, names of persons, secrets or local paths into a file of the repository. Keep your notes outside the repository.
|
|
545
|
+
|
|
546
|
+
Steps:
|
|
547
|
+
1. In the selected chats, find sequences of steps that repeat. For each sequence, list the steps, the tool of each step (for example git, a test command, gh or a model), and each decision of a person (for example "approve the diff").
|
|
548
|
+
2. Show me the list, and ask me which sequence to use.
|
|
549
|
+
3. Map each step that changes something outside the workflow to protectedEffect, with a capability and a method. Map each decision of a person to decisionGate.
|
|
550
|
+
4. Use only the capabilities that have a worker: claude (method run-turn) and github. Put each step that needs a different capability in a list of open points, not in the draft.
|
|
551
|
+
5. Write the draft in the form of workflows/develop-ticket.ts of the Cloving checkout: an exported async function with the directive "use workflow", and the step helpers from the subpaths of cloving/workflows.
|
|
552
|
+
6. Write a list of the human decisions in the draft: for each decisionGate, the question, the person who decides, and the result of each answer.
|
|
553
|
+
7. Write workflow tests with a fake step bridge, in the form of test/develop-workflow-fixture.ts.
|
|
554
|
+
8. Tell me which changes of the Cloving code the draft needs before the service can run it. The section "Develop a workflow" of the Cloving README lists them.
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
## Develop a workflow
|
|
558
|
+
|
|
559
|
+
A workflow is a TypeScript file in the form of `workflows/develop-ticket.ts`:
|
|
560
|
+
|
|
561
|
+
- An exported async function with the directive `"use workflow"` as its first statement. The directive needs the compiler of the Workflow SDK, not only TypeScript.
|
|
562
|
+
- The first argument is the input of the run. A resolver of the daemon makes it, for example `cycleId`, `ticketId`, `ticket` and `repository`. After a decision, the host calls the function again with the decision (`gateId`, `decision` and `answer`) as the second argument. The function must examine the decision before it asks for an effect, as `decided()` in `workflows/develop-ticket.ts` does. If it does not, it does the work of round 1 again.
|
|
563
|
+
- The step helpers come from the subpaths of `cloving/workflows`: `protectedEffect` from `cloving/workflows/steps/protected-effect`, `decisionGate` from `cloving/workflows/steps/decision-gate` and `loadCycle` from `cloving/workflows/steps/load-cycle`. The type `CycleOutcome` comes from `cloving/workflows`. An import of `cloving/workflows` starts no service.
|
|
564
|
+
- `protectedEffect` asks the daemon for one effect of a capability, for example a Claude turn. `decisionGate` opens a decision for a person.
|
|
565
|
+
- The function returns a `CycleOutcome`: `waiting_for_decision`, `handoff_requested` or `blocked`.
|
|
566
|
+
|
|
567
|
+
```ts
|
|
568
|
+
import type { CycleOutcome } from "cloving/workflows";
|
|
569
|
+
import { decisionGate } from "cloving/workflows/steps/decision-gate";
|
|
570
|
+
import { protectedEffect } from "cloving/workflows/steps/protected-effect";
|
|
571
|
+
|
|
572
|
+
export async function developTicket(
|
|
573
|
+
input: { readonly cycleId: string; readonly ticket: string },
|
|
574
|
+
decision?: {
|
|
575
|
+
readonly gateId: string;
|
|
576
|
+
readonly decision: string;
|
|
577
|
+
readonly answer: string | null;
|
|
578
|
+
},
|
|
579
|
+
): Promise<CycleOutcome> {
|
|
580
|
+
"use workflow";
|
|
581
|
+
if (decision?.decision === "approved")
|
|
582
|
+
return {
|
|
583
|
+
kind: "handoff_requested",
|
|
584
|
+
cycleId: input.cycleId,
|
|
585
|
+
promotionId: `cloving-${input.cycleId}`,
|
|
586
|
+
};
|
|
587
|
+
if (decision !== undefined)
|
|
588
|
+
return {
|
|
589
|
+
kind: "blocked",
|
|
590
|
+
cycleId: input.cycleId,
|
|
591
|
+
reason: "The operator denied the work.",
|
|
592
|
+
evidenceId: decision.gateId,
|
|
593
|
+
};
|
|
594
|
+
const turn = await protectedEffect({
|
|
595
|
+
scope: { phase: "implement", operation: "claude-turn", round: 1 },
|
|
596
|
+
capability: "claude",
|
|
597
|
+
method: "run-turn",
|
|
598
|
+
target: input.cycleId,
|
|
599
|
+
payload: input.ticket,
|
|
600
|
+
units: 1,
|
|
601
|
+
});
|
|
602
|
+
if (turn.kind !== "completed")
|
|
603
|
+
return {
|
|
604
|
+
kind: "blocked",
|
|
605
|
+
cycleId: input.cycleId,
|
|
606
|
+
reason: "The Claude turn did not complete.",
|
|
607
|
+
evidenceId: "claude-turn",
|
|
608
|
+
};
|
|
609
|
+
const gate = await decisionGate({
|
|
610
|
+
gateId: "review-1",
|
|
611
|
+
kind: "approval",
|
|
612
|
+
prompt: "Review the work of the Claude worker.",
|
|
613
|
+
});
|
|
614
|
+
if (gate.kind !== "opened")
|
|
615
|
+
return {
|
|
616
|
+
kind: "blocked",
|
|
617
|
+
cycleId: input.cycleId,
|
|
618
|
+
reason: "The review gate did not open.",
|
|
619
|
+
evidenceId: "review-1",
|
|
620
|
+
};
|
|
621
|
+
return {
|
|
622
|
+
kind: "waiting_for_decision",
|
|
623
|
+
cycleId: input.cycleId,
|
|
624
|
+
decisionId: gate.decisionId,
|
|
625
|
+
};
|
|
626
|
+
}
|
|
210
627
|
```
|
|
211
|
-
Options:
|
|
212
|
-
- `-f, --files <filenames...>`: Specify filenames of files with context
|
|
213
628
|
|
|
214
|
-
|
|
629
|
+
In this example, an approval completes the run and a denial ends it. `workflows/develop-ticket.ts` also starts one more round after a denial with a feedback text.
|
|
630
|
+
|
|
631
|
+
The workflow tests run the workflow function with a fake step bridge (`test/develop-workflow-fixture.ts`). The fixture resolves `cloving/workflows` to the files of `src`, records each effect request and gate request, and gives the results of a scenario. `test/develop-ticket-workflow.test.ts` and `test/develop-issue-workflow.test.ts` use it.
|
|
215
632
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
633
|
+
`cloving start` compiles the TypeScript files in the application's `workflows` folder. Each file may contain one workflow function, and function names must be unique across files. The four built-in registrations (`develop-ticket`, `develop-issue`, `develop-prd` and `develop-prompt`) keep their existing input contracts and resolvers.
|
|
634
|
+
|
|
635
|
+
To register another workflow, put `<name>.declaration.json` beside `<name>.ts`:
|
|
636
|
+
|
|
637
|
+
```json
|
|
638
|
+
{
|
|
639
|
+
"workflowId": "review-run",
|
|
640
|
+
"effectLimit": 14,
|
|
641
|
+
"capabilities": ["claude"],
|
|
642
|
+
"input": {
|
|
643
|
+
"maximumBytes": 65536,
|
|
644
|
+
"fields": {
|
|
645
|
+
"prompt": { "type": "string" },
|
|
646
|
+
"rounds": { "type": "integer", "minimum": 1, "maximum": 10, "optional": true }
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
219
650
|
```
|
|
220
|
-
Options:
|
|
221
|
-
- `-s, --silent`: Run without asking for confirmation
|
|
222
|
-
- `-f, --files <filenames...>`: Specify filenames for the unit tests
|
|
223
|
-
- `-m, --model <model>`: Select the model to use
|
|
224
651
|
|
|
225
|
-
|
|
652
|
+
The ID accepts 1–64 letters, digits or hyphens. The effect limit is 1–100; capabilities must contain `claude`, `github`, or both. The input byte limit is 1–1048576, subject to the service's own limit. Fields accept nonempty strings, integers with optional inclusive bounds, or booleans. Fields are required unless `optional` is `true`; unknown fields are rejected. Bounds apply only to integers.
|
|
653
|
+
|
|
654
|
+
After startup, `cloving status` lists the declared ID. Submit JSON with `cloving run review-run --input input.json`. The function receives `{ cycleId, repository, input }`, where `cycleId` is `task-` followed by 12 characters derived from the command ID, `repository` is the service repository, and `input` retains the checked JSON values. Invalid input is rejected before a run starts. Invalid declarations or duplicate workflow IDs or function names stop startup.
|
|
655
|
+
|
|
656
|
+
Candidate policy checking is available internally through `checkWorkflowCandidate` in `src/workflow-candidate.ts`. It takes serializable analysis facts, an export snapshot and a candidate declaration containing `workflow` and `methods`. Each declared capability requires a nonempty list of distinct method names. The existing workflow sidecar format is unchanged. Results are sorted, unique refusal codes; an empty list grants no admission or execution authority.
|
|
657
|
+
|
|
658
|
+
The caller supplies imported symbol names, literal effect pairs (`null` represents a dynamic value), direct-effect and unsupported-form findings, and known call and unit totals. Unknown portions of a total still require runtime budget enforcement. This pure checker does not analyze source or verify these facts. Source-to-facts analysis, SDK candidate compilation and the installed candidate admission adapter remain unimplemented.
|
|
659
|
+
|
|
660
|
+
## Development of Cloving
|
|
661
|
+
|
|
662
|
+
```sh
|
|
663
|
+
npm ci --ignore-scripts
|
|
664
|
+
npm run check:setup
|
|
665
|
+
npm run build
|
|
666
|
+
node dist/src/cli.js --help
|
|
667
|
+
npm pack --ignore-scripts
|
|
668
|
+
```
|
|
226
669
|
|
|
227
|
-
|
|
670
|
+
`npm pack` prints the file name of the tarball. Install it into a separate project with `npm install --ignore-scripts --omit=dev /absolute/path/to/TARBALL`, then run `./node_modules/.bin/cloving --version` or `./node_modules/.bin/cloving start`. The package includes the emitted CLI, start program, compiler and bundled workflows; startup uses the installed runtime dependencies. The package has no installation hooks. An import of `cloving/workflows` gives the step helpers `loadCycle`, `protectedEffect` and `decisionGate`, and starts no service.
|
|
228
671
|
|
|
229
|
-
|
|
230
|
-
- `-V, --version`: Output the version number
|
|
231
|
-
- `-h, --help`: Display help for command
|
|
672
|
+
`npm run check` and `npm run test:concurrency` currently reject admission because the complete quality policy is not implemented. Setup checks are not product acceptance. State and retained releases will live outside the package installation; installing or updating the package does not activate a daemon or migrate state.
|
|
232
673
|
|
|
233
|
-
|
|
234
|
-
- `config`: Configure Cloving with your API key and models to use
|
|
235
|
-
- `init`: Setup Cloving in the current directory
|
|
236
|
-
- `chat`: Start an interactive chat with Cloving
|
|
237
|
-
- `tokens`: Estimate the number of tokens in the current working directory or specified files
|
|
238
|
-
- `proxy`: Start a proxy server to use with Cloving
|
|
239
|
-
- `models`: List available models
|
|
240
|
-
- `commit`: Alias for cloving generate commit
|
|
241
|
-
- `generate`: Generate various items like unit-tests and code reviews
|
|
242
|
-
- `commit`: Generate a commit message and commit the changes
|
|
243
|
-
- `code`: Generate code based on a prompt
|
|
244
|
-
- `context`: Generate context for building a prompt outside of cloving
|
|
245
|
-
- `shell`: Generate a shell command based on a prompt
|
|
246
|
-
- `unit-tests`: Generate unit tests
|
|
247
|
-
- `review`: Review the code for committed changes
|
|
674
|
+
Run `npm run test:scale` on an otherwise idle machine to measure authority opening at 1,000, 10,000 and 50,000 events. This command runs the benchmark alone, without coverage; the regular test suite excludes it. The fixture uses completed runs with budgets, gates and released continuations. It requires each opening to take less than two seconds and the largest opening to take less than eight times the 10,000-event opening. Replay uses the pure reducer with run-scoped projections and preserves shared effect and lease state. Large effect histories, growing gate or pending-intent state within one run, and cancelled-run recovery still require separate scaling work; this benchmark does not establish their bounds. The generated-history parity and tamper tests compare replay with the full reducer and cover every event type.
|
|
248
675
|
|
|
249
|
-
|
|
250
|
-
- `-s, --silent`: Run the command without asking for confirmation of submitting prompts
|
|
251
|
-
- `-m, --model <model>`: Select the model to use (e.g., openai, claude, ollama, ollama:llama3, claude:claude-3-5-sonnet-20240620)
|
|
676
|
+
`npm run check:quality` checks the npm manifest, lock and installed versions, regenerates TypeScript output in memory, inventories first-party files, and runs strict compilation, the proposed module catalog, workflow/effect boundaries, suppression and test-integrity checks, formatting, typed lint, structural checks, clone detection and the regular local test suite. Production modules require at least 90% line, statement and function coverage and 85% branch coverage per file. Coverage uses native V8 ranges mapped to the syntax tree of the exact Node-stripped source; unimported production files fail. Class and named object types allow at most 24 callable members; interfaces allow 10. Clone checks support ordinary TypeScript and JavaScript; JSX is rejected until separately qualified. `npm run check:lint`, `npm run check:format` and `npm run test:quality` run individual development checks.
|
|
252
677
|
|
|
253
|
-
|
|
678
|
+
The watch scrolling tests launch an isolated headless Chrome process at desktop and phone widths. They require Chrome on the test machine. Run them with `node --test test/watch-scrolling.test.ts`. The fixture serves bundled Preact and board data over loopback and blocks external page resources.
|
|
254
679
|
|
|
255
|
-
|
|
680
|
+
Set `CLOVING_CHECK_TIME_FACTOR` to a whole number from 1 to 5 (default 1) to multiply the developer gate test and coverage command time limits, the inner hook check limit (5 seconds by default), and the installed hook limit (10 seconds by default). With factor 3, the hook limits are 15 and 30 seconds, respectively.
|
|
256
681
|
|
|
257
|
-
|
|
682
|
+
The catalog and checker configuration are local proposals. The bounded SDK artifact, dependency-surface, production-coverage and mandatory-test inventory components have local qualification fixtures. Protected activation of their records, verifier execution and hooks remain pending. Dependency snapshots and supplied review records cannot activate a candidate. The local quality command cannot accept a product candidate. Static workflow checks are not isolation or replay proof. Deterministic sequencing fixtures qualify the test mechanism; they do not prove ownership or storage concurrency in the service.
|
|
258
683
|
|
|
259
|
-
|
|
684
|
+
The coverage profile supports strip-only TypeScript and JavaScript (`ts`, `mts`, `cts`, `js`, `mjs`, `cjs`). It rejects source-map and coverage-ignore patterns interpreted by the provider, including patterns inside strings. Native V8 limitations around throwing calls and default arguments remain; coverage does not replace behavioral assertions. Production roles come from the complete module catalog, independently of which files tests import. Nested npm workspaces and unsupported dependency directory links fail explicitly until qualified.
|
|
260
685
|
|
|
261
|
-
|
|
686
|
+
For trusted development fixtures, `npm run build:workflows -- SOURCE_DIRECTORY OUTPUT_DIRECTORY` runs the selected directive compiler with deterministic manifest ordering. Run the compiler in an isolated fixture project; its output directory must resolve that project's installed `workflow` dependency. Compiler caches and generated handlers stay outside the application source tree. Generated handlers are development artifacts and do not grant authority to execute effects.
|
|
262
687
|
|
|
263
|
-
|
|
264
|
-
- Special thanks to the open-source community for inspiration and support.
|
|
688
|
+
SDK qualification uses a fixed logical output path and an empty root TypeScript configuration. Its separate input preflight rejects ancestor/nested compiler configuration, outside first-party inputs, dynamic/CommonJS loading and ambiguous local declaration/runtime resolution. Record the full installed tool/helper closure and every generated handler, manifest and debug artifact, then regenerate at the same logical path and compare preserved bytes. The direct build command does not authenticate these records. Real packed-helper execution is qualified with a disposable prototype.
|