@menghuan1918/dsh-apollo 0.3.0 → 0.4.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/README.md +44 -23
- package/cordis.patch.yml +3 -3
- package/docs/DEVELOPMENT.md +88 -35
- package/package.json +4 -3
- package/presets/eng/NOTICE +3 -2
- package/presets/eng/plugins/exit-guard/index.js +6 -6
- package/presets/eng/plugins/mode-instructions/index.js +111 -35
- package/presets/eng/plugins/wait-subagent/index.js +9 -4
- package/presets/eng-ptc.patch.yml +186 -0
- package/presets/eng.patch.yml +14 -17
- package/skills/brainstorming/SKILL.md +54 -54
- package/skills/brainstorming/spec-document-reviewer-prompt.md +6 -6
- package/skills/code-review/SKILL.md +1 -1
- package/skills/dev/SKILL.md +16 -18
- package/skills/exec/SKILL.md +56 -69
- package/skills/handoff/SKILL.md +14 -14
- package/skills/main-agent-driven-development/SKILL.md +33 -33
- package/src/cli-adapter.js +1 -1
- package/src/client.js +329 -16
- package/src/config.js +30 -4
- package/src/panel.js +406 -14
- package/src/subagents.js +3 -4
- package/presets/eng-noask/NOTICE +0 -2
- package/presets/eng-noask/plugins/exit-guard/index.js +0 -111
- package/presets/eng-noask/plugins/exit-guard/package.json +0 -7
- package/presets/eng-noask/plugins/mode-instructions/index.js +0 -48
- package/presets/eng-noask/plugins/mode-instructions/package.json +0 -7
- package/presets/eng-noask/plugins/wait-subagent/index.js +0 -228
- package/presets/eng-noask/plugins/wait-subagent/package.json +0 -7
- package/presets/eng-noask.patch.yml +0 -341
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Spec Document Reviewer Prompt Template
|
|
2
2
|
|
|
3
|
-
Use this template when dispatching a spec document reviewer via the `subagent` tool (fresh read-only child, quality tier
|
|
3
|
+
Use this template when dispatching a spec document reviewer via the `subagent` tool (fresh read-only child, quality tier).
|
|
4
4
|
|
|
5
|
-
**Purpose:** Verify a
|
|
5
|
+
**Purpose:** Verify a master Spec or sub-Spec is complete, consistent, and ready for implementation.
|
|
6
6
|
|
|
7
7
|
**Dispatch after:** Spec document is written to the workspace's spec directory (`.workspace-docs/specs/` where that convention exists, otherwise the target repo's own specs directory).
|
|
8
8
|
|
|
@@ -11,8 +11,8 @@ subagent(
|
|
|
11
11
|
prompt="You are a spec document reviewer. Verify this spec is complete and ready for implementation.
|
|
12
12
|
|
|
13
13
|
**Spec to review:** [SPEC_FILE_PATH]
|
|
14
|
-
**Spec type:** [
|
|
15
|
-
**
|
|
14
|
+
**Spec type:** [master | sub]
|
|
15
|
+
**Master Spec, if this is a sub-Spec:** [MASTER_SPEC_FILE_PATH or N/A]
|
|
16
16
|
|
|
17
17
|
## What to Check
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ subagent(
|
|
|
22
22
|
| Completeness | TODOs, placeholders, "TBD", incomplete sections |
|
|
23
23
|
| Consistency | Internal contradictions, conflicting requirements |
|
|
24
24
|
| Clarity | Requirements ambiguous enough to cause someone to build the wrong thing |
|
|
25
|
-
| Scope |
|
|
25
|
+
| Scope | Master Specs decompose large work into sub-Specs; sub-Specs are independently implementable and do not try to implement the whole master Spec |
|
|
26
26
|
| YAGNI | Unrequested features, over-engineering |
|
|
27
27
|
|
|
28
28
|
## Calibration
|
|
@@ -32,7 +32,7 @@ subagent(
|
|
|
32
32
|
interpreted two different ways — those are issues. Minor wording improvements,
|
|
33
33
|
stylistic preferences, and "sections less detailed than others" are not.
|
|
34
34
|
|
|
35
|
-
Approve unless there are serious gaps that would lead to a flawed implementation. Do not reject a
|
|
35
|
+
Approve unless there are serious gaps that would lead to a flawed implementation. Do not reject a master Spec merely because it covers multiple subsystems; reject it only if it lacks clear sub-Specs, ordering, boundaries, or shared contracts. Do not reject a sub-Spec merely because it does not implement the whole master Spec.
|
|
36
36
|
|
|
37
37
|
## Output Format
|
|
38
38
|
|
|
@@ -57,7 +57,7 @@ Each smell reads *what it is* → *how to fix*; match it against the diff:
|
|
|
57
57
|
|
|
58
58
|
### 4. Spawn both sub-agents in parallel
|
|
59
59
|
|
|
60
|
-
Send both `subagent` calls in a single message — each a fresh
|
|
60
|
+
Send both `subagent` calls in a single message — each a fresh quality-tier child with a fully self-contained prompt; children see none of this conversation.
|
|
61
61
|
|
|
62
62
|
**Standards sub-agent prompt** — include:
|
|
63
63
|
|
package/skills/dev/SKILL.md
CHANGED
|
@@ -1,43 +1,41 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dev
|
|
3
|
-
description: "DSH
|
|
3
|
+
description: "Node contract for the DSH execution backend: prompt requirements, report formats, and failure semantics for implementation and review nodes."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Built-in development backend (node contracts)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
This skill defines the execution backend's two node types. Wave orchestration (worktrees, merging, cleanup, review-loop scheduling) belongs to `/exec`; this skill must not create, merge, or delete worktrees. Subagents have no independent working directory and cannot see the orchestration session: every node input must come with the prompt (absolute worktree path, Spec path, shared contracts, verification commands), with bash always using `workdir` and file tools always using absolute paths.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Implementation node (develop)
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
One brand-new subagent (quality tier) handles exactly one sub-Spec, following `main-agent-driven-development` in prebuilt-worktree mode (in an `/exec` wave, skip its internal review step — the review loop is run by `/exec`, and nodes do not dispatch reviewers themselves).
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
报告 schema(结构化输出):
|
|
14
|
+
Report format (JSON code block at the end of the closing message):
|
|
17
15
|
|
|
18
16
|
```js
|
|
19
17
|
{
|
|
20
18
|
status: 'complete' | 'blocked',
|
|
21
|
-
commit: '
|
|
22
|
-
verification: '
|
|
23
|
-
summary: '
|
|
24
|
-
blocker: '<status=blocked
|
|
19
|
+
commit: '<final commit SHA>',
|
|
20
|
+
verification: '<verification commands run this round and their results>',
|
|
21
|
+
summary: '<implementation summary for the reviewer and orchestrator>',
|
|
22
|
+
blocker: '<required when status=blocked>'
|
|
25
23
|
}
|
|
26
24
|
```
|
|
27
25
|
|
|
28
|
-
##
|
|
26
|
+
## Review node (review-only)
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
A brand-new read-only subagent (quality tier). The prompt supplies: absolute worktree path, diff range, Spec path, implementation summary, and verification already run. Four-state verdict format (JSON code block at the end of the closing message):
|
|
31
29
|
|
|
32
30
|
```js
|
|
33
31
|
{
|
|
34
32
|
status: 'APPROVED' | 'APPROVED_WITH_NOTES' | 'CHANGES_REQUIRED' | 'BLOCKED',
|
|
35
|
-
findings: ['
|
|
33
|
+
findings: ['<issue, with file and line number>']
|
|
36
34
|
}
|
|
37
35
|
```
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
Serious correctness errors, Spec gaps, integration risks, security issues, or missing verification must yield `CHANGES_REQUIRED`. Do not edit, commit, or merge.
|
|
40
38
|
|
|
41
|
-
##
|
|
39
|
+
## Failure semantics
|
|
42
40
|
|
|
43
|
-
|
|
41
|
+
A subagent failure (error / empty return) = `node-failed`; `blocked`, timeouts, partial replies, or uncommitted results never count as complete. The caller decides whether to redispatch, or to continue via `send_message` only when unblocking the same sub-Spec. Never reuse a node for another sub-Spec.
|
package/skills/exec/SKILL.md
CHANGED
|
@@ -1,91 +1,78 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: exec
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use when the user invokes /exec with an approved master Spec. Orchestrates per-Spec worktrees, wave-parallel subagent execution, merging, verification, and final review."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
##
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- `.worktrees/`
|
|
15
|
-
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
1.
|
|
19
|
-
2.
|
|
20
|
-
3.
|
|
21
|
-
|
|
22
|
-
##
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
let verdict = await agent(reviewPrompt(s, impl), { label: `${s.id}-cr-1`, schema: verdictSchema, ...quality })
|
|
42
|
-
let round = 1
|
|
43
|
-
while (verdict && verdict.status === 'CHANGES_REQUIRED' && round < 5) {
|
|
44
|
-
impl = await agent(fixPrompt(s, impl, verdict), { label: `${s.id}-fix-${round}`, schema: implSchema, ...quality })
|
|
45
|
-
if (!impl || impl.status !== 'complete') return { spec: s.id, status: 'fix-failed', round }
|
|
46
|
-
round += 1
|
|
47
|
-
verdict = await agent(reviewPrompt(s, impl), { label: `${s.id}-cr-${round}`, schema: verdictSchema, ...quality })
|
|
48
|
-
}
|
|
49
|
-
return { spec: s.id, status: verdict ? verdict.status : 'review-failed', rounds: round, impl, verdict }
|
|
50
|
-
}))
|
|
51
|
-
```
|
|
6
|
+
# Execute multi-Spec tasks
|
|
7
|
+
|
|
8
|
+
Run approved sub-Specs in isolated worktrees under `.worktrees/` in the target repo. The main workspace is always the merge target; orchestration state lives only in the current session context.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
- The master Spec indexes at least two sub-Specs.
|
|
13
|
+
- Confirm a single target repo; the main workspace is on a named branch and its working tree is clean.
|
|
14
|
+
- `.worktrees/` is covered by the target repo's `.gitignore`; if not, ask the user to add it first.
|
|
15
|
+
|
|
16
|
+
## Execution
|
|
17
|
+
|
|
18
|
+
1. Read the master Spec and all sub-Specs; confirm shared contracts, dependency DAG, and verification commands.
|
|
19
|
+
2. Build the task list by dependency wave.
|
|
20
|
+
3. Per wave: create a branch from the main workspace HEAD, create a worktree at `<repo>/.worktrees/exec-<task>/<subtask>`, then dispatch the whole wave of nodes. Create the next wave's worktrees only after every prior wave has merged.
|
|
21
|
+
|
|
22
|
+
## Wave execution: subagent + wait_subagent
|
|
23
|
+
|
|
24
|
+
The main agent orchestrates each wave; node contracts (prompt elements, report format, failure semantics) are in the `dev` skill.
|
|
25
|
+
|
|
26
|
+
1. **Dispatch**: in a single message, call `subagent` once per sub-Spec in this wave (quality tier), and record "Spec → subagent id". Implementation-node prompt template:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
You work in the isolated worktree <worktree absolute path>: always run bash with workdir=<worktree>, and use absolute paths for file tools.
|
|
30
|
+
Follow the main-agent-driven-development skill in prebuilt-worktree mode (skip its internal review step; the review loop is run by /exec).
|
|
31
|
+
Implement only <sub-Spec path> and obey the shared contracts: <contracts>. Run verification: <verification command>.
|
|
32
|
+
After committing, report in the dev skill's implementation-node format. Do not merge or delete the worktree; if blocked, set status=blocked and fill in blocker.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
2. **Collect**: pass every id in this wave to `wait_subagent` in one call; reports arrive with the settlement notice. A Spec with a missing report, `blocked`, or no commit is recorded as `node-failed` and does not affect the other Specs in the wave.
|
|
36
|
+
3. **Review loop** (each completed Spec advances independently; batches may be dispatched in parallel):
|
|
37
|
+
- Dispatch a brand-new read-only reviewer (quality tier): `Read-only review of the full diff of worktree <worktree> against the baseline (always run bash with workdir=<worktree>). Spec: <path>. Implementation summary: <summary>. Verification already run: <verification>. List issues by severity, each with file and line number; judge with the dev skill's four-state format. Do not edit, commit, or merge.`
|
|
38
|
+
- `CHANGES_REQUIRED` → send the findings to the original implementation subagent with `send_message` (preserving its context), and require it to fix each real issue, explain false positives, rerun verification, commit, and report again; then `wait_subagent` and dispatch a brand-new reviewer.
|
|
39
|
+
- At most 5 rounds; if still failing, record `review-exhausted`.
|
|
40
|
+
4. Only Specs judged `APPROVED` / `APPROVED_WITH_NOTES` proceed to merge.
|
|
52
41
|
|
|
53
|
-
|
|
42
|
+
Key points:
|
|
54
43
|
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
- 调用前台阻塞至整波结束,波内无人工交互;节点的疑问一律按 blocked 上报,由主线程处置。
|
|
59
|
-
- 返回值是结构化波次报告:只有 `status` 为 `APPROVED` / `APPROVED_WITH_NOTES` 的 Spec 进入合并。
|
|
44
|
+
- Every review round uses a brand-new subagent; fixes reuse the original implementation subagent — never start another implementation node for the same Spec.
|
|
45
|
+
- Report any node question as blocked for the main agent to handle; do not ask the user within a wave.
|
|
46
|
+
- In PTC mode, a whole wave's dispatch and collection can be done in one `run_code`.
|
|
60
47
|
|
|
61
|
-
##
|
|
48
|
+
## Merge
|
|
62
49
|
|
|
63
|
-
|
|
50
|
+
For each completed node: confirm it is committed and verification passed → check the changed files for out-of-scope edits → merge into the main workspace → verify after merging → delete the worktree and sub-branch.
|
|
64
51
|
|
|
65
|
-
|
|
52
|
+
Small, well-defined conflicts are resolved directly by the main agent. For complex conflicts, use a new fix worktree under `.worktrees/` and a development node. Never merge failed or blocked nodes.
|
|
66
53
|
|
|
67
|
-
##
|
|
54
|
+
## Final review
|
|
68
55
|
|
|
69
|
-
|
|
56
|
+
Once all sub-Specs are merged, run the full integration verification, then dispatch a brand-new read-only reviewer subagent (quality tier) to review the whole integrated result:
|
|
70
57
|
|
|
71
58
|
```
|
|
72
59
|
subagent(
|
|
73
|
-
prompt="
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
60
|
+
prompt="Read-only review of the <base>..HEAD diff in <workspace> (always run bash with workdir=<workspace>).
|
|
61
|
+
Master Spec: <path> | all sub-Specs | shared contracts | changed files | implementation summary | verification results.
|
|
62
|
+
List issues by severity, each with file and line number.
|
|
63
|
+
Return APPROVED / APPROVED_WITH_NOTES / CHANGES_REQUIRED / BLOCKED. Do not edit, commit, or merge."
|
|
77
64
|
)
|
|
78
65
|
```
|
|
79
66
|
|
|
80
|
-
|
|
67
|
+
Wait with `wait_subagent`. On `CHANGES_REQUIRED` there is no need to ask the user — the main agent classifies and fixes all real bugs directly, and briefly explains false positives and existing behavior in context; after fixing, verify again and dispatch a brand-new reviewer for re-review. If serious or blocking issues remain after a soft cap of 3 rounds, stop the fix loop and truthfully report the remaining issues to the user.
|
|
81
68
|
|
|
82
|
-
##
|
|
69
|
+
## Wrap-up
|
|
83
70
|
|
|
84
|
-
|
|
71
|
+
Run the full verification, check the Specs, report branches, commits, verification results, and open issues, and ask the user what to do next. Do not create a PR or delete branches without the user's choice.
|
|
85
72
|
|
|
86
73
|
## KISS
|
|
87
74
|
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
75
|
+
- One sub-Spec, one worktree, one development node.
|
|
76
|
+
- The main agent holds repo topology (branches/worktrees/merges/cleanup) and in-wave scheduling; implementation and review go to subagents.
|
|
77
|
+
- State lives only in session context; add no integration branch, scheduler scripts, or state files.
|
|
78
|
+
- Completion notices arrive automatically; wait only when you need results to proceed. Never poll with `sleep`.
|
package/skills/handoff/SKILL.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: handoff
|
|
3
|
-
description:
|
|
4
|
-
argument-hint: "
|
|
3
|
+
description: Compress the current conversation into a handoff document for a fresh agent to continue from.
|
|
4
|
+
argument-hint: "What will the next session be used for?"
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Compress the current conversation into a handoff document, so a brand-new agent can pick up the work without re-reading the parent session.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Storage and reuse
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
12
|
+
- **Rewrite if one exists**: if a handoff document is already in the session context (written earlier in this session, or injected when the session started), rewrite that file in full; do not create a new one.
|
|
13
|
+
- **Otherwise create one**: when the workspace has `.workspace-docs/`, write to `.workspace-docs/notes/<repo-or-topic>/` — a handoff is essentially a note; otherwise write to the target repo's existing docs directory. Prefix the file name with the date and follow the naming style already used in that directory.
|
|
14
|
+
- When writing under `.workspace-docs/`, new files carry an OKF header (`type: Note` plus `title`/`description`/`tags`/`status`/`repos`), and are not registered in `index.md`; commit/push follows that repo's existing discipline. Where the target repo has no such convention, use its existing doc format.
|
|
15
|
+
- If neither location exists, fall back to the OS temp directory.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Content requirements
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
19
|
+
- Include a "Suggested skills" section pointing the receiving agent at the skills it should invoke.
|
|
20
|
+
- Do not restate content already on disk (spec, plan, ADR, issue, commit, diff); give paths or URLs only.
|
|
21
|
+
- Record only objective facts and verification evidence; no self-justifying narrative.
|
|
22
|
+
- Redact sensitive content such as API keys, passwords, and personal identity information.
|
|
23
|
+
- When the user invokes it with an argument, that argument is the next session's focus; trim the document accordingly.
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: main-agent-driven-development
|
|
3
|
-
description: "
|
|
3
|
+
description: "Use only when the user or an orchestration skill explicitly invokes /main-agent-driven-development to complete a well-bounded implementation task."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Main-agent-driven development
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The current agent session implements a well-bounded Spec directly. The outer `/exec` orchestrator owns the worktree and merge lifecycle.
|
|
9
9
|
|
|
10
|
-
## Worktree
|
|
10
|
+
## Worktree modes
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Choose exactly one:
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
14
|
+
- **Prebuilt mode** — when the caller already provided an isolated worktree and owns its lifecycle, use it directly; do not create, merge, or delete worktrees.
|
|
15
|
+
- **Standalone mode** — otherwise, identify the target repo, require the baseline to be on a named branch, record the starting SHA, and create a worktree under the repo's `.worktrees/`.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
All operations must happen inside the chosen worktree. After isolation, do not edit the original checkout.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Flow
|
|
20
20
|
|
|
21
|
-
1.
|
|
22
|
-
2.
|
|
23
|
-
3.
|
|
24
|
-
4.
|
|
25
|
-
5.
|
|
26
|
-
6.
|
|
27
|
-
7.
|
|
28
|
-
8.
|
|
29
|
-
9.
|
|
30
|
-
10.
|
|
21
|
+
1. Read the assigned Spec and the relevant repo instructions.
|
|
22
|
+
2. Confirm task boundaries, dependencies, acceptance criteria, and required verification. Ask questions only when a missing decision truly blocks implementation.
|
|
23
|
+
3. Initialize the task list from the Spec.
|
|
24
|
+
4. Project setup + baseline verification. Report first if the baseline fails; continue only when the failure is clearly unrelated and documented.
|
|
25
|
+
5. Implement directly, limited to the Spec's scope. Follow the `tdd` skill (bundled in this package): write a failing test first, then the minimal implementation.
|
|
26
|
+
6. After each logical step, run focused verification, self-review the diff, and commit when it is complete. Verification standard: run the command this round and confirm the output; never replace it with "it should pass".
|
|
27
|
+
7. After implementation, run all required verification.
|
|
28
|
+
8. When verification fails or review finds a bug, follow the `diagnosing-bugs` skill (bundled in this package): build a feedback loop to find the root cause first, then fix.
|
|
29
|
+
9. Run the internal review loop (see below). Exception: when acting as an implementation node in an `/exec` wave, **skip this step** — the review loop is run by `/exec`, and the node only implements, verifies, commits, and reports.
|
|
30
|
+
10. Commit all approved fixes and report to the caller.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Keep it KISS. Prefer reusing existing patterns, small and complete changes, and only the targeted refactoring the Spec requires.
|
|
33
33
|
|
|
34
|
-
##
|
|
34
|
+
## Internal review loop
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
After full verification, dispatch exactly one brand-new read-only reviewer subagent (quality tier):
|
|
37
37
|
|
|
38
38
|
```
|
|
39
39
|
subagent(
|
|
@@ -45,20 +45,20 @@ subagent(
|
|
|
45
45
|
)
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Require file and line numbers, and one status: `APPROVED` / `APPROVED_WITH_NOTES` / `CHANGES_REQUIRED` / `BLOCKED`.
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Wait for the review with `wait_subagent`. Once results arrive, fix all necessary correctness errors, Spec gaps, security issues, integration risks, and verification gaps directly — no need to ask the user. After verifying and committing the fixes, dispatch a brand-new reviewer with `subagent` again. Repeat until `APPROVED` or only non-blocking suggestions remain.
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Never self-approve, and never reuse an old reviewer.
|
|
53
53
|
|
|
54
|
-
##
|
|
54
|
+
## Completion contract
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
Before reporting completion, all of the following must hold:
|
|
57
57
|
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
58
|
+
- All assigned acceptance criteria are implemented
|
|
59
|
+
- Required verification ran and passed this round (backed by command output)
|
|
60
|
+
- No uncommitted implementation changes
|
|
61
|
+
- Internal review passed with no required fixes
|
|
62
|
+
- The final commit SHA is available
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
Report blockers truthfully. Do not merge on your own; the caller owns integration and cleanup.
|
package/src/cli-adapter.js
CHANGED
|
@@ -16,7 +16,7 @@ export function enabledIn(config, agent) {
|
|
|
16
16
|
const projections = agent?.ctx?.get?.('sessionProjections')
|
|
17
17
|
if (projections) preset = projections.stateOf(agent.session, 'agentPreset') ?? preset
|
|
18
18
|
} catch { /* Compositions without the optional preset registry use the header. */ }
|
|
19
|
-
return scope.global || (scope.eng && ['eng', 'eng-
|
|
19
|
+
return scope.global || (scope.eng && ['eng', 'eng-ptc'].includes(preset))
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/** Exact checks are repeated before every CLI turn, including cold resume. */
|