@event4u/agent-config 9.16.0 → 9.17.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 (135) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +53 -0
  4. package/README.md +1 -1
  5. package/dist/agent-src/commands/agent-handoff.md +100 -48
  6. package/dist/agent-src/commands/commit.md +1 -1
  7. package/dist/agent-src/commands/condense.md +19 -64
  8. package/dist/agent-src/commands/evals/agent-handoff.json +13 -1
  9. package/dist/agent-src/commands/memory/promote.md +14 -1
  10. package/dist/agent-src/commands/mode.md +9 -5
  11. package/dist/agent-src/commands/optimize/deep.md +72 -11
  12. package/dist/agent-src/contexts/authority/commit-mechanics.md +5 -5
  13. package/dist/agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -0
  14. package/dist/agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +1 -1
  15. package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +6 -1
  16. package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +4 -1
  17. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +27 -1
  18. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +5 -2
  19. package/dist/agent-src/profiles/agency.yml +3 -3
  20. package/dist/agent-src/profiles/content_creator.yml +2 -2
  21. package/dist/agent-src/profiles/developer.yml +2 -2
  22. package/dist/agent-src/profiles/finance.yml +1 -1
  23. package/dist/agent-src/profiles/founder.yml +2 -2
  24. package/dist/agent-src/profiles/ops.yml +2 -2
  25. package/dist/agent-src/rules/architecture.md +2 -2
  26. package/dist/agent-src/rules/autonomous-execution.md +1 -1
  27. package/dist/agent-src/rules/context-hygiene.md +3 -2
  28. package/dist/agent-src/rules/domain-safety-pii.md +1 -1
  29. package/dist/agent-src/rules/output-discipline.md +9 -2
  30. package/dist/agent-src/rules/token-budget-discipline.md +2 -2
  31. package/dist/agent-src/rules/user-interaction.md +3 -4
  32. package/dist/agent-src/skills/build-buy-partner/SKILL.md +1 -1
  33. package/dist/agent-src/skills/copilot-agents-optimization/SKILL.md +4 -4
  34. package/dist/agent-src/skills/copilot-config/SKILL.md +1 -1
  35. package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +7 -4
  36. package/dist/agent-src/skills/description-assist/SKILL.md +1 -1
  37. package/dist/agent-src/skills/fe-design/SKILL.md +1 -1
  38. package/dist/agent-src/skills/market-entry-analysis/SKILL.md +1 -1
  39. package/dist/agent-src/skills/persona-writing/SKILL.md +2 -2
  40. package/dist/agent-src/skills/readme-reviewer/SKILL.md +2 -1
  41. package/dist/agent-src/skills/rule-writing/SKILL.md +4 -2
  42. package/dist/agent-src/skills/skill-reviewer/SKILL.md +1 -1
  43. package/dist/agent-src/skills/skill-writing/SKILL.md +2 -2
  44. package/dist/agent-src/skills/tailwind-engineer/SKILL.md +3 -1
  45. package/dist/agent-src/skills/token-optimizer/SKILL.md +2 -2
  46. package/dist/agent-src/skills/ui-component-architect/SKILL.md +6 -3
  47. package/dist/agent-src/templates/agent-settings.md +13 -15
  48. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +6 -2
  49. package/dist/agent-src/templates/persona.md +2 -2
  50. package/dist/agent-src/templates/roadmaps.md +1 -1
  51. package/dist/agent-src/templates/rule.md +1 -1
  52. package/dist/agent-src/templates/skill.md +1 -1
  53. package/dist/cli/registry.js +1 -0
  54. package/dist/cli/registry.js.map +1 -1
  55. package/dist/cli-delegate/{chunk-ZXXJLL5K.js → chunk-BSLUHV2F.js} +127 -1487
  56. package/dist/cli-delegate/{chunk-H574KOUH.js → chunk-IMSXPRVH.js} +24 -1
  57. package/dist/cli-delegate/chunk-VSYT7OHO.js +1382 -0
  58. package/dist/cli-delegate/chunk-XGA2NTU4.js +3727 -0
  59. package/dist/cli-delegate/cmd_conformance.js +4 -3
  60. package/dist/cli-delegate/cmd_converge.js +3 -3
  61. package/dist/cli-delegate/cmd_doctor.js +3 -2
  62. package/dist/cli-delegate/cmd_export.js +4 -4
  63. package/dist/cli-delegate/cmd_handoff.js +3194 -0
  64. package/dist/cli-delegate/cmd_memory_get.js +35 -3754
  65. package/dist/cli-delegate/cmd_migrate.js +2 -2
  66. package/dist/cli-delegate/cmd_prune.js +4 -4
  67. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  68. package/dist/cli-delegate/cmd_sync.js +4 -4
  69. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  70. package/dist/cli-delegate/cmd_update.js +3 -3
  71. package/dist/cli-delegate/cmd_upgrade.js +3 -3
  72. package/dist/cli-delegate/cmd_validate.js +4 -4
  73. package/dist/cli-delegate/cmd_versions.js +3 -3
  74. package/dist/discovery/deprecation-report.md +1 -1
  75. package/dist/discovery/discovery-manifest.json +31 -31
  76. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  77. package/dist/discovery/discovery-manifest.summary.md +1 -1
  78. package/dist/discovery/orphan-report.md +1 -1
  79. package/dist/discovery/packs.json +2 -2
  80. package/dist/discovery/trust-report.md +1 -1
  81. package/dist/discovery/workspaces.json +2 -2
  82. package/dist/hooks/dispatch.js +602 -507
  83. package/dist/install/install.mjs +23 -0
  84. package/dist/mcp/awesome-mcp-servers.row.md +1 -1
  85. package/dist/mcp/mcp-cloudflare-catalogue.json +2 -2
  86. package/dist/mcp/registry-manifest.json +4 -4
  87. package/dist/mcp/server.json +2 -2
  88. package/dist/mcp/server.mjs +25 -3
  89. package/dist/scripts/_lib/agent_src.js +39 -6
  90. package/dist/scripts/_lib/agent_src.js.map +1 -1
  91. package/dist/server/schemas/settings.js +13 -0
  92. package/dist/server/schemas/settings.js.map +1 -1
  93. package/docs/guidelines/abstraction-thresholds.md +53 -0
  94. package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +1 -1
  95. package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +7 -0
  96. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +2 -2
  97. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +5 -3
  98. package/docs/guidelines/agent-infra/size-and-scope.md +8 -2
  99. package/docs/guidelines/component-oriented-and-oop-development.md +11 -6
  100. package/docs/guidelines/docs/readme-size-and-splitting.md +5 -2
  101. package/llms.txt +1 -0
  102. package/package.json +1 -1
  103. package/src/config/agent-settings.template.yml +22 -0
  104. package/src/config/evaluator-budgets.json +8 -11
  105. package/src/config/gate-coverage.yml +30 -0
  106. package/src/scripts/_cli/cmd_handoff.ts +405 -0
  107. package/src/scripts/_cli/handoff_generate.ts +453 -0
  108. package/src/scripts/_cli/handoff_sessions.ts +435 -0
  109. package/src/scripts/_dispatch.bash +9 -0
  110. package/src/scripts/_lib/agent_src.ts +36 -6
  111. package/src/scripts/_lib/release_material.ts +156 -0
  112. package/src/scripts/check_condensation.ts +2 -1
  113. package/src/scripts/check_finding_dispositions.ts +278 -0
  114. package/src/scripts/check_pack_size.ts +4 -3
  115. package/src/scripts/check_references.ts +1 -0
  116. package/src/scripts/check_release_highlights.ts +300 -0
  117. package/src/scripts/check_release_pr_shape.ts +4 -0
  118. package/src/scripts/check_release_surface_equality.ts +132 -0
  119. package/src/scripts/check_reply_consistency.ts +187 -138
  120. package/src/scripts/handoff_context_hook.ts +148 -0
  121. package/src/scripts/hook_manifest.yaml +17 -7
  122. package/src/scripts/hooks/concern_registry.ts +2 -0
  123. package/src/scripts/lint_abstraction_thresholds.ts +325 -0
  124. package/src/scripts/lint_framework_leakage_allowlist.json +2 -2
  125. package/src/scripts/lint_profile_personas.ts +153 -0
  126. package/src/scripts/lint_token_budget_discipline.ts +148 -0
  127. package/src/scripts/release.ts +156 -32
  128. package/src/scripts/release_drill.ts +491 -0
  129. package/src/scripts/schemas/command.schema.json +33 -0
  130. package/src/scripts/self_review_gate.ts +41 -3
  131. package/src/scripts/skill_linter.ts +3 -1
  132. package/src/scripts/smoke/router.sh +1 -1
  133. package/src/scripts/update_counts.ts +60 -12
  134. package/src/server/schemas/settings.ts +23 -0
  135. package/dist/cli-delegate/{chunk-XX6TOPD7.js → chunk-WR6GTRHJ.js} +3 -3
@@ -34,25 +34,73 @@ const _HERE = fileURLToPath(import.meta.url);
34
34
  // REPO_ROOT = <file>.parent.parent.parent — two dirs up from src/scripts.
35
35
  export const REPO_ROOT = path.resolve(path.dirname(_HERE), '..', '..');
36
36
 
37
- /** Recursively walk a directory, yielding files whose basename matches. */
37
+ /**
38
+ * Recursively walk a directory, yielding files whose basename matches.
39
+ *
40
+ * Symlink confinement (release-truth Phase 3): a symlink — leaf or directory —
41
+ * is honored only when its target resolves inside the walk root; external
42
+ * targets, broken links, and cycles are ignored. Directory symlinks are
43
+ * followed through a visited-realpath set so a self-referential link
44
+ * terminates instead of recursing to stack exhaustion.
45
+ */
38
46
  function* _rglob(dir: string, match: (name: string) => boolean): Generator<string> {
39
- let entries: fs.Dirent[];
47
+ let rootReal: string;
40
48
  try {
41
- entries = fs.readdirSync(dir, { withFileTypes: true });
49
+ rootReal = fs.realpathSync(dir);
42
50
  } catch {
43
51
  return;
44
52
  }
45
- // Sort for determinism (Path.rglob order is filesystem-dependent in
46
- // Python; we only count, so order does not affect the result).
47
- entries.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));
48
- for (const e of entries) {
49
- const full = path.join(dir, e.name);
50
- if (e.isDirectory()) {
51
- yield* _rglob(full, match);
52
- } else if (match(e.name)) {
53
- yield full;
53
+ const confined = (p: string): string | null => {
54
+ try {
55
+ const real = fs.realpathSync(p);
56
+ const rel = path.relative(rootReal, real);
57
+ const inside = real === rootReal || (rel !== '' && !rel.startsWith('..') && !path.isAbsolute(rel));
58
+ return inside ? real : null;
59
+ } catch {
60
+ return null; // broken symlink → explicitly not yielded
61
+ }
62
+ };
63
+ const visited = new Set<string>([rootReal]);
64
+ function* walk(current: string): Generator<string> {
65
+ let entries: fs.Dirent[];
66
+ try {
67
+ entries = fs.readdirSync(current, { withFileTypes: true });
68
+ } catch {
69
+ return;
70
+ }
71
+ // Sort for determinism (Path.rglob order is filesystem-dependent in
72
+ // Python; we only count, so order does not affect the result).
73
+ entries.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));
74
+ for (const e of entries) {
75
+ const full = path.join(current, e.name);
76
+ if (e.isDirectory()) {
77
+ yield* walk(full);
78
+ } else if (e.isSymbolicLink()) {
79
+ const real = confined(full);
80
+ if (real === null) {
81
+ continue;
82
+ }
83
+ let st: fs.Stats;
84
+ try {
85
+ st = fs.statSync(full);
86
+ } catch {
87
+ continue;
88
+ }
89
+ if (st.isDirectory()) {
90
+ if (visited.has(real)) {
91
+ continue;
92
+ }
93
+ visited.add(real);
94
+ yield* walk(full);
95
+ } else if (st.isFile() && match(e.name)) {
96
+ yield full;
97
+ }
98
+ } else if (e.isFile() && match(e.name)) {
99
+ yield full;
100
+ }
54
101
  }
55
102
  }
103
+ yield* walk(dir);
56
104
  }
57
105
 
58
106
  /** Yield immediate child files of dir matching `match`. */
@@ -247,6 +247,29 @@ export const settingsSchema = z.object({
247
247
  'Whether skills marked token_budget_class: rich may load in full (exempt from telegraph-speak + thin-projector trimming), consumed by the token-budget-discipline rule. on = allowed (default); off = fall back to standard condensed behavior; ask = surface an estimated token delta (tokens, not dollars) and ask once per session before loading.',
248
248
  ),
249
249
  }).default({ rich_skills: 'on' }),
250
+ verbosity: z.object({
251
+ intent_announcements: z.boolean().default(false).describe(
252
+ 'Intent narration before tool batches ("Let me check X…"). Only honored when personal.play_by_play is ALSO true (the direct-answers narration carve-out requires both). false (default) = act and emit the result.',
253
+ ),
254
+ preview_artifacts: z.boolean().default(false).describe(
255
+ 'Show generated commit messages, PR titles/bodies, branch names before acting. false (default) = use generated content directly (/commit terse path).',
256
+ ),
257
+ routine_confirmations: z.boolean().default(false).describe(
258
+ 'Confirmation prompts for routine workflow steps with one obvious answer. Iron-Law gates (commit-policy, scope-control git-ops, Hard Floor) ALWAYS ask regardless.',
259
+ ),
260
+ offer_council_in_delivery: z.boolean().default(false).describe(
261
+ 'Offer "run AI Council on this?" inside delivery commands (/feature-plan, /review-changes, /roadmap-create). Council commands themselves are unaffected.',
262
+ ),
263
+ post_action_reports: z.enum(['off', 'minimal', 'full']).default('minimal').describe(
264
+ 'Status blocks after a successful action. off = errors only; minimal (default) = one-line confirmation; full = bullet list.',
265
+ ),
266
+ }).default({
267
+ intent_announcements: false,
268
+ preview_artifacts: false,
269
+ routine_confirmations: false,
270
+ offer_council_in_delivery: false,
271
+ post_action_reports: 'minimal',
272
+ }),
250
273
  code_style: z.object({
251
274
  docblocks: z.enum(['minimal', 'full']).default('minimal').describe(
252
275
  'Consumed by the code-comment-discipline rule. minimal (default) = no signature-mirroring docblocks; docblocks only for machine-relevant precision (generics, array shapes) or genuine why-context. full = the exported public surface of a library package may carry one-line summary docblocks; the redundancy ban still holds.',
@@ -1,10 +1,10 @@
1
1
  import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
- import {
3
- resolve_project_root
4
- } from "./chunk-HJ6DAJHR.js";
5
2
  import {
6
3
  resolvePackageRoot
7
4
  } from "./chunk-MCJYCQPF.js";
5
+ import {
6
+ resolve_project_root
7
+ } from "./chunk-HJ6DAJHR.js";
8
8
 
9
9
  // src/scripts/_cli/cmd_migrate.ts
10
10
  import { spawnSync } from "node:child_process";