@dzhechkov/harness-core 0.8.2 → 0.8.5

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 (45) hide show
  1. package/.dz-manifest.json +110 -22
  2. package/README.md +66 -1
  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-routing.d.ts +2 -2
  16. package/dist/feature-adr-routing.d.ts.map +1 -1
  17. package/dist/feature-adr-routing.js +21 -1
  18. package/dist/feature-adr-routing.js.map +1 -1
  19. package/dist/index.d.ts +7 -0
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +7 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/qe-bridge.d.ts.map +1 -1
  24. package/dist/qe-bridge.js +9 -0
  25. package/dist/qe-bridge.js.map +1 -1
  26. package/dist/restart-advisor.d.ts +103 -0
  27. package/dist/restart-advisor.d.ts.map +1 -0
  28. package/dist/restart-advisor.js +445 -0
  29. package/dist/restart-advisor.js.map +1 -0
  30. package/dist/slop-lint.d.ts +128 -0
  31. package/dist/slop-lint.d.ts.map +1 -0
  32. package/dist/slop-lint.js +607 -0
  33. package/dist/slop-lint.js.map +1 -0
  34. package/package.json +14 -13
  35. package/sbom.json +241 -21
  36. package/src/cmd-usage.ts +720 -0
  37. package/src/compounding.ts +13 -0
  38. package/src/contract-checklist.ts +973 -0
  39. package/src/deadwood-allowlist.json +80 -0
  40. package/src/feature-adr-routing.ts +21 -1
  41. package/src/index.ts +79 -0
  42. package/src/qe-bridge.ts +9 -0
  43. package/src/restart-advisor.ts +579 -0
  44. package/src/slop-lint.ts +762 -0
  45. package/src/slop-markers.json +71 -0
@@ -0,0 +1,80 @@
1
+ {
2
+ "v": 1,
3
+ "entries": [
4
+ {
5
+ "surface": "sign",
6
+ "kind": "command",
7
+ "reason": "trust-root signing and verification run only on key or release events; rarity is the design"
8
+ },
9
+ {
10
+ "surface": "delivery-check",
11
+ "kind": "command",
12
+ "reason": "release gate invoked per delivery, not as part of ordinary daily command traffic"
13
+ },
14
+ {
15
+ "surface": "deadwood",
16
+ "kind": "command",
17
+ "reason": "the measurement command deliberately does not record itself, so its zero count is structural"
18
+ },
19
+ {
20
+ "surface": "no-secrets",
21
+ "kind": "rule",
22
+ "reason": "credential safety net whose zero-firing state is the healthy outcome"
23
+ },
24
+ {
25
+ "surface": "no-workspace-star",
26
+ "kind": "rule",
27
+ "reason": "publish safety net; zero firings means no broken workspace dependency would ship"
28
+ },
29
+ {
30
+ "surface": "no-skill-drift",
31
+ "kind": "rule",
32
+ "reason": "canonical-copy safety net; zero firings means projected skills stayed in sync"
33
+ },
34
+ {
35
+ "surface": "readme-consistency",
36
+ "kind": "rule",
37
+ "reason": "documentation drift safety net; zero firings means measured counts stayed aligned"
38
+ },
39
+ {
40
+ "surface": "skills-registrable",
41
+ "kind": "rule",
42
+ "reason": "package registration safety net; zero firings means shipped skill layouts stayed loadable"
43
+ },
44
+ {
45
+ "surface": "readme-first",
46
+ "kind": "rule",
47
+ "reason": "release documentation safety net; zero firings means behavior changes carried their README update"
48
+ },
49
+ {
50
+ "surface": "agents-md-policy-sync",
51
+ "kind": "rule",
52
+ "reason": "governance projection safety net; zero firings means policy copies stayed synchronized"
53
+ },
54
+ {
55
+ "surface": "lockfile-in-sync",
56
+ "kind": "rule",
57
+ "reason": "dependency release safety net; zero firings means package manifests and the lockfile agreed"
58
+ },
59
+ {
60
+ "surface": "store-bloat-cap",
61
+ "kind": "rule",
62
+ "reason": "learning-store capacity safety net; zero firings means the configured cap was respected"
63
+ },
64
+ {
65
+ "surface": "no-stubs",
66
+ "kind": "rule",
67
+ "reason": "incomplete-source safety net; zero firings means no unfinished implementation marker reached publish"
68
+ },
69
+ {
70
+ "surface": "review-round",
71
+ "kind": "rule",
72
+ "reason": "independent-review safety net evaluated only for publishable source changes"
73
+ },
74
+ {
75
+ "surface": "licence-hold",
76
+ "kind": "rule",
77
+ "reason": "release safety net that fires only while a package has an unresolved licence grant"
78
+ }
79
+ ]
80
+ }
@@ -389,7 +389,16 @@ export function codexEffortHint(opts: StageOpts | null | undefined): string {
389
389
 
390
390
  // ── Step-7.5 CODE landed barrier (Codex out-of-band write flush) ────────────
391
391
 
392
- export const DEFAULT_CODE_LANDING_MAX_WAIT_MS = 120_000;
392
+ // Widened 2026-08-28 (MEASURED, not a guess): the dz-deadwood coder job ran 46m11s end to end, and
393
+ // the slop-lint coder was independently confirmed STILL RUNNING (codex-companion status "running",
394
+ // pid alive, mid-TDD-cycle, actively applying file changes) at 16m38s elapsed — a full 8x past the
395
+ // old 120s window. The old window declared "genuinely not landed" and fed Step-8 QE a false empty
396
+ // tree, producing a grade-D report entirely about an absence that was never real. This does not fix
397
+ // the underlying conflation of TIMEOUT with CONFIRMED-ABSENCE (filed as a backlog item — the barrier
398
+ // still cannot see the codex-companion job's own liveness) — it only narrows how often the false
399
+ // negative fires for a realistic M-tier build, at the cost of a longer worst-case wait when the
400
+ // coder truly produced nothing.
401
+ export const DEFAULT_CODE_LANDING_MAX_WAIT_MS = 1_020_000;
393
402
 
394
403
  export const DEFAULT_CODE_LANDING_BACKOFF_MS = [
395
404
  1_000,
@@ -403,6 +412,17 @@ export const DEFAULT_CODE_LANDING_BACKOFF_MS = [
403
412
  20_000,
404
413
  25_000,
405
414
  25_000,
415
+ 30_000,
416
+ 30_000,
417
+ 60_000,
418
+ 60_000,
419
+ 60_000,
420
+ 90_000,
421
+ 90_000,
422
+ 120_000,
423
+ 120_000,
424
+ 120_000,
425
+ 120_000,
406
426
  ] as const;
407
427
 
408
428
  export const CODE_LANDED_BARRIER_SLEEPS_SECONDS = DEFAULT_CODE_LANDING_BACKOFF_MS.map((ms) => ms / 1000);
package/src/index.ts CHANGED
@@ -224,6 +224,28 @@ export type { PretrainResult, DetectedTech } from './pretrain.js';
224
224
  export type { RecommendationReport, SkillRecommendation } from './recommend.js';
225
225
  export { claimCheck, summarize, decideClaimCheckText, severityCounts, isGated } from './claim-check.js';
226
226
  export type { ClaimFinding, ClaimCheckResult, ClaimTextDecision, FailOn } from './claim-check.js';
227
+ export {
228
+ BUNDLED_SLOP_REGISTRY_URL,
229
+ DEFAULT_SLOP_CONFIG,
230
+ parseSlopRegistry,
231
+ slopLint,
232
+ validateSlopLintConfig,
233
+ } from './slop-lint.js';
234
+ export type {
235
+ SlopDiagnostic,
236
+ SlopEvidence,
237
+ SlopFinding,
238
+ SlopFindingMetrics,
239
+ SlopFindingThresholds,
240
+ SlopLanguage,
241
+ SlopLintConfig,
242
+ SlopLintResult,
243
+ SlopRegistry,
244
+ SlopRegistryEntry,
245
+ SlopRuleId,
246
+ SlopValidationError,
247
+ ValidationResult,
248
+ } from './slop-lint.js';
227
249
  export { hookDecision, isFenced, isNewLine, ESCAPE_TEACHING } from './claim-check-hook-policy.js';
228
250
  export type { HookDecision, HookDecisionOpts } from './claim-check-hook-policy.js';
229
251
  export { step8ClaimGate } from './feature-adr-claim-gate.js';
@@ -290,6 +312,35 @@ export { decidePublishSigning, decidePostSigningVerification, decideSignableSet,
290
312
  export type { PublishSigningVerdict, PublishSigningDecision, SignableSetDecision } from './publish-signing.js';
291
313
  export type { RecordKind, RecordVerdict, RecordDecision } from './run-records.js';
292
314
  export type { AmendmentRow, AmendmentVerdict, AmendmentResolution, AmendmentOutcome, AmendmentDecision, PlanCoverageGap } from './amendment-trace.js';
315
+ // contract-checklist (ADR-001): pure extraction, canonical rendering, typed report parsing, and
316
+ // exact per-item verification. Filesystem discovery/containment stays in harness-cli.
317
+ export {
318
+ extractContractChecklist,
319
+ renderContractChecklist,
320
+ parseContractVerdictReport,
321
+ verifyContractVerdicts,
322
+ } from './contract-checklist.js';
323
+ export type {
324
+ ContractSourceKind,
325
+ ContractVerdict,
326
+ ContractObservedOutcome,
327
+ ContractGrade,
328
+ ContractSourceArtifact,
329
+ ContractChecklistSource,
330
+ ContractItem,
331
+ ContractChecklist,
332
+ ContractDiagnostic,
333
+ ContractChecklistResult,
334
+ ContractVerdictEvidence,
335
+ ContractVerdictItem,
336
+ ContractVerdictReport,
337
+ ContractVerdictParseResult,
338
+ ContractEvidenceReadResult,
339
+ ContractEvidenceReader,
340
+ ContractItemVerification,
341
+ ContractVerificationCounts,
342
+ ContractVerification,
343
+ } from './contract-checklist.js';
293
344
  export {
294
345
  DOMAIN_LIFT_EXACT,
295
346
  DOMAIN_LIFT_RELATED,
@@ -792,6 +843,9 @@ export * from './skills-verify.js';
792
843
  // finding, not a pass).
793
844
  export * from './compounding.js';
794
845
 
846
+ // Advisory command-invocation telemetry + deadwood report (feature dz-deadwood).
847
+ export * from './cmd-usage.js';
848
+
795
849
  // Cold-vs-warm EPOCH RUNNER (feature epoch-replay, scout idea #4) — the RESULT leg to compounding's
796
850
  // readiness leg. Orchestrates + scores; never calls a model. SUPPORTED requires two DISJOINT Wilson
797
851
  // intervals; INCONCLUSIVE is a first-class honest outcome.
@@ -872,6 +926,31 @@ export { decideCadenceWindow, isoWeekOf, weeklyBuckets, guardRepeatDecay, buildC
872
926
  export type { CadenceWindow, CadenceReport, CadenceWindowDecision } from './cadence.js';
873
927
  export { readQeRounds, countQeRounds, QE_ROUNDS_DEFAULT_CEILING } from './qe-rounds.js';
874
928
  export type { QeRound, QeFailedAttempt, QeRoundsReport, QeRoundsStatus } from './qe-rounds.js';
929
+ export {
930
+ adviseRestart,
931
+ decideRestartRecommendation,
932
+ parseCheckpointQeHistory,
933
+ parseTrainingPairQeHistory,
934
+ renderRestartDecisionLog,
935
+ RESTART_ADVISOR_SCHEMA,
936
+ RESTART_ADVISOR_MAX_DIAGNOSTICS,
937
+ RESTART_ADVISOR_MAX_EVIDENCE,
938
+ } from './restart-advisor.js';
939
+ export type {
940
+ ParsedRestartHistory,
941
+ RestartAdvice,
942
+ RestartAdvisorInput,
943
+ RestartAdvisorPolicy,
944
+ RestartDecision,
945
+ RestartDecisionInput,
946
+ RestartGrade,
947
+ RestartNormalizedRound,
948
+ RestartPolicyOrigin,
949
+ RestartReason,
950
+ RestartRecommendation,
951
+ RestartSource,
952
+ RestartThreshold,
953
+ } from './restart-advisor.js';
875
954
  export { describeStoreLocation, storeLocationLine } from './store-location.js';
876
955
  export type { StoreLocation, StoreOrigin } from './store-location.js';
877
956
  export { mergeStoreHits, sameStore, globalStoreRoot, storeCountLabel } from './store-merge.js';
package/src/qe-bridge.ts CHANGED
@@ -392,6 +392,15 @@ export function buildBridgePrompt(
392
392
  '4. Judge only what the extracts below actually show; if the evidence is insufficient to judge',
393
393
  ' something, say so explicitly rather than assuming it is fine.',
394
394
  '',
395
+ 'You have been given NO tools and NO filesystem access — this is deliberate isolation, not an',
396
+ 'accident, and there is nothing else to inspect. Do not attempt to run a shell command, read a',
397
+ 'file, or explore a directory: no such action can succeed here, and any text that looks like a',
398
+ 'tool invocation will simply sit in your own output unexecuted. The extracts below are the',
399
+ 'COMPLETE evidence you will ever receive for this review. If they are insufficient to judge a',
400
+ 'specific point, write that as a finding (e.g. "cannot verify X from the given extracts") and',
401
+ 'continue to a grade regardless — never stop your review to attempt verification that cannot',
402
+ 'happen in this environment.',
403
+ '',
395
404
  'Output format — ALL THREE parts are required, in this order, at the END of your answer:',
396
405
  ' (a) your review prose, containing exactly ONE line that reads: GRADE: <A-F>',
397
406
  ' (b) a fenced code block labelled ' + BRIDGE_FENCE_LABEL + ' whose body is JSON:',