@dailephd/my-dev-kit-lab 0.8.2 → 0.9.1

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 (122) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +19 -3
  3. package/benchmarks/contracts/agent-success-rate-project-profiles.json +33 -0
  4. package/benchmarks/contracts/agent-success-rate-tasks.json +671 -0
  5. package/benchmarks/projects/agent-success-inventory-node/.gitattributes +2 -0
  6. package/benchmarks/projects/agent-success-inventory-node/README.md +74 -0
  7. package/benchmarks/projects/agent-success-inventory-node/package.json +14 -0
  8. package/benchmarks/projects/agent-success-inventory-node/src/fulfillmentReport.js +38 -0
  9. package/benchmarks/projects/agent-success-inventory-node/src/index.js +26 -0
  10. package/benchmarks/projects/agent-success-inventory-node/src/inventoryStore.js +114 -0
  11. package/benchmarks/projects/agent-success-inventory-node/src/quantity.js +19 -0
  12. package/benchmarks/projects/agent-success-inventory-node/src/reservationService.js +45 -0
  13. package/benchmarks/projects/agent-success-inventory-node/tests/quantity-edge.check.mjs +51 -0
  14. package/benchmarks/projects/agent-success-inventory-node/tests/quantity-primary.check.mjs +46 -0
  15. package/benchmarks/projects/agent-success-inventory-node/tests/regression.check.mjs +115 -0
  16. package/benchmarks/projects/agent-success-inventory-node/tests/report-edge.check.mjs +109 -0
  17. package/benchmarks/projects/agent-success-inventory-node/tests/report-primary.check.mjs +47 -0
  18. package/benchmarks/projects/agent-success-inventory-node/tests/reservation-edge.check.mjs +63 -0
  19. package/benchmarks/projects/agent-success-inventory-node/tests/reservation-primary.check.mjs +44 -0
  20. package/benchmarks/projects/agent-success-task-board-node/.gitattributes +2 -0
  21. package/benchmarks/projects/agent-success-task-board-node/README.md +77 -0
  22. package/benchmarks/projects/agent-success-task-board-node/package.json +14 -0
  23. package/benchmarks/projects/agent-success-task-board-node/src/index.js +24 -0
  24. package/benchmarks/projects/agent-success-task-board-node/src/projectSummary.js +15 -0
  25. package/benchmarks/projects/agent-success-task-board-node/src/taskService.js +58 -0
  26. package/benchmarks/projects/agent-success-task-board-node/src/taskStore.js +58 -0
  27. package/benchmarks/projects/agent-success-task-board-node/src/validation.js +31 -0
  28. package/benchmarks/projects/agent-success-task-board-node/tests/import-edge.check.mjs +65 -0
  29. package/benchmarks/projects/agent-success-task-board-node/tests/import-primary.check.mjs +31 -0
  30. package/benchmarks/projects/agent-success-task-board-node/tests/regression.check.mjs +107 -0
  31. package/benchmarks/projects/agent-success-task-board-node/tests/summary-edge.check.mjs +67 -0
  32. package/benchmarks/projects/agent-success-task-board-node/tests/summary-primary.check.mjs +54 -0
  33. package/benchmarks/projects/agent-success-task-board-node/tests/title-edge.check.mjs +39 -0
  34. package/benchmarks/projects/agent-success-task-board-node/tests/title-primary.check.mjs +29 -0
  35. package/dist/src/agents/adapters/claudeAdapter.js +6 -3
  36. package/dist/src/agents/adapters/codexAdapter.js +51 -10
  37. package/dist/src/agents/index.js +1 -0
  38. package/dist/src/agents/normalizeAgentTelemetry.js +50 -0
  39. package/dist/src/agents/parseAgentTokenUsage.js +71 -49
  40. package/dist/src/agents/providerBuildObservation.js +97 -0
  41. package/dist/src/audits/core/projectInventory.js +1 -0
  42. package/dist/src/cli/help.js +44 -1
  43. package/dist/src/commands/runExperimentDescribeCommand.js +83 -1
  44. package/dist/src/commands/runExperimentRunCommand.js +309 -6
  45. package/dist/src/core/processTree.js +55 -0
  46. package/dist/src/core/runMeasuredCommand.js +108 -22
  47. package/dist/src/evaluation/agentSuccess/applyPatchToSandbox.js +37 -0
  48. package/dist/src/evaluation/agentSuccess/assessBaseline.js +23 -0
  49. package/dist/src/evaluation/agentSuccess/corpusTypes.js +74 -0
  50. package/dist/src/evaluation/agentSuccess/extractPatchCandidate.js +46 -0
  51. package/dist/src/evaluation/agentSuccess/index.js +14 -0
  52. package/dist/src/evaluation/agentSuccess/parseUnifiedDiff.js +210 -0
  53. package/dist/src/evaluation/agentSuccess/patchTypes.js +5 -0
  54. package/dist/src/evaluation/agentSuccess/readAgentSuccessCorpus.js +183 -0
  55. package/dist/src/evaluation/agentSuccess/runVerificationCheck.js +100 -0
  56. package/dist/src/evaluation/agentSuccess/taskPaths.js +34 -0
  57. package/dist/src/evaluation/agentSuccess/taskTypes.js +14 -0
  58. package/dist/src/evaluation/agentSuccess/validateAgentSuccessCorpus.js +307 -0
  59. package/dist/src/evaluation/agentSuccess/validateAgentSuccessTask.js +297 -0
  60. package/dist/src/evaluation/agentSuccess/validatePatchPolicy.js +66 -0
  61. package/dist/src/evaluation/agentSuccess/verificationTypes.js +1 -0
  62. package/dist/src/evaluation/benchmarkSandbox/createBenchmarkSandbox.js +127 -0
  63. package/dist/src/evaluation/benchmarkSandbox/errors.js +11 -0
  64. package/dist/src/evaluation/benchmarkSandbox/gitExecutor.js +62 -0
  65. package/dist/src/evaluation/benchmarkSandbox/index.js +8 -0
  66. package/dist/src/evaluation/benchmarkSandbox/minimalHostEnv.js +37 -0
  67. package/dist/src/evaluation/benchmarkSandbox/pathPolicy.js +49 -0
  68. package/dist/src/evaluation/benchmarkSandbox/removeBenchmarkSandbox.js +74 -0
  69. package/dist/src/evaluation/benchmarkSandbox/treeSnapshot.js +57 -0
  70. package/dist/src/evaluation/benchmarkSandbox/types.js +3 -0
  71. package/dist/src/evaluation/changeSet/captureChangeSet.js +98 -0
  72. package/dist/src/evaluation/changeSet/index.js +2 -0
  73. package/dist/src/evaluation/changeSet/types.js +9 -0
  74. package/dist/src/experiments/defaultRegistry.js +2 -0
  75. package/dist/src/experiments/plugins/agentSuccessRate/agentTaskProjection.js +12 -0
  76. package/dist/src/experiments/plugins/agentSuccessRate/analysis.js +425 -0
  77. package/dist/src/experiments/plugins/agentSuccessRate/analysisArtifact.js +155 -0
  78. package/dist/src/experiments/plugins/agentSuccessRate/analysisTypes.js +65 -0
  79. package/dist/src/experiments/plugins/agentSuccessRate/attemptEvidence.js +7 -0
  80. package/dist/src/experiments/plugins/agentSuccessRate/campaignCheckpoint.js +216 -0
  81. package/dist/src/experiments/plugins/agentSuccessRate/campaignCheckpointStore.js +588 -0
  82. package/dist/src/experiments/plugins/agentSuccessRate/campaignEvidenceQuality.js +77 -0
  83. package/dist/src/experiments/plugins/agentSuccessRate/campaignExecution.js +314 -0
  84. package/dist/src/experiments/plugins/agentSuccessRate/campaignIdentity.js +111 -0
  85. package/dist/src/experiments/plugins/agentSuccessRate/campaignProgress.js +173 -0
  86. package/dist/src/experiments/plugins/agentSuccessRate/campaignQueue.js +11 -0
  87. package/dist/src/experiments/plugins/agentSuccessRate/campaignRecovery.js +256 -0
  88. package/dist/src/experiments/plugins/agentSuccessRate/campaignResumableExecution.js +207 -0
  89. package/dist/src/experiments/plugins/agentSuccessRate/config.js +123 -0
  90. package/dist/src/experiments/plugins/agentSuccessRate/contextGeneration.js +497 -0
  91. package/dist/src/experiments/plugins/agentSuccessRate/execution.js +441 -0
  92. package/dist/src/experiments/plugins/agentSuccessRate/executionArtifact.js +126 -0
  93. package/dist/src/experiments/plugins/agentSuccessRate/executionTypes.js +2 -0
  94. package/dist/src/experiments/plugins/agentSuccessRate/index.js +26 -0
  95. package/dist/src/experiments/plugins/agentSuccessRate/metadata.js +28 -0
  96. package/dist/src/experiments/plugins/agentSuccessRate/metrics.js +76 -0
  97. package/dist/src/experiments/plugins/agentSuccessRate/plugin.js +517 -0
  98. package/dist/src/experiments/plugins/agentSuccessRate/realAgentExecution.js +272 -0
  99. package/dist/src/experiments/plugins/agentSuccessRate/realAgentPrompt.js +43 -0
  100. package/dist/src/experiments/plugins/agentSuccessRate/repairAnalysis.js +148 -0
  101. package/dist/src/experiments/plugins/agentSuccessRate/repairExecution.js +103 -0
  102. package/dist/src/experiments/plugins/agentSuccessRate/repairFeedback.js +91 -0
  103. package/dist/src/experiments/plugins/agentSuccessRate/repairPolicy.js +88 -0
  104. package/dist/src/experiments/plugins/agentSuccessRate/timeoutPresets.js +9 -0
  105. package/dist/src/experiments/plugins/agentSuccessRate/types.js +1 -0
  106. package/dist/src/experiments/plugins/warmIndexReuse/plugin.js +2 -3
  107. package/dist/src/report/experiments/agentSuccessCampaignProgressReportModel.js +1 -0
  108. package/dist/src/report/experiments/agentSuccessRateReportModel.js +6 -0
  109. package/dist/src/report/experiments/buildAgentSuccessCampaignProgressReport.js +6 -0
  110. package/dist/src/report/experiments/buildAgentSuccessRateReport.js +266 -0
  111. package/dist/src/report/experiments/buildPluginExperimentReport.js +27 -2
  112. package/dist/src/report/experiments/index.js +4 -0
  113. package/dist/src/report/experiments/renderAgentSuccessCampaignProgressHtml.js +6 -0
  114. package/dist/src/report/experiments/renderAgentSuccessCampaignProgressText.js +25 -0
  115. package/dist/src/report/experiments/renderAgentSuccessRateHtml.js +171 -0
  116. package/dist/src/report/experiments/renderAgentSuccessRateText.js +146 -0
  117. package/dist/src/report/experiments/renderPluginExperimentReportHtml.js +3 -0
  118. package/dist/src/report/experiments/renderPluginExperimentReportText.js +5 -0
  119. package/dist/src/report/experiments/writeAgentSuccessCampaignProgressReport.js +135 -0
  120. package/dist/src/report/experiments/writePluginExperimentReports.js +4 -3
  121. package/docs/METRICS.md +79 -0
  122. package/package.json +1 -1
@@ -156,6 +156,10 @@ export function renderExperimentRunHelp() {
156
156
  " --case <ids> Comma-separated case ids to run",
157
157
  " --benchmark-project <ids> Comma-separated benchmark project ids to run",
158
158
  "",
159
+ "Options are accepted per plugin: every plugin rejects the options it does not support instead of ignoring them. The",
160
+ "generic controlled-experiment options (such as --agents, --strategies, --complexities, --max-runs and the command",
161
+ "templates) belong to context-strategy-comparison and warm-index-reuse only.",
162
+ "",
159
163
  "my-dev-kit command override (warm-index-reuse, incremental-change-staleness, context-window-scaling, retrieval-precision-recall, retrieval-query-strategy-comparison, and context-pack-generation):",
160
164
  " --kit-command <command> my-dev-kit command used by the selected experiment plugin",
161
165
  " (defaults: warm-index-reuse and context-window-scaling use",
@@ -273,7 +277,45 @@ export function renderExperimentRunHelp() {
273
277
  " --command-template-codex <template> Command template used to invoke the codex agent",
274
278
  " --command-template-claude <template> Command template used to invoke the claude agent",
275
279
  " --no-screenshot Accepted for compatibility; the plugin-aware report",
276
- " path does not capture screenshots yet"
280
+ " path does not capture screenshots yet",
281
+ "",
282
+ "agent-success-rate only:",
283
+ " Self-target only (the Lab itself); --target is rejected. Runs the",
284
+ " bundled six-task implementation corpus (two canonical benchmark",
285
+ " projects) with both source-context treatments, raw-full-file and",
286
+ " context-pack, for every selected task. The default is",
287
+ " deterministic-fixture mode, which validates the patch evaluation",
288
+ " pipeline, invokes no coding agent and needs no provider installed.",
289
+ " Accepted options: --out, --case, --benchmark-project,",
290
+ " --kit-command, --agent, --include-real-agents, --timeout-ms and",
291
+ " --repair-attempts; --case and --benchmark-project narrow the",
292
+ " catalog without reordering it.",
293
+ " --agent <codex|claude> Select exactly one real provider. Real-agent mode is entered only",
294
+ " when --agent is combined with --include-real-agents; neither flag",
295
+ " works alone. The provider receives source-only context and returns",
296
+ " a unified diff; it never edits files. The Lab applies the diff in a",
297
+ " disposable sandbox with a guarded patch policy and decides task",
298
+ " success from trusted checks on the changed state.",
299
+ " --include-real-agents Explicit authorization to invoke the selected provider. Without it",
300
+ " no provider is ever launched.",
301
+ " --timeout-ms <ms> Per provider attempt (real-agent mode only): a positive integer,",
302
+ " default 240000, maximum 1800000.",
303
+ " --repair-attempts <0|1|2> Repairs allowed after the initial attempt (real-agent mode only;",
304
+ " default 0). At most 3 attempts per treatment. A repair runs only",
305
+ " after an evaluable implementation failure, in a fresh sandbox,",
306
+ " with fixed-category feedback and the untrusted previous diff; it",
307
+ " never follows a provider, sandbox or verification infrastructure",
308
+ " problem.",
309
+ " Ordinary noncampaign execution writes report.json, report.html and report.txt plus",
310
+ " agent-success-rate-execution.json and",
311
+ " agent-success-rate-analysis.json. Initial-attempt and final success",
312
+ " are reported separately. Results are descriptive for the finite",
313
+ " corpus: no winner, ranking, composite score or significance claim.",
314
+ "",
315
+ "agent-success-rate resumable campaigns and timeouts only:",
316
+ ...AGENT_CAMPAIGN_OPTION_HELP.map(line => ` ${line}`),
317
+ "Examples (replace bracketed values; explicit source-root is required when package source proof is unavailable):",
318
+ ...AGENT_CAMPAIGN_EXAMPLES.map(line => ` ${line}`)
277
319
  ].join("\n");
278
320
  }
279
321
  export function renderExperimentControlledHelp() {
@@ -490,3 +532,4 @@ export function renderTutorialRunHelp() {
490
532
  " 2 Invalid command usage"
491
533
  ].join("\n");
492
534
  }
535
+ import { AGENT_CAMPAIGN_EXAMPLES, AGENT_CAMPAIGN_OPTION_HELP } from "../commands/runExperimentDescribeCommand.js";
@@ -1,4 +1,30 @@
1
1
  import { createDefaultExperimentPluginRegistry } from "../experiments/index.js";
2
+ import { AGENT_SUCCESS_RATE_DEFAULT_AGENT_TIMEOUT_MS, AGENT_SUCCESS_RATE_MAX_AGENT_TIMEOUT_MS, AGENT_SUCCESS_RATE_REAL_AGENT_IDS, AGENT_SUCCESS_RATE_REPAIR_ATTEMPT_VALUES, AGENT_SUCCESS_RATE_TREATMENT_IDS } from "../experiments/plugins/agentSuccessRate/index.js";
3
+ import { AGENT_TIMEOUT_PRESETS } from "../experiments/plugins/agentSuccessRate/timeoutPresets.js";
4
+ /** Public command-owned operational contract, shared by human, JSON and run help. */
5
+ export const AGENT_CAMPAIGN_OPTION_HELP = [
6
+ "--agent-campaign <new|resume|continue-limit>: explicit version 2 campaign; requires stable --out <directory>.",
7
+ "--one-case: campaign-only; process at most the first unfinished selected case, with both treatments mandatory.",
8
+ "--campaign-source-root <directory>: campaign-only verified current source checkout; required when installed source proof is unavailable.",
9
+ "--timeout-preset <standard|extended|maximum>: codex/claude real-agent mode only; 240000/900000/1800000 ms per attempt.",
10
+ "--timeout-ms <ms>: numeric override; mutually exclusive with --timeout-preset. Neither supplied preserves 240000 ms default.",
11
+ "--expected-checkpoint-revision <positive-integer>: continue-limit only; exact committed checkpoint generation.",
12
+ "--limit-case <case-id> --limit-treatment <raw-full-file|context-pack> --limit-epoch <epoch-id>: continue-limit only; exact terminal limit unit and epoch.",
13
+ "--authorize-additional-invocation: mandatory boolean with no value for continue-limit; at most two execution epochs per treatment.",
14
+ "Resume revalidates identity, ownership and artifact digests and skips completed work, including completed task failures.",
15
+ "Real campaigns require --agent <codex|claude> and --include-real-agents plus trusted local build observation bound to invocation.",
16
+ "Native executables and attributable restricted node entrypoints are supported; unsupported wrappers are UNVERIFIABLE. No universal installation support or transitive attestation.",
17
+ "Uncertain invocations block resume; no force replay, marker stealing, automatic quota waiting, polling or provider switching.",
18
+ "Partial campaign work is persisted without final scientific reports; complete campaigns write the existing execution/analysis v1 artifacts.",
19
+ "Campaign exits: 0 consistent bounded work (including one-case partial), 1 paused/blocked/failed execution, 2 invalid CLI usage. Legacy behavior is preserved.",
20
+ "--campaign belongs to warm-index-reuse and is rejected by agent-success-rate; other plugins reject these campaign options."
21
+ ];
22
+ export const AGENT_CAMPAIGN_EXAMPLES = [
23
+ "my-dev-kit-lab experiment run --experiment agent-success-rate --agent-campaign new --one-case --out <campaign-output-root> --campaign-source-root <source-checkout>",
24
+ "my-dev-kit-lab experiment run --experiment agent-success-rate --agent-campaign resume --one-case --out <same-campaign-output-root> --campaign-source-root <source-checkout>",
25
+ "my-dev-kit-lab experiment run --experiment agent-success-rate --agent codex --include-real-agents --agent-campaign new --timeout-preset extended --out <campaign-output-root> --campaign-source-root <source-checkout>",
26
+ "my-dev-kit-lab experiment run --experiment agent-success-rate --agent codex --include-real-agents --agent-campaign continue-limit --out <campaign-output-root> --campaign-source-root <source-checkout> --expected-checkpoint-revision <revision> --limit-case <case-id> --limit-treatment <treatment> --limit-epoch <epoch-id> --authorize-additional-invocation"
27
+ ];
2
28
  // ---------------------------------------------------------------------------
3
29
  // v0.4.6 Batch 4 -- reusable experiment-describe command owner.
4
30
  //
@@ -57,7 +83,29 @@ function buildDescription(plugin) {
57
83
  optionalConfigFields: readConfigFields(plugin, false),
58
84
  targetBehavior: describeTargetBehavior(plugin),
59
85
  expectedReports: describeExpectedReports(plugin),
60
- examples: describeExamples(plugin)
86
+ examples: describeExamples(plugin),
87
+ ...(plugin.metadata.id === AGENT_SUCCESS_RATE_ID ? { agentSuccessRate: describeAgentSuccessRate() } : {})
88
+ };
89
+ }
90
+ const AGENT_SUCCESS_RATE_ID = "agent-success-rate";
91
+ /** Fixed, public description of the implemented behavior. It names no task check, fact, edit scope or reference patch. */
92
+ function describeAgentSuccessRate() {
93
+ return {
94
+ treatments: [...AGENT_SUCCESS_RATE_TREATMENT_IDS],
95
+ corpus: "Bundled six-task implementation corpus over two canonical benchmark projects (localized, cross-module and broad-change tasks), resolved from the installed package.",
96
+ defaultMode: "deterministic-fixture: validates the patch evaluation pipeline and the benchmark corpus; no coding agent runs and no provider is required.",
97
+ realAgentMode: "Opt-in only: --agent <codex|claude> together with --include-real-agents. Neither flag alone enables it; real execution is never the default.",
98
+ providers: [...AGENT_SUCCESS_RATE_REAL_AGENT_IDS],
99
+ timeoutMs: { default: AGENT_SUCCESS_RATE_DEFAULT_AGENT_TIMEOUT_MS, maximum: AGENT_SUCCESS_RATE_MAX_AGENT_TIMEOUT_MS, scope: "each provider attempt" },
100
+ timeoutPresets: AGENT_TIMEOUT_PRESETS,
101
+ campaign: { modes: ["new", "resume", "continue-limit"], options: [...AGENT_CAMPAIGN_OPTION_HELP], examples: [...AGENT_CAMPAIGN_EXAMPLES] },
102
+ repairAttempts: { allowed: [...AGENT_SUCCESS_RATE_REPAIR_ATTEMPT_VALUES], default: 0, maximumTotalAttemptsPerTreatment: 3, mode: "real-agent only" },
103
+ agentContext: "Source-only: the provider sees the public task text and the treatment's source context, never tests, trusted checks or reference patches, and runs in a neutral working directory.",
104
+ patchApplication: "Guarded: the provider returns a unified diff only. The Lab validates it against a patch policy and applies it in a fresh disposable sandbox; canonical benchmark projects are never modified.",
105
+ taskSuccess: "Decided by trusted checks on the actual changed repository state (required behavior, no regressions, protected files intact). A provider's claim of completion is never evidence. Initial-attempt success and final success are reported separately.",
106
+ reportOutputs: ["report.json", "report.html", "report.txt", "agent-success-rate-execution.json", "agent-success-rate-analysis.json"],
107
+ targetPolicy: "Self-target only; external-local targets are rejected.",
108
+ interpretation: "Descriptive matched comparison of two source-context treatments on a finite corpus: no winner, ranking, composite score, causal or statistical-significance claim."
61
109
  };
62
110
  }
63
111
  function printDescription(plugin) {
@@ -84,6 +132,26 @@ function printDescription(plugin) {
84
132
  for (const example of description.examples) {
85
133
  console.log(` ${example}`);
86
134
  }
135
+ const agentSuccessRate = description.agentSuccessRate; // eslint-disable-line @typescript-eslint/no-explicit-any
136
+ if (agentSuccessRate) {
137
+ console.log("");
138
+ console.log("Agent success rate details:");
139
+ console.log(` Treatments: ${agentSuccessRate.treatments.join(", ")}`);
140
+ console.log(` Corpus: ${agentSuccessRate.corpus}`);
141
+ console.log(` Default mode: ${agentSuccessRate.defaultMode}`);
142
+ console.log(` Real-agent mode: ${agentSuccessRate.realAgentMode}`);
143
+ console.log(` Providers: ${agentSuccessRate.providers.join(", ")}`);
144
+ console.log(` Timeout per attempt: default ${agentSuccessRate.timeoutMs.default} ms, maximum ${agentSuccessRate.timeoutMs.maximum} ms`);
145
+ for (const option of agentSuccessRate.campaign.options)
146
+ console.log(` ${option}`);
147
+ console.log(` Repair attempts: ${agentSuccessRate.repairAttempts.allowed.join(", ")} (default ${agentSuccessRate.repairAttempts.default}; at most ${agentSuccessRate.repairAttempts.maximumTotalAttemptsPerTreatment} attempts per treatment; real-agent mode only)`);
148
+ console.log(` Agent context: ${agentSuccessRate.agentContext}`);
149
+ console.log(` Patch application: ${agentSuccessRate.patchApplication}`);
150
+ console.log(` Task success: ${agentSuccessRate.taskSuccess}`);
151
+ console.log(` Report outputs: ${agentSuccessRate.reportOutputs.join(", ")}`);
152
+ console.log(` Target policy: ${agentSuccessRate.targetPolicy}`);
153
+ console.log(` Interpretation: ${agentSuccessRate.interpretation}`);
154
+ }
87
155
  }
88
156
  function printConfigSection(title, fields) {
89
157
  console.log(`${title}:`);
@@ -123,12 +191,18 @@ function readArrayField(value, key) {
123
191
  return Array.isArray(field) ? field : [];
124
192
  }
125
193
  function describePurpose(plugin) {
194
+ if (plugin.metadata.id === AGENT_SUCCESS_RATE_ID) {
195
+ return "Measure whether implementation patches resolve benchmark tasks under two source-context treatments (raw-full-file and context-pack) using trusted checks on disposable benchmark copies. Deterministic-fixture mode (default) validates the evaluation pipeline only; real-agent mode (opt-in) evaluates the patches a selected provider returns, with optional bounded repair.";
196
+ }
126
197
  if (plugin.metadata.id === "context-strategy-comparison") {
127
198
  return "Compare raw full-file prompts with my-dev-kit-guided retrieval prompts using the existing controlled experiment workflow.";
128
199
  }
129
200
  return plugin.metadata.description;
130
201
  }
131
202
  function describeTargetBehavior(plugin) {
203
+ if (plugin.metadata.id === AGENT_SUCCESS_RATE_ID) {
204
+ return "Self-target only: the bundled corpus is evaluated against the Lab itself and an explicit --target is rejected. Sandboxes and artifacts are written beneath the output directory (beneath the workspace when installed), never into the installed package or the canonical benchmark projects. Accepted options: --out, --case, --benchmark-project, --kit-command, --agent, --include-real-agents, --timeout-ms and --repair-attempts; every other option is rejected.";
205
+ }
132
206
  const supportsExternal = plugin.metadata.supportedTargets.includes("external-local");
133
207
  if (plugin.metadata.id === "context-window-scaling") {
134
208
  return "Three subject modes. Bundled (default): the bundled fixed scaling corpus against the Lab itself. Synthetic: caller-supplied deterministic synthetic repositories via --synthetic-config <path> (a SyntheticRepositoryConfigV1 JSON file, mutually exclusive with --case) written beneath the experiment output directory. External local repository: an explicitly selected local Git worktree via --target <path> together with --local-subject-config <path> (a LocalRepositorySubjectConfigV1 JSON file); the repository is never modified, the output directory must be outside it, and durable output omits the repository path, source text, and file names. Operational context-fit measurement only; no retrieval precision, recall, or ranking quality is measured.";
@@ -151,6 +225,9 @@ function describeTargetBehavior(plugin) {
151
225
  return "Runs against the current lab repository.";
152
226
  }
153
227
  function describeExpectedReports(plugin) {
228
+ if (plugin.metadata.id === AGENT_SUCCESS_RATE_ID) {
229
+ return "Writes plugin-aware report.json, report.html and report.txt with a typed agent-success-rate section (initial-attempt and final success, repair history, edit quality, provider duration and tokens, scientific limitations), plus the separate agent-success-rate-execution.json and agent-success-rate-analysis.json artifacts.";
230
+ }
154
231
  if (plugin.metadata.supportedOutputs.includes("html") && plugin.metadata.supportedOutputs.includes("json")) {
155
232
  return "Writes plugin-aware JSON and HTML reports with plugin, target, variant, case, metric, artifact, warning, skip, and failure metadata.";
156
233
  }
@@ -164,6 +241,8 @@ function describeExamples(plugin) {
164
241
  `my-dev-kit-lab experiment describe --experiment ${plugin.metadata.id}`,
165
242
  `my-dev-kit-lab experiment run --experiment ${plugin.metadata.id}${agentOptions}`
166
243
  ];
244
+ if (plugin.metadata.id === AGENT_SUCCESS_RATE_ID)
245
+ examples.push(...AGENT_CAMPAIGN_EXAMPLES);
167
246
  // Only advertise an explicit --target example for plugins that support external targets.
168
247
  if (plugin.metadata.supportedTargets.includes("external-local") &&
169
248
  plugin.metadata.id !== "context-window-scaling" &&
@@ -185,6 +264,9 @@ function describeExamples(plugin) {
185
264
  if (plugin.metadata.id === "context-pack-generation") {
186
265
  examples.push(`my-dev-kit-lab experiment run --experiment ${plugin.metadata.id} --case <case-id> --out <run-dir>`, `my-dev-kit-lab experiment run --experiment ${plugin.metadata.id} --target <local-git-repository> --local-subject-config <path-to-local-subject-config.json> --out <run-dir-outside-the-repository>`);
187
266
  }
267
+ if (plugin.metadata.id === AGENT_SUCCESS_RATE_ID) {
268
+ examples.push(`my-dev-kit-lab experiment run --experiment ${plugin.metadata.id} --case <case-id> --out <run-dir>`, `my-dev-kit-lab experiment run --experiment ${plugin.metadata.id} --agent codex --include-real-agents --repair-attempts 2 --out <run-dir>`);
269
+ }
188
270
  if (plugin.metadata.id === "context-window-scaling") {
189
271
  examples.push(`my-dev-kit-lab experiment run --experiment ${plugin.metadata.id} --synthetic-config <path-to-config.json> --out <run-dir>`, `my-dev-kit-lab experiment run --experiment ${plugin.metadata.id} --target <local-git-repository> --local-subject-config <path-to-local-subject-config.json> --out <run-dir-outside-the-repository>`);
190
272
  }