scene-capability-engine 3.3.16 → 3.3.18

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 CHANGED
@@ -7,6 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.3.18] - 2026-02-26
11
+
12
+ ### Added
13
+ - Curated `errorbook` command set for high-signal failure remediation knowledge:
14
+ - `sce errorbook record`
15
+ - `sce errorbook list`
16
+ - `sce errorbook show <id>`
17
+ - `sce errorbook find --query <text>`
18
+ - `sce errorbook promote <id>`
19
+ - `sce errorbook deprecate <id> --reason <text>`
20
+ - `sce errorbook requalify <id> --status <candidate|verified>`
21
+
22
+ ### Changed
23
+ - Added strict curation/promotion policy to command reference (`宁缺毋滥,优胜略汰`):
24
+ - fingerprint-based deduplication on record
25
+ - promotion gate requires validated root cause, fix actions, verification evidence, ontology tags, and minimum quality score
26
+
27
+ ## [3.3.17] - 2026-02-26
28
+
29
+ ### Added
30
+ - Orchestrator rate-limit profile management commands:
31
+ - `sce orchestrate profile list`
32
+ - `sce orchestrate profile show`
33
+ - `sce orchestrate profile set <conservative|balanced|aggressive> [--reset-overrides]`
34
+ - Runtime one-shot profile override:
35
+ - `sce orchestrate run --rate-limit-profile <profile>`
36
+ - New anti-429 regression shortcut:
37
+ - `npm run test:orchestrator-429`
38
+ - Added default orchestrator baseline config files:
39
+ - `.sce/config/orchestrator.json`
40
+ - `template/.sce/config/orchestrator.json`
41
+ - Added profile runbook:
42
+ - `docs/agent-runtime/orchestrator-rate-limit-profiles.md`
43
+
44
+ ### Changed
45
+ - Orchestration engine now supports runtime config overrides for one execution without mutating persisted config.
46
+ - Command reference updated with profile workflow and recommended anti-429 usage.
47
+
10
48
  ## [3.3.16] - 2026-02-26
11
49
 
12
50
  ### Added
package/README.md CHANGED
@@ -775,6 +775,6 @@ A deep conversation about AI development trends, Neo-Confucian philosophy, and s
775
775
 
776
776
  ---
777
777
 
778
- **Version**: 3.3.16
778
+ **Version**: 3.3.17
779
779
  **Last Updated**: 2026-02-26
780
780
 
package/README.zh.md CHANGED
@@ -636,7 +636,7 @@ sce spec bootstrap --name 01-00-my-first-feature --non-interactive
636
636
 
637
637
  ---
638
638
 
639
- **版本**:3.3.16
639
+ **版本**:3.3.17
640
640
  **最后更新**:2026-02-26
641
641
 
642
642
 
@@ -817,6 +817,10 @@ registerLockCommands(program);
817
817
  const { registerKnowledgeCommands } = require('../lib/commands/knowledge');
818
818
  registerKnowledgeCommands(program);
819
819
 
820
+ // Errorbook commands
821
+ const { registerErrorbookCommands } = require('../lib/commands/errorbook');
822
+ registerErrorbookCommands(program);
823
+
820
824
  // Studio orchestration commands
821
825
  const { registerStudioCommands } = require('../lib/commands/studio');
822
826
  registerStudioCommands(program);
@@ -0,0 +1,66 @@
1
+ # Orchestrator Rate-Limit Profiles
2
+
3
+ This document defines the default anti-429 presets used by SCE multi-agent orchestration.
4
+
5
+ ## Profiles
6
+
7
+ | Profile | Positioning | Best for |
8
+ |---|---|---|
9
+ | `conservative` | strongest throttling, safest | unstable provider quota windows, repeated `429` spikes |
10
+ | `balanced` | default baseline | normal daily multi-agent runs |
11
+ | `aggressive` | higher throughput, lower safety margin | stable quota windows with strict delivery deadlines |
12
+
13
+ ## Effective Preset Values
14
+
15
+ | Key | conservative | balanced | aggressive |
16
+ |---|---:|---:|---:|
17
+ | `rateLimitMaxRetries` | 10 | 8 | 6 |
18
+ | `rateLimitBackoffBaseMs` | 2200 | 1500 | 1000 |
19
+ | `rateLimitBackoffMaxMs` | 90000 | 60000 | 30000 |
20
+ | `rateLimitCooldownMs` | 60000 | 45000 | 20000 |
21
+ | `rateLimitLaunchBudgetPerMinute` | 4 | 8 | 16 |
22
+ | `rateLimitSignalWindowMs` | 45000 | 30000 | 20000 |
23
+ | `rateLimitSignalThreshold` | 2 | 3 | 4 |
24
+ | `rateLimitSignalExtraHoldMs` | 5000 | 3000 | 2000 |
25
+ | `rateLimitDynamicBudgetFloor` | 1 | 1 | 2 |
26
+
27
+ ## Usage
28
+
29
+ Persistent (writes `.sce/config/orchestrator.json`):
30
+
31
+ ```bash
32
+ sce orchestrate profile set conservative
33
+ sce orchestrate profile set balanced --reset-overrides
34
+ ```
35
+
36
+ One-shot for a single run (does not change file):
37
+
38
+ ```bash
39
+ sce orchestrate run --specs "spec-a,spec-b,spec-c" --rate-limit-profile conservative
40
+ ```
41
+
42
+ Inspect current effective state:
43
+
44
+ ```bash
45
+ sce orchestrate profile show --json
46
+ ```
47
+
48
+ ## Validation Checklist
49
+
50
+ Run anti-429 regression:
51
+
52
+ ```bash
53
+ npm run test:orchestrator-429
54
+ ```
55
+
56
+ Run full suite before release:
57
+
58
+ ```bash
59
+ npm test -- --runInBand
60
+ ```
61
+
62
+ Release readiness criteria:
63
+
64
+ 1. No failing test in orchestrator/rate-limit scope.
65
+ 2. `orchestrate profile show --json` returns expected profile and effective values.
66
+ 3. Multi-agent run no longer stalls under sustained `429`; launch budget and hold telemetry progress over time.
@@ -295,15 +295,72 @@ sce repo health [--json]
295
295
  # Start orchestration for multiple specs
296
296
  sce orchestrate run --specs "spec-a,spec-b,spec-c" --max-parallel 3
297
297
 
298
+ # One-shot anti-429 profile override (without editing orchestrator.json)
299
+ sce orchestrate run --specs "spec-a,spec-b,spec-c" --rate-limit-profile conservative
300
+
298
301
  # Show orchestration status
299
302
  sce orchestrate status [--json]
300
303
 
301
304
  # Stop all running sub-agents
302
305
  sce orchestrate stop
306
+
307
+ # List/show/set persistent rate-limit profile
308
+ sce orchestrate profile list
309
+ sce orchestrate profile show --json
310
+ sce orchestrate profile set conservative
311
+ sce orchestrate profile set balanced --reset-overrides
303
312
  ```
304
313
 
305
314
  When you pass `--specs` to `sce spec bootstrap|pipeline run|gate run`, sce now defaults to this orchestrate mode automatically.
306
315
 
316
+ Rate-limit profiles:
317
+ - `conservative`: strongest anti-429 throttling (recommended for unstable quota windows)
318
+ - `balanced`: default profile for normal multi-agent runs
319
+ - `aggressive`: higher throughput with lower protection margins
320
+
321
+ ### Errorbook (Curated Failure Knowledge)
322
+
323
+ ```bash
324
+ # Record curated remediation entry
325
+ sce errorbook record \
326
+ --title "Order approval queue saturation" \
327
+ --symptom "Approval queue backlog exceeded SLA" \
328
+ --root-cause "Worker pool under-provisioned and retries amplified load" \
329
+ --fix-action "Increase workers from 4 to 8" \
330
+ --fix-action "Reduce retry burst window" \
331
+ --verification "Load test confirms p95 < SLA threshold" \
332
+ --ontology "entity,relation,decision_policy" \
333
+ --tags "moqui,order,performance" \
334
+ --status verified \
335
+ --json
336
+
337
+ # List/show/find entries
338
+ sce errorbook list --status promoted --min-quality 75 --json
339
+ sce errorbook show <entry-id> --json
340
+ sce errorbook find --query "approve order timeout" --limit 10 --json
341
+
342
+ # Promote only after strict gate checks pass
343
+ sce errorbook promote <entry-id> --json
344
+
345
+ # Eliminate obsolete/low-value entries (curation)
346
+ sce errorbook deprecate <entry-id> --reason "superseded by v2 policy" --json
347
+
348
+ # Requalify deprecated entry after remediation review
349
+ sce errorbook requalify <entry-id> --status verified --json
350
+ ```
351
+
352
+ Curated quality policy (`宁缺毋滥,优胜略汰`) defaults:
353
+ - `record` requires: `title`, `symptom`, `root_cause`, and at least one `fix_action`.
354
+ - Fingerprint dedup is automatic; repeated records merge evidence and increment occurrence count.
355
+ - `promote` enforces strict gate:
356
+ - `root_cause` present
357
+ - `fix_actions` non-empty
358
+ - `verification_evidence` non-empty
359
+ - `ontology_tags` non-empty
360
+ - `quality_score >= 75`
361
+ - `deprecate` requires explicit `--reason` to preserve elimination traceability.
362
+ - `requalify` only accepts `candidate|verified`; `promoted` must still go through `promote` gate.
363
+
307
364
  ### Studio Workflow
308
365
 
309
366
  ```bash
@@ -408,6 +465,7 @@ Contract/baseline files:
408
465
  - `docs/agent-runtime/capability-mapping-report.schema.json`
409
466
  - `docs/agent-runtime/agent-result-summary-contract.schema.json`
410
467
  - `docs/agent-runtime/multi-agent-coordination-policy-baseline.json`
468
+ - `docs/agent-runtime/orchestrator-rate-limit-profiles.md`
411
469
 
412
470
  Multi-agent merge governance default:
413
471
  - `sce orchestrate run` loads `docs/agent-runtime/multi-agent-coordination-policy-baseline.json`.
@@ -1327,6 +1385,7 @@ Recommended `.sce/config/orchestrator.json`:
1327
1385
  "maxParallel": 3,
1328
1386
  "timeoutSeconds": 900,
1329
1387
  "maxRetries": 2,
1388
+ "rateLimitProfile": "balanced",
1330
1389
  "rateLimitMaxRetries": 8,
1331
1390
  "rateLimitBackoffBaseMs": 1500,
1332
1391
  "rateLimitBackoffMaxMs": 60000,
@@ -1335,13 +1394,25 @@ Recommended `.sce/config/orchestrator.json`:
1335
1394
  "rateLimitCooldownMs": 45000,
1336
1395
  "rateLimitLaunchBudgetPerMinute": 8,
1337
1396
  "rateLimitLaunchBudgetWindowMs": 60000,
1397
+ "rateLimitSignalWindowMs": 30000,
1398
+ "rateLimitSignalThreshold": 3,
1399
+ "rateLimitSignalExtraHoldMs": 3000,
1400
+ "rateLimitDynamicBudgetFloor": 1,
1338
1401
  "apiKeyEnvVar": "CODEX_API_KEY",
1339
1402
  "codexArgs": ["--skip-git-repo-check"],
1340
1403
  "codexCommand": "npx @openai/codex"
1341
1404
  }
1342
1405
  ```
1343
1406
 
1344
- `rateLimit*` settings provide dedicated retry/backoff and adaptive parallel throttling when providers return 429 / too-many-requests errors. Engine retry honors `Retry-After` / `try again in ...` hints from provider error messages and clamps final retry waits by `rateLimitBackoffMaxMs` to avoid unbounded pause windows. During active backoff windows, new pending spec launches are paused to reduce request bursts (launch hold remains active even if adaptive parallel throttling is disabled). `orchestrate stop` now interrupts pending retry waits immediately so long backoff does not look like a deadlock.
1407
+ `rateLimitProfile` applies preset anti-429 behavior (`conservative|balanced|aggressive`). Any explicit `rateLimit*` field in `orchestrator.json` overrides the selected profile value.
1408
+
1409
+ `rateLimit*` settings provide dedicated retry/backoff and adaptive throttling when providers return 429 / too-many-requests errors. Engine retry honors `Retry-After` / `try again in ...` hints from provider error messages and clamps final retry waits by `rateLimitBackoffMaxMs` to avoid unbounded pause windows. During active backoff windows, new pending spec launches are paused to reduce request bursts (launch hold remains active even if adaptive parallel throttling is disabled). Sustained 429 spikes are additionally controlled by:
1410
+ - `rateLimitSignalWindowMs`: rolling signal window for spike detection
1411
+ - `rateLimitSignalThreshold`: signals required inside window before escalation
1412
+ - `rateLimitSignalExtraHoldMs`: extra launch hold per escalation unit
1413
+ - `rateLimitDynamicBudgetFloor`: lowest dynamic launch budget allowed during sustained pressure
1414
+
1415
+ `orchestrate stop` interrupts pending retry waits immediately so long backoff windows do not look like deadlocks.
1345
1416
 
1346
1417
  Codex sub-agent permission defaults:
1347
1418
  - `--sandbox danger-full-access` is always injected by orchestrator runtime.