@dzhechkov/harness-core 0.8.2 → 0.8.6

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.
Files changed (81) hide show
  1. package/.dz-manifest.json +146 -58
  2. package/README.md +72 -2
  3. package/dist/cmd-usage.d.ts +148 -0
  4. package/dist/cmd-usage.d.ts.map +1 -0
  5. package/dist/cmd-usage.js +548 -0
  6. package/dist/cmd-usage.js.map +1 -0
  7. package/dist/compounding.d.ts +4 -0
  8. package/dist/compounding.d.ts.map +1 -1
  9. package/dist/compounding.js +6 -0
  10. package/dist/compounding.js.map +1 -1
  11. package/dist/contract-checklist.d.ts +123 -0
  12. package/dist/contract-checklist.d.ts.map +1 -0
  13. package/dist/contract-checklist.js +700 -0
  14. package/dist/contract-checklist.js.map +1 -0
  15. package/dist/feature-adr-checkpoints.d.ts +11 -2
  16. package/dist/feature-adr-checkpoints.d.ts.map +1 -1
  17. package/dist/feature-adr-checkpoints.js +37 -2
  18. package/dist/feature-adr-checkpoints.js.map +1 -1
  19. package/dist/feature-adr-routing.d.ts +58 -23
  20. package/dist/feature-adr-routing.d.ts.map +1 -1
  21. package/dist/feature-adr-routing.js +208 -59
  22. package/dist/feature-adr-routing.js.map +1 -1
  23. package/dist/guard.d.ts +25 -0
  24. package/dist/guard.d.ts.map +1 -1
  25. package/dist/guard.js +59 -1
  26. package/dist/guard.js.map +1 -1
  27. package/dist/index.d.ts +9 -2
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +8 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/loop-blobs.generated.js +8 -8
  32. package/dist/loop-blobs.generated.js.map +1 -1
  33. package/dist/loop-plan.d.ts +13 -1
  34. package/dist/loop-plan.d.ts.map +1 -1
  35. package/dist/loop-plan.js +15 -1
  36. package/dist/loop-plan.js.map +1 -1
  37. package/dist/loop-render.d.ts.map +1 -1
  38. package/dist/loop-render.js +51 -6
  39. package/dist/loop-render.js.map +1 -1
  40. package/dist/loop-trace.d.ts +20 -1
  41. package/dist/loop-trace.d.ts.map +1 -1
  42. package/dist/loop-trace.js +83 -1
  43. package/dist/loop-trace.js.map +1 -1
  44. package/dist/model-recommender.d.ts +8 -0
  45. package/dist/model-recommender.d.ts.map +1 -1
  46. package/dist/model-recommender.js +31 -4
  47. package/dist/model-recommender.js.map +1 -1
  48. package/dist/qe-bridge.d.ts.map +1 -1
  49. package/dist/qe-bridge.js +9 -0
  50. package/dist/qe-bridge.js.map +1 -1
  51. package/dist/restart-advisor.d.ts +103 -0
  52. package/dist/restart-advisor.d.ts.map +1 -0
  53. package/dist/restart-advisor.js +445 -0
  54. package/dist/restart-advisor.js.map +1 -0
  55. package/dist/slop-lint.d.ts +128 -0
  56. package/dist/slop-lint.d.ts.map +1 -0
  57. package/dist/slop-lint.js +607 -0
  58. package/dist/slop-lint.js.map +1 -0
  59. package/dist/workflow-run.d.ts.map +1 -1
  60. package/dist/workflow-run.js +18 -12
  61. package/dist/workflow-run.js.map +1 -1
  62. package/package.json +19 -15
  63. package/sbom.json +277 -57
  64. package/src/cmd-usage.ts +720 -0
  65. package/src/compounding.ts +13 -0
  66. package/src/contract-checklist.ts +973 -0
  67. package/src/deadwood-allowlist.json +80 -0
  68. package/src/feature-adr-checkpoints.ts +38 -2
  69. package/src/feature-adr-routing.ts +238 -55
  70. package/src/guard.ts +79 -1
  71. package/src/index.ts +81 -1
  72. package/src/loop-blobs.generated.ts +8 -8
  73. package/src/loop-plan.ts +36 -3
  74. package/src/loop-render.ts +50 -6
  75. package/src/loop-trace.ts +91 -2
  76. package/src/model-recommender.ts +35 -4
  77. package/src/qe-bridge.ts +9 -0
  78. package/src/restart-advisor.ts +579 -0
  79. package/src/slop-lint.ts +762 -0
  80. package/src/slop-markers.json +71 -0
  81. package/src/workflow-run.ts +18 -11
@@ -0,0 +1,71 @@
1
+ {
2
+ "schema": "dz-slop-registry/1",
3
+ "metadata": {
4
+ "policyVersion": "2026-08-28",
5
+ "owner": "@dzhechkov/harness-core maintainers",
6
+ "reviewCadence": "Review fixture-backed false positives before every registry change and at the ADR after-action date.",
7
+ "englishReference": {
8
+ "repository": "https://github.com/NousResearch/autonovel",
9
+ "commit": "d165f267a0ffd34f3b0a70a8a72ac38cb8e4a542",
10
+ "path": "ANTI-SLOP.md",
11
+ "license": "none-declared",
12
+ "retrieved": "2026-08-28",
13
+ "use": "reference-only; shipped entries are independently selected from the project brief and are repository-authored"
14
+ }
15
+ },
16
+ "markers": [
17
+ { "id": "en.leverage", "language": "en", "match": { "kind": "form", "values": ["leverage", "leverages", "leveraged", "leveraging"] }, "rationale": "Promotional verb when clustered.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
18
+ { "id": "en.utilize", "language": "en", "match": { "kind": "form", "values": ["utilize", "utilizes", "utilized", "utilizing"] }, "rationale": "Stock substitute for use when clustered.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
19
+ { "id": "en.seamless", "language": "en", "match": { "kind": "form", "values": ["seamless", "seamlessly"] }, "rationale": "Promotional ease claim when clustered.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
20
+ { "id": "en.robust", "language": "en", "match": { "kind": "form", "values": ["robust", "robustly"] }, "rationale": "Strength adjective that is legitimate alone and suspicious only in clusters.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
21
+ { "id": "en.cutting-edge", "language": "en", "match": { "kind": "phrase", "values": ["cutting-edge"] }, "rationale": "Promotional novelty phrase when clustered.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
22
+ { "id": "en.comprehensive", "language": "en", "match": { "kind": "form", "values": ["comprehensive", "comprehensively"] }, "rationale": "Scope adjective when clustered.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
23
+ { "id": "en.delve", "language": "en", "match": { "kind": "form", "values": ["delve", "delves", "delved", "delving"] }, "rationale": "Stock exploration verb when clustered.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
24
+ { "id": "en.paradigm", "language": "en", "match": { "kind": "form", "values": ["paradigm", "paradigms"] }, "rationale": "Abstract framing noun when clustered.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
25
+ { "id": "en.synergy", "language": "en", "match": { "kind": "form", "values": ["synergy", "synergies", "synergistic"] }, "rationale": "Promotional collaboration noun when clustered.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
26
+ { "id": "en.state-of-the-art", "language": "en", "match": { "kind": "phrase", "values": ["state-of-the-art"] }, "rationale": "Promotional superlative phrase when clustered.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
27
+ { "id": "en.in-order-to", "language": "en", "match": { "kind": "phrase", "values": ["in order to"] }, "rationale": "Verbose stock connective when clustered.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
28
+ { "id": "ru.leverage", "language": "ru", "match": { "kind": "phrase", "values": ["задействовать потенциал", "использовать потенциал"] }, "rationale": "Канцелярский оборот о потенциале при высокой плотности.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
29
+ { "id": "ru.utilize", "language": "ru", "match": { "kind": "stem", "values": ["использова"] }, "rationale": "Глагол общего назначения, значим только в кластере.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
30
+ { "id": "ru.seamless", "language": "ru", "match": { "kind": "stem", "values": ["бесшовн"] }, "rationale": "Рекламное описание простоты при высокой плотности.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
31
+ { "id": "ru.robust", "language": "ru", "match": { "kind": "stem", "values": ["надёжн", "надежн", "устойчив"] }, "rationale": "Технически допустимая характеристика, подозрительная только в кластере.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
32
+ { "id": "ru.cutting-edge", "language": "ru", "match": { "kind": "stem", "values": ["передов", "на острие технологий"] }, "rationale": "Рекламная новизна при высокой плотности.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
33
+ { "id": "ru.comprehensive", "language": "ru", "match": { "kind": "stem", "values": ["комплексн", "всесторонн"] }, "rationale": "Широта охвата при высокой плотности.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
34
+ { "id": "ru.delve", "language": "ru", "match": { "kind": "form", "values": ["погрузиться", "погрузимся", "погрузитесь", "давайте погрузимся"] }, "rationale": "Шаблонное приглашение к погружению.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
35
+ { "id": "ru.paradigm", "language": "ru", "match": { "kind": "stem", "values": ["парадигм"] }, "rationale": "Абстрактное рамочное существительное при высокой плотности.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
36
+ { "id": "ru.synergy", "language": "ru", "match": { "kind": "stem", "values": ["синерги"] }, "rationale": "Рекламное описание взаимодействия.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
37
+ { "id": "ru.state-of-the-art", "language": "ru", "match": { "kind": "phrase", "values": ["самый современный", "самая современная", "самое современное", "самые современные", "последнее слово техники"] }, "rationale": "Шаблонный суперлатив.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } },
38
+ { "id": "ru.in-order-to", "language": "ru", "match": { "kind": "phrase", "values": ["для того чтобы", "с целью того чтобы"] }, "rationale": "Многословная целевая связка.", "provenance": { "source": "features/slop-lint/01_requirements.md", "license": "repository-authored" } }
39
+ ],
40
+ "adjectives": [
41
+ { "id": "en.adjective.fast", "language": "en", "match": { "kind": "form", "values": ["fast"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
42
+ { "id": "en.adjective.seamless", "language": "en", "match": { "kind": "form", "values": ["seamless"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
43
+ { "id": "en.adjective.robust", "language": "en", "match": { "kind": "form", "values": ["robust"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
44
+ { "id": "en.adjective.comprehensive", "language": "en", "match": { "kind": "form", "values": ["comprehensive"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
45
+ { "id": "en.adjective.cutting-edge", "language": "en", "match": { "kind": "form", "values": ["cutting-edge"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
46
+ { "id": "en.adjective.scalable", "language": "en", "match": { "kind": "form", "values": ["scalable"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
47
+ { "id": "en.adjective.flexible", "language": "en", "match": { "kind": "form", "values": ["flexible"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
48
+ { "id": "en.adjective.powerful", "language": "en", "match": { "kind": "form", "values": ["powerful"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
49
+ { "id": "en.adjective.intuitive", "language": "en", "match": { "kind": "form", "values": ["intuitive"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
50
+ { "id": "en.adjective.efficient", "language": "en", "match": { "kind": "form", "values": ["efficient"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
51
+ { "id": "en.adjective.innovative", "language": "en", "match": { "kind": "form", "values": ["innovative"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
52
+ { "id": "en.adjective.modern", "language": "en", "match": { "kind": "form", "values": ["modern"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
53
+ { "id": "en.adjective.reliable", "language": "en", "match": { "kind": "form", "values": ["reliable"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
54
+ { "id": "en.adjective.secure", "language": "en", "match": { "kind": "form", "values": ["secure"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
55
+ { "id": "en.adjective.simple", "language": "en", "match": { "kind": "form", "values": ["simple"] }, "rationale": "Closed stack qualifier.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
56
+ { "id": "ru.adjective.fast", "language": "ru", "match": { "kind": "stem", "values": ["быстр"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
57
+ { "id": "ru.adjective.seamless", "language": "ru", "match": { "kind": "stem", "values": ["бесшовн"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
58
+ { "id": "ru.adjective.robust", "language": "ru", "match": { "kind": "stem", "values": ["надёжн", "надежн", "устойчив"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
59
+ { "id": "ru.adjective.comprehensive", "language": "ru", "match": { "kind": "stem", "values": ["комплексн", "всесторонн"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
60
+ { "id": "ru.adjective.cutting-edge", "language": "ru", "match": { "kind": "stem", "values": ["передов"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
61
+ { "id": "ru.adjective.scalable", "language": "ru", "match": { "kind": "stem", "values": ["масштабируем"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
62
+ { "id": "ru.adjective.flexible", "language": "ru", "match": { "kind": "stem", "values": ["гибк"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
63
+ { "id": "ru.adjective.powerful", "language": "ru", "match": { "kind": "stem", "values": ["мощн"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
64
+ { "id": "ru.adjective.intuitive", "language": "ru", "match": { "kind": "stem", "values": ["интуитивн"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
65
+ { "id": "ru.adjective.efficient", "language": "ru", "match": { "kind": "stem", "values": ["эффективн"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
66
+ { "id": "ru.adjective.innovative", "language": "ru", "match": { "kind": "stem", "values": ["инновационн"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
67
+ { "id": "ru.adjective.modern", "language": "ru", "match": { "kind": "stem", "values": ["современн"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
68
+ { "id": "ru.adjective.secure", "language": "ru", "match": { "kind": "stem", "values": ["безопасн"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } },
69
+ { "id": "ru.adjective.simple", "language": "ru", "match": { "kind": "stem", "values": ["прост"] }, "rationale": "Закрытый квалификатор стека.", "provenance": { "source": "features/slop-lint/03_adr/001-add-density-aware-bilingual-lexical-linting.md", "license": "repository-authored" } }
70
+ ]
71
+ }
@@ -33,6 +33,7 @@ import {
33
33
  traceInit,
34
34
  traceLedgerLine,
35
35
  traceOnDispatch,
36
+ traceOnFanoutTruncated,
36
37
  traceOnSettle,
37
38
  traceShellQuote,
38
39
  TRACE_KEY_RE,
@@ -336,7 +337,7 @@ export function computeBoundaryReservations(
336
337
  if (b.kind === 'region') {
337
338
  const r = b.region;
338
339
  if (r === undefined) continue;
339
- const members = activatedMembers(r.registry, r.dedup, r.maxFanout).length;
340
+ const members = activatedMembers(r.registry, r.dedup, r.maxFanout, r.overflow).length;
340
341
  const perItem = r.chain.reduce((n, s) => n + worstCaseInvocations(s), 0);
341
342
  const perItemWall = r.chain.reduce((n, s) => n + worstCaseInvocations(s) * timeoutMsFor(s), 0);
342
343
  out.push({
@@ -366,17 +367,14 @@ export function computeBoundaryReservations(
366
367
  /**
367
368
  * The members a fanout actually ACTIVATES.
368
369
  *
369
- * `maxFanout` caps ACTIVATION, not merely concurrency the rendered script emits
370
- * `registry.slice(0, maxFanout)` ("bounded fanout (INV-2): never args-derived, never uncapped").
371
- * Getting this wrong is a STRUCTURAL-EQUIVALENCE break, not a performance detail: a runner that
372
- * treated the bound as a concurrency limit would dispatch all six entries of a six-item registry
373
- * where the Claude host dispatched three, and the two hosts' traces would disagree on dispatch
374
- * multiplicity for the same plan. (MEASURED: that is exactly what the F5 equivalence leg caught
375
- * against the committed `pkg-audit-1` run — 6 lanes here, 3 there.)
370
+ * `maxFanout` caps CONCURRENCY under the default/window policy. Only the explicitly declared
371
+ * `overflow:'truncate'` escape hatch caps activation, and that path owes stderr + trace receipts.
372
+ * This function is shared by reservation arithmetic and enactment so neither can silently retain
373
+ * the old prefix-only interpretation.
376
374
  */
377
- function activatedMembers(registry: string[], dedup: boolean, maxFanout: number): string[] {
375
+ function activatedMembers(registry: string[], dedup: boolean, maxFanout: number, overflow: 'window' | 'truncate'): string[] {
378
376
  const base = dedup ? [...new Set(registry)] : [...registry];
379
- return maxFanout > 0 ? base.slice(0, maxFanout) : base;
377
+ return overflow === 'truncate' && maxFanout > 0 ? base.slice(0, maxFanout) : base;
380
378
  }
381
379
 
382
380
  /**
@@ -1605,7 +1603,16 @@ async function runStage(ctx: RunCtx, b: RunBoundary): Promise<string | null> {
1605
1603
  async function runRegion(ctx: RunCtx, b: RunBoundary): Promise<void> {
1606
1604
  const r = b.region;
1607
1605
  if (r === undefined) return;
1608
- const members = activatedMembers(r.registry, r.dedup, r.maxFanout);
1606
+ const members = activatedMembers(r.registry, r.dedup, r.maxFanout, r.overflow);
1607
+ if (r.overflow === 'truncate') {
1608
+ traceOnFanoutTruncated(ctx.trace, {
1609
+ stage: r.fanout,
1610
+ registrySize: r.registry.length,
1611
+ dispatched: members.length,
1612
+ reason: r.truncateReason ?? '',
1613
+ });
1614
+ flush(ctx);
1615
+ }
1609
1616
  for (const k of members) {
1610
1617
  if (!safeItemKey(k)) {
1611
1618
  throw new RunFailure(