peaks-loop 4.0.0-beta.10 → 4.0.0-beta.11
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/CHANGELOG.md +18 -11
- package/dist/cli/cli-helpers.d.ts +0 -5
- package/dist/cli/cli-helpers.js +0 -24
- package/dist/cli/commands/audit-commands.js +1 -1
- package/dist/cli/commands/capability-worker-config-sc-commands.js +0 -2
- package/dist/cli/commands/code-commands.js +1 -1
- package/dist/cli/commands/code-review-commands.js +1 -1
- package/dist/cli/commands/config-commands.js +3 -74
- package/dist/cli/commands/core/skill-command.js +5 -2
- package/dist/cli/commands/dispatch-commands.js +14 -0
- package/dist/cli/commands/ecc-commands.d.ts +30 -0
- package/dist/cli/commands/ecc-commands.js +119 -0
- package/dist/cli/commands/perf-audit-commands.js +1 -1
- package/dist/cli/commands/prd-commands.js +3 -1
- package/dist/cli/commands/qa-commands.js +1 -1
- package/dist/cli/commands/sc-commands.js +3 -1
- package/dist/cli/commands/security-audit-commands.js +1 -1
- package/dist/cli/commands/skill-search-commands.js +3 -0
- package/dist/cli/commands/upgrade-commands.js +1 -1
- package/dist/cli/program.js +12 -4
- package/dist/services/agent/ecc-cache-service.d.ts +97 -0
- package/dist/services/agent/ecc-cache-service.js +491 -0
- package/dist/services/audit/static-service.d.ts +32 -25
- package/dist/services/audit/static-service.js +30 -109
- package/dist/services/config/config-service.d.ts +1 -12
- package/dist/services/config/config-service.js +3 -72
- package/dist/services/config/config-types.d.ts +2 -4
- package/dist/services/context/context-schema.d.ts +2 -2
- package/dist/services/job/job-types.d.ts +3 -3
- package/dist/services/log/retention.d.ts +16 -0
- package/dist/services/log/retention.js +17 -0
- package/dist/services/migrate-skill-name/schema.d.ts +2 -2
- package/dist/services/rd/rd-service.js +10 -11
- package/dist/services/rd/types.d.ts +2 -2
- package/dist/services/recommendations/capability-seed-items.js +0 -1
- package/dist/services/recommendations/capability-seed-mappings.js +0 -1
- package/dist/services/recommendations/capability-seed-sources.js +0 -1
- package/dist/services/skill/skill-search-service.d.ts +5 -0
- package/dist/services/skill/skill-search-service.js +6 -2
- package/dist/services/skills/skill-registry.d.ts +1 -0
- package/dist/services/skills/skill-registry.js +4 -2
- package/dist/services/workflow/workflow-router-service.js +7 -7
- package/dist/shared/version.d.ts +1 -1
- package/dist/shared/version.js +1 -1
- package/package.json +1 -1
- package/skills/bee/peaks-perf-audit/SKILL.md +1 -0
- package/skills/bee/peaks-rd/SKILL.md +1 -24
- package/skills/bee/peaks-reviewer/SKILL.md +1 -0
- package/skills/bee/peaks-security-audit/SKILL.md +1 -0
- package/skills/peaks-code/SKILL.md +1 -99
- package/skills/peaks-code/references/startup-sequence.md +110 -0
- package/skills/peaks-doctor/SKILL.md +1 -1
- package/skills/peaks-ide/SKILL.md +1 -1
- package/dist/cli/commands/agent-commands.d.ts +0 -20
- package/dist/cli/commands/agent-commands.js +0 -48
- package/dist/cli/commands/worker-commands.d.ts +0 -3
- package/dist/cli/commands/worker-commands.js +0 -52
- package/dist/services/agent/ecc-agent-service.d.ts +0 -47
- package/dist/services/agent/ecc-agent-service.js +0 -143
- package/dist/services/config/provider-service.d.ts +0 -48
- package/dist/services/config/provider-service.js +0 -143
- package/dist/services/providers/minimax-provider-service.d.ts +0 -24
- package/dist/services/providers/minimax-provider-service.js +0 -143
- package/dist/services/providers/minimax-worker-service.d.ts +0 -21
- package/dist/services/providers/minimax-worker-service.js +0 -83
|
@@ -176,13 +176,13 @@ export function createWorkflowRouterPlan(request) {
|
|
|
176
176
|
// "enabled" (matches the pre-2.0.1 implicit default).
|
|
177
177
|
const economyMode = request.config?.economyMode ?? true;
|
|
178
178
|
const swarmMode = request.config?.swarmMode ?? true;
|
|
179
|
-
// Pre-2.0.1 DEFAULT_CONFIG carried an implicit
|
|
180
|
-
//
|
|
181
|
-
//
|
|
182
|
-
//
|
|
183
|
-
//
|
|
184
|
-
//
|
|
185
|
-
const effectiveProviders = request.config?.providers ?? {
|
|
179
|
+
// Pre-2.0.1 DEFAULT_CONFIG carried an implicit provider for test fixtures
|
|
180
|
+
// that did not pass `config.providers`. The slim DEFAULT_CONFIG removed that
|
|
181
|
+
// field, so we re-supply it here only when the caller did not pass any
|
|
182
|
+
// providers at all. An explicit empty object (`config: { providers: {} }`)
|
|
183
|
+
// still surfaces the "must be configured" error from
|
|
184
|
+
// `getConfiguredExecutionModelId`.
|
|
185
|
+
const effectiveProviders = request.config?.providers ?? { anthropic: { model: 'claude-opus-4-7' } };
|
|
186
186
|
// Slice 2026-07-09 add-zcode-adapter (A.3): the strongest
|
|
187
187
|
// planner/reviewer model is now resolved via `getStrongestModelId`,
|
|
188
188
|
// which reads `config.model` (if present) or falls back to the
|
package/dist/shared/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "4.0.0-beta.
|
|
1
|
+
export declare const CLI_VERSION = "4.0.0-beta.11";
|
package/dist/shared/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "4.0.0-beta.
|
|
1
|
+
export const CLI_VERSION = "4.0.0-beta.11";
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-perf-audit
|
|
3
|
+
visibility: internal
|
|
3
4
|
description: Independent performance audit skill. Reads the immutable peaks-prd handoff + the project-level perf-template.md, performs a 6-dimension perf audit, and writes a structured envelope to `.peaks/_runtime/<sessionId>/audit/perf-<rid>.md`. Decoupled from peaks-rd 5-way fan-out per slice v2.12.0 (Group A, Tier 3). Use when the slice introduces CPU-bound hot loops, I/O throughput changes, memory allocation patterns, concurrency model changes, bundle size deltas, or cold-start costs.
|
|
4
5
|
metadata:
|
|
5
6
|
appliesTo: peaks-loop v2.12.0+
|
|
@@ -136,30 +136,7 @@ If any gate fails, return to development for fixes or hand off as blocked. Do no
|
|
|
136
136
|
|
|
137
137
|
## Parallel review fan-out (v2.12.0 3-way fanout — code-reviewer + qa-test-cases-writer + karpathy-reviewer)
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
> **v2.12.0 collapse (Group A):** the 5-way fan-out moved `security-reviewer` + `perf-baseline-reviewer` into standalone audit skills (`peaks-security-audit` + `peaks-perf-audit`). → `references/v2-12-fanout-collapse.md`.
|
|
142
|
-
|
|
143
|
-
> **v2.15.0+:** 技术决策 AI 据 prd 业务场景块自决,user 不参与;存量项目无 UT,改 A 前跑 `peaks impact scan`(G13);fork 场景 tech-doc 列上游基线+业务 patch 集(G11)。详见 `.peaks/memory/peaks-loop-user-role-and-tech-decision.md`。
|
|
144
|
-
|
|
145
|
-
> **Slice 2026-06-24-efficiency-4p-bundle / G4 (P1.3) — karpathy-skip policy authoritative.** Decision table at `src/services/rd/reviewer-dispatch-policy.ts` (`shouldDispatchKarpathy`, `reviewerListFor`). Pinned by `tests/unit/rd/karpathy-skip-on-config-docs-chore.test.ts`.
|
|
146
|
-
|
|
147
|
-
### Hard Karpathy-Gate (Slice 5/6)
|
|
148
|
-
|
|
149
|
-
The `karpathy-reviewer` sub-agent is a **hard gate** for `rd:qa-handoff`. Per `andrej-karpathy-skills:karpathy-guidelines` §1 Think Before Coding ("state your assumptions") + §3 Surgical Changes ("touch only what the user asked"), `peaks request transition --state qa-handoff` is BLOCKED by the CLI gate until `.peaks/_runtime/<sessionId>/rd/karpathy-review.md` exists with the `## Karpathy-Gate` header and at least one of the 4 guideline section markers. The file is enforced by the `KARPATHY_REVIEW` prerequisite in `src/services/artifacts/artifact-prerequisites.ts` (added in Slice 5). The escape hatch is `peaks request transition --allow-incomplete --confirm` (assisted mode). The companion `peaks scan karpathy` CLI is a structural scanner for the same file (`src/services/scan/karpathy-service.ts`); the semantic review is the sub-agent's job.
|
|
150
|
-
|
|
151
|
-
### Peaks-Loop Gate C — type-specific RD evidence
|
|
152
|
-
|
|
153
|
-
The CLI gate at `rd:qa-handoff` is the authoritative check. Missing any required file → DO NOT attempt the qa-handoff transition; CLI will reject with `PREREQUISITES_MISSING`.
|
|
154
|
-
|
|
155
|
-
| Request type | Required RD evidence |
|
|
156
|
-
|---|---|
|
|
157
|
-
| feature / refactor | `audit/security.md` + `audit/perf.md` + `rd/code-review.md` + `rd/karpathy-review.md` + `qa/test-cases/<rid>.md` + `prd/handoff.md` |
|
|
158
|
-
| bugfix | `audit/security.md` + `audit/perf.md` (perf-shaped only) + `rd/code-review.md` + `rd/karpathy-review.md` + `qa/test-cases/<rid>.md` + `prd/handoff.md` |
|
|
159
|
-
| config | `audit/security.md` |
|
|
160
|
-
| docs / chore | (no extra evidence required) |
|
|
161
|
-
|
|
162
|
-
→ see `references/rd-fanout-contracts.md` for the **3** sub-agents' contracts + hard prohibitions + aggregation + degradation. Pre-v2.12.0 `rd/{security-review,perf-baseline}.md` paths remain readable for the 1-minor-release back-compat window.
|
|
139
|
+
Full content extracted to **`references/parallel-review-fanout.md`** (3-way fan-out dispatch contract, when-to-fan-out rules, dispatch template, prereq gates). Read that file before issuing any 3-way fan-out.
|
|
163
140
|
|
|
164
141
|
## Refactor hard gates
|
|
165
142
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-reviewer
|
|
3
|
+
visibility: internal
|
|
3
4
|
description: Third-party independent code-review skill for Peaks. Use as a parallel reviewer to karpathy-reviewer when a workflow needs an out-of-band (non-RD-model) review pass to mitigate single-LLM self-dogfood blind spots. Emits a schema-validated ReviewerEnvelope (no free-form LLM JSON). v2.14.0 G4.
|
|
4
5
|
---
|
|
5
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-security-audit
|
|
3
|
+
visibility: internal
|
|
3
4
|
description: Independent security audit skill. Reads the immutable peaks-prd handoff + the project-level security-template.md, performs an OWASP Top-10 + 8-dimension threat model audit, and writes a structured envelope to `.peaks/_runtime/<sessionId>/audit/security-<rid>.md`. Decoupled from peaks-rd 5-way fan-out per slice v2.12.0 (Group A, Tier 2). Use when the slice introduces authn/authz, secrets, input validation, path/filesystem trust, SQL/NoSQL injection, XSS/content injection, dependency supply chain, or external API surface changes.
|
|
4
5
|
metadata:
|
|
5
6
|
appliesTo: peaks-loop v2.12.0+
|
|
@@ -46,105 +46,7 @@ This skill is the **primary surface**. The `peaks <cmd>` CLI is **auxiliary**
|
|
|
46
46
|
|
|
47
47
|
## Peaks-Loop Startup sequence (MANDATORY — execute in order)
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`peaks workspace consolidate` is the slice-011 umbrella primitive. `peaks session checkpoint` (context-overflow defense) and `peaks session resume` surface as Step 0.75 + Step N. See `references/cross-date-session-check.md`.
|
|
52
|
-
|
|
53
|
-
### Peaks-Loop Step 0.75: Resume from checkpoint (BLOCKING on same-day re-invocation)
|
|
54
|
-
|
|
55
|
-
When a NEW conversation opens on a session whose `lastActivity` is from today AND `.peaks/_runtime/<sessionId>/checkpoints/` has `*.json`, surface via `peaks session info --active --json` + `peaks session resume --from <path> --project <repo>`. Prompt via `AskUserQuestion` (resume / fresh); if "resume", prepend the block. Step 0.75 is no-op on precondition fail. See `references/checkpoint-resume.md`.
|
|
56
|
-
|
|
57
|
-
### Peaks-Loop Step N: Periodic checkpoint (auto-fire, no user action)
|
|
58
|
-
|
|
59
|
-
Proactive context-overflow defense. CLI: `peaks session checkpoint [--reason <r>] [...flags]`. Fire `--reason periodic` every 20 tool calls (G1 hard-coded), `--reason artifact-written` per PRD/RD/QA/TXT write. See `references/periodic-checkpoint.md` (otherwise `tests/unit/code/checkpoint-periodic-frequency.test.ts` fails).
|
|
60
|
-
|
|
61
|
-
### Peaks-Loop Step 0.6: Audit + Goal (NEW)
|
|
62
|
-
|
|
63
|
-
Invoke peaks-audit after need expressed; store approved goal at `.peaks/_runtime/<sessionId>/audit-goal/<rid>.json`. **All autonomous work requires approved goal.** → `references/audit-goal-gate.md`.
|
|
64
|
-
|
|
65
|
-
### Peaks-Loop Step N+1: Final Review (NEW)
|
|
66
|
-
|
|
67
|
-
After autonomous work (RD, QA, security, perf), invoke peaks-final-review for 4-dim evidence. All 4 pass → final delivery; else loop back. See `references/final-review-gate.md`.
|
|
68
|
-
|
|
69
|
-
### Peaks-Loop Step N+2: Main-session context monitor (D6 + slice 2026-07-02)
|
|
70
|
-
|
|
71
|
-
After every 4th tool call, probe via `peaks code context-now --project <repo> --json`. Thresholds: 50% / **0.85 pre-compact / 0.95 red-line** (v2.13.0). **In Job mode ≥ 0.85 is MANDATORY auto-compact** (`peaks session auto-compact --execute`). Pass `--enforce-job-mode` for single-rid. **≥ 0.95** red line: next Bash/Task fires `peaks session auto-compact-hook`. **Karpathy §4 exception**: compact red line keeps runner alive — zero-intervention wins; LLM MUST NOT ask user to run `/compact`. Honor `--in-flight-batch` (D6.e).
|
|
72
|
-
|
|
73
|
-
### Peaks-Loop Step 0: Anchor the workflow (MANDATORY FIRST ACTIONS — no bail-out)
|
|
74
|
-
|
|
75
|
-
Run `peaks workspace init` + `peaks skill presence:set peaks-code` BEFORE any analysis, role handoff, or mode-selection question. Even "分析下这个项目" / "看一下代码" / one-line questions anchor first.
|
|
76
|
-
|
|
77
|
-
→ see `references/anchoring-and-session-info.md` for the full Step 0 contract + session-conflict resolution.
|
|
78
|
-
|
|
79
|
-
#### Step 0 bypass — Claude Code [Fact-Forcing Gate] (slice 2.0.1-bug3)
|
|
80
|
-
|
|
81
|
-
`peaks workspace init` materializes `.claude/settings.local.json` (a PreToolUse hook allow-list for `.peaks/**` paths and `peaks <subcommand>` Bash) so the [Fact-Forcing Gate] does not block Step 0. Pass `--no-claude-hooks` to opt out.
|
|
82
|
-
|
|
83
|
-
→ see `references/anchoring-and-session-info.md` for the full bypass contract, recovery flow, and anti-bail-out rule.
|
|
84
|
-
|
|
85
|
-
### Peaks-Loop Step 0.7: Detect unfinished work and offer resume (BLOCKING on first invocation per session)
|
|
86
|
-
|
|
87
|
-
After Step 0, run the resume-detection probe; surface via `AskUserQuestion` if a slice is in flight. **v3.1.2 resume rule:** if `.peaks/_runtime/<sessionId>/job/<jid>/progress.json` exists, read FIRST and surface `Next: slice #N of M`. **v2.11.0 D7 override:** if user just `/compact`ed, run `peaks code post-compact-detect --project <repo> --json` FIRST; `shouldAutoResume: true` skips AskUserQuestion. → `references/resume-detection.md`.
|
|
88
|
-
|
|
89
|
-
### Peaks-Loop Step 0.55: 1.x → 2.0 detection (BLOCKING on first invocation per session, when the project is not on a 2.0 layout)
|
|
90
|
-
|
|
91
|
-
After Step 0.7 returns "fresh", run `peaks upgrade --detect-1x --project <root> --json`. If `isOneX: true`, surface `AskUserQuestion`. → `references/step-0-55-1x-detection.md`.
|
|
92
|
-
|
|
93
|
-
### Peaks-Loop Step 0.8 — Job 启动 (BLOCKING on LLM judgement — v3.1.1 patch + v3.1.2 mechanical gates)
|
|
94
|
-
|
|
95
|
-
> **CLI reality check (D-001 sediment, 2026-07-09):** The CLI surface has changed since this section was last verified. The actual command is **`peaks job init --job-id <jid> --slice-list <list> --main-loop-strategy <single|rotating> [--parallelism-hint <serial|llm-decides>] [--exit-policy <strict|best-effort>] [--project <repo>]`**. The legacy `peaks code detect-job --is-job/--suggested-job-id/--confidence` form described below is **no longer present** in 4.0.0-beta.6. If you find `--is-job` rejected, fall back to `peaks job init`.
|
|
96
|
-
|
|
97
|
-
The CLI is a **recorder + gate** for job-shape (the LLM judges). LLM calls `peaks job init --job-id <jid> --slice-list <list> --main-loop-strategy <single|rotating>` (with `--caller-id <id>` and `--project <repo>` in non-Claude-Code environments), which writes `.peaks/_runtime/<sessionId>/job/<jid>/state.json` and emits a `[job-event] {kind: job-started, jobId, total, strategy}` line. Downstream steps call `peaks job status --job-id <jid>` to read state.
|
|
98
|
-
|
|
99
|
-
**Hard rule (v3.1.1 red-line #10):** LLM MUST NOT skip the job-init call. If `peaks job status` reports `done: 0` and the slice work has begun, the LLM forgot to initialize — re-call `peaks job init` immediately.
|
|
100
|
-
|
|
101
|
-
> **D-003 sediment (2026-07-09):** The historical `JOB_SHAPE_NOT_DECIDED` exception thrown by `read-job-shape` is no longer wired in 4.0.0-beta.6. The current CLI uses `peaks job status` which reports a passive `done: 0` instead of throwing. Both behaviors enforce the same intent (no work may begin before init) but the failure mode is a soft warning rather than a hard exception. LLM should treat `done: 0` after Step 0.8 as a recoverable miss, not an unrecoverable error.
|
|
102
|
-
|
|
103
|
-
**v3.1.2 mechanical gates** (recorder-only was bypassed twice):
|
|
104
|
-
|
|
105
|
-
PreToolUse hook on `peaks code gate-step-08`; size-fear ban on `peaks code emit-handoff`; forced auto-compact at ≥ 0.85 in Job mode; on-disk slice progress via `peaks job checkpoint` (canonical reader `peaks job progress --job-id <jid>`). Full mechanics (judgement criteria, hook table, backup-regex rationale, hook wiring) at `references/step-0-8-gate.md`.
|
|
106
|
-
|
|
107
|
-
### Peaks-Loop Step 0.81 — per-slice 收尾
|
|
108
|
-
|
|
109
|
-
After commit: `peaks job checkpoint --slice-id <rid> --state done --commit-sha $(git rev-parse HEAD)` → `peaks job status` → loop (remaining>0 → Step 1; ==0 → Step 8/9/10/11; blocked → Step 0.85).
|
|
110
|
-
|
|
111
|
-
### Peaks-Loop Step 0.85 — slice 阻塞处理
|
|
112
|
-
|
|
113
|
-
Trigger: `repair-status` atCap=true, context-now red-line ≥5min, or `subagent-cleanup` fails twice. Action: `peaks job block --slice-id <rid> --reason "<reason>"` then STOP.
|
|
114
|
-
|
|
115
|
-
### Peaks-Loop Step 0.86 — main session rotation
|
|
116
|
-
|
|
117
|
-
Active in rotating mode; fires every `rotateEvery` slices or via `peaks job rotate-now`. Sequence: cycle-summary → checkpoint rotate-marker → `peaks session rotate` → resume via `peaks session resume --job-id <jid>`.
|
|
118
|
-
|
|
119
|
-
### Peaks-Loop Step 0.87 — sub-agent cleanup gate
|
|
120
|
-
|
|
121
|
-
After every `peaks sub-agent dispatch --batch-id <id>` inside a Job, BEFORE next slice checkpoint: `peaks job subagent-cleanup --job-id <jid> --batch-id <id> --force`. Non-zero → block.
|
|
122
|
-
|
|
123
|
-
→ see `references/job-loop.md` for state machine, visibility, rotation cadence, cross-day recovery, 9 red lines.
|
|
124
|
-
|
|
125
|
-
### Peaks-Loop Step 1: Mode selection
|
|
126
|
-
|
|
127
|
-
Use `AskUserQuestion` with `Full auto (Recommended)` first when user did not name a profile OR skill presence is stale (run `peaks skill presence:check-stale --project <path> --json` first; `stale: true` ⇒ re-ask). → `references/mode-selection.md`, `references/fast-mode.md`, `references/mode-selection-with-stale-presence.md`.
|
|
128
|
-
|
|
129
|
-
### Peaks-Loop Step 2: Re-set skill presence with the chosen mode
|
|
130
|
-
|
|
131
|
-
Re-run `peaks skill presence:set peaks-code --mode <mode-value> --gate startup`. Install statusline on first run (`peaks statusline install`). → `references/skill-presence-and-title.md`.
|
|
132
|
-
|
|
133
|
-
### Peaks-Loop Step 2.3: Load project memory (durable, LLM-authored memories)
|
|
134
|
-
|
|
135
|
-
Run `peaks project memories --project <repo> --json` to read decisions / conventions / modules / rules / lessons from `.peaks/memory`. → `references/project-memory-loading.md`.
|
|
136
|
-
|
|
137
|
-
### Peaks-Loop Step 2.5: Set session title
|
|
138
|
-
|
|
139
|
-
Extract a short title from the user's first request (8-20 Chinese chars or 4-10 English words). Run `peaks session title <sessionId> "<title>" --json`. Skip if a title is already set. → `references/skill-presence-and-title.md` (same file as Step 2). D-002: sid is positional, NOT `--session-id` flag (rejected with `error: unknown option`).
|
|
140
|
-
|
|
141
|
-
## Sub-agent session sharing (MANDATORY — one conversation = one sid)
|
|
142
|
-
|
|
143
|
-
When peaks-code dispatches a sub-agent (peaks-rd, peaks-qa, peaks-ui, peaks-txt, peaks-sc), the prompt MUST include the parent's sid. The sub-agent MUST NOT call `peaks workspace init` (would orphan the parent's binding).
|
|
144
|
-
|
|
145
|
-
## Boundaries
|
|
146
|
-
|
|
147
|
-
Peaks-Loop Code may identify scenarios, recommend profiles, coordinate role skills via artifacts, coordinate project memory extraction, request user confirmation at risk/commit boundaries. MUST NOT silently install hooks / create agents / enable MCP / modify Claude settings / create GitHub repos / bypass role-skill artifacts. → `references/boundaries.md`.
|
|
49
|
+
Full content extracted to **`references/startup-sequence.md`** (Steps 0 / 0.5-0.87 / 1 / 2 / 2.3 / 2.5 / N / N+1 / N+2 + sub-agent sharing + boundaries). Read that file in full at session start; the sequence is MANDATORY.
|
|
148
50
|
|
|
149
51
|
## CLI Drift Index (sediment 2026-07-09)
|
|
150
52
|
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: peaks-code-startup-sequence
|
|
3
|
+
description: peaks-code startup sequence Steps 0 / 0.5-0.87 / 1 / 2 / 2.3 / 2.5 / N / N+1 / N+2 — extracted from SKILL.md 2026-07-16 to keep SKILL.md under 25,000-byte cap
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Peaks-Loop Startup sequence (MANDATORY — execute in order)
|
|
7
|
+
|
|
8
|
+
> **Extracted from SKILL.md on 2026-07-16.** This file is the
|
|
9
|
+
> authoritative reference; SKILL.md points here with a 1-line pointer.
|
|
10
|
+
> Do not edit `SKILL.md` for content changes — edit this file instead.
|
|
11
|
+
|
|
12
|
+
### Peaks-Loop Slice 011 — workspace consolidate + session checkpoint/resume
|
|
13
|
+
|
|
14
|
+
`peaks workspace consolidate` is the slice-011 umbrella primitive. `peaks session checkpoint` (context-overflow defense) and `peaks session resume` surface as Step 0.75 + Step N. See `references/cross-date-session-check.md`.
|
|
15
|
+
|
|
16
|
+
### Peaks-Loop Step 0.75: Resume from checkpoint (BLOCKING on same-day re-invocation)
|
|
17
|
+
|
|
18
|
+
When a NEW conversation opens on a session whose `lastActivity` is from today AND `.peaks/_runtime/<sessionId>/checkpoints/` has `*.json`, surface via `peaks session info --active --json` + `peaks session resume --from <path> --project <repo>`. Prompt via `AskUserQuestion` (resume / fresh); if "resume", prepend the block. Step 0.75 is no-op on precondition fail. See `references/checkpoint-resume.md`.
|
|
19
|
+
|
|
20
|
+
### Peaks-Loop Step N: Periodic checkpoint (auto-fire, no user action)
|
|
21
|
+
|
|
22
|
+
Proactive context-overflow defense. CLI: `peaks session checkpoint [--reason <r>] [...flags]`. Fire `--reason periodic` every 20 tool calls (G1 hard-coded), `--reason artifact-written` per PRD/RD/QA/TXT write. See `references/periodic-checkpoint.md` (otherwise `tests/unit/code/checkpoint-periodic-frequency.test.ts` fails).
|
|
23
|
+
|
|
24
|
+
### Peaks-Loop Step 0.6: Audit + Goal (NEW)
|
|
25
|
+
|
|
26
|
+
Invoke peaks-audit after need expressed; store approved goal at `.peaks/_runtime/<sessionId>/audit-goal/<rid>.json`. **All autonomous work requires approved goal.** → `references/audit-goal-gate.md`.
|
|
27
|
+
|
|
28
|
+
### Peaks-Loop Step N+1: Final Review (NEW)
|
|
29
|
+
|
|
30
|
+
After autonomous work (RD, QA, security, perf), invoke peaks-final-review for 4-dim evidence. All 4 pass → final delivery; else loop back. See `references/final-review-gate.md`.
|
|
31
|
+
|
|
32
|
+
### Peaks-Loop Step N+2: Main-session context monitor (D6 + slice 2026-07-02)
|
|
33
|
+
|
|
34
|
+
After every 4th tool call, probe via `peaks code context-now --project <repo> --json`. Thresholds: 50% / **0.85 pre-compact / 0.95 red-line** (v2.13.0). **In Job mode ≥ 0.85 is MANDATORY auto-compact** (`peaks session auto-compact --execute`). Pass `--enforce-job-mode` for single-rid. **≥ 0.95** red line: next Bash/Task fires `peaks session auto-compact-hook`. **Karpathy §4 exception**: compact red line keeps runner alive — zero-intervention wins; LLM MUST NOT ask user to run `/compact`. Honor `--in-flight-batch` (D6.e).
|
|
35
|
+
|
|
36
|
+
### Peaks-Loop Step 0: Anchor the workflow (MANDATORY FIRST ACTIONS — no bail-out)
|
|
37
|
+
|
|
38
|
+
Run `peaks workspace init` + `peaks skill presence:set peaks-code` BEFORE any analysis, role handoff, or mode-selection question. Even "分析下这个项目" / "看一下代码" / one-line questions anchor first.
|
|
39
|
+
|
|
40
|
+
→ see `references/anchoring-and-session-info.md` for the full Step 0 contract + session-conflict resolution.
|
|
41
|
+
|
|
42
|
+
#### Step 0 bypass — Claude Code [Fact-Forcing Gate] (slice 2.0.1-bug3)
|
|
43
|
+
|
|
44
|
+
`peaks workspace init` materializes `.claude/settings.local.json` (a PreToolUse hook allow-list for `.peaks/**` paths and `peaks <subcommand>` Bash) so the [Fact-Forcing Gate] does not block Step 0. Pass `--no-claude-hooks` to opt out.
|
|
45
|
+
|
|
46
|
+
→ see `references/anchoring-and-session-info.md` for the full bypass contract, recovery flow, and anti-bail-out rule.
|
|
47
|
+
|
|
48
|
+
### Peaks-Loop Step 0.7: Detect unfinished work and offer resume (BLOCKING on first invocation per session)
|
|
49
|
+
|
|
50
|
+
After Step 0, run the resume-detection probe; surface via `AskUserQuestion` if a slice is in flight. **v3.1.2 resume rule:** if `.peaks/_runtime/<sessionId>/job/<jid>/progress.json` exists, read FIRST and surface `Next: slice #N of M`. **v2.11.0 D7 override:** if user just `/compact`ed, run `peaks code post-compact-detect --project <repo> --json` FIRST; `shouldAutoResume: true` skips AskUserQuestion. → `references/resume-detection.md`.
|
|
51
|
+
|
|
52
|
+
### Peaks-Loop Step 0.55: 1.x → 2.0 detection (BLOCKING on first invocation per session, when the project is not on a 2.0 layout)
|
|
53
|
+
|
|
54
|
+
After Step 0.7 returns "fresh", run `peaks upgrade --detect-1x --project <root> --json`. If `isOneX: true`, surface `AskUserQuestion`. → `references/step-0-55-1x-detection.md`.
|
|
55
|
+
|
|
56
|
+
### Peaks-Loop Step 0.8 — Job 启动 (BLOCKING on LLM judgement — v3.1.1 patch + v3.1.2 mechanical gates)
|
|
57
|
+
|
|
58
|
+
> **CLI reality check (D-001 sediment, 2026-07-09):** The CLI surface has changed since this section was last verified. The actual command is **`peaks job init --job-id <jid> --slice-list <list> --main-loop-strategy <single|rotating> [--parallelism-hint <serial|llm-decides>] [--exit-policy <strict|best-effort>] [--project <repo>]`**. The legacy `peaks code detect-job --is-job/--suggested-job-id/--confidence` form described below is **no longer present** in 4.0.0-beta.6. If you find `--is-job` rejected, fall back to `peaks job init`.
|
|
59
|
+
|
|
60
|
+
The CLI is a **recorder + gate** for job-shape (the LLM judges). LLM calls `peaks job init --job-id <jid> --slice-list <list> --main-loop-strategy <single|rotating>` (with `--caller-id <id>` and `--project <repo>` in non-Claude-Code environments), which writes `.peaks/_runtime/<sessionId>/job/<jid>/state.json` and emits a `[job-event] {kind: job-started, jobId, total, strategy}` line. Downstream steps call `peaks job status --job-id <jid>` to read state.
|
|
61
|
+
|
|
62
|
+
**Hard rule (v3.1.1 red-line #10):** LLM MUST NOT skip the job-init call. If `peaks job status` reports `done: 0` and the slice work has begun, the LLM forgot to initialize — re-call `peaks job init` immediately.
|
|
63
|
+
|
|
64
|
+
> **D-003 sediment (2026-07-09):** The historical `JOB_SHAPE_NOT_DECIDED` exception thrown by `read-job-shape` is no longer wired in 4.0.0-beta.6. The current CLI uses `peaks job status` which reports a passive `done: 0` instead of throwing. Both behaviors enforce the same intent (no work may begin before init) but the failure mode is a soft warning rather than a hard exception. LLM should treat `done: 0` after Step 0.8 as a recoverable miss, not an unrecoverable error.
|
|
65
|
+
|
|
66
|
+
**v3.1.2 mechanical gates** (recorder-only was bypassed twice):
|
|
67
|
+
|
|
68
|
+
PreToolUse hook on `peaks code gate-step-08`; size-fear ban on `peaks code emit-handoff`; forced auto-compact at ≥ 0.85 in Job mode; on-disk slice progress via `peaks job checkpoint` (canonical reader `peaks job progress --job-id <jid>`). Full mechanics (judgement criteria, hook table, backup-regex rationale, hook wiring) at `references/step-0-8-gate.md`.
|
|
69
|
+
|
|
70
|
+
### Peaks-Loop Step 0.81 — per-slice 收尾
|
|
71
|
+
|
|
72
|
+
After commit: `peaks job checkpoint --slice-id <rid> --state done --commit-sha $(git rev-parse HEAD)` → `peaks job status` → loop (remaining>0 → Step 1; ==0 → Step 8/9/10/11; blocked → Step 0.85).
|
|
73
|
+
|
|
74
|
+
### Peaks-Loop Step 0.85 — slice 阻塞处理
|
|
75
|
+
|
|
76
|
+
Trigger: `repair-status` atCap=true, context-now red-line ≥5min, or `subagent-cleanup` fails twice. Action: `peaks job block --slice-id <rid> --reason "<reason>"` then STOP.
|
|
77
|
+
|
|
78
|
+
### Peaks-Loop Step 0.86 — main session rotation
|
|
79
|
+
|
|
80
|
+
Active in rotating mode; fires every `rotateEvery` slices or via `peaks job rotate-now`. Sequence: cycle-summary → checkpoint rotate-marker → `peaks session rotate` → resume via `peaks session resume --job-id <jid>`.
|
|
81
|
+
|
|
82
|
+
### Peaks-Loop Step 0.87 — sub-agent cleanup gate
|
|
83
|
+
|
|
84
|
+
After every `peaks sub-agent dispatch --batch-id <id>` inside a Job, BEFORE next slice checkpoint: `peaks job subagent-cleanup --job-id <jid> --batch-id <id> --force`. Non-zero → block.
|
|
85
|
+
|
|
86
|
+
→ see `references/job-loop.md` for state machine, visibility, rotation cadence, cross-day recovery, 9 red lines.
|
|
87
|
+
|
|
88
|
+
### Peaks-Loop Step 1: Mode selection
|
|
89
|
+
|
|
90
|
+
Use `AskUserQuestion` with `Full auto (Recommended)` first when user did not name a profile OR skill presence is stale (run `peaks skill presence:check-stale --project <path> --json` first; `stale: true` ⇒ re-ask). → `references/mode-selection.md`, `references/fast-mode.md`, `references/mode-selection-with-stale-presence.md`.
|
|
91
|
+
|
|
92
|
+
### Peaks-Loop Step 2: Re-set skill presence with the chosen mode
|
|
93
|
+
|
|
94
|
+
Re-run `peaks skill presence:set peaks-code --mode <mode-value> --gate startup`. Install statusline on first run (`peaks statusline install`). → `references/skill-presence-and-title.md`.
|
|
95
|
+
|
|
96
|
+
### Peaks-Loop Step 2.3: Load project memory (durable, LLM-authored memories)
|
|
97
|
+
|
|
98
|
+
Run `peaks project memories --project <repo> --json` to read decisions / conventions / modules / rules / lessons from `.peaks/memory`. → `references/project-memory-loading.md`.
|
|
99
|
+
|
|
100
|
+
### Peaks-Loop Step 2.5: Set session title
|
|
101
|
+
|
|
102
|
+
Extract a short title from the user's first request (8-20 Chinese chars or 4-10 English words). Run `peaks session title <sessionId> "<title>" --json`. Skip if a title is already set. → `references/skill-presence-and-title.md` (same file as Step 2). D-002: sid is positional, NOT `--session-id` flag (rejected with `error: unknown option`).
|
|
103
|
+
|
|
104
|
+
## Sub-agent session sharing (MANDATORY — one conversation = one sid)
|
|
105
|
+
|
|
106
|
+
When peaks-code dispatches a sub-agent (peaks-rd, peaks-qa, peaks-ui, peaks-txt, peaks-sc), the prompt MUST include the parent's sid. The sub-agent MUST NOT call `peaks workspace init` (would orphan the parent's binding).
|
|
107
|
+
|
|
108
|
+
## Boundaries
|
|
109
|
+
|
|
110
|
+
Peaks-Loop Code may identify scenarios, recommend profiles, coordinate role skills via artifacts, coordinate project memory extraction, request user confirmation at risk/commit boundaries. MUST NOT silently install hooks / create agents / enable MCP / modify Claude settings / create GitHub repos / bypass role-skill artifacts. → `references/boundaries.md`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-doctor
|
|
3
3
|
description: Orchestrate peaks-loop's L3 doctor (peaks audit + peaks doctor + peaks openspec from-doctor) for project health. Use when the user asks for a project health check, doctor report, audit, or wants to convert doctor findings into OpenSpec change records. Coordinates the L2 audit framework + the L3.2 doctor + the L3.3 from-doctor proposal generator. Triggers on `/peaks-doctor`, "peaks doctor", "项目健康", "doctor report", "health check", "check the project", "audit my repo".
|
|
4
|
-
|
|
4
|
+
visibility: internal
|
|
5
5
|
---
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-ide
|
|
3
3
|
description: Orchestrate peaks-loop's IDE-aware behavior (hooks + statusline + handle) for a user's specific IDE. Detects the current state (which IDE the user is on, what peaks has already installed), plans the install / switch / status / uninstall actions, and invokes the existing peaks CLI primitives. Triggers on `/peaks-ide`, "set up peaks for my IDE", "switch peaks to Trae", "what did peaks install", "uninstall peaks hooks". Sits between the user and `peaks hooks install` / `peaks statusline install` / `peaks hook handle` — those are the CLI primitives; this skill is the user-facing surface.
|
|
4
|
-
|
|
4
|
+
visibility: internal
|
|
5
5
|
---
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* peaks agent * CLI surface — Slice: ECC 64 agents soft-optional
|
|
3
|
-
* integration (per spec §7.2 line 818).
|
|
4
|
-
*
|
|
5
|
-
* Registers the new `peaks agent` top-level command with two
|
|
6
|
-
* subcommands:
|
|
7
|
-
* - `peaks agent run <name> [--target <path>]` — shell out to
|
|
8
|
-
* `npx ecc agent run <name> --target <path> --json` when ECC
|
|
9
|
-
* is installed; soft-fail with the 4-option install prompt
|
|
10
|
-
* when it isn't.
|
|
11
|
-
* - `peaks agent list` — emit the 12
|
|
12
|
-
* canonical ECC agents (the wrapper hardcodes the
|
|
13
|
-
* most-used subset; the full 64-agent list is
|
|
14
|
-
* discoverable at runtime via `npx ecc agent list`).
|
|
15
|
-
*
|
|
16
|
-
* The wrapper service is `src/services/agent/ecc-agent-service.ts`.
|
|
17
|
-
*/
|
|
18
|
-
import { Command } from 'commander';
|
|
19
|
-
import { type ProgramIO } from '../cli-helpers.js';
|
|
20
|
-
export declare function registerAgentCommands(program: Command, io: ProgramIO): void;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { runEccAgent, validateEccAgent, CANONICAL_ECC_AGENTS, } from '../../services/agent/ecc-agent-service.js';
|
|
2
|
-
import { addJsonOption, getErrorMessage, printResult } from '../cli-helpers.js';
|
|
3
|
-
import { fail, ok } from '../../shared/result.js';
|
|
4
|
-
export function registerAgentCommands(program, io) {
|
|
5
|
-
const agent = program
|
|
6
|
-
.command('agent')
|
|
7
|
-
.description('Run an ECC agent (soft-optional per spec §7.2). 64 agents are npm-installable via npx ecc; peaks-loop shells out when ECC is installed and soft-fails with a 4-option install prompt when it is not. Native peaks-loop diagnostics still run via `peaks doctor scan`.');
|
|
8
|
-
addJsonOption(agent
|
|
9
|
-
.command('run <name>')
|
|
10
|
-
.description(`Run an ECC agent by name (e.g. 'security-reviewer', 'code-reviewer'). The canonical subprocess is \`npx ecc agent run <name> --target <path> --json\`.`)
|
|
11
|
-
.option('--target <path>', 'project root or file to analyze (default: cwd)')
|
|
12
|
-
.option('--enable', 'enable the ECC subprocess for this call (overrides default-off; soft-fails with the 4-option install prompt when ECC is missing)')).action(async (name, options) => {
|
|
13
|
-
const validationError = validateEccAgent(name);
|
|
14
|
-
if (validationError !== null) {
|
|
15
|
-
printResult(io, fail('agent.run', 'INVALID_AGENT_NAME', validationError, { agent: name }, [
|
|
16
|
-
'Use `peaks agent list` to see the canonical 12 agents',
|
|
17
|
-
]), options.json);
|
|
18
|
-
process.exitCode = 1;
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const projectRoot = options.target ?? process.cwd();
|
|
22
|
-
try {
|
|
23
|
-
const result = runEccAgent({
|
|
24
|
-
agent: name,
|
|
25
|
-
projectRoot,
|
|
26
|
-
enableAgent: options.enable === true,
|
|
27
|
-
});
|
|
28
|
-
const data = { ...result, projectRoot };
|
|
29
|
-
const nextActions = [];
|
|
30
|
-
if (result.reason === 'flag-enabled-but-ecc-missing') {
|
|
31
|
-
nextActions.push('ECC not installed. Pick one of the four options below:', ' a) Install: run `npx ecc --help` to install, then re-run `peaks agent run`.', ' b) Skip this run: use the peaks-loop native diagnostic via `peaks doctor scan`.', ' c) Skip forever: run `peaks preferences set agentShieldEnabled false`.', ' d) Learn more: see docs/superpowers/specs/2026-06-11-peaks-loop-l1-l2-l3-redesign.md §7.2.');
|
|
32
|
-
}
|
|
33
|
-
const envelope = ok('agent.run', data, [...result.warnings], nextActions);
|
|
34
|
-
printResult(io, envelope, options.json);
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
const message = getErrorMessage(error);
|
|
38
|
-
printResult(io, fail('agent.run', 'AGENT_RUN_FAILED', message, { agent: name, projectRoot, spawned: false }, [message]), options.json);
|
|
39
|
-
process.exitCode = 1;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
addJsonOption(agent
|
|
43
|
-
.command('list')
|
|
44
|
-
.description(`List the 12 canonical ECC agents (peaks-loop ships a static subset; the full 64 are ECC-discovered).`)).action((options) => {
|
|
45
|
-
const envelope = ok('agent.list', { agents: CANONICAL_ECC_AGENTS.map((a) => ({ name: a.name, description: a.description })) }, [], ['Run any agent with: `peaks agent run <name> --target <path>`']);
|
|
46
|
-
printResult(io, envelope, options.json);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { getMiniMaxProviderConfig } from '../../services/config/config-service.js';
|
|
2
|
-
import { runMiniMaxWorker } from '../../services/providers/minimax-worker-service.js';
|
|
3
|
-
import { fail, ok } from '../../shared/result.js';
|
|
4
|
-
import { addJsonOption, getErrorMessage, printResult, redactSensitiveErrorMessage, summarizeMiniMaxWorkerResult } from '../cli-helpers.js';
|
|
5
|
-
function addMiniMaxWorkerOptions(command) {
|
|
6
|
-
return addJsonOption(command
|
|
7
|
-
.description('Run a single MiniMax coding and unit-test execution worker')
|
|
8
|
-
.requiredOption('--session-id <id>', 'session identifier (the single-axis workspace binding after the change-id root removal)')
|
|
9
|
-
.requiredOption('--goal <goal>', 'execution goal')
|
|
10
|
-
.requiredOption('--coding-task <task>', 'coding execution task')
|
|
11
|
-
.requiredOption('--unit-test-task <task>', 'unit-test execution task')
|
|
12
|
-
.option('--model <model>', 'model name for the worker', 'MiniMax-M2.7')
|
|
13
|
-
.option('--confirm', 'confirm that worker inputs may be sent to the external MiniMax provider once and only return a review handoff', false));
|
|
14
|
-
}
|
|
15
|
-
async function runMiniMaxWorkerCommand(io, options) {
|
|
16
|
-
if (!options.confirm) {
|
|
17
|
-
printResult(io, fail('worker.minimax', 'CONFIRMATION_REQUIRED', 'This worker only runs with explicit confirmation because inputs may be sent to the external MiniMax provider', {}, ['Rerun with --confirm after removing secrets from worker inputs']), options.json);
|
|
18
|
-
process.exitCode = 1;
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const sessionId = options.sessionId.trim();
|
|
22
|
-
const goal = options.goal.trim();
|
|
23
|
-
const codingTask = options.codingTask.trim();
|
|
24
|
-
const unitTestTask = options.unitTestTask.trim();
|
|
25
|
-
if (!sessionId || !goal || !codingTask || !unitTestTask) {
|
|
26
|
-
printResult(io, fail('worker.minimax', 'INVALID_WORKER_INPUT', 'Worker inputs must be non-empty', {}, ['Provide non-empty values for --session-id, --goal, --coding-task, and --unit-test-task']), options.json);
|
|
27
|
-
process.exitCode = 1;
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
try {
|
|
31
|
-
const result = await runMiniMaxWorker(getMiniMaxProviderConfig(), { sessionId, goal, codingTask, unitTestTask, model: options.model });
|
|
32
|
-
const safeResult = summarizeMiniMaxWorkerResult(result);
|
|
33
|
-
if (!result.provider.configured) {
|
|
34
|
-
printResult(io, fail('worker.minimax', 'MINIMAX_PROVIDER_NOT_CONFIGURED', 'MiniMax provider requires baseUrl and apiKey in user config', safeResult, ['Run peaks config provider minimax set --base-url <url> and either MINIMAX_API_KEY']), options.json);
|
|
35
|
-
process.exitCode = 1;
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
printResult(io, result.provider.ok ? ok('worker.minimax', safeResult) : fail('worker.minimax', 'MINIMAX_WORKER_FAILED', 'MiniMax worker execution failed', safeResult, ['Check the MiniMax base URL, API key, and worker tasks']), options.json);
|
|
39
|
-
if (!result.provider.ok) {
|
|
40
|
-
process.exitCode = 1;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
catch (error) {
|
|
44
|
-
printResult(io, fail('worker.minimax', 'MINIMAX_WORKER_FAILED', redactSensitiveErrorMessage(getErrorMessage(error)), {}, ['Check the MiniMax base URL, API key, and worker tasks']), options.json);
|
|
45
|
-
process.exitCode = 1;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
export function registerWorkerCommands(program, io) {
|
|
49
|
-
const worker = program.command('worker').description('Run controlled execution workers');
|
|
50
|
-
addMiniMaxWorkerOptions(worker.command('minimax')).action(async (options) => runMiniMaxWorkerCommand(io, options));
|
|
51
|
-
addMiniMaxWorkerOptions(program.command('minimax-worker')).action(async (options) => runMiniMaxWorkerCommand(io, options));
|
|
52
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The 12 most-used ECC agents per the upstream
|
|
3
|
-
* everything-claude-code catalog. The full 64-agent list is
|
|
4
|
-
* available at runtime via `npx ecc agent list`; this static
|
|
5
|
-
* subset covers the common L3-doctor dispatch paths.
|
|
6
|
-
*/
|
|
7
|
-
export declare const CANONICAL_ECC_AGENTS: readonly {
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}[];
|
|
11
|
-
export interface EccAgentResult {
|
|
12
|
-
readonly agent: string;
|
|
13
|
-
readonly ok: boolean;
|
|
14
|
-
readonly stdout: string;
|
|
15
|
-
readonly stderr: string;
|
|
16
|
-
readonly durationMs: number;
|
|
17
|
-
/** Parsed JSON envelope if the subprocess exited 0 and stdout was JSON. */
|
|
18
|
-
readonly parsed?: unknown;
|
|
19
|
-
readonly error?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface EccAgentServiceInput {
|
|
22
|
-
readonly agent: string;
|
|
23
|
-
readonly projectRoot: string;
|
|
24
|
-
readonly enableAgent?: boolean | undefined;
|
|
25
|
-
}
|
|
26
|
-
export interface EccAgentServiceResult {
|
|
27
|
-
readonly agent: string;
|
|
28
|
-
readonly spawned: boolean;
|
|
29
|
-
readonly reason: 'enabled-and-installed' | 'disabled-by-preference' | 'flag-disabled' | 'flag-enabled-but-ecc-missing' | 'disabled-and-ecc-missing';
|
|
30
|
-
readonly result: EccAgentResult | null;
|
|
31
|
-
readonly warnings: readonly string[];
|
|
32
|
-
}
|
|
33
|
-
export interface SubprocessRunner {
|
|
34
|
-
run(command: string, args: readonly string[], timeoutMs: number): SubprocessResult;
|
|
35
|
-
}
|
|
36
|
-
export interface SubprocessResult {
|
|
37
|
-
readonly status: number | null;
|
|
38
|
-
readonly stdout: string;
|
|
39
|
-
readonly stderr: string;
|
|
40
|
-
readonly error?: Error;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Validate the agent name against the canonical ECC catalog.
|
|
44
|
-
* Returns `null` if the agent is known; an error message otherwise.
|
|
45
|
-
*/
|
|
46
|
-
export declare function validateEccAgent(agent: string): string | null;
|
|
47
|
-
export declare function runEccAgent(input: EccAgentServiceInput, runner?: SubprocessRunner): EccAgentServiceResult;
|