@abelxiaoxing/cadence 2.0.37 → 2.0.38
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/README.de.md +2 -2
- package/README.es.md +2 -2
- package/README.fr.md +2 -2
- package/README.ja.md +2 -2
- package/README.ko.md +2 -2
- package/README.md +9 -7
- package/README.pt-BR.md +2 -2
- package/README.ru.md +2 -2
- package/README.zh-CN.md +10 -8
- package/agents/design-explorer.md +4 -2
- package/agents/diagnosis-worker.md +5 -2
- package/agents/implementation-worker.md +19 -12
- package/docs/conversation-mode.md +43 -16
- package/package.json +4 -1
- package/src/agent-browser/session-navigator.ts +33 -6
- package/src/agent-browser/source.ts +23 -19
- package/src/agent-panel-cadence.ts +147 -628
- package/src/agent-panel-model.ts +30 -19
- package/src/agent-panel.ts +12 -16
- package/src/cadence-instructions.ts +8 -7
- package/src/cadence-mode.ts +30 -9
- package/src/change-tools.mjs +268 -0
- package/src/coordinator-tools.mjs +2 -2
- package/src/git-environment.d.mts +2 -0
- package/src/git-environment.mjs +24 -0
- package/src/index.ts +1 -1
- package/src/native-build.ts +1 -1
- package/src/native-workflow-history.ts +20 -3
- package/src/operator-cli.mjs +18 -11
- package/src/sdk-worker.mjs +2 -0
- package/src/service/contracts/workbench.ts +11 -3
- package/src/service/contracts/workflow.ts +283 -16
- package/src/service/coordination.ts +7 -0
- package/src/service-cli.mjs +366 -85
- package/src/service-host.mjs +2450 -983
- package/src/worker-capture.mjs +24 -1
- package/src/worker-public.mjs +18 -0
- package/src/worker-redaction.mjs +11 -0
- package/src/worker-toolkit.mjs +48 -1
- package/src/workspace.ts +4 -24
- package/web/dist/assets/cadence.css +1 -1
- package/web/dist/assets/cadence.js +18 -17
- package/web/dist/manifest.json +7 -7
package/README.de.md
CHANGED
|
@@ -46,7 +46,7 @@ Port und Token liegen in `~/.pi/agent/cadence/.env`; wer das Token hat, kann dei
|
|
|
46
46
|
3. Sende einmal `/cadence [Ziel]`.
|
|
47
47
|
Dieses Gespräch bleibt im Cadence-Modus; kläre Anforderungen mit normalen Nachrichten.
|
|
48
48
|
4. Prüfe den vollständigen Plan und klicke **Implement this plan**.
|
|
49
|
-
Implementierung, Checks,
|
|
49
|
+
Implementierung, Checks, automatische Fehlerbehebung und die vereinbarte lokale Lieferung laufen automatisch.
|
|
50
50
|
5. Verfolge den Fortschritt im Gespräch; die Protokolle der Subagenten öffnest du über das Dock **Subagents** unten links.
|
|
51
51
|
Aktualisieren und Abschluss beenden den Modus nicht.
|
|
52
52
|
**Exit Cadence** beendet nur den Modus; **Cancel workflow — request stop** fordert den Abbruch an.
|
|
@@ -57,7 +57,7 @@ No live Pi terminal is required for the browser conversation workflow.
|
|
|
57
57
|
|
|
58
58
|
Gib einmal `/cadence <Ziel>` ein und führe danach ein normales Gespräch.
|
|
59
59
|
Cadence untersucht das Projekt, klärt Entscheidungen und erstellt einen Plan.
|
|
60
|
-
Nach ausdrücklicher Planfreigabe folgen Implementierung, Prüfungen,
|
|
60
|
+
Nach ausdrücklicher Planfreigabe folgen Implementierung, Prüfungen, automatische Fehlerbehebung und die vereinbarte lokale Integration automatisch.
|
|
61
61
|
|
|
62
62
|
Der Modus bleibt für dieses Gespräch aktiv, auch nach Abschluss eines Ziels.
|
|
63
63
|
Zum Verlassen `exit cadence` eingeben; dadurch wird laufende Arbeit nicht abgebrochen.
|
package/README.es.md
CHANGED
|
@@ -46,7 +46,7 @@ El puerto y el token están en `~/.pi/agent/cadence/.env`; cualquiera con el tok
|
|
|
46
46
|
3. Envía `/cadence [objetivo]` una vez.
|
|
47
47
|
Esta conversación permanece en modo Cadence; aclara los requisitos con mensajes normales.
|
|
48
48
|
4. Revisa el plan completo y pulsa **Implement this plan**.
|
|
49
|
-
La implementación, comprobaciones,
|
|
49
|
+
La implementación, comprobaciones, recuperación automática y entrega local acordada son automáticas.
|
|
50
50
|
5. Sigue el progreso en la conversación; abre los registros de los subagentes desde el panel **Subagents** abajo a la izquierda.
|
|
51
51
|
Recargar o terminar un objetivo no desactiva el modo.
|
|
52
52
|
**Exit Cadence** sale del modo; **Cancel workflow — request stop** solicita cancelar el trabajo.
|
|
@@ -57,7 +57,7 @@ No live Pi terminal is required for the browser conversation workflow.
|
|
|
57
57
|
|
|
58
58
|
Escribe `/cadence <objetivo>` una sola vez y continúa conversando normalmente.
|
|
59
59
|
Cadence investiga el proyecto, aclara decisiones y prepara un plan.
|
|
60
|
-
Tras aprobarlo explícitamente, implementa, verifica, realiza
|
|
60
|
+
Tras aprobarlo explícitamente, implementa, verifica, realiza recuperación automática y entrega la integración local acordada.
|
|
61
61
|
|
|
62
62
|
El modo permanece activo durante toda la conversación, incluso al terminar un objetivo.
|
|
63
63
|
Usa `exit cadence` para salir; salir no cancela el trabajo aceptado.
|
package/README.fr.md
CHANGED
|
@@ -46,7 +46,7 @@ Le port et le jeton se trouvent dans `~/.pi/agent/cadence/.env` ; quiconque poss
|
|
|
46
46
|
3. Envoyez une fois `/cadence [objectif]`.
|
|
47
47
|
Cette conversation reste en mode Cadence ; précisez les besoins par des messages ordinaires.
|
|
48
48
|
4. Lisez le plan complet et cliquez sur **Implement this plan**.
|
|
49
|
-
L’implémentation, les vérifications,
|
|
49
|
+
L’implémentation, les vérifications, la reprise automatique et la livraison locale convenue sont automatiques.
|
|
50
50
|
5. Suivez la progression dans la conversation ; ouvrez les traces des sous-agents depuis le panneau **Subagents** en bas à gauche.
|
|
51
51
|
Actualiser ou terminer un objectif ne quitte pas le mode.
|
|
52
52
|
**Exit Cadence** quitte le mode ; **Cancel workflow — request stop** demande l’annulation.
|
|
@@ -57,7 +57,7 @@ No live Pi terminal is required for the browser conversation workflow.
|
|
|
57
57
|
|
|
58
58
|
Saisissez `/cadence <objectif>` une seule fois, puis poursuivez la conversation normalement.
|
|
59
59
|
Cadence étudie le projet, clarifie les décisions et prépare un plan.
|
|
60
|
-
Après votre approbation explicite, il réalise les modifications, vérifications,
|
|
60
|
+
Après votre approbation explicite, il réalise les modifications, vérifications, reprise automatique et intégration locale convenues.
|
|
61
61
|
|
|
62
62
|
Le mode reste actif pendant toute la conversation, même après la fin d’un objectif.
|
|
63
63
|
Saisissez `exit cadence` pour quitter ; cela n’annule pas le travail accepté.
|
package/README.ja.md
CHANGED
|
@@ -58,7 +58,7 @@ pi install "$(npm root -g)/@abelxiaoxing/cadence"
|
|
|
58
58
|
3. 一度だけ `/cadence [目標]` を送信します。
|
|
59
59
|
この会話は Cadence モードを維持し、その後は通常のメッセージで要件を明確にできます。
|
|
60
60
|
4. 完全な計画を確認し、**Implement this plan** を押します。
|
|
61
|
-
|
|
61
|
+
実装、検証、障害からの自動復旧、合意したローカル納品が自動で進みます。
|
|
62
62
|
5. 同じ会話で進捗を確認し、サブエージェントの記録は左下の **Subagents** パネルから開きます。
|
|
63
63
|
再読み込みや目標完了でもモードは維持されます。
|
|
64
64
|
**Exit Cadence** はモード終了のみ、**Cancel workflow — request stop** は作業のキャンセル要求です。
|
|
@@ -69,7 +69,7 @@ No live Pi terminal is required for the browser conversation workflow.
|
|
|
69
69
|
|
|
70
70
|
`/cadence <目標>` を一度入力した後は、通常の会話を続けます。
|
|
71
71
|
Cadence がプロジェクトを調査し、必要な判断を確認して計画を作ります。
|
|
72
|
-
|
|
72
|
+
計画への明示的な承認後は、実装・検証・自動復旧・合意したローカル統合を自動で進めます。
|
|
73
73
|
|
|
74
74
|
目標が完了しても、この会話では Cadence モードを維持します。
|
|
75
75
|
終了するには `exit cadence` と入力します。
|
package/README.ko.md
CHANGED
|
@@ -56,7 +56,7 @@ pi install "$(npm root -g)/@abelxiaoxing/cadence"
|
|
|
56
56
|
3. `/cadence [목표]`를 한 번 전송하세요.
|
|
57
57
|
이 대화는 Cadence 모드를 유지하며 이후에는 일반 메시지로 요구사항을 구체화합니다.
|
|
58
58
|
4. 전체 계획을 확인하고 **Implement this plan**을 누르세요.
|
|
59
|
-
구현, 검사,
|
|
59
|
+
구현, 검사, 자동 복구 및 합의한 로컬 전달을 자동으로 진행합니다.
|
|
60
60
|
5. 같은 대화에서 진행 상황을 확인하고, 서브에이전트 기록은 왼쪽 아래 **Subagents** 패널에서 여세요.
|
|
61
61
|
새로고침이나 목표 완료로 모드가 꺼지지 않습니다.
|
|
62
62
|
**Exit Cadence**는 모드만 종료하고, **Cancel workflow — request stop**은 작업 취소를 요청합니다.
|
|
@@ -67,7 +67,7 @@ No live Pi terminal is required for the browser conversation workflow.
|
|
|
67
67
|
|
|
68
68
|
`/cadence <목표>`를 한 번 입력한 다음 평소처럼 대화하세요.
|
|
69
69
|
Cadence가 프로젝트를 조사하고 결정 사항을 확인한 뒤 계획을 만듭니다.
|
|
70
|
-
명시적으로 계획을 승인하면 구현, 검증,
|
|
70
|
+
명시적으로 계획을 승인하면 구현, 검증, 자동 복구 및 합의한 로컬 통합을 자동으로 진행합니다.
|
|
71
71
|
|
|
72
72
|
목표가 완료되어도 이 대화는 Cadence 모드를 유지합니다.
|
|
73
73
|
`exit cadence`로 종료할 수 있으며, 종료는 이미 승인된 작업을 취소하지 않습니다.
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[English](README.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Deutsch](README.de.md) · [Français](README.fr.md) · [Español](README.es.md) · [Português (Brasil)](README.pt-BR.md) · [Русский](README.ru.md)
|
|
4
4
|
|
|
5
5
|
Cadence turns [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent) into a conversation-driven engineering workflow.
|
|
6
|
-
Enter `/cadence [goal]`, align the
|
|
6
|
+
Enter `/cadence [goal]`, align the expected delivery through conversation, then let the persistent owner implement, recover and verify it.
|
|
7
7
|
The optional WebUI supports the same persistent conversation workflow without a live Pi terminal, alongside ordinary chat and readonly retained history.
|
|
8
8
|
|
|
9
9
|
## Why Cadence
|
|
@@ -11,9 +11,9 @@ The optional WebUI supports the same persistent conversation workflow without a
|
|
|
11
11
|
- **Work outlives the window.**
|
|
12
12
|
Tasks run in a background service: closing the terminal, quitting Pi or leaving the browser tab only detaches, and either client can reattach to the same run.
|
|
13
13
|
- **Nothing is edited before you approve.**
|
|
14
|
-
|
|
14
|
+
Cadence first investigates readonly and proposes a readable delivery agreement; files change only after you confirm its goal, scope and permitted actions.
|
|
15
15
|
- **Results you can trust.**
|
|
16
|
-
Subagent output, real check runs and
|
|
16
|
+
Subagent output, real check runs and independent Agent review stay separate: model prose or a "Done" never counts as a passed check, and failed, canceled and unknown outcomes stay distinct.
|
|
17
17
|
- **Complete history.**
|
|
18
18
|
Conversation workflows retain sanitized transcripts and actual process results; legacy task history also provides exact search and Markdown/NDJSON export.
|
|
19
19
|
- **One link for everything.**
|
|
@@ -21,7 +21,7 @@ The optional WebUI supports the same persistent conversation workflow without a
|
|
|
21
21
|
- **One history with the terminal.**
|
|
22
22
|
Browser conversations are the project's Pi sessions: continue a terminal session in the browser or a browser one with `/resume`, and read Pi's branches in either place.
|
|
23
23
|
|
|
24
|
-
Cadence is a trusted assistant, **not a sandbox**: its agents
|
|
24
|
+
Cadence is a trusted assistant, **not a sandbox**: its agents use host tools in the approved checkout or worktree, so use it on code you can review and recover.
|
|
25
25
|
|
|
26
26
|
## Install
|
|
27
27
|
|
|
@@ -47,7 +47,7 @@ The port and token live in `~/.pi/agent/cadence/.env`; anyone with the token can
|
|
|
47
47
|
Saved model preferences are reused on Send; choose once if none is available.
|
|
48
48
|
3. Send `/cadence [goal]` once to enter Cadence in this conversation; continue with normal messages to investigate and clarify requirements.
|
|
49
49
|
4. Review the complete inline plan and click **Implement this plan** (or send `按计划实施`).
|
|
50
|
-
The owner implements,
|
|
50
|
+
The owner implements, diagnoses failures, adjusts the route, updates approved project knowledge and verifies delivery without routine reconfirmation.
|
|
51
51
|
5. Follow actual progress and local merge results in the conversation; open any subagent's full context from the lower-left **Subagents** dock.
|
|
52
52
|
Refresh and completion keep Cadence on; **Exit Cadence** only exits the mode, while **Cancel workflow — request stop** requests cancellation.
|
|
53
53
|
|
|
@@ -58,8 +58,10 @@ Choose a vision-capable model; see [image input](docs/conversation-mode.md#image
|
|
|
58
58
|
|
|
59
59
|
Enter `/cadence <goal>` once in any trusted project's Pi conversation.
|
|
60
60
|
Continue with normal messages: Cadence investigates, consolidates questions and develops a readable plan with you.
|
|
61
|
-
After explicit
|
|
62
|
-
|
|
61
|
+
After one explicit delivery approval it automatically implements, recovers, reviews and verifies within the agreed boundary.
|
|
62
|
+
Each approved local delivery gets a named branch and one stable worktree that preserves partial work, then merges back into the displayed original branch.
|
|
63
|
+
Mode entry/research create no Git resources; approved local commits/merge never imply a remote push.
|
|
64
|
+
Relevant project documents are injected into workers and updated from verified lessons, without a separate knowledge-management command.
|
|
63
65
|
|
|
64
66
|
**Completing a goal leaves the conversation in Cadence mode.**
|
|
65
67
|
No repeated command is needed.
|
package/README.pt-BR.md
CHANGED
|
@@ -46,7 +46,7 @@ A porta e o token ficam em `~/.pi/agent/cadence/.env`; qualquer pessoa com o tok
|
|
|
46
46
|
3. Envie `/cadence [objetivo]` uma vez.
|
|
47
47
|
Esta conversa permanece no modo Cadence; esclareça os requisitos com mensagens normais.
|
|
48
48
|
4. Revise o plano completo e clique em **Implement this plan**.
|
|
49
|
-
Implementação, verificações,
|
|
49
|
+
Implementação, verificações, recuperação automática e entrega local acordada são automáticos.
|
|
50
50
|
5. Acompanhe o progresso na conversa; abra os registros dos subagentes no painel **Subagents**, no canto inferior esquerdo.
|
|
51
51
|
Atualizar a página ou concluir um objetivo não desativa o modo.
|
|
52
52
|
**Exit Cadence** sai do modo; **Cancel workflow — request stop** solicita o cancelamento.
|
|
@@ -57,7 +57,7 @@ No live Pi terminal is required for the browser conversation workflow.
|
|
|
57
57
|
|
|
58
58
|
Digite `/cadence <objetivo>` uma vez e continue conversando normalmente.
|
|
59
59
|
O Cadence investiga o projeto, esclarece decisões e prepara um plano.
|
|
60
|
-
Após aprovação explícita, executa a implementação, verificações,
|
|
60
|
+
Após aprovação explícita, executa a implementação, verificações, recuperação automática e integração local acordada.
|
|
61
61
|
|
|
62
62
|
O modo permanece ativo durante toda a conversa, mesmo após concluir um objetivo.
|
|
63
63
|
Digite `exit cadence` para sair; sair não cancela trabalho aceito.
|
package/README.ru.md
CHANGED
|
@@ -46,7 +46,7 @@ pi install "$(npm root -g)/@abelxiaoxing/cadence"
|
|
|
46
46
|
3. Один раз отправьте `/cadence [цель]`.
|
|
47
47
|
Разговор остаётся в режиме Cadence; уточняйте требования обычными сообщениями.
|
|
48
48
|
4. Проверьте полный план и нажмите **Implement this plan**.
|
|
49
|
-
Реализация, проверки,
|
|
49
|
+
Реализация, проверки, автоматическое восстановление и согласованная локальная интеграция выполняются автоматически.
|
|
50
50
|
5. Следите за ходом работы в разговоре; записи субагентов открываются из панели **Subagents** слева внизу.
|
|
51
51
|
Обновление страницы и завершение цели не выключают режим.
|
|
52
52
|
**Exit Cadence** выходит из режима; **Cancel workflow — request stop** запрашивает отмену работы.
|
|
@@ -57,7 +57,7 @@ No live Pi terminal is required for the browser conversation workflow.
|
|
|
57
57
|
|
|
58
58
|
Введите `/cadence <цель>` один раз и продолжайте обычный диалог.
|
|
59
59
|
Cadence исследует проект, уточняет решения и составляет план.
|
|
60
|
-
После явного одобрения он автоматически выполняет реализацию, проверки,
|
|
60
|
+
После явного одобрения он автоматически выполняет реализацию, проверки, автоматическое восстановление и согласованную локальную интеграцию.
|
|
61
61
|
|
|
62
62
|
Режим сохраняется на весь диалог, даже после завершения цели.
|
|
63
63
|
Команда `exit cadence` выходит из режима, но не отменяет принятую работу.
|
package/README.zh-CN.md
CHANGED
|
@@ -12,7 +12,7 @@ Cadence 把 [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent)
|
|
|
12
12
|
- **批准之前不会修改任何文件。**
|
|
13
13
|
任务先只读分析并提出一个可读的计划;只有在你确认那个确切计划之后,文件才会被修改。
|
|
14
14
|
- **结果可信。**
|
|
15
|
-
|
|
15
|
+
子代理输出、真实的检查运行和独立 Agent 审查彼此独立:模型的文字或一句“Done”都不算检查通过,失败、取消和未知结果保持相互区分。
|
|
16
16
|
- **完整历史。**
|
|
17
17
|
新工作流保留脱敏后的子代理记录与实际进程结果;旧任务历史另支持精确搜索及 Markdown/NDJSON 导出。
|
|
18
18
|
- **与终端共用一份历史。**
|
|
@@ -20,7 +20,7 @@ Cadence 把 [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent)
|
|
|
20
20
|
- **一个链接涵盖一切。**
|
|
21
21
|
WebUI(桌面和手机,英文与简体中文)还承载普通的 Pi 对话,并可在项目间切换,每个项目都有自己的 owner 和历史。
|
|
22
22
|
|
|
23
|
-
Cadence
|
|
23
|
+
Cadence 是一个受信任的助手,**不是沙箱**:它的代理在获批的 checkout 或 worktree 中使用宿主工具,所以请只在你能够审阅和恢复的代码上使用它。
|
|
24
24
|
|
|
25
25
|
## 安装
|
|
26
26
|
|
|
@@ -43,18 +43,19 @@ pi install "$(npm root -g)/@abelxiaoxing/cadence"
|
|
|
43
43
|
如果丢失了链接,`cadence token-link --reveal` 会再次打印它。
|
|
44
44
|
2. 用右下角的文件夹按钮明确选择项目。
|
|
45
45
|
发送时复用已保存的模型偏好;没有可用偏好时只需选择一次。
|
|
46
|
-
3. 输入一次 `/cadence [目标]`,当前对话进入持续 Cadence
|
|
46
|
+
3. 输入一次 `/cadence [目标]`,当前对话进入持续 Cadence 模式;之后正常对话,调查项目并澄清影响交付的关键问题。
|
|
47
47
|
4. 查看完整计划,点击**按此计划实施**或发送 `按计划实施`。
|
|
48
|
-
|
|
48
|
+
后台自动实施、诊断故障、调整路线、维护项目知识并验证交付,普通内部问题无需再次确认。
|
|
49
49
|
5. 在同一对话查看真实进度和合并结果;子代理的完整上下文从左下角**子代理**面板打开。
|
|
50
50
|
刷新、完成目标后仍保持 Cadence;**退出 Cadence**不取消后台工作,**取消工作流 — 请求停止**才请求取消。
|
|
51
51
|
|
|
52
52
|
### 在终端中:一次进入,持续对话
|
|
53
53
|
|
|
54
54
|
在任意已信任项目的 Pi 对话里输入一次 `/cadence <目标>`,之后正常对话即可。
|
|
55
|
-
Cadence
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
Cadence 自动调查仓库和项目知识,只澄清真正影响结果的问题,并生成包含目标、验收、范围、环境准备和本地交付方式的约定。
|
|
56
|
+
确认后输入 `按计划实施`,系统自主实施、诊断、接续部分成果和调整技术路线;没有固定修复轮数或总交付时长配额,真实验证后再交付。
|
|
57
|
+
每个获批的 Git 交付创建一个命名任务分支和稳定 worktree,在其中持续实施、恢复和维护项目知识,审查与验证后合回约定中的原分支。
|
|
58
|
+
进入模式和只读研究不会创建 Git 资源;不会默认推送、发布或部署。
|
|
58
59
|
非 Git 项目可选择直接工作副本交付,不执行提交或合并。
|
|
59
60
|
|
|
60
61
|
**完成任务后,这个对话仍然保持 Cadence 模式,不需要再次输入 `/cadence`。**
|
|
@@ -63,7 +64,8 @@ Cadence 自动调查仓库、汇总需要你决定的问题,并与你反复对
|
|
|
63
64
|
|
|
64
65
|
日常原生使用可按需启动或复用本地项目 owner,**无需安装系统服务或先进入项目管理器**。
|
|
65
66
|
模型偏好记在 `~/.pi/agent/cadence/settings.json`,跨项目复用,不复制 Pi 凭据。
|
|
66
|
-
|
|
67
|
+
项目知识优先维护在已有工程文档中,`.cadence/project.md` 作为简洁索引;相关内容在工作者启动时按需注入,交付时自动沉淀已验证经验。
|
|
68
|
+
隔离 worktree 不会自动复制依赖或凭据,必要的准备命令会列入确认。
|
|
67
69
|
|
|
68
70
|
详细边界见 [对话模式](docs/conversation-mode.md)。
|
|
69
71
|
`/cadence-history [运行 ID]` 提供只读诊断、运行详情和已有任务历史,不创建或执行任务,也不启动服务。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-explorer
|
|
3
|
-
description: Readonly
|
|
3
|
+
description: Readonly research and independent Agent review for an explicit Cadence goal
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Design Explorer
|
|
@@ -14,4 +14,6 @@ Your plan is advisory, not permission to edit.
|
|
|
14
14
|
Do not change files, run shell commands, delegate editing, mutate Git, install software, clean consumer data or publish.
|
|
15
15
|
Do not invoke workflow commands or approve your own work.
|
|
16
16
|
Never reveal credentials, private diagnostics or session transcripts.
|
|
17
|
-
Return
|
|
17
|
+
Return the requested format with references and unresolved questions.
|
|
18
|
+
For automatic review, judge the current candidate against immutable acceptance and real check evidence; the initial technical route is not an additional requirement.
|
|
19
|
+
Automatic Agent review is never human review.
|
|
@@ -11,7 +11,10 @@ Compare plausible causes and describe evidence that would falsify each one.
|
|
|
11
11
|
Report unavailable collectors, missing reproduction evidence and uncertainty explicitly.
|
|
12
12
|
|
|
13
13
|
Do not repair files, run shell commands, mutate Git, install software, clean consumer material, publish or delegate editing.
|
|
14
|
-
A
|
|
14
|
+
A repair suggestion is not editing authority.
|
|
15
|
+
In an already approved delivery, return the owner-requested structured diagnosis and in-scope remaining assignments; the service may dispatch them under the original approval.
|
|
16
|
+
Do not ask for routine reconfirmation or redefine acceptance.
|
|
15
17
|
Never expose credentials, private diagnostics or session transcripts.
|
|
16
|
-
Return
|
|
18
|
+
Return the requested report format with supporting evidence and concrete next steps.
|
|
19
|
+
Distinguish a failed method from a genuinely unavailable in-scope route.
|
|
17
20
|
Do not claim a successful check, certified result or applied repair from source inspection alone.
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implementation-worker
|
|
3
|
-
description: One
|
|
3
|
+
description: One editing attempt within an approved, service-owned adaptive delivery
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Implementation Worker
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
Read
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
Complete the assigned remaining work in the owner-selected working copy using ordinary host tools.
|
|
9
|
+
Read the injected project knowledge, applicable project instructions, adjacent implementation and tests first.
|
|
10
|
+
Make the smallest complete change and reuse existing helpers before introducing new abstractions.
|
|
11
|
+
Inspect existing outputs before editing: previous attempts and predecessors may already have completed useful work.
|
|
12
|
+
Preserve those outputs and unrelated user edits; do not restart the plan or rerun clean-start preconditions.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
The initial technical route may change within the approved goal, explicit decisions, acceptance and assigned write paths.
|
|
15
|
+
Resolve ordinary implementation problems yourself.
|
|
16
|
+
If a route fails, report concrete evidence and remaining work so the owner can diagnose, split or revise the route.
|
|
17
|
+
Never weaken requirements or tests to manufacture success.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
The
|
|
19
|
+
Do not mutate Git, install software, copy profiles or credentials, delete consumer state, publish, deploy or invoke workflow commands.
|
|
20
|
+
Do not spawn workers or retry the whole work session.
|
|
21
|
+
The service owns delegation and recovery.
|
|
22
|
+
These are host tools, not a sandbox or automatic rollback system.
|
|
23
|
+
|
|
24
|
+
After all work, use `cadence_report` to submit completed or blocked with a concrete summary of actual changes and remaining gaps, then give a short final answer.
|
|
25
|
+
Do not call another tool after the report unless you submit a new report afterwards.
|
|
26
|
+
Your report and native exit are not passing checks or delivery approval: the owner runs real checks and independent readonly Agent review.
|
|
27
|
+
For knowledge assignments, update existing topic owners with source-backed facts and useful verification guidance, preserving human text; never turn speculation or raw session history into project rules.
|
|
@@ -11,7 +11,8 @@ Browser conversation mode is retained by the project owner, not by a browser-onl
|
|
|
11
11
|
|
|
12
12
|
1. Cadence delegates focused readonly repository investigations, reuses existing project documentation, and consolidates questions in the main conversation.
|
|
13
13
|
2. Discuss requirements and decisions until the implementation and acceptance criteria are clear.
|
|
14
|
-
3. Cadence presents one readable
|
|
14
|
+
3. Cadence presents one readable delivery agreement: expected result, acceptance, scope, setup/check commands, project knowledge and delivery policy.
|
|
15
|
+
The technical route is an initial suggestion; routine recovery and in-scope implementation changes need no further approval.
|
|
15
16
|
4. Type `按计划实施` after the plan to authorize those exact bytes.
|
|
16
17
|
In the browser, click **Implement this plan** or send that exact approval phrase for the currently displayed plan.
|
|
17
18
|
In Pi, the Start tool can alternatively present one native confirmation of the complete plan.
|
|
@@ -26,7 +27,12 @@ Native mode is branch-aware; browser mode follows its server-owned conversation
|
|
|
26
27
|
The browser and the terminal share the conversation itself (it is the same Pi session), but each keeps its own Cadence mode and plan approval: entering Cadence in one does not enter it in the other.
|
|
27
28
|
A workflow started in either place appears in that conversation in the browser as one line after the turn it started in.
|
|
28
29
|
A saved native mode is active only in a trusted interactive terminal; print/RPC sessions keep ordinary tools and can still exit with `/cadence exit`.
|
|
29
|
-
In Pi, the agent panel
|
|
30
|
+
In Pi, the agent panel shows only running subagents belonging to the current conversation, not other Pi conversations in the same directory.
|
|
31
|
+
With an empty focused input, press ↓ to choose a running agent and Enter to read it; ended agents leave the list automatically.
|
|
32
|
+
A transcript you already opened stays readable when its agent finishes, without further background queries.
|
|
33
|
+
With none running, ↓ stays with the editor.
|
|
34
|
+
Completion keeps a compact summary; use `/cadence-history` (or `cadence_status` for one step) when you explicitly need retained results/transcripts.
|
|
35
|
+
Resuming the same Pi conversation can observe its ongoing work; new and forked conversations do not inherit that live display.
|
|
30
36
|
Resume and compaction retain the mode/context, not execution grants.
|
|
31
37
|
Opening a different conversation does not enable Cadence there.
|
|
32
38
|
Restore never replays a command or automatically resumes an interrupted queue.
|
|
@@ -87,10 +93,13 @@ An unavailable remembered model is not silently substituted.
|
|
|
87
93
|
Pi's original model and authentication sources remain authoritative; Cadence does not copy credentials.
|
|
88
94
|
|
|
89
95
|
Repository investigation and discussion do not edit business code.
|
|
90
|
-
Approved work
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
Approved work maintains the relevant existing project documents named in the agreement and publishes readable workflow notes under `.cadence/assistant/workflows/<run-id>/`.
|
|
97
|
+
`.cadence/project.md` is a compact knowledge index; optional `.cadence/knowledge/` topics fill gaps, not duplicate existing `engineering/`, `docs/` or `.trellis/spec/`.
|
|
98
|
+
Human text and unrelated conventions are preserved.
|
|
99
|
+
Workers receive actual selected project knowledge, the approved goal/decisions/acceptance, their assignment and relevant failure/check evidence.
|
|
100
|
+
Source paths and partial coverage are recorded; longer documents remain available for on-demand reads.
|
|
101
|
+
After implementation, Cadence extracts useful source-backed lessons and updates approved documentation automatically, then checks and reviews the combined candidate.
|
|
102
|
+
No knowledge-maintenance or finish command is required.
|
|
94
103
|
Private proposals, grants, native/auth outcomes and transcripts stay outside the checkout.
|
|
95
104
|
Markdown is not execution authority.
|
|
96
105
|
Old task summaries and history are neither imported nor reset.
|
|
@@ -100,8 +109,10 @@ Old task summaries and history are neither imported nor reset.
|
|
|
100
109
|
The plan chooses one delivery policy:
|
|
101
110
|
|
|
102
111
|
- **Local merge:** requires an existing Git branch and configured commit identity.
|
|
103
|
-
|
|
104
|
-
|
|
112
|
+
After approval, each delivery creates its own `cadence/<goal>-<run-id>` branch and one stable worktree; mode entry and research create neither.
|
|
113
|
+
Assignments, diagnosis, recovery and knowledge updates reuse that candidate, preserving partial work.
|
|
114
|
+
The target is the current local branch displayed in the agreement, not necessarily `main`; the conversation stays in its original directory.
|
|
115
|
+
The owner commits only declared file changes, runs independent readonly Agent review and real checks, then fast-forwards the unchanged target branch.
|
|
105
116
|
Local task commits and the merge are included in the plan approval.
|
|
106
117
|
Git hooks and commit signing are disabled for these internal commits; verification is explicitly declared instead.
|
|
107
118
|
No remote push occurs.
|
|
@@ -115,10 +126,15 @@ A write path naming a directory covers the files below it; in Git, working-copy
|
|
|
115
126
|
Unresolved conflicts or a changed target stop integration.
|
|
116
127
|
Cadence never resets, stashes, force-pushes or silently cleans uncertain worktrees.
|
|
117
128
|
Ignored generated Markdown remains ignored and is published without forcing it into Git.
|
|
118
|
-
|
|
129
|
+
The named task branch is kept.
|
|
130
|
+
Only owned worktrees at the delivered commit, after successful post-merge checks and without any residue, are removed with plain `git worktree remove`.
|
|
131
|
+
Ignored setup/build output such as `node_modules` also retains the worktree; failures, cancellation and unknown outcomes never trigger cleanup.
|
|
119
132
|
Only one approved implementation runs at a time; approving a second while one is active is refused with `conflict`.
|
|
120
|
-
|
|
121
|
-
|
|
133
|
+
There is no fixed delivery-duration or repair-round quota.
|
|
134
|
+
Individual workers/checks retain their process deadlines; a settled failure can trigger diagnosis and continuation, not automatic goal termination.
|
|
135
|
+
Cancel/Stop never interrupt the final fast-forward (a hung `git merge` therefore delays Stop until Git exits).
|
|
136
|
+
Local-merge plans need clean, nonignored code and knowledge targets; use working-copy delivery for dirty or ignored documentation.
|
|
137
|
+
Generated workflow notes remain separate.
|
|
122
138
|
After an owner restart, an unfinished run is shown as `unknown` with its retained worktrees; it is never resumed.
|
|
123
139
|
Credential-looking text in plans and research questions is shown and approved redacted.
|
|
124
140
|
|
|
@@ -127,10 +143,17 @@ Investigate prerequisites during planning.
|
|
|
127
143
|
If dependencies/setup are needed, include the exact commands in the plan for explicit approval.
|
|
128
144
|
No dependency/browser download or source-profile copying is implicit.
|
|
129
145
|
Baseline checks are separate from acceptance checks that need newly implemented files.
|
|
130
|
-
Failed
|
|
131
|
-
|
|
146
|
+
Failed setup, baseline, implementation, checks or review enter source-backed diagnosis when their actual operations have settled.
|
|
147
|
+
Cadence can preserve partial outputs, split remaining work and choose alternative implementations within the approval; it never expands permissions or weakens acceptance.
|
|
148
|
+
Known transient provider HTTP failures back off automatically after actual cleanup, without holding the checkout while waiting; re-entry checks that the approved files have not changed.
|
|
149
|
+
An unchanged failure and identical recovery strategy cannot become an endless replay loop.
|
|
150
|
+
A concrete external blocker is reported with preserved work, not a generic request to type “continue”.
|
|
132
151
|
Final candidate checks must pass before merge.
|
|
133
|
-
Post-merge failures
|
|
152
|
+
Post-merge failures retain the actual merge commit.
|
|
153
|
+
Repairs stay in the same named candidate, invalidate its earlier acceptance, and are checked/reviewed against a new exact candidate.
|
|
154
|
+
Only this run’s last confirmed merge can serve as the next integration baseline; external target movement or branch switching blocks integration.
|
|
155
|
+
Repairs can fast-forward that unchanged target again; the user’s unrelated index is never committed.
|
|
156
|
+
Unresolved failures remain failures; no rollback is fabricated.
|
|
134
157
|
Automatic review is never recorded as human review.
|
|
135
158
|
|
|
136
159
|
To request orderly closure, ask Cadence to cancel in Pi, or use **Cancel workflow — request stop** in the browser (the browser coordinator cannot cancel).
|
|
@@ -147,9 +170,9 @@ System-service installation and remote access remain separate explicit operation
|
|
|
147
170
|
|
|
148
171
|
`/cadence-history [run-id]` provides readonly diagnostics without model calls or service startup; see [History and diagnostics](history.md).
|
|
149
172
|
The WebUI uses the same execution engine with a separate, context-bound browser confirmation path.
|
|
150
|
-
Its main composer stays in the same conversation; the
|
|
173
|
+
Its main composer stays in the same conversation; the agreement card appears inline, and each workflow is one line after the turn it started in, showing what it is doing (with **Stop**) or how it ended: its merge commit, or the reason it did not complete.
|
|
151
174
|
Select the line to open the workflow's steps, checks, delivery and diagnostics in the main area; while it runs, the conversation's status names its phase.
|
|
152
|
-
Research, implementation and review subagents are listed in the lower-left **Subagents** dock, together with legacy task children; selecting one (or **Open subagent context** on a step) opens its full transcript and retained result in the main area, and **Back to conversation** returns.
|
|
175
|
+
Research, implementation, diagnosis, knowledge and review subagents are listed in the lower-left **Subagents** dock, together with legacy task children; selecting one (or **Open subagent context** on a step) opens its full transcript and retained result in the main area, and **Back to conversation** returns.
|
|
153
176
|
Active workflows are listed under **Running conversations** with **Cancel workflow — request stop**; this includes native-started workflows, and an unavailable observation is not proof of no work.
|
|
154
177
|
The old task creation/Save/Start/check/human-Review controls are retired on both clients and refused by the service.
|
|
155
178
|
Existing task records remain readonly; they are not converted into workflows.
|
|
@@ -178,3 +201,7 @@ Ask for `cadence_status` with the exact `runId`, `stepId`, and optionally `trans
|
|
|
178
201
|
Selecting a retained run is readonly and does not replace the current run or restart work.
|
|
179
202
|
Native status/history and the browser's **Owner timing and runtime** details show the actual owner build/epoch and recorded queue/worker timestamps; the worker SDK version can differ from the terminal Pi host.
|
|
180
203
|
A parent session may record a whole batch of tool results together, so those timestamps are not the service's completion times.
|
|
204
|
+
|
|
205
|
+
Long workflows retain earlier steps in readonly pages rather than stopping at a step count.
|
|
206
|
+
Open **Earlier workflow steps** in the WebUI, **Earlier steps** in native history, or use `cadence_status` with the returned `stepsBefore` as `before`.
|
|
207
|
+
Route revisions and failed attempts remain visible; a later successful attempt never rewrites their original outcomes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abelxiaoxing/cadence",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.38",
|
|
4
4
|
"description": "Conversation-driven Pi workspace: persistent native and WebUI workflows, explicit plan approval, checks and local delivery.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"src/worker-public.mjs",
|
|
55
55
|
"src/worker-redaction.mjs",
|
|
56
56
|
"src/worker-tools.mjs",
|
|
57
|
+
"src/change-tools.mjs",
|
|
58
|
+
"src/git-environment.mjs",
|
|
59
|
+
"src/git-environment.d.mts",
|
|
57
60
|
"src/research-tools.mjs",
|
|
58
61
|
"src/research-scan.mjs",
|
|
59
62
|
"src/worker-toolkit.mjs",
|
|
@@ -69,11 +69,23 @@ export class SessionNavigator implements Component {
|
|
|
69
69
|
]);
|
|
70
70
|
if (this.signature === signature) return;
|
|
71
71
|
this.signature = signature;
|
|
72
|
+
const previousIndex = this.entries.findIndex(
|
|
73
|
+
(entry) => entry.id === this.selected,
|
|
74
|
+
);
|
|
75
|
+
// Keep an already-open transcript as a reading snapshot, but release the
|
|
76
|
+
// producer as soon as it leaves the live list. No historical rereads.
|
|
77
|
+
if (this.viewing && !entries.some((entry) => entry.id === this.viewing)) {
|
|
78
|
+
this.viewing = undefined;
|
|
79
|
+
this.source.view(null);
|
|
80
|
+
}
|
|
72
81
|
this.entries = entries;
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
entries.findIndex((entry) => entry.id === this.selected),
|
|
82
|
+
const selectedIndex = entries.findIndex(
|
|
83
|
+
(entry) => entry.id === this.selected,
|
|
76
84
|
);
|
|
85
|
+
const index =
|
|
86
|
+
selectedIndex >= 0
|
|
87
|
+
? selectedIndex
|
|
88
|
+
: Math.max(0, Math.min(previousIndex, entries.length - 1));
|
|
77
89
|
this.selected = entries[index]?.id;
|
|
78
90
|
this.list = new SelectList(
|
|
79
91
|
entries.map(({ id, label }) => ({ value: id, label })),
|
|
@@ -95,8 +107,14 @@ export class SessionNavigator implements Component {
|
|
|
95
107
|
}
|
|
96
108
|
|
|
97
109
|
private open(id: string): void {
|
|
110
|
+
// Mouse input can still name a row painted before its end. Recheck that
|
|
111
|
+
// exact id, rather than redirecting the click to a different live row.
|
|
112
|
+
this.refresh();
|
|
98
113
|
const entry = this.entries.find((candidate) => candidate.id === id);
|
|
99
|
-
if (!entry)
|
|
114
|
+
if (!entry) {
|
|
115
|
+
this.tui.requestRender();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
100
118
|
this.viewing = id;
|
|
101
119
|
let position = this.positions.get(id);
|
|
102
120
|
if (!position) {
|
|
@@ -144,10 +162,17 @@ export class SessionNavigator implements Component {
|
|
|
144
162
|
labeledRule(
|
|
145
163
|
width,
|
|
146
164
|
(text) => this.theme.fg("border", text),
|
|
147
|
-
["
|
|
165
|
+
["Running agents"],
|
|
148
166
|
[`${at + 1} / ${this.entries.length}`],
|
|
149
167
|
),
|
|
150
|
-
...(this.
|
|
168
|
+
...(this.entries.length
|
|
169
|
+
? (this.list?.render(width) ?? [])
|
|
170
|
+
: [
|
|
171
|
+
truncateToWidth(
|
|
172
|
+
this.theme.fg("dim", "No agents running in this session"),
|
|
173
|
+
width,
|
|
174
|
+
),
|
|
175
|
+
]),
|
|
151
176
|
truncateToWidth(
|
|
152
177
|
this.theme.fg("dim", "↑↓ select · Enter view · Esc return to input"),
|
|
153
178
|
width,
|
|
@@ -157,6 +182,8 @@ export class SessionNavigator implements Component {
|
|
|
157
182
|
|
|
158
183
|
handleInput(data: string): void {
|
|
159
184
|
if (isKeyRelease(data)) return;
|
|
185
|
+
// An end can arrive between the last paint and Enter: never open a stale row.
|
|
186
|
+
this.refresh();
|
|
160
187
|
if (this.pane) this.pane.handleInput(data);
|
|
161
188
|
else this.list?.handleInput(data);
|
|
162
189
|
this.tui.requestRender();
|
|
@@ -143,26 +143,30 @@ export function cadenceBrowserSource(
|
|
|
143
143
|
const sources = new Map<string, TranscriptSource>();
|
|
144
144
|
return {
|
|
145
145
|
entries: () => {
|
|
146
|
-
for (const id of sources.keys())
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
146
|
+
for (const id of sources.keys())
|
|
147
|
+
if (store.get(id)?.status !== "running") sources.delete(id);
|
|
148
|
+
return store
|
|
149
|
+
.ordered()
|
|
150
|
+
.filter((agent) => agent.status === "running")
|
|
151
|
+
.map((agent) => {
|
|
152
|
+
let source = sources.get(agent.id);
|
|
153
|
+
if (!source) {
|
|
154
|
+
source = transcriptSource(store, agent);
|
|
155
|
+
sources.set(agent.id, source);
|
|
156
|
+
}
|
|
157
|
+
return {
|
|
158
|
+
id: agent.id,
|
|
159
|
+
label: `${described(agent)} · ${agent.status} · ${factsText(agent, now())}`,
|
|
160
|
+
heading: {
|
|
161
|
+
name: agent.label,
|
|
162
|
+
modeLabel: agent.kind,
|
|
163
|
+
get description() {
|
|
164
|
+
return agent.status;
|
|
165
|
+
},
|
|
161
166
|
},
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
};
|
|
165
|
-
});
|
|
167
|
+
source,
|
|
168
|
+
};
|
|
169
|
+
});
|
|
166
170
|
},
|
|
167
171
|
subscribe: (changed) => store.subscribe(changed),
|
|
168
172
|
view,
|