scene-capability-engine 3.0.4 → 3.0.7

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 CHANGED
@@ -253,6 +253,7 @@ sequenceDiagram
253
253
  - 🌍 **[Environment Management](docs/environment-management-guide.md)** - Multi-environment configuration
254
254
  - 📦 **[Multi-Repository Management](docs/multi-repo-management-guide.md)** - Manage multiple Git repositories
255
255
  - 🎭 **[Scene Runtime](docs/scene-runtime-guide.md)** - Template engine, quality pipeline, ontology, Moqui ERP
256
+ - ♻️ **[Moqui Standard Rebuild](docs/moqui-standard-rebuild-guide.md)** - Rebuild bootstrap bundle + page-copilot contract from metadata
256
257
  - 🤖 **[Multi-Agent Coordination](docs/multi-agent-coordination-guide.md)** - Parallel agent coordination
257
258
  - 📈 **[Value Observability](docs/value-observability-guide.md)** - KPI snapshot, baseline, trend, gate-ready evidence
258
259
  - 🔌 **[Integration Modes](docs/integration-modes.md)** - Three ways to integrate sce
@@ -411,12 +412,14 @@ Tip: `sce spec bootstrap|pipeline run|gate run --specs ...` now defaults to this
411
412
  "maxParallel": 3,
412
413
  "timeoutSeconds": 900,
413
414
  "maxRetries": 2,
414
- "rateLimitMaxRetries": 6,
415
- "rateLimitBackoffBaseMs": 1000,
416
- "rateLimitBackoffMaxMs": 30000,
415
+ "rateLimitMaxRetries": 8,
416
+ "rateLimitBackoffBaseMs": 1500,
417
+ "rateLimitBackoffMaxMs": 60000,
417
418
  "rateLimitAdaptiveParallel": true,
418
419
  "rateLimitParallelFloor": 1,
419
- "rateLimitCooldownMs": 30000,
420
+ "rateLimitCooldownMs": 45000,
421
+ "rateLimitLaunchBudgetPerMinute": 8,
422
+ "rateLimitLaunchBudgetWindowMs": 60000,
420
423
  "apiKeyEnvVar": "CODEX_API_KEY",
421
424
  "codexArgs": ["--skip-git-repo-check"],
422
425
  "codexCommand": "npx @openai/codex"
@@ -787,6 +787,7 @@ Dual-track handoff integration:
787
787
  - `sce auto handoff queue --manifest <path> [--out <path>] [--append] [--no-include-known-gaps] [--dry-run] [--json]`: generate close-loop batch goal queue from handoff manifest and optionally persist line-based queue file (default `.kiro/auto/handoff-goals.lines`).
788
788
  - `sce auto handoff template-diff --manifest <path> [--json]`: compare manifest templates against local template exports/registry and report `missing_in_local` and `extra_in_local`.
789
789
  - `sce auto handoff capability-matrix --manifest <path> [--strict] [--strict-warnings] [--min-capability-coverage <n>] [--min-capability-semantic <n>] [--no-require-capability-semantic] [--format <json|markdown>] [--out <path>] [--remediation-queue-out <path>] [--fail-on-gap] [--json]`: generate a fast Moqui capability matrix (`template-diff + baseline + capability coverage + semantic completeness`) and optionally fail fast on gaps.
790
+ - When `manifest.capabilities` is empty, sce auto-infers canonical expected capabilities from `manifest.templates` using the Moqui lexicon before deciding whether capability coverage should be skipped.
790
791
  - `sce auto handoff run --manifest <path> [--out <path>] [--queue-out <path>] [--append] [--no-include-known-gaps] [--continue-from <session|latest|file>] [--continue-strategy <auto|pending|failed-only>] [--dry-run] [--strict] [--strict-warnings] [--no-dependency-batching] [--min-spec-success-rate <n>] [--max-risk-level <level>] [--max-moqui-matrix-regressions <n>] [--no-require-ontology-validation] [--no-require-moqui-baseline] [--min-capability-coverage <n>] [--no-require-capability-coverage] [--require-release-gate-preflight] [--release-evidence-window <n>] [--json]`: execute handoff end-to-end (`plan -> queue -> close-loop-batch -> observability`) with automatic report archive to `.kiro/reports/handoff-runs/<session>.json`.
791
792
  - Default mode is dependency-aware: spec integration goals are grouped into dependency batches and executed in topological order.
792
793
  - `--continue-from` resumes pending goals from an existing handoff run report (`latest`, session id, or JSON file path). For safety, sce enforces manifest-path consistency between the previous report and current run.
@@ -797,6 +798,7 @@ Dual-track handoff integration:
797
798
  - `moqui_baseline.summary` now includes `scope_breakdown`, `coverage_matrix`, and `gap_frequency` for ER/BR/decision closure tracking.
798
799
  - `moqui_baseline.compare` now includes `coverage_matrix_deltas` and `coverage_matrix_regressions` for trend-level entity/relation/rule/decision closure movement and negative-delta alerts (used by matrix-regression hard gate).
799
800
  - Run output includes `moqui_capability_coverage` snapshot by default (when manifest `capabilities` is declared), with artifacts at `.kiro/reports/release-evidence/moqui-capability-coverage.json` and `.kiro/reports/release-evidence/moqui-capability-coverage.md`.
801
+ - When `manifest.capabilities` is not declared, sce attempts lexicon-based capability inference from `manifest.templates` first; only fully non-mappable manifests keep capability coverage in skipped mode.
800
802
  - Run output includes `release_gate_preflight` (latest release gate history signal snapshot + blocked reasons) and carries this context into `warnings`.
801
803
  - `release_gate_preflight` is advisory by default; use `--require-release-gate-preflight` to hard-fail when preflight is unavailable/blocked.
802
804
  - When Moqui baseline/capability gates fail, sce auto-generates remediation queue lines at `.kiro/auto/moqui-remediation.lines`.
@@ -827,9 +829,27 @@ Dual-track handoff integration:
827
829
 
828
830
  Moqui template library lexicon audit (script-level governance helper):
829
831
  - `node scripts/moqui-lexicon-audit.js [--manifest <path>] [--template-dir <path>] [--lexicon <path>] [--out <path>] [--markdown-out <path>] [--fail-on-gap] [--json]`: audit manifest/template capability names against canonical Moqui lexicon; reports unknown aliases and uncovered expected capabilities.
832
+ - Expected capability scope uses `manifest.capabilities` first; when empty, it infers canonical expected capabilities from `manifest.templates` and emits `expected_scope` metadata (`source`, `inferred_*`, `unresolved_templates`).
830
833
  - By default, template capability auditing is scoped to `manifest.templates` (when matched), reducing noise from unrelated templates.
831
834
  - Template scope matching normalizes `sce.scene--*` / `kse.scene--*` prefixes, so renamed template namespaces still map correctly.
832
835
 
836
+ Moqui standard rebuild helper (script-level recovery bootstrap):
837
+ - `node scripts/moqui-standard-rebuild.js [--metadata <path>] [--out <path>] [--markdown-out <path>] [--bundle-out <path>] [--json]`: build a standard Moqui recovery bundle from metadata, including recommended SCE template matrix, recovery spec plan, handoff manifest seed, ontology seed, and page-copilot context contract.
838
+ - Output now includes `recovery.readiness_matrix`, `recovery.readiness_summary`, and `recovery.prioritized_gaps` for template capability matrix scoring and remediation planning.
839
+ - Bundle now includes `rebuild/matrix-remediation.lines` (gap remediation queue lines).
840
+ - Bundle now includes `rebuild/matrix-remediation-plan.json|.md` (gap-to-source-file remediation plan).
841
+ - This workflow is scoped to SCE outputs and does not mutate business project code directly.
842
+ - Recommended usage for rebuild target path: `E:/workspace/331-poc-rebuild` (keep `331-poc` repair stream isolated).
843
+
844
+ Moqui rebuild gate helper (CI/pre-release readiness gate):
845
+ - `node scripts/moqui-rebuild-gate.js [--metadata <path>] [--out <path>] [--markdown-out <path>] [--bundle-out <path>] [--min-ready <n>] [--max-partial <n>] [--max-gap <n>]`: run rebuild and fail when readiness gate is not met (default: ready>=6, partial<=0, gap<=0).
846
+ - npm alias: `npm run gate:moqui-rebuild`
847
+
848
+ Moqui metadata extractor helper (script-level catalog bootstrap):
849
+ - `node scripts/moqui-metadata-extract.js [--project-dir <path>] [--out <path>] [--markdown-out <path>] [--json]`: build a normalized metadata catalog from multiple sources for rebuild automation. Default sources include Moqui XML resources (`entity/service/screen/form/rule/decision`), scene package contracts (`.kiro/specs/**/docs/scene-package.json`), handoff manifest/capability matrix, and handoff evidence JSON.
850
+ - Recommended first step before `moqui-standard-rebuild`.
851
+ - Keep extraction source read-only and run rebuild generation against SCE output directories.
852
+
833
853
  Recommended `.kiro/config/orchestrator.json`:
834
854
 
835
855
  ```json
@@ -838,12 +858,14 @@ Recommended `.kiro/config/orchestrator.json`:
838
858
  "maxParallel": 3,
839
859
  "timeoutSeconds": 900,
840
860
  "maxRetries": 2,
841
- "rateLimitMaxRetries": 6,
842
- "rateLimitBackoffBaseMs": 1000,
843
- "rateLimitBackoffMaxMs": 30000,
861
+ "rateLimitMaxRetries": 8,
862
+ "rateLimitBackoffBaseMs": 1500,
863
+ "rateLimitBackoffMaxMs": 60000,
844
864
  "rateLimitAdaptiveParallel": true,
845
865
  "rateLimitParallelFloor": 1,
846
- "rateLimitCooldownMs": 30000,
866
+ "rateLimitCooldownMs": 45000,
867
+ "rateLimitLaunchBudgetPerMinute": 8,
868
+ "rateLimitLaunchBudgetWindowMs": 60000,
847
869
  "apiKeyEnvVar": "CODEX_API_KEY",
848
870
  "codexArgs": ["--skip-git-repo-check"],
849
871
  "codexCommand": "npx @openai/codex"
@@ -0,0 +1,96 @@
1
+ # Moqui Standard Rebuild Guide
2
+
3
+ This guide bootstraps a standard Moqui recovery bundle using SCE templates and metadata.
4
+ It is designed to avoid direct interference with an in-progress `331-poc` repair stream.
5
+
6
+ ## Goal
7
+
8
+ - Rebuild baseline business capability assets from metadata.
9
+ - Keep original Moqui technology stack unchanged.
10
+ - Add a page-level human/AI copilot dialog contract for contextual fixes.
11
+
12
+ ## Recommended Workspace Strategy
13
+
14
+ 1. Keep SCE in `E:/workspace/kiro-spec-engine` for reusable rebuild tooling.
15
+ 2. Keep business rebuild target isolated (recommended): `E:/workspace/331-poc-rebuild`.
16
+ 3. Do not write generated recovery files into live `331-poc` unless explicitly approved.
17
+
18
+ ## Input Metadata (minimum)
19
+
20
+ Provide a JSON file with at least one of these arrays:
21
+
22
+ - `entities`
23
+ - `services`
24
+ - `screens`
25
+ - `forms`
26
+
27
+ Optional:
28
+
29
+ - `business_rules`
30
+ - `decisions`
31
+
32
+ ## Step 1: Extract Metadata (from Moqui project)
33
+
34
+ ```bash
35
+ node scripts/moqui-metadata-extract.js \
36
+ --project-dir E:/workspace/your-moqui-project \
37
+ --out docs/moqui/metadata-catalog.json \
38
+ --markdown-out docs/moqui/metadata-catalog.md \
39
+ --json
40
+ ```
41
+
42
+ `moqui-metadata-extract` now performs multi-source catalog extraction by default:
43
+ - Moqui XML (`entity/service/screen/form/rule/decision`)
44
+ - `scene-package.json` contracts in `.kiro/specs/**/docs/`
45
+ - `docs/handoffs/handoff-manifest.json`
46
+ - `docs/handoffs/capability-matrix.md`
47
+ - `docs/handoffs/evidence/**/*.json`
48
+ - `.kiro/recovery/salvage/**/*.json` (if present)
49
+
50
+ ## Step 2: Build Rebuild Bundle
51
+
52
+ ```bash
53
+ node scripts/moqui-standard-rebuild.js \
54
+ --metadata docs/moqui/metadata-catalog.json \
55
+ --out .kiro/reports/recovery/moqui-standard-rebuild.json \
56
+ --markdown-out .kiro/reports/recovery/moqui-standard-rebuild.md \
57
+ --bundle-out .kiro/reports/recovery/moqui-standard-bundle \
58
+ --json
59
+ ```
60
+
61
+ ## Step 3: Run Rebuild Readiness Gate (recommended for CI/release)
62
+
63
+ ```bash
64
+ node scripts/moqui-rebuild-gate.js \
65
+ --metadata docs/moqui/metadata-catalog.json \
66
+ --out .kiro/reports/recovery/moqui-standard-rebuild.json \
67
+ --markdown-out .kiro/reports/recovery/moqui-standard-rebuild.md \
68
+ --bundle-out .kiro/reports/recovery/moqui-standard-bundle
69
+ ```
70
+
71
+ Defaults: `ready>=6`, `partial<=0`, `gap<=0`.
72
+
73
+ ## Generated Bundle
74
+
75
+ - `handoff/handoff-manifest.json`: seed manifest for SCE handoff gates.
76
+ - `ontology/moqui-ontology-seed.json`: initial ontology graph seed.
77
+ - `rebuild/recovery-spec-plan.json`: ordered recovery spec list.
78
+ - `rebuild/matrix-remediation.lines`: prioritized remediation queue lines derived from template readiness gaps.
79
+ - `rebuild/matrix-remediation-plan.json`: gap-to-source-file remediation plan for quick 331 execution.
80
+ - `rebuild/matrix-remediation-plan.md`: markdown view of remediation plan.
81
+ - `copilot/page-context-contract.json`: page-context contract for copilot dialog.
82
+ - `copilot/conversation-playbook.md`: operational playbook for human/AI page fixes.
83
+ - rebuild report includes template readiness scoring (`recovery.readiness_matrix`) and prioritized remediation items (`recovery.prioritized_gaps`).
84
+
85
+ ## Default Moqui Template Matrix
86
+
87
+ - `kse.scene--moqui-entity-model-core--0.1.0`
88
+ - `kse.scene--moqui-service-contract-core--0.1.0`
89
+ - `kse.scene--moqui-screen-flow-core--0.1.0`
90
+ - `kse.scene--moqui-form-interaction-core--0.1.0`
91
+ - `kse.scene--moqui-rule-decision-core--0.1.0`
92
+ - `kse.scene--moqui-page-copilot-dialog--0.1.0`
93
+
94
+ ## Next Step for Business Project
95
+
96
+ Use generated assets as input to a dedicated rebuild project (for example `331-poc-rebuild`) and execute normal SCE handoff + gate flows there.
@@ -6848,6 +6848,75 @@ function collectUniqueIdentifiers(rawEntries, fieldCandidates, label) {
6848
6848
  return { values, warnings };
6849
6849
  }
6850
6850
 
6851
+ function normalizeAutoHandoffTemplateCapabilityCandidate(value) {
6852
+ if (value === undefined || value === null) {
6853
+ return null;
6854
+ }
6855
+ const raw = `${value}`.trim();
6856
+ if (!raw) {
6857
+ return null;
6858
+ }
6859
+ const normalizedPath = raw.toLowerCase().replace(/\\/g, '/');
6860
+ const baseName = normalizedPath.split('/').pop() || normalizedPath;
6861
+ let candidate = baseName.replace(/^[a-z0-9-]+\.scene--/, 'scene--');
6862
+ candidate = candidate.replace(/^scene--/, '');
6863
+ candidate = candidate.replace(
6864
+ /--\d+\.\d+\.\d+(?:-[a-z0-9.-]+)?(?:\+[a-z0-9.-]+)?$/,
6865
+ ''
6866
+ );
6867
+ candidate = candidate.replace(/--\d{4}(?:-\d{2}){1,2}(?:-[a-z0-9-]+)?$/, '');
6868
+ return normalizeMoquiCapabilityToken(candidate);
6869
+ }
6870
+
6871
+ function inferManifestCapabilitiesFromTemplates(
6872
+ templateIdentifiers = [],
6873
+ lexiconIndex = MOQUI_CAPABILITY_LEXICON_INDEX
6874
+ ) {
6875
+ const inferred = [];
6876
+ const inferredSet = new Set();
6877
+ const inferredFrom = [];
6878
+ const unresolvedTemplates = [];
6879
+ const unresolvedSet = new Set();
6880
+
6881
+ if (!Array.isArray(templateIdentifiers) || templateIdentifiers.length === 0) {
6882
+ return {
6883
+ capabilities: inferred,
6884
+ inferred_from: inferredFrom,
6885
+ unresolved_templates: unresolvedTemplates
6886
+ };
6887
+ }
6888
+
6889
+ for (const templateIdentifier of templateIdentifiers) {
6890
+ const candidate = normalizeAutoHandoffTemplateCapabilityCandidate(templateIdentifier);
6891
+ if (!candidate) {
6892
+ continue;
6893
+ }
6894
+ const descriptor = resolveMoquiCapabilityDescriptor(candidate, lexiconIndex);
6895
+ if (descriptor && descriptor.is_known) {
6896
+ if (!inferredSet.has(descriptor.canonical)) {
6897
+ inferredSet.add(descriptor.canonical);
6898
+ inferred.push(descriptor.canonical);
6899
+ }
6900
+ inferredFrom.push({
6901
+ template: templateIdentifier,
6902
+ normalized_template: candidate,
6903
+ capability: descriptor.canonical
6904
+ });
6905
+ continue;
6906
+ }
6907
+ if (!unresolvedSet.has(templateIdentifier)) {
6908
+ unresolvedSet.add(templateIdentifier);
6909
+ unresolvedTemplates.push(templateIdentifier);
6910
+ }
6911
+ }
6912
+
6913
+ return {
6914
+ capabilities: inferred,
6915
+ inferred_from: inferredFrom,
6916
+ unresolved_templates: unresolvedTemplates
6917
+ };
6918
+ }
6919
+
6851
6920
  function normalizeHandoffDependencyEntry(entry) {
6852
6921
  return normalizeHandoffIdentifier(entry, [
6853
6922
  'name',
@@ -7128,8 +7197,32 @@ function normalizeAutoHandoffManifest(payload = {}) {
7128
7197
  'capabilities'
7129
7198
  );
7130
7199
  validationWarnings.push(...capabilitiesCollected.warnings);
7200
+ const capabilityInference = inferManifestCapabilitiesFromTemplates(
7201
+ templatesCollected.values,
7202
+ MOQUI_CAPABILITY_LEXICON_INDEX
7203
+ );
7204
+ let capabilityValues = capabilitiesCollected.values;
7205
+ let capabilitySource = 'manifest';
7131
7206
  if (capabilitiesCollected.values.length === 0) {
7132
- validationWarnings.push('capabilities is empty; capability coverage gate will be skipped unless capabilities are declared');
7207
+ if (capabilityInference.capabilities.length > 0) {
7208
+ capabilityValues = capabilityInference.capabilities;
7209
+ capabilitySource = 'inferred-from-templates';
7210
+ validationWarnings.push(
7211
+ `capabilities not declared; inferred ${capabilityValues.length} canonical capabilities from templates`
7212
+ );
7213
+ if (capabilityInference.unresolved_templates.length > 0) {
7214
+ const preview = capabilityInference.unresolved_templates.slice(0, 5).join(', ');
7215
+ const suffix = capabilityInference.unresolved_templates.length > 5
7216
+ ? ` (+${capabilityInference.unresolved_templates.length - 5} more)`
7217
+ : '';
7218
+ validationWarnings.push(
7219
+ `template capability inference skipped ${capabilityInference.unresolved_templates.length} templates not found in lexicon: ${preview}${suffix}`
7220
+ );
7221
+ }
7222
+ } else {
7223
+ capabilitySource = 'none';
7224
+ validationWarnings.push('capabilities is empty; capability coverage gate will be skipped unless capabilities are declared');
7225
+ }
7133
7226
  }
7134
7227
 
7135
7228
  const knownGapCollected = collectKnownGaps(payload.known_gaps);
@@ -7153,7 +7246,16 @@ function normalizeAutoHandoffManifest(payload = {}) {
7153
7246
  spec_descriptors: specsCollected.descriptors,
7154
7247
  dependency_batches: dependencyBatches,
7155
7248
  templates: templatesCollected.values,
7156
- capabilities: capabilitiesCollected.values,
7249
+ capabilities: capabilityValues,
7250
+ capability_source: capabilitySource,
7251
+ capability_inference: {
7252
+ applied: capabilitySource === 'inferred-from-templates',
7253
+ inferred_count: capabilityInference.capabilities.length,
7254
+ inferred_capabilities: capabilityInference.capabilities,
7255
+ inferred_from_templates: capabilityInference.inferred_from,
7256
+ unresolved_template_count: capabilityInference.unresolved_templates.length,
7257
+ unresolved_templates: capabilityInference.unresolved_templates
7258
+ },
7157
7259
  known_gaps: knownGapCollected.gaps,
7158
7260
  ontology_validation: ontologyValidation,
7159
7261
  next_batch: nextBatch,
@@ -7268,6 +7370,17 @@ async function buildAutoHandoffPlan(projectPath, options = {}) {
7268
7370
  dependency_batches: handoff.dependency_batches,
7269
7371
  templates: handoff.templates,
7270
7372
  capabilities: handoff.capabilities,
7373
+ capability_source: handoff.capability_source || 'manifest',
7374
+ capability_inference: handoff.capability_inference && typeof handoff.capability_inference === 'object'
7375
+ ? handoff.capability_inference
7376
+ : {
7377
+ applied: false,
7378
+ inferred_count: 0,
7379
+ inferred_capabilities: [],
7380
+ inferred_from_templates: [],
7381
+ unresolved_template_count: 0,
7382
+ unresolved_templates: []
7383
+ },
7271
7384
  known_gaps: handoff.known_gaps,
7272
7385
  ontology_validation: handoff.ontology_validation,
7273
7386
  next_batch: handoff.next_batch
@@ -13472,6 +13585,18 @@ async function buildAutoHandoffCapabilityMatrix(projectPath, options = {}) {
13472
13585
  capability_count: Array.isArray(plan.handoff && plan.handoff.capabilities)
13473
13586
  ? plan.handoff.capabilities.length
13474
13587
  : 0,
13588
+ capability_source: normalizeHandoffText(plan.handoff && plan.handoff.capability_source) || 'manifest',
13589
+ capability_inference: plan.handoff && plan.handoff.capability_inference &&
13590
+ typeof plan.handoff.capability_inference === 'object'
13591
+ ? plan.handoff.capability_inference
13592
+ : {
13593
+ applied: false,
13594
+ inferred_count: 0,
13595
+ inferred_capabilities: [],
13596
+ inferred_from_templates: [],
13597
+ unresolved_template_count: 0,
13598
+ unresolved_templates: []
13599
+ },
13475
13600
  capabilities: Array.isArray(plan.handoff && plan.handoff.capabilities)
13476
13601
  ? plan.handoff.capabilities
13477
13602
  : []
@@ -16,13 +16,13 @@ const path = require('path');
16
16
  const fsUtils = require('../utils/fs-utils');
17
17
 
18
18
  const SPECS_DIR = '.kiro/specs';
19
- const DEFAULT_RATE_LIMIT_MAX_RETRIES = 6;
20
- const DEFAULT_RATE_LIMIT_BACKOFF_BASE_MS = 1000;
21
- const DEFAULT_RATE_LIMIT_BACKOFF_MAX_MS = 30000;
19
+ const DEFAULT_RATE_LIMIT_MAX_RETRIES = 8;
20
+ const DEFAULT_RATE_LIMIT_BACKOFF_BASE_MS = 1500;
21
+ const DEFAULT_RATE_LIMIT_BACKOFF_MAX_MS = 60000;
22
22
  const DEFAULT_RATE_LIMIT_ADAPTIVE_PARALLEL = true;
23
23
  const DEFAULT_RATE_LIMIT_PARALLEL_FLOOR = 1;
24
- const DEFAULT_RATE_LIMIT_COOLDOWN_MS = 30000;
25
- const DEFAULT_RATE_LIMIT_LAUNCH_BUDGET_PER_MINUTE = 12;
24
+ const DEFAULT_RATE_LIMIT_COOLDOWN_MS = 45000;
25
+ const DEFAULT_RATE_LIMIT_LAUNCH_BUDGET_PER_MINUTE = 8;
26
26
  const DEFAULT_RATE_LIMIT_LAUNCH_BUDGET_WINDOW_MS = 60000;
27
27
  const DEFAULT_AGENT_WAIT_TIMEOUT_SECONDS = 600;
28
28
  const AGENT_WAIT_TIMEOUT_GRACE_MS = 30000;
@@ -35,6 +35,7 @@ const RATE_LIMIT_ERROR_PATTERNS = [
35
35
  /resource exhausted/i,
36
36
  /quota exceeded/i,
37
37
  /exceeded.*quota/i,
38
+ /exceeded retry limit/i,
38
39
  /requests per minute/i,
39
40
  /tokens per minute/i,
40
41
  ];
@@ -44,13 +44,13 @@ const DEFAULT_CONFIG = Object.freeze({
44
44
  maxParallel: 3,
45
45
  timeoutSeconds: 600,
46
46
  maxRetries: 2,
47
- rateLimitMaxRetries: 6,
48
- rateLimitBackoffBaseMs: 1000,
49
- rateLimitBackoffMaxMs: 30000,
47
+ rateLimitMaxRetries: 8,
48
+ rateLimitBackoffBaseMs: 1500,
49
+ rateLimitBackoffMaxMs: 60000,
50
50
  rateLimitAdaptiveParallel: true,
51
51
  rateLimitParallelFloor: 1,
52
- rateLimitCooldownMs: 30000,
53
- rateLimitLaunchBudgetPerMinute: 12,
52
+ rateLimitCooldownMs: 45000,
53
+ rateLimitLaunchBudgetPerMinute: 8,
54
54
  rateLimitLaunchBudgetWindowMs: 60000,
55
55
  apiKeyEnvVar: 'CODEX_API_KEY',
56
56
  bootstrapTemplate: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scene-capability-engine",
3
- "version": "3.0.4",
3
+ "version": "3.0.7",
4
4
  "description": "SCE (Scene Capability Engine) - A CLI tool and npm package for spec-driven development with AI coding assistants.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -35,6 +35,9 @@
35
35
  "test:brand-consistency": "node scripts/check-branding-consistency.js",
36
36
  "test:watch": "npx jest --watch",
37
37
  "coverage": "npx jest --coverage",
38
+ "report:moqui-metadata": "node scripts/moqui-metadata-extract.js --json",
39
+ "report:moqui-rebuild": "node scripts/moqui-standard-rebuild.js --json",
40
+ "gate:moqui-rebuild": "node scripts/moqui-rebuild-gate.js",
38
41
  "report:moqui-baseline": "node scripts/moqui-template-baseline-report.js --json",
39
42
  "report:moqui-core-regression": "node scripts/moqui-core-regression-suite.js --json",
40
43
  "prepublishOnly": "npm run test:full && npm run test:skip-audit && npm run test:brand-consistency",