@event4u/agent-config 14.13.0 → 14.14.0

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 (101) hide show
  1. package/.augment-plugin/marketplace.json +3 -3
  2. package/.augment-plugin/plugin.json +1 -1
  3. package/.claude-plugin/marketplace.json +1 -1
  4. package/CHANGELOG.md +116 -387
  5. package/dist/agent-src/commands/analyze/inbox.md +36 -0
  6. package/dist/agent-src/rules/code-comment-discipline.md +6 -0
  7. package/dist/agent-src/scripts/archive_completed_roadmaps.ts +6 -6
  8. package/dist/agent-src/scripts/guarded_baseline.ts +22 -7
  9. package/dist/agent-src/scripts/stubs_due.ts +118 -2
  10. package/dist/agent-src/scripts/update_roadmap_progress.ts +8 -8
  11. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  12. package/dist/cli-delegate/cmd_conformance.js +38 -1
  13. package/dist/discovery/deprecation-report.md +1 -1
  14. package/dist/discovery/discovery-manifest.json +4 -4
  15. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  16. package/dist/discovery/discovery-manifest.summary.md +1 -1
  17. package/dist/discovery/dormancy-report.md +1 -1
  18. package/dist/discovery/orphan-report.md +1 -1
  19. package/dist/discovery/packs.json +2 -2
  20. package/dist/discovery/trust-report.md +1 -1
  21. package/dist/discovery/workspaces.json +2 -2
  22. package/dist/hooks/dispatch.js +1438 -711
  23. package/dist/mcp/registry-manifest.json +2 -2
  24. package/dist/mcp/server.json +2 -2
  25. package/dist/mcp/server.mjs +112 -17
  26. package/docs/guidelines/agent-infra/guarded-baseline.md +1 -1
  27. package/docs/guidelines/code-clarity.md +18 -0
  28. package/package.json +1 -1
  29. package/src/agent-src/scripts/archive_completed_roadmaps.ts +6 -6
  30. package/src/agent-src/scripts/guarded_baseline.ts +22 -7
  31. package/src/agent-src/scripts/stubs_due.ts +118 -2
  32. package/src/agent-src/scripts/update_roadmap_progress.ts +8 -8
  33. package/src/config/estate-count-budget.json +20 -1
  34. package/src/config/gate-coverage.yml +150 -0
  35. package/src/config/gate-violation-baselines.json +8 -3
  36. package/src/config/preamble-payload-budget.json +19 -11
  37. package/src/config/rule-stub-ceilings.json +14 -7
  38. package/src/scripts/_dispatch.bash +0 -4
  39. package/src/scripts/_lib/activation_ladder.ts +47 -3
  40. package/src/scripts/_lib/activation_receipt_producer.ts +341 -0
  41. package/src/scripts/_lib/adr_frontmatter.ts +26 -0
  42. package/src/scripts/_lib/candidate_pair_delta.ts +349 -0
  43. package/src/scripts/_lib/carrier_status.ts +118 -0
  44. package/src/scripts/_lib/cascade_stage_enumeration.ts +92 -0
  45. package/src/scripts/_lib/corpus_manifest.ts +726 -0
  46. package/src/scripts/_lib/delivery_arm_experiment.ts +18 -2
  47. package/src/scripts/_lib/estate_carrier_cases.ts +72 -0
  48. package/src/scripts/_lib/evaluation_cascade.ts +452 -0
  49. package/src/scripts/_lib/evolution_roi.ts +562 -0
  50. package/src/scripts/_lib/harness_evolution_guards.ts +10 -0
  51. package/src/scripts/_lib/lexical_shortlist.ts +215 -0
  52. package/src/scripts/_lib/llm_candidate_proposer.ts +461 -0
  53. package/src/scripts/_lib/llm_proposer_transport.ts +153 -0
  54. package/src/scripts/_lib/pathology_archive.ts +393 -0
  55. package/src/scripts/_lib/promotion_capability.ts +315 -0
  56. package/src/scripts/_lib/promotion_evidence.ts +414 -0
  57. package/src/scripts/_lib/promotion_review.ts +294 -0
  58. package/src/scripts/_lib/prompt_shape.ts +92 -0
  59. package/src/scripts/_lib/release_highlights.ts +70 -1
  60. package/src/scripts/_lib/release_material.ts +125 -2
  61. package/src/scripts/_lib/routing_corpus.ts +307 -0
  62. package/src/scripts/_lib/routing_index_input.ts +104 -0
  63. package/src/scripts/_lib/rule_injection.ts +22 -1
  64. package/src/scripts/_lib/semantic_noop.ts +167 -0
  65. package/src/scripts/activation_receipt.ts +258 -0
  66. package/src/scripts/ai_council/cross_exam.ts +128 -0
  67. package/src/scripts/ai_council/explain_route.ts +157 -0
  68. package/src/scripts/ai_council/information_gain.ts +293 -0
  69. package/src/scripts/ai_council/leakage_corpus.ts +385 -0
  70. package/src/scripts/ai_council/leakage_patterns.ts +453 -0
  71. package/src/scripts/ai_council/minority_retention.ts +171 -0
  72. package/src/scripts/ai_council/recouncil_savings.ts +299 -0
  73. package/src/scripts/ai_council/replay_route.ts +223 -0
  74. package/src/scripts/ai_council/reviewer_assignment.ts +279 -0
  75. package/src/scripts/ai_council/routing_training_row.ts +197 -0
  76. package/src/scripts/ai_council/synthesis_strategy.ts +159 -0
  77. package/src/scripts/check_adr_frontmatter.ts +4 -9
  78. package/src/scripts/check_estate_count.ts +205 -24
  79. package/src/scripts/check_release_highlights.ts +96 -13
  80. package/src/scripts/check_roadmap_trackable.ts +17 -2
  81. package/src/scripts/corpus_manifest.ts +235 -0
  82. package/src/scripts/evolution_lab.ts +181 -8
  83. package/src/scripts/hook_manifest.json +1 -1
  84. package/src/scripts/hook_manifest.yaml +28 -6
  85. package/src/scripts/hooks/comment_discipline_hook.ts +146 -0
  86. package/src/scripts/hooks/concern_registry.ts +2 -0
  87. package/src/scripts/hooks/turn_end_gate_hook.ts +9 -1
  88. package/src/scripts/language_mirror_hook.ts +14 -2
  89. package/src/scripts/lint_carrier_integrity.ts +820 -0
  90. package/src/scripts/lint_code_comments.ts +643 -0
  91. package/src/scripts/lint_plan_risk_register.ts +39 -19
  92. package/src/scripts/lint_promotion_paths.ts +779 -0
  93. package/src/scripts/llm_propose.ts +256 -0
  94. package/src/scripts/measure_delivery_sets.ts +361 -0
  95. package/src/scripts/measure_routing_signal.ts +307 -0
  96. package/src/scripts/model_rule_injection.ts +19 -3
  97. package/src/scripts/probe_council_retention.ts +495 -0
  98. package/src/scripts/release.ts +21 -37
  99. package/src/scripts/release_drill.ts +143 -0
  100. package/src/scripts/release_env.ts +35 -0
  101. package/src/scripts/release_publication.ts +84 -0
@@ -7,10 +7,12 @@
7
7
  * and § 6 (exit-code contract). A divergence from that contract is a
8
8
  * validator bug, never a contract reinterpretation.
9
9
  *
10
- * Corpus: ready (non-draft) roadmap files directly under `agents/roadmaps/`
10
+ * Corpus: ready (non-draft) roadmap files directly under `agents/roadmaps/` code-comment-allow provenance-comment -- the path is this script's operand, not where the code came from
11
11
  * (top level only — `archive/`, `skipped/`, `later/`, `stubs/` excluded, as
12
- * are `template.md` and `dashboard*`). `status: draft` frontmatter exempts a
13
- * file (reported as `draft-exempt`, still counted as scanned).
12
+ * are `template.md` and `dashboard*`). `status: draft` and `status: carrier`
13
+ * frontmatter exempt a file, each reported under its own name (`draft-exempt`
14
+ * / `carrier-exempt`) and still counted as scanned — one label for two states
15
+ * made the gate's own output name a state it had not acted on.
14
16
  *
15
17
  * Checks per ready file:
16
18
  * 1. `## Risk Register` section exists — missing = fail unless the
@@ -229,7 +231,7 @@ function _isSeparatorRow(line: string): boolean {
229
231
  }
230
232
 
231
233
  /**
232
- * § 1.2 — validate the risk table rows found in `bodyLines` (section body
234
+ * § 1.2 — validate the risk table rows found in `bodyLines` (section body code-comment-allow report-comment -- a section marker in this gate's own numbered spec, not an analysis report
233
235
  * after the marker). `startLine` is the 1-based document line of the first
234
236
  * body line, used for violation line numbers. Returns violations; the caller
235
237
  * decides emptiness handling.
@@ -326,20 +328,37 @@ export function validateTable(
326
328
  return { headerFound, rowCount, violations };
327
329
  }
328
330
 
329
- /** `status: draft` in the YAML frontmatter block exempts a file. */
330
- export function hasDraftStatus(text: string): boolean {
331
+ /** A frontmatter status that exempts the file, or `null` when none does. */
332
+ export type ExemptingStatus = 'draft' | 'carrier';
333
+
334
+ /**
335
+ * Which frontmatter status exempts this file, per contract § 1.
336
+ *
337
+ * `draft` and `carrier` both exempt, and WHICH one is returned rather than a
338
+ * bare boolean: the previous predicate answered "is this exempt" and the gate
339
+ * then printed `draft-exempt` for a carrier, so its own output named a state it
340
+ * had not acted on.
341
+ *
342
+ * A carrier is not a plan. It holds obligations deferred out of an archived
343
+ * parent, each with an unmet resumption trigger, so a plan risk register for it
344
+ * would be manufactured rather than reported. Same category reason that exempts
345
+ * it from `check_roadmap_trackable`'s `## Phase` requirement.
346
+ */
347
+ export function exemptingStatus(text: string): ExemptingStatus | null {
331
348
  const lines = _splitLines(text);
332
- if ((lines[0] ?? '').trim() !== '---') return false;
349
+ if ((lines[0] ?? '').trim() !== '---') return null;
333
350
  for (let i = 1; i < lines.length; i++) {
334
351
  const line = lines[i] as string;
335
- if (line.trim() === '---') return false;
336
- if (/^status:\s*draft\s*$/.test(line)) return true;
352
+ if (line.trim() === '---') return null;
353
+ const m = /^status:\s*(draft|carrier)\s*$/.exec(line);
354
+ if (m !== null) return m[1] as ExemptingStatus;
337
355
  }
338
- return false;
356
+ return null;
339
357
  }
340
358
 
341
359
  export interface ContentResult {
342
- draftExempt: boolean;
360
+ /** The status that exempted the file, or `null` when it was checked. */
361
+ exempt: ExemptingStatus | null;
343
362
  registerMissing: boolean;
344
363
  /** Parsed `reviewed:` date when the marker is valid; null otherwise. */
345
364
  reviewed: string | null;
@@ -349,13 +368,14 @@ export interface ContentResult {
349
368
  /** Pure content-level Gate-R1 check (no git — grandfather/staleness live in checkFile). */
350
369
  export function checkContent(file: string, text: string): ContentResult {
351
370
  const result: ContentResult = {
352
- draftExempt: false,
371
+ exempt: null,
353
372
  registerMissing: false,
354
373
  reviewed: null,
355
374
  violations: [],
356
375
  };
357
- if (hasDraftStatus(text)) {
358
- result.draftExempt = true;
376
+ const exempt = exemptingStatus(text);
377
+ if (exempt !== null) {
378
+ result.exempt = exempt;
359
379
  return result;
360
380
  }
361
381
  const lines = _linesOutsideFences(text);
@@ -572,7 +592,7 @@ function _blobAt(absPath: string, sha: string): string | null {
572
592
  return _git(root, ['show', `${sha}:${rel}`]);
573
593
  }
574
594
 
575
- export type FileStatus = 'ok' | 'draft-exempt' | 'grandfathered' | 'fail';
595
+ export type FileStatus = 'ok' | 'draft-exempt' | 'carrier-exempt' | 'grandfathered' | 'fail';
576
596
 
577
597
  export interface FileResult {
578
598
  file: string;
@@ -584,8 +604,8 @@ export interface FileResult {
584
604
  export function checkFile(absPath: string): FileResult {
585
605
  const text = fs.readFileSync(absPath, 'utf-8');
586
606
  const content = checkContent(absPath, text);
587
- if (content.draftExempt) {
588
- return { file: absPath, status: 'draft-exempt', violations: [] };
607
+ if (content.exempt !== null) {
608
+ return { file: absPath, status: `${content.exempt}-exempt`, violations: [] };
589
609
  }
590
610
  if (content.registerMissing) {
591
611
  // Grandfather clause (contract § 1): exempt while feature-equal with
@@ -859,8 +879,8 @@ export function main(argv?: readonly string[]): number {
859
879
  for (const p of targets) {
860
880
  const result = checkFile(p);
861
881
  scanned += 1;
862
- if (result.status === 'draft-exempt') {
863
- statusLines.push(` draft-exempt: ${p}`);
882
+ if (result.status === 'draft-exempt' || result.status === 'carrier-exempt') {
883
+ statusLines.push(` ${result.status}: ${p}`);
864
884
  } else if (result.status === 'grandfathered') {
865
885
  statusLines.push(` grandfathered: ${p}`);
866
886
  }