@tea-agent/loop-agent 0.10.0 → 0.11.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/AGENTS.md +10 -2
- package/CHANGELOG.md +67 -25
- package/README.md +82 -11
- package/dist/application/dag/args.js +1 -12
- package/dist/application/dag/generate-task-dag.js +23 -2
- package/dist/application/dag/run-dag.js +1 -27
- package/dist/application/dag/validate-dag.js +2 -2
- package/dist/application/loop/run-action.js +0 -4
- package/dist/cli/command-definitions.js +44 -16
- package/dist/cli/program.js +40 -23
- package/dist/cli/update/notifier.js +117 -0
- package/dist/cli/update/npm-client.js +151 -0
- package/dist/cli/update/policy.js +58 -0
- package/dist/cli/update/state.js +68 -0
- package/dist/cli.js +33 -0
- package/dist/commands/cursor-prompt.js +42 -82
- package/dist/commands/dag-approve.js +36 -0
- package/dist/commands/delegate.js +75 -77
- package/dist/commands/doctor.js +0 -18
- package/dist/commands/init.js +476 -91
- package/dist/commands/instructions.js +7 -10
- package/dist/commands/loop.js +4 -20
- package/dist/commands/plan.js +50 -0
- package/dist/executors/config-core.js +0 -51
- package/dist/executors/dag-pi-executor.js +1 -1
- package/dist/executors/dag.js +0 -1
- package/dist/executors/index.js +0 -2
- package/dist/executors/model-routing.js +9 -9
- package/dist/executors/shell-executor.js +1 -1
- package/dist/governance/checks.js +6 -3
- package/dist/governance/exec-plans.js +545 -0
- package/dist/governance/manifest-types.js +24 -2
- package/dist/infrastructure/harness/loop-action-store.js +0 -3
- package/dist/records/harvest.js +2 -23
- package/dist/records/one-shot-runs.js +1 -1
- package/dist/shared/artifacts-core.js +24 -5
- package/dist/shared/output-truncation.js +37 -0
- package/dist/shared/package-metadata.js +353 -0
- package/dist/{executors/cursor-executor.js → sidecars/cursor-prompt/executor.js} +2 -42
- package/dist/sidecars/cursor-prompt/index.js +3 -0
- package/dist/sidecars/cursor-prompt/stream.js +121 -0
- package/dist/task/config-types.js +28 -12
- package/dist/task/delegate.js +9 -21
- package/dist/task/runtime.js +1 -2
- package/dist/worker/cli.js +29 -2
- package/dist/worker/delivery/final-verification.js +47 -11
- package/dist/worker/delivery/package.js +63 -10
- package/dist/worker/feature/run.js +60 -8
- package/dist/worker/loop-agent/loop-agent-client.js +329 -126
- package/dist/worker/observability/read-model.js +27 -1
- package/dist/worker/observe/static/app.js +326 -45
- package/dist/worker/observe/static/index.html +1 -1
- package/dist/worker/observe/static/styles.css +5 -4
- package/dist/worker/preflight.js +49 -1
- package/dist/worker/run-task/run-task.js +22 -12
- package/dist/worker/runner/run-ready.js +76 -12
- package/dist/worker/task-spec/schema.js +0 -1
- package/dist/workflows/dag/convergence/controller.js +1 -1
- package/dist/workflows/dag/executor-registry.js +0 -2
- package/dist/workflows/dag/init-hybrid.js +402 -25
- package/dist/workflows/dag/node-execution.js +61 -7
- package/dist/workflows/dag/runner.js +45 -17
- package/dist/workflows/dag/scheduler.js +7 -2
- package/dist/workflows/dag/sdd-embedded.js +128 -0
- package/dist/workflows/dag/skill-instructions.js +5 -4
- package/dist/workflows/dag/skill-snapshot.js +527 -0
- package/dist/workflows/dag/types.js +42 -9
- package/dist/workflows/dag/validate.js +5 -8
- package/dist/workflows/loop/actions/dag-action.js +0 -2
- package/dist/workflows/loop/actions/shared.js +1 -1
- package/dist/workflows/loop/actions.js +14 -31
- package/dist/workflows/loop/benchmark.js +1 -1
- package/dist/workflows/loop/index.js +1 -1
- package/dist/workflows/loop/policy/auto-policy.js +22 -14
- package/dist/workflows/loop/policy/path-patterns.js +13 -0
- package/docs/README.md +36 -33
- package/docs/agent-dag-recovery-playbook.md +1 -1
- package/docs/agent-dag-runner.md +2 -2
- package/docs/architecture/README.md +26 -0
- package/docs/architecture/dag-execution.md +134 -0
- package/docs/architecture/evolution.md +52 -0
- package/docs/architecture/facts-and-state.md +58 -0
- package/docs/architecture/runtime-boundaries.md +45 -17
- package/docs/architecture/system-overview.md +93 -0
- package/docs/architecture/worker-and-feature.md +81 -0
- package/docs/cursor-prompt-sidecar.md +36 -0
- package/docs/decisions/README.md +13 -1
- package/docs/design/README.md +42 -21
- package/docs/development-principles.md +2 -2
- package/docs/exec-plans/active/README.md +2 -2
- package/docs/exec-plans/completed/README.md +12 -0
- package/docs/feature-workflow.md +50 -4
- package/docs/harness-methodology-debugging.md +1 -1
- package/docs/harness-methodology-tdd.md +3 -3
- package/docs/init-surface.manifest.json +60 -25
- package/docs/loop-agent-harness.md +28 -4
- package/docs/progress/README.md +32 -1
- package/docs/reports/README.md +84 -18
- package/docs/skills/README.md +2 -1
- package/docs/skills/vetted-skill-registry.md +2 -1
- package/docs/templates/agent-dag-report.schema.json +6 -6
- package/docs/templates/agent-dag.base.json +0 -5
- package/docs/templates/agent-dag.final-verification.json +0 -5
- package/docs/templates/agent-dag.schema.json +1 -2
- package/docs/templates/agent-dag.supervised-implementation.json +1 -6
- package/docs/templates/frontend-design-contract.md +33 -0
- package/docs/templates/frontend-task-constraints.md +25 -0
- package/docs/templates/frontend-task-requirement.md +61 -0
- package/docs/templates/harness.schema.json +10 -12
- package/docs/templates/hybrid-dag.json +1 -6
- package/docs/templates/interactive-ui-round2-experiment.md +1 -1
- package/docs/templates/product-line/task.yaml +0 -1
- package/docs/templates/project-start-checklist.md +2 -2
- package/docs/templates/worker-dogfood-evidence.md +28 -0
- package/docs/templates/worker-dogfood-setup.md +20 -0
- package/docs/verification-matrix.md +10 -0
- package/examples/decision-gate-agent-dag.json +87 -33
- package/examples/example-dag.json +0 -5
- package/examples/hybrid-loop-agent-dag.json +0 -5
- package/harness.json +7 -15
- package/package.json +22 -46
- package/scripts/check-product-line-docs.sh +10 -7
- package/skills/agent-worker/SKILL.md +37 -0
- package/skills/agent-worker/references/agent-worker-operator.md +43 -0
- package/skills/frontend-design-review/SKILL.md +59 -0
- package/skills/frontend-design-review/references/review-checklist.md +37 -0
- package/skills/frontend-implementation/SKILL.md +51 -0
- package/skills/frontend-implementation/references/code-standards.md +34 -0
- package/skills/frontend-implementation/references/design-spec.md +46 -0
- package/skills/frontend-implementation/references/node-contracts.md +32 -0
- package/skills/frontend-review/SKILL.md +53 -0
- package/skills/frontend-review/references/review-findings.md +42 -0
- package/skills/frontend-verification/SKILL.md +40 -0
- package/skills/frontend-verification/references/verification-checklist.md +56 -0
- package/skills/grill-me/SKILL.md +10 -0
- package/skills/grill-with-docs/SKILL.md +88 -0
- package/skills/grill-with-docs/adr-format.md +47 -0
- package/skills/grill-with-docs/context-format.md +60 -0
- package/skills/loop-agent/SKILL.md +11 -9
- package/skills/loop-agent/references/command-reference.md +13 -15
- package/skills/loop-agent/references/docs-converge.md +126 -0
- package/skills/loop-agent/references/harness-policy.md +7 -7
- package/skills/loop-agent/references/hybrid-dag.md +15 -18
- package/skills/loop-agent/references/long-running-loop.md +4 -6
- package/skills/loop-agent/references/multi-worktree.md +6 -6
- package/skills/loop-agent/references/orchestrator-and-interventions.md +3 -3
- package/skills/loop-agent/references/pi-subagent-assisted-mode.md +14 -11
- package/skills/loop-agent/references/task-workflow.md +1 -1
- package/skills/using-git-worktrees/SKILL.md +215 -0
- package/dist/commands/cursor-worker.js +0 -43
- package/dist/cursor-worker-entry.js +0 -8
- package/dist/executors/cursor-artifacts.js +0 -33
- package/dist/executors/cursor-execution-log.js +0 -81
- package/dist/executors/cursor-executor-artifacts.js +0 -134
- package/dist/executors/cursor-run.js +0 -115
- package/dist/executors/cursor-tool.js +0 -94
- package/dist/executors/cursor-worker-client.js +0 -223
- package/dist/executors/cursor-worker-protocol.js +0 -18
- package/dist/executors/cursor-worker-server.js +0 -54
- package/dist/executors/cursor-worker.js +0 -3
- package/dist/executors/cursor.js +0 -6
- package/dist/executors/dag-cursor-executor.js +0 -87
- package/dist/workflows/loop/actions/cursor-fix.js +0 -191
- package/dist/workflows/loop/policy/cursor-fix-policy.js +0 -31
- package/docs/cursor-executor-usage.md +0 -25
- package/docs/dynamic-workflow-dag-engine-roadmap.md +0 -1749
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grill-with-docs
|
|
3
|
+
description: Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<what-to-do>
|
|
7
|
+
|
|
8
|
+
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
9
|
+
|
|
10
|
+
Ask the questions one at a time, waiting for feedback on each question before continuing.
|
|
11
|
+
|
|
12
|
+
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
13
|
+
|
|
14
|
+
</what-to-do>
|
|
15
|
+
|
|
16
|
+
<supporting-info>
|
|
17
|
+
|
|
18
|
+
## Domain awareness
|
|
19
|
+
|
|
20
|
+
During codebase exploration, also look for existing documentation:
|
|
21
|
+
|
|
22
|
+
### File structure
|
|
23
|
+
|
|
24
|
+
Most repos have a single context:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
/
|
|
28
|
+
├── CONTEXT.md
|
|
29
|
+
├── docs/
|
|
30
|
+
│ └── adr/
|
|
31
|
+
│ ├── 0001-event-sourced-orders.md
|
|
32
|
+
│ └── 0002-postgres-for-write-model.md
|
|
33
|
+
└── src/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
/
|
|
40
|
+
├── CONTEXT-MAP.md
|
|
41
|
+
├── docs/
|
|
42
|
+
│ └── adr/ ← system-wide decisions
|
|
43
|
+
├── src/
|
|
44
|
+
│ ├── ordering/
|
|
45
|
+
│ │ ├── CONTEXT.md
|
|
46
|
+
│ │ └── docs/adr/ ← context-specific decisions
|
|
47
|
+
│ └── billing/
|
|
48
|
+
│ ├── CONTEXT.md
|
|
49
|
+
│ └── docs/adr/
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Create files lazily — only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved. If no `docs/adr/` exists, create it when the first ADR is needed.
|
|
53
|
+
|
|
54
|
+
## During the session
|
|
55
|
+
|
|
56
|
+
### Challenge against the glossary
|
|
57
|
+
|
|
58
|
+
When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y — which is it?"
|
|
59
|
+
|
|
60
|
+
### Sharpen fuzzy language
|
|
61
|
+
|
|
62
|
+
When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account' — do you mean the Customer or the User? Those are different things."
|
|
63
|
+
|
|
64
|
+
### Discuss concrete scenarios
|
|
65
|
+
|
|
66
|
+
When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
|
|
67
|
+
|
|
68
|
+
### Cross-reference with code
|
|
69
|
+
|
|
70
|
+
When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible — which is right?"
|
|
71
|
+
|
|
72
|
+
### Update CONTEXT.md inline
|
|
73
|
+
|
|
74
|
+
When a term is resolved, update `CONTEXT.md` right there. Don't batch these up — capture them as they happen. Use the format in [context-format.md](./context-format.md).
|
|
75
|
+
|
|
76
|
+
`CONTEXT.md` should be totally devoid of implementation details. Do not treat `CONTEXT.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
|
|
77
|
+
|
|
78
|
+
### Offer ADRs sparingly
|
|
79
|
+
|
|
80
|
+
Only offer to create an ADR when all three are true:
|
|
81
|
+
|
|
82
|
+
1. **Hard to reverse** — the cost of changing your mind later is meaningful
|
|
83
|
+
2. **Surprising without context** — a future reader will wonder "why did they do it this way?"
|
|
84
|
+
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
85
|
+
|
|
86
|
+
If any of the three is missing, skip the ADR. Use the format in [adr-format.md](./adr-format.md).
|
|
87
|
+
|
|
88
|
+
</supporting-info>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# ADR Format
|
|
2
|
+
|
|
3
|
+
ADRs live in `docs/adr/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc.
|
|
4
|
+
|
|
5
|
+
Create the `docs/adr/` directory lazily — only when the first ADR is needed.
|
|
6
|
+
|
|
7
|
+
## Template
|
|
8
|
+
|
|
9
|
+
```md
|
|
10
|
+
# {Short title of the decision}
|
|
11
|
+
|
|
12
|
+
{1-3 sentences: what's the context, what did we decide, and why.}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
That's it. An ADR can be a single paragraph. The value is in recording *that* a decision was made and *why* — not in filling out sections.
|
|
16
|
+
|
|
17
|
+
## Optional sections
|
|
18
|
+
|
|
19
|
+
Only include these when they add genuine value. Most ADRs won't need them.
|
|
20
|
+
|
|
21
|
+
- **Status** frontmatter (`proposed | accepted | deprecated | superseded by ADR-NNNN`) — useful when decisions are revisited
|
|
22
|
+
- **Considered Options** — only when the rejected alternatives are worth remembering
|
|
23
|
+
- **Consequences** — only when non-obvious downstream effects need to be called out
|
|
24
|
+
|
|
25
|
+
## Numbering
|
|
26
|
+
|
|
27
|
+
Scan `docs/adr/` for the highest existing number and increment by one.
|
|
28
|
+
|
|
29
|
+
## When to offer an ADR
|
|
30
|
+
|
|
31
|
+
All three of these must be true:
|
|
32
|
+
|
|
33
|
+
1. **Hard to reverse** — the cost of changing your mind later is meaningful
|
|
34
|
+
2. **Surprising without context** — a future reader will look at the code and wonder "why on earth did they do it this way?"
|
|
35
|
+
3. **The result of a real trade-off** — there were genuine alternatives and you picked one for specific reasons
|
|
36
|
+
|
|
37
|
+
If a decision is easy to reverse, skip it — you'll just reverse it. If it's not surprising, nobody will wonder why. If there was no real alternative, there's nothing to record beyond "we did the obvious thing."
|
|
38
|
+
|
|
39
|
+
### What qualifies
|
|
40
|
+
|
|
41
|
+
- **Architectural shape.** "We're using a monorepo." "The write model is event-sourced, the read model is projected into Postgres."
|
|
42
|
+
- **Integration patterns between contexts.** "Ordering and Billing communicate via domain events, not synchronous HTTP."
|
|
43
|
+
- **Technology choices that carry lock-in.** Database, message bus, auth provider, deployment target. Not every library — just the ones that would take a quarter to swap out.
|
|
44
|
+
- **Boundary and scope decisions.** "Customer data is owned by the Customer context; other contexts reference it by ID only." The explicit no-s are as valuable as the yes-s.
|
|
45
|
+
- **Deliberate deviations from the obvious path.** "We're using manual SQL instead of an ORM because X." Anything where a reasonable reader would assume the opposite. These stop the next engineer from "fixing" something that was deliberate.
|
|
46
|
+
- **Constraints not visible in the code.** "We can't use AWS because of compliance requirements." "Response times must be under 200ms because of the partner API contract."
|
|
47
|
+
- **Rejected alternatives when the rejection is non-obvious.** If you considered GraphQL and picked REST for subtle reasons, record it — otherwise someone will suggest GraphQL again in six months.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# CONTEXT.md Format
|
|
2
|
+
|
|
3
|
+
## Structure
|
|
4
|
+
|
|
5
|
+
```md
|
|
6
|
+
# {Context Name}
|
|
7
|
+
|
|
8
|
+
{One or two sentence description of what this context is and why it exists.}
|
|
9
|
+
|
|
10
|
+
## Language
|
|
11
|
+
|
|
12
|
+
**Order**:
|
|
13
|
+
{A one or two sentence description of the term}
|
|
14
|
+
_Avoid_: Purchase, transaction
|
|
15
|
+
|
|
16
|
+
**Invoice**:
|
|
17
|
+
A request for payment sent to a customer after delivery.
|
|
18
|
+
_Avoid_: Bill, payment request
|
|
19
|
+
|
|
20
|
+
**Customer**:
|
|
21
|
+
A person or organization that places orders.
|
|
22
|
+
_Avoid_: Client, buyer, account
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
|
|
28
|
+
- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
|
|
29
|
+
- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
|
|
30
|
+
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
|
|
31
|
+
|
|
32
|
+
## Single vs multi-context repos
|
|
33
|
+
|
|
34
|
+
**Single context (most repos):** One `CONTEXT.md` at the repo root.
|
|
35
|
+
|
|
36
|
+
**Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
|
|
37
|
+
|
|
38
|
+
```md
|
|
39
|
+
# Context Map
|
|
40
|
+
|
|
41
|
+
## Contexts
|
|
42
|
+
|
|
43
|
+
- `src/ordering/CONTEXT.md` — receives and tracks customer orders
|
|
44
|
+
- `src/billing/CONTEXT.md` — generates invoices and processes payments
|
|
45
|
+
- `src/fulfillment/CONTEXT.md` — manages warehouse picking and shipping
|
|
46
|
+
|
|
47
|
+
## Relationships
|
|
48
|
+
|
|
49
|
+
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
|
|
50
|
+
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
|
|
51
|
+
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The skill infers which structure applies:
|
|
55
|
+
|
|
56
|
+
- If `CONTEXT-MAP.md` exists, read it to find contexts
|
|
57
|
+
- If only a root `CONTEXT.md` exists, single context
|
|
58
|
+
- If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
|
|
59
|
+
|
|
60
|
+
When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: loop-agent
|
|
3
3
|
description: >-
|
|
4
|
-
Use when implementing features, processing PRDs or requirements, running structured loop-agent workflows, creating harness tasks, using Agent DAG, run-dag, pi-prompt planning/review, or
|
|
4
|
+
Use when implementing features, processing PRDs or requirements, running structured loop-agent workflows, creating harness tasks, using Agent DAG, run-dag, pi-prompt planning/review, cursor-prompt one-shot sidecar intervention, or converging website/governance docs after user-visible changes in loop-agent. Triggers: loop-agent, workflow, structured development, harness task, Agent DAG, docs converge, Converge Docs, 文档收敛, 结构化开发, 工作流, 需求实现, PRD 实现.
|
|
5
5
|
references:
|
|
6
6
|
- path: references/harness-policy.md
|
|
7
7
|
required: true
|
|
@@ -25,9 +25,9 @@ Shared loop-agent harness workflow 规则见 `references/harness-policy.md`。Re
|
|
|
25
25
|
|
|
26
26
|
- 主入口是 **Agent DAG**。
|
|
27
27
|
- 主会话负责编排、审 writeSet、复核验证与 handoff。
|
|
28
|
-
- DAG `pi` executor
|
|
28
|
+
- DAG `pi` executor 是唯一受治理 Agent runtime:默认用于 read-only planning / review / diagnosis;当节点声明 `toolProfile: "write"` 时用于 bounded implementation / repair;Pi 模型矩阵保持 LOW=`gpt-5.3-codex-spark`、MED=`glm-5.2`、HIGH=`gpt-5.5`。
|
|
29
29
|
- `pi-prompt` 与 `cursor-prompt` 都是一次性 full-capability helper;用作 sidecar 时必须在 prompt 和 tool/model 参数里显式收窄。
|
|
30
|
-
- Cursor
|
|
30
|
+
- Cursor 仅是显式、手工触发的 `cursor-prompt` one-shot sidecar,不是受治理 DAG/Loop writer;受治理写入固定为 `implement-pi` / `repair-pi`,必须给出 allowed / forbidden paths 与 writeSet。
|
|
31
31
|
- Shell verification 是事实源;任何完成声明都必须有本轮命令输出。
|
|
32
32
|
- 长期结论写回 `docs/exec-plans/`、`docs/reports/`、`docs/progress/` 或 `./skill/`。
|
|
33
33
|
|
|
@@ -68,11 +68,11 @@ loop-agent run-dag --dag <temp-dir>/<task-id>-dag.json --cwd <repo-root>
|
|
|
68
68
|
|
|
69
69
|
## Bounded Write Execution
|
|
70
70
|
|
|
71
|
-
需要写代码时,默认使用 DAG `pi` executor 的 write tool profile
|
|
71
|
+
需要写代码时,默认使用 DAG `pi` executor 的 write tool profile(`implement-pi` / `repair-pi`)。Pi writer 节点必须包含 task id、目标、allowed paths、forbidden paths、writeSet、硬约束和预期验证,并在执行后由主会话独立运行 shell verification。
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
`cursor-prompt` 仅作人工 one-shot sidecar intervention,不进入 Loop auto-execute / Delegate auto-run / DAG writer 选择。细节见 `docs/cursor-prompt-sidecar.md`、`references/harness-policy.md` 和 `references/verification-and-failure-handling.md`。
|
|
74
74
|
|
|
75
|
-
Pi writer prompt
|
|
75
|
+
Pi writer prompt(以及可选 sidecar prompt)都必须包含:
|
|
76
76
|
|
|
77
77
|
- task id
|
|
78
78
|
- exact objective
|
|
@@ -82,7 +82,7 @@ Pi writer prompt 与 Cursor prompt 都必须包含:
|
|
|
82
82
|
- expected verification
|
|
83
83
|
- instruction to preserve unrelated files
|
|
84
84
|
|
|
85
|
-
bounded writer 完成后,主会话必须独立复核;命令清单见 `references/verification-and-failure-handling.md`
|
|
85
|
+
bounded writer 完成后,主会话必须独立复核;命令清单见 `references/verification-and-failure-handling.md` 的独立复核章节。
|
|
86
86
|
|
|
87
87
|
## 进阶主题路由
|
|
88
88
|
|
|
@@ -94,7 +94,8 @@ bounded writer 完成后,主会话必须独立复核;命令清单见 `refere
|
|
|
94
94
|
| Three-Pass Convergence、repair artifact、spine audit、knowledge curate、SePO-lite prompt evolution | `references/harness-policy.md` |
|
|
95
95
|
| Operator commands(status/doctor/report/closeout/promote/inspect/spine/knowledge/docs/handoff) | `references/command-reference.md` |
|
|
96
96
|
| 伴生 CLI `agent-worker`(TaskSpec / Task Pool / batch / morning report) | `references/command-reference.md` |
|
|
97
|
-
| Post-
|
|
97
|
+
| Post-writer 独立验证、verify knobs、failure handling、closeout | `references/verification-and-failure-handling.md` |
|
|
98
|
+
| Docs Converge(用户可见变更后的站上/治理文档同步检查表) | `references/docs-converge.md` |
|
|
98
99
|
|
|
99
100
|
## Source Layout
|
|
100
101
|
|
|
@@ -121,7 +122,7 @@ bounded writer 完成后,主会话必须独立复核;命令清单见 `refere
|
|
|
121
122
|
2. Source materials are mandatory: `source/需求.md` and `source/执行约束.md`. Prefer immutable originals under `source/references/` via `import-prd` or Worker `source_docs`; treat `需求.md` as a derived contract.
|
|
122
123
|
3. Agent DAG is the implementation workflow. Review must three-way check references + derived source + implementation when originals exist.
|
|
123
124
|
4. DAG `pi` executor stays read-only unless the node sets `toolProfile: "write"`; `pi-prompt` / `cursor-prompt` are full-capability one-shot helpers and must be bounded per call.
|
|
124
|
-
5. Pi writer nodes
|
|
125
|
+
5. Pi writer nodes must be bounded by explicit allowed / forbidden paths and writeSet; Cursor remains `cursor-prompt` sidecar only.
|
|
125
126
|
6. Completed DAG and one-shot run facts are read-only.
|
|
126
127
|
7. Do not write root `artifacts/` from read-only DAG or sidecar steps.
|
|
127
128
|
8. Do not keep hidden workflow state in chat only; write durable conclusions to repo artifacts.
|
|
@@ -147,3 +148,4 @@ Optional(按需加载):
|
|
|
147
148
|
- `references/model-routing.md`
|
|
148
149
|
- `references/multi-worktree.md`
|
|
149
150
|
- `references/post-implementation-and-patterns.md`
|
|
151
|
+
- `references/docs-converge.md` — 用户可见变更后的文档收敛检查表;禁止每次重新规划整站大纲
|
|
@@ -60,7 +60,7 @@ loop-agent doctor
|
|
|
60
60
|
```
|
|
61
61
|
3. **Escape hatch**,仅用于 worktree 隔离委派、executor 调试或 one-shot 诊断:
|
|
62
62
|
```bash
|
|
63
|
-
loop-agent delegate <task-id> --
|
|
63
|
+
loop-agent delegate <task-id> --auto-run
|
|
64
64
|
loop-agent harvest <task-id>
|
|
65
65
|
loop-agent cursor-prompt --cwd <repo-root> --file /tmp/bounded-task.md
|
|
66
66
|
loop-agent pi-prompt "Reply with exactly OK."
|
|
@@ -122,7 +122,7 @@ loop-agent examples copy <name> --output examples/<name>
|
|
|
122
122
|
loop-agent new-task <task-id> "Task Title"
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
创建 `.harness/tasks/<task-id>/`,含 `source/`、`artifacts/`、`logs/` 及初始 state
|
|
125
|
+
创建 `.harness/tasks/<task-id>/`,含 `source/`、`artifacts/`、`logs/` 及初始 state。`artifacts/` 默认只预种 `修改记录.md` 与 `验证结果.md`(供后续 `promote-run` / `closeout` 使用);不再预种 L1 的 `分析报告.md`、`实现计划.md`、`复盘报告.md`。
|
|
126
126
|
|
|
127
127
|
### 导入原始 PRD(不可变事实源)
|
|
128
128
|
```bash
|
|
@@ -141,7 +141,7 @@ loop-agent instructions promotion --task <task-id> --json
|
|
|
141
141
|
loop-agent instructions closeout --task <task-id> --json
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
`status` 是 agent 行动上下文入口,返回 `artifactPaths`、`runRefs`、`actionContext` 与 `nextActions`。`instructions` 在写入 source、DAG draft、task artifacts、promotion 或 closeout 前返回目标路径、依赖、模板、写策略与完成标准;blocked artifact 会列出 `missingDependencies
|
|
144
|
+
`status` 是 agent 行动上下文入口,返回 `artifactPaths`、`runRefs`、`actionContext` 与 `nextActions`。`instructions` 在写入 source、DAG draft、task artifacts、promotion 或 closeout 前返回目标路径、依赖、模板、写策略与完成标准;blocked artifact 会列出 `missingDependencies`。`instructions task-artifacts` 只要求 promote 桥接的 `修改记录.md` / `验证结果.md`,不要求手写分析/计划/复盘三份 L1 报告。
|
|
145
145
|
|
|
146
146
|
### Promotion / closeout
|
|
147
147
|
```bash
|
|
@@ -228,9 +228,7 @@ loop-agent dag validate --dag <temp-dir>/hybrid-dag.json --strict-governance --s
|
|
|
228
228
|
loop-agent dag validate --dag docs/templates/agent-dag.supervised-implementation.json --strict-models --strict-governance # role=supervisor + write-set-gate topology
|
|
229
229
|
cp docs/templates/agent-dag.supervised-implementation.json <temp-dir>/supervised-dag.json
|
|
230
230
|
(npx vitest run test/dag-supervised-template.test.ts test/dag-validate.test.ts test/dag-shell-executor.test.ts --reporter=dot) # supervised template + shell.verdictGate runtime
|
|
231
|
-
loop-agent dag validate --dag <temp-dir>/hybrid-dag.json --forbid-executor cursor # 存在 cursor node 时失败
|
|
232
231
|
loop-agent run-dag --dag <temp-dir>/hybrid-dag.json --cwd <repo-root> # 执行 Agent DAG
|
|
233
|
-
loop-agent run-dag --dag <temp-dir>/hybrid-dag.json --cwd <repo-root> --no-cursor # 执行前若存在 cursor node 则失败
|
|
234
232
|
loop-agent run-dag --dag <temp-dir>/hybrid-dag.json --init-only --canvas-path <temp-dir>/hybrid-dag.canvas.tsx # 可选 derived Canvas view
|
|
235
233
|
loop-agent dag init-hybrid <task-id> # 生成可审阅的 DAG draft
|
|
236
234
|
loop-agent dag run-task <task-id> # generate + validate(安全默认;无 dag-runs;standard-compatible)
|
|
@@ -291,15 +289,9 @@ loop-agent workflow replay <run-id>
|
|
|
291
289
|
|
|
292
290
|
`workflow` 是 Dynamic Workflow 的 saved/operator surface。它读取 `WorkflowSpec`,编译为 DAG,再进入同一套 `run-dag` runtime;不会新增 executor 能力或绕过 DAG governance。真实写入任务仍应检查 compiled DAG 的 executor、writeSet、shell gates 和 completed facts 边界。
|
|
293
291
|
|
|
294
|
-
### Cursor
|
|
295
|
-
```bash
|
|
296
|
-
loop-agent cursor-worker status # enabled/running/child/entry path
|
|
297
|
-
loop-agent cursor-worker stop # SIGTERM worker 并清 parent state
|
|
298
|
-
loop-agent cursor-worker ping # 启动 worker 并跑短 execute smoke(之后 stop worker)
|
|
299
|
-
```
|
|
292
|
+
### Cursor sidecar
|
|
300
293
|
|
|
301
|
-
-
|
|
302
|
-
- Parent RPC timeout(`timeoutMs + 5s`)返回 `details.timeoutKind=rpc`,终止 worker(`SIGTERM`),defer SDK cancel(`cancelDeferred=true`,`cancelAttempted=false`);下次 execute 启动新 worker。
|
|
294
|
+
`cursor-worker` 已删除。人工干预使用 `cursor-prompt` one-shot sidecar;见 `docs/cursor-prompt-sidecar.md`。
|
|
303
295
|
|
|
304
296
|
### 检查 task status
|
|
305
297
|
```bash
|
|
@@ -311,6 +303,9 @@ loop-agent status <task-id>
|
|
|
311
303
|
loop-agent docs audit
|
|
312
304
|
loop-agent docs archive docs/exec-plans/active/<plan>.md
|
|
313
305
|
loop-agent plan list
|
|
306
|
+
loop-agent plan create <plan-id> "<title>"
|
|
307
|
+
loop-agent plan complete <plan-id> --summary "<summary>"
|
|
308
|
+
loop-agent plan check
|
|
314
309
|
loop-agent handoff check [task-id]
|
|
315
310
|
loop-agent handoff coverage <task-id> [--json|--markdown]
|
|
316
311
|
```
|
|
@@ -318,6 +313,9 @@ loop-agent handoff coverage <task-id> [--json|--markdown]
|
|
|
318
313
|
- `docs audit`:扫描文档腐化风险,如 active/completed 漂移、失效链接、host-gap closeout
|
|
319
314
|
- `docs archive`:将 active plan 迁入 completed,并自动重写常见 markdown 引用
|
|
320
315
|
- `plan list`:列出当前 active plans 及其解析状态
|
|
316
|
+
- `plan create`:优先从目标项目模板创建 active exec-plan,不存在时回退发布包内置模板;同步 `active/README.md`,拒绝重复 id、不安全文件名,失败时回滚
|
|
317
|
+
- `plan complete`:将 active exec-plan 标记完成、迁入 completed、追加 `--summary` 并同步 active/completed 索引;失败时回滚所有已触碰文件
|
|
318
|
+
- `plan check`:确定性校验 exec-plan 目录与索引之间的 missing、stale、duplicate、status mismatch;发现问题时输出 JSON 并以非零状态失败
|
|
321
319
|
- `handoff check`:检查任务 source / artifacts / auto-commit scope 是否满足交付闭环
|
|
322
320
|
- `handoff coverage`:从 `source/需求.md` 抽取 checklist / numbered / `REQ-*` 项并输出 coverage audit;未覆盖项 exit 1;`explicitly_out_of_scope` 不计为缺口
|
|
323
321
|
|
|
@@ -434,12 +432,12 @@ loop-agent stats
|
|
|
434
432
|
### Worktree delegate / harvest(escape hatch)
|
|
435
433
|
|
|
436
434
|
```bash
|
|
437
|
-
loop-agent delegate <task-id> [--
|
|
435
|
+
loop-agent delegate <task-id> [--base <branch>] [--branch <name>] [--no-symlink] [--auto-run]
|
|
438
436
|
loop-agent harvest <task-id> [--squash] [--no-archive] [--keep-worktree]
|
|
439
437
|
loop-agent worktree create|list|remove ...
|
|
440
438
|
```
|
|
441
439
|
|
|
442
|
-
用于 worktree
|
|
440
|
+
用于 worktree 隔离以及可选的 Pi-only DAG 执行与 merge 收口。常规 autonomous work 应优先 Agent DAG;详见 `multi-worktree.md` 与 `docs/cursor-prompt-sidecar.md`。
|
|
443
441
|
|
|
444
442
|
### One-shot Cursor sidecar(escape hatch)
|
|
445
443
|
```bash
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Docs Converge(文档收敛)
|
|
2
|
+
|
|
3
|
+
本 reference 把会话协议中的 **Converge Docs** 落成可执行检查表。
|
|
4
|
+
定位是**收敛 / 同步**,不是「每次重新 invent 文档大纲」。
|
|
5
|
+
|
|
6
|
+
权威规划:`docs/exec-plans/completed/2026-07-14-website-docs-ia-and-converge.md`。
|
|
7
|
+
站与治理双树边界:`website/README.md`。
|
|
8
|
+
|
|
9
|
+
## 何时触发
|
|
10
|
+
|
|
11
|
+
在以下任一情况**加载本文件并跑检查表**:
|
|
12
|
+
|
|
13
|
+
- 用户可见行为变更(CLI 输出、默认工作流、init 投影、Observe/Worker 主路径)。
|
|
14
|
+
- 新增 / 修改 / 删除 CLI 命令或关键 flags。
|
|
15
|
+
- runtime / 架构边界变更(`docs/architecture/*`、executor 角色、Worker 边界)。
|
|
16
|
+
- active plan 创建、blocked、完成或归档。
|
|
17
|
+
- 准备发布或写 `CHANGELOG.md` 版本条目。
|
|
18
|
+
- 用户明确要求「文档收敛」「docs converge」「同步 website docs」。
|
|
19
|
+
- handoff 前需要声明「本轮是否更新了站上文档」。
|
|
20
|
+
|
|
21
|
+
**不要**在无关的纯内部重构(无用户可见行为、无命令面变化)上强制大改站上正文;此时 handoff 写明豁免理由即可。
|
|
22
|
+
|
|
23
|
+
## 受众矩阵
|
|
24
|
+
|
|
25
|
+
| 受众 | 主要入口 | 权威细节 |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| 新贡献者 | `website/docs/intro.md` → `overview/architecture` → `overview/roadmap` → first-run | 根 `docs/architecture/*`、active plans |
|
|
28
|
+
| 使用者 | `overview/feature-map`、`quick-start/*`、`guides/*`、`reference/*` | CLI help、根 `CHANGELOG.md` |
|
|
29
|
+
| 维护者 / agent | 本检查表 + `AGENTS.md` Converge Docs | `docs/`、`skills/`、`scripts/check-*.sh` |
|
|
30
|
+
|
|
31
|
+
## 页面清单(站上活文档)
|
|
32
|
+
|
|
33
|
+
| 页面 | 职责 |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `website/docs/intro.md` | 概念地图 + 30 分钟路径;非能力堆砌 |
|
|
36
|
+
| `website/docs/overview/feature-map.md` | 功能导览 → guide/CLI |
|
|
37
|
+
| `website/docs/overview/architecture.md` | 架构导读;链到 `docs/architecture/` |
|
|
38
|
+
| `website/docs/overview/roadmap.md` | 当前有效规划短索引 |
|
|
39
|
+
| `website/docs/quick-start/*` | 安装 / init / first-run |
|
|
40
|
+
| `website/docs/guides/*` | 主路径操作说明 |
|
|
41
|
+
| `website/docs/reference/cli.md` | 用户向 CLI 参考 |
|
|
42
|
+
| `website/docs/reference/config.md` | 配置参考 |
|
|
43
|
+
| `website/docs/changelog.md` | 读者摘要;完整版本以根 `CHANGELOG.md` 为准 |
|
|
44
|
+
|
|
45
|
+
治理全文、exec-plans、reports **不**搬进 Docusaurus。
|
|
46
|
+
|
|
47
|
+
## 变更 → 文档检查表
|
|
48
|
+
|
|
49
|
+
按本轮实际 diff 勾选(有则必须处理,无则跳过并记豁免):
|
|
50
|
+
|
|
51
|
+
| 若变更了… | 必须检查 / 更新 |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| 新/改 CLI 命令 | `website/docs/reference/cli.md` + `skills/loop-agent/references/command-reference.md`(及 agent-worker 相关 reference) |
|
|
54
|
+
| 用户可见行为 | 对应 `guides/*` 或 `quick-start/*`;根 `CHANGELOG.md`;必要时 `overview/feature-map.md` / `intro.md` |
|
|
55
|
+
| runtime / 边界 | 根 `docs/architecture/*`;站上 `overview/architecture.md` 导语与外链 |
|
|
56
|
+
| 默认工作流 | `intro.md` 流程图 + `guides/agent-dag.md` / `guides/harness-policy.md` |
|
|
57
|
+
| active plan 状态 | `overview/roadmap.md` 短索引 + `docs/exec-plans/active/README.md` |
|
|
58
|
+
| 发布 | 根 `CHANGELOG.md` 为版本事实源;`website/docs/changelog.md` 只写摘要与链接;roadmap 仅在规划状态变化时更新 |
|
|
59
|
+
| skill / init 投影 | `docs/init-surface.manifest.json`、相关测试、必要时 `docs/skills/*` |
|
|
60
|
+
|
|
61
|
+
跨树链接规则:
|
|
62
|
+
|
|
63
|
+
- 站内页面用 Docusaurus 相对文档链接。
|
|
64
|
+
- 链到根目录 `docs/`、`AGENTS.md`、`CHANGELOG.md` 等时,使用
|
|
65
|
+
`https://github.com/tea-agent/loop-agent/blob/main/<repo-path>`,
|
|
66
|
+
正文同时写出 repo-relative path;禁止伪造站内 `/docs/architecture/...` 作为根目录文档路由。
|
|
67
|
+
|
|
68
|
+
## 执行步骤(最小闭环)
|
|
69
|
+
|
|
70
|
+
1. **列出本轮用户可见 diff**(命令、行为、边界、计划状态)。
|
|
71
|
+
2. **对照上表**产出缺口清单(页面路径 + 要改的一句话)。
|
|
72
|
+
3. **最小补丁**:只改清单内页面;禁止顺手重写 practices 或迁移整个 `docs/`。
|
|
73
|
+
4. **验证**(见下节)。
|
|
74
|
+
5. **Handoff** 二选一:
|
|
75
|
+
- 已更新:列出改动页面与验证命令结果。
|
|
76
|
+
- 无需站上更新:写明「本轮无需站上更新,原因:…」。
|
|
77
|
+
|
|
78
|
+
## 验证命令
|
|
79
|
+
|
|
80
|
+
站上正文、侧栏或 `docusaurus.config.ts` 有改动时:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run docs:build
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
涉及治理文档、脚本、skill、init surface 时再跑:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
bash scripts/check-repo.sh
|
|
90
|
+
# 或定向:
|
|
91
|
+
bash scripts/check-skill-entry.sh
|
|
92
|
+
bash scripts/check-command-registry-drift.sh
|
|
93
|
+
bash scripts/check-init-surface.sh
|
|
94
|
+
node bin/loop-agent.js docs audit --repo-root .
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
skill / package 投影相关:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npx vitest run test/init-command.test.ts test/package-surface.test.ts
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 禁止事项
|
|
104
|
+
|
|
105
|
+
- 每次会话从头撰写全新文档大纲或「重新规划整个 docs 树」。
|
|
106
|
+
- 把 `docs/design/`、exec-plans、reports 全文复制进 `website/docs/`。
|
|
107
|
+
- 在站上建立第二套与 `docs/architecture/*` 冲突的架构真源。
|
|
108
|
+
- 未读 `website/README.md` 与相关 exec-plan 就扩大 scope。
|
|
109
|
+
- 用删测试、降 `onBrokenMarkdownLinks` 或忽略 `docs:build` 失败制造「完成」。
|
|
110
|
+
- 新增独立公共 skill 目录承载本检查表(应留在 `skills/loop-agent/references/`)。
|
|
111
|
+
|
|
112
|
+
## 与现有能力的关系
|
|
113
|
+
|
|
114
|
+
| 能力 | 关系 |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| `loop-agent docs audit` | L0 腐化检查(断链、计划状态等);**不**替代本表内容审计 |
|
|
117
|
+
| `npm run docs:build` | 站上改动硬门禁(含 Markdown 断链 fail-fast) |
|
|
118
|
+
| `grill-with-docs` | ADR / 术语;不替代本 reference |
|
|
119
|
+
| 历史 2026-07-05 docs governance dogfood | 仅经验输入;新 workflow 必须 Pi-only,不复用已退役原生 Cursor DAG |
|
|
120
|
+
|
|
121
|
+
## 快速自检(handoff 前 30 秒)
|
|
122
|
+
|
|
123
|
+
- [ ] 用户可见变更是否对照检查表处理或已豁免?
|
|
124
|
+
- [ ] intro 是否仍是概念地图(而非能力 bullet 堆砌)?
|
|
125
|
+
- [ ] roadmap 是否只含当前有效 active 项?
|
|
126
|
+
- [ ] 需要时 `docs:build` / `check-repo` 是否有新鲜输出?
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
- 历史顺序式 `run analyze|plan|spec|implement|verify|auto|loop|continue` workflow 已移除。不要将其作为 fallback path 呈现。
|
|
9
9
|
- **Long-running `loop`** 是 Agent DAG 之上的 outer state/evidence layer。它记录 rounds、context compression、signals、canonical refs;不得替代 complex work 的 DAG writeSet review、Decision Gate 或 shell verification。
|
|
10
10
|
- **Main session** 负责 orchestrate:选一个 work chunk、准备 source materials、review DAG/writeSet、monitor failures、跑 final verification、hand off。
|
|
11
|
-
- **Executors** 实现 bounded work:Pi
|
|
11
|
+
- **Executors** 实现 bounded work:Pi 是唯一受治理 Agent runtime(read-only planning/review/diagnosis,以及 `toolProfile: "write"` 的 bounded implementation/repair);shell 产出 deterministic verification facts;`cursor-prompt` 仅是 one-shot sidecar。
|
|
12
12
|
- **Shell verification 是 completion fact source**。LLM review 或 advisory output 不能替代 command exit codes 与 archived evidence。
|
|
13
13
|
|
|
14
14
|
## Command surface tiers
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
| Primary | Normal autonomous implementation | `new-task` -> `dag run-task --profile auto` -> `dag validate --strict-models --strict-governance` -> `run-dag` |
|
|
19
19
|
| Operator | Diagnose, recover, close out, inspect facts | `status`, `instructions`, `dag status`, `dag doctor`, `dag report`, `dag closeout-draft`, `dag reconcile-tasks`, `dag final-verification`, `inspect`, `doctor`, `spine audit`, `knowledge curate`, `docs audit`, `handoff check`, `loop-benchmark` |
|
|
20
20
|
| Compatibility | Legacy task metadata and feature-study helpers | `goal`, `reference`, `study` |
|
|
21
|
-
| Escape hatch | Isolated delegation, one-shot diagnosis or bounded repair | `delegate`, `worktree`, `harvest`, `pi-prompt`, `cursor-prompt
|
|
21
|
+
| Escape hatch | Isolated delegation, one-shot diagnosis or bounded repair | `delegate`, `worktree`, `harvest`, `pi-prompt`, `cursor-prompt` |
|
|
22
22
|
| Experimental | Long-running outer task state | `loop init|status|run|record-round|add-signal|closeout` |
|
|
23
23
|
|
|
24
24
|
Prompt templates、README snippets、task instructions 应优先呈现 Primary + Operator。Compatibility 与 escape-hatch commands 仍可用,但须携带其 downgrade/fallback 含义。
|
|
@@ -130,7 +130,7 @@ loop-agent loop run <task-id> --action dag
|
|
|
130
130
|
loop-agent loop run <task-id> --action dag --execute
|
|
131
131
|
loop-agent loop run <task-id> --action shell-verify --command "<repo-check>"
|
|
132
132
|
loop-agent loop run <task-id> --action pi-review
|
|
133
|
-
loop-agent loop run <task-id> --auto --max-rounds 3
|
|
133
|
+
loop-agent loop run <task-id> --auto --max-rounds 3
|
|
134
134
|
loop-agent loop closeout <task-id>
|
|
135
135
|
```
|
|
136
136
|
|
|
@@ -138,11 +138,11 @@ Loop action rules:
|
|
|
138
138
|
|
|
139
139
|
- `shell-verify` 是 deterministic;exit code 决定 verification record。
|
|
140
140
|
- `pi-review` 是 read-only;tools 限于 `read,grep,find,ls`,output 为 structured advisory evidence。Structured JSON 须含 `findingSummary`、`failureCategory`、`nextHypothesis`、`recommendedAction`、`fixScope`、`rootCause`;`recommendedAction` exactly 为 `implement_fix|replan|pause|done`。
|
|
141
|
-
-
|
|
142
|
-
- 对 `task.json.complexity = medium | large
|
|
141
|
+
- 自动写入只能通过 Pi-only Agent DAG execute;须读 task `allowedPaths` / `forbiddenPaths`,审查 writer `writeSet`,并 follow shell verification 或 review。
|
|
142
|
+
- 对 `task.json.complexity = medium | large`,自动 DAG execute additionally 需要:
|
|
143
143
|
- previous loop `dag` round,或
|
|
144
144
|
- explicit `task.json.dagFallbackReason` 说明为何不能用 DAG。
|
|
145
|
-
- `loop run --auto` 默认不 write。Auto
|
|
145
|
+
- `loop run --auto` 默认不 write。Auto DAG execute 需要 `task.json.loopAutoExecutionPolicy="enabled"`,或 `loopAutoExecutionPolicy="approval-required"` 加 pending approval signal;旧 `loopAutoWritePolicy` fail-fast;write guards 仍 fail closed 并 pause。
|
|
146
146
|
- `loop closeout` 须报告 workflow path:`dag`、`explicit-fallback`、`missing-dag-evidence` 或 `micro-or-small`。
|
|
147
147
|
- 无 DAG evidence 且无 `dagFallbackReason` 的 medium/large closeout 须将其列为 remaining risk。
|
|
148
148
|
- `record-round --decision complete` 仅是 loop-state candidate;completion 仍须 shell verification、review verdict、success-criteria coverage。
|
|
@@ -220,7 +220,7 @@ Sidecar output 为 advisory。若须成为 task evidence,通过 loop-agent run
|
|
|
220
220
|
- `harness.json.models.<step>` 下 historical step models 是 legacy metadata,不是新 DAG work 的 routing。
|
|
221
221
|
- `pi-prompt` / `cursor-prompt` models 来自 CLI flags 或 runtime defaults,须 per intervention 选择。
|
|
222
222
|
- Pi DAG nodes 默认 read-only planning/review/diagnosis;声明 `toolProfile: "write"` 时是 bounded writers,须有 explicit write scope。
|
|
223
|
-
-
|
|
223
|
+
- 受治理 writer 固定为 `implement-pi` / `repair-pi`,须有 explicit write scope;`cursor-prompt` 不进入 DAG schema。
|
|
224
224
|
- Shell nodes 产出 deterministic verification facts 与 gates。
|
|
225
225
|
|
|
226
226
|
## Artifacts and facts boundary
|