@event4u/agent-config 9.15.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 (157) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +74 -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/mcp/content.js +1 -1
  54. package/dist/cli/mcp/content.js.map +1 -1
  55. package/dist/cli/registry.js +1 -0
  56. package/dist/cli/registry.js.map +1 -1
  57. package/dist/cli-delegate/{chunk-ZXXJLL5K.js → chunk-BSLUHV2F.js} +127 -1487
  58. package/dist/cli-delegate/{chunk-H574KOUH.js → chunk-IMSXPRVH.js} +24 -1
  59. package/dist/cli-delegate/chunk-VSYT7OHO.js +1382 -0
  60. package/dist/cli-delegate/chunk-XGA2NTU4.js +3727 -0
  61. package/dist/cli-delegate/cmd_conformance.js +4 -3
  62. package/dist/cli-delegate/cmd_converge.js +3 -3
  63. package/dist/cli-delegate/cmd_doctor.js +3 -2
  64. package/dist/cli-delegate/cmd_export.js +4 -4
  65. package/dist/cli-delegate/cmd_handoff.js +3194 -0
  66. package/dist/cli-delegate/cmd_memory_get.js +35 -3754
  67. package/dist/cli-delegate/cmd_migrate.js +2 -2
  68. package/dist/cli-delegate/cmd_prune.js +4 -4
  69. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  70. package/dist/cli-delegate/cmd_sync.js +4 -4
  71. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  72. package/dist/cli-delegate/cmd_update.js +3 -3
  73. package/dist/cli-delegate/cmd_upgrade.js +3 -3
  74. package/dist/cli-delegate/cmd_validate.js +4 -4
  75. package/dist/cli-delegate/cmd_versions.js +3 -3
  76. package/dist/discovery/deprecation-report.md +1 -1
  77. package/dist/discovery/discovery-manifest.json +31 -31
  78. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  79. package/dist/discovery/discovery-manifest.summary.md +1 -1
  80. package/dist/discovery/orphan-report.md +1 -1
  81. package/dist/discovery/packs.json +2 -2
  82. package/dist/discovery/trust-report.md +1 -1
  83. package/dist/discovery/workspaces.json +2 -2
  84. package/dist/hooks/dispatch.js +602 -507
  85. package/dist/install/install.mjs +23 -0
  86. package/dist/mcp/awesome-mcp-servers.row.md +1 -1
  87. package/dist/mcp/mcp-cloudflare-catalogue.json +2 -2
  88. package/dist/mcp/registry-manifest.json +4 -4
  89. package/dist/mcp/server.json +2 -2
  90. package/dist/mcp/server.mjs +25 -3
  91. package/dist/scripts/_lib/agent_src.js +39 -6
  92. package/dist/scripts/_lib/agent_src.js.map +1 -1
  93. package/dist/server/routes/workspace.js +1 -1
  94. package/dist/server/routes/workspace.js.map +1 -1
  95. package/dist/server/schemas/settings.js +13 -0
  96. package/dist/server/schemas/settings.js.map +1 -1
  97. package/dist/shared/userMd/utils.js +1 -1
  98. package/dist/shared/userMd/utils.js.map +1 -1
  99. package/dist/ui/assets/index-DmR0mbk4.js +26 -0
  100. package/dist/ui/assets/index-DmR0mbk4.js.map +1 -0
  101. package/dist/ui/index.html +1 -1
  102. package/docs/guidelines/abstraction-thresholds.md +53 -0
  103. package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +1 -1
  104. package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +7 -0
  105. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +2 -2
  106. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +5 -3
  107. package/docs/guidelines/agent-infra/size-and-scope.md +8 -2
  108. package/docs/guidelines/component-oriented-and-oop-development.md +11 -6
  109. package/docs/guidelines/docs/readme-size-and-splitting.md +5 -2
  110. package/llms.txt +1 -0
  111. package/package.json +4 -4
  112. package/src/config/agent-settings.template.yml +25 -1
  113. package/src/config/budget-routing.json +7 -0
  114. package/src/config/evaluator-budgets.json +8 -11
  115. package/src/config/gate-coverage.yml +30 -0
  116. package/src/scripts/_cli/cmd_handoff.ts +405 -0
  117. package/src/scripts/_cli/handoff_generate.ts +453 -0
  118. package/src/scripts/_cli/handoff_sessions.ts +435 -0
  119. package/src/scripts/_dispatch.bash +9 -0
  120. package/src/scripts/_lib/agent_src.ts +36 -6
  121. package/src/scripts/_lib/release_material.ts +156 -0
  122. package/src/scripts/_lib/tier_budget_routing.ts +154 -28
  123. package/src/scripts/anchor_scoring_run.ts +1 -1
  124. package/src/scripts/bench_persona_placebo.ts +1 -1
  125. package/src/scripts/bench_quality_run.ts +1 -1
  126. package/src/scripts/check_cli_registry_budget_sync.ts +168 -0
  127. package/src/scripts/check_condensation.ts +2 -1
  128. package/src/scripts/check_finding_dispositions.ts +278 -0
  129. package/src/scripts/check_gate_coverage.ts +1 -1
  130. package/src/scripts/check_pack_size.ts +4 -3
  131. package/src/scripts/check_references.ts +1 -0
  132. package/src/scripts/check_release_highlights.ts +300 -0
  133. package/src/scripts/check_release_pr_shape.ts +4 -0
  134. package/src/scripts/check_release_surface_equality.ts +132 -0
  135. package/src/scripts/check_reply_consistency.ts +187 -138
  136. package/src/scripts/check_token_quality_golden.ts +1 -1
  137. package/src/scripts/cost/budget.mjs +18 -4
  138. package/src/scripts/handoff_context_hook.ts +148 -0
  139. package/src/scripts/hook_manifest.yaml +17 -7
  140. package/src/scripts/hooks/concern_registry.ts +2 -0
  141. package/src/scripts/lint_abstraction_thresholds.ts +325 -0
  142. package/src/scripts/lint_framework_leakage_allowlist.json +2 -2
  143. package/src/scripts/lint_profile_personas.ts +153 -0
  144. package/src/scripts/lint_token_budget_discipline.ts +148 -0
  145. package/src/scripts/release.ts +264 -37
  146. package/src/scripts/release_drill.ts +491 -0
  147. package/src/scripts/routing_doctor.ts +76 -1
  148. package/src/scripts/schemas/command.schema.json +33 -0
  149. package/src/scripts/self_review_gate.ts +41 -3
  150. package/src/scripts/skill_linter.ts +3 -1
  151. package/src/scripts/smoke/router.sh +1 -1
  152. package/src/scripts/update_counts.ts +60 -12
  153. package/src/server/schemas/settings.ts +23 -0
  154. package/src/shared/userMd/utils.ts +1 -1
  155. package/dist/ui/assets/index-DJY_vQVn.js +0 -40
  156. package/dist/ui/assets/index-DJY_vQVn.js.map +0 -1
  157. package/dist/cli-delegate/{chunk-XX6TOPD7.js → chunk-WR6GTRHJ.js} +3 -3
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Bootstrap shim for the event4u agent-config suite. This plugin ships ONLY the dispatcher hooks plus one install-pointer skill — ALL content (skills, rules, commands) is installed via `npx -y @event4u/agent-config init`, which writes the file projection AND registers the same hooks in ~/.claude/settings.json. DEPRECATED as a content channel; kept so the marketplace listing stays discoverable and existing installs keep working hooks.",
9
- "version": "9.15.0",
9
+ "version": "9.17.0",
10
10
  "keywords": [
11
11
  "agent-config",
12
12
  "skills",
package/AGENTS.md CHANGED
@@ -24,7 +24,7 @@ task ci # full pipeline — green before PR
24
24
  - **Content pipelines** (A→D): [`docs/architecture.md`](docs/architecture.md).
25
25
  - **Editing this repo**: [`source-of-truth`](src/rules/source-of-truth.md) + [`agents-md-thin-root`](src/skills/agents-md-thin-root/SKILL.md).
26
26
  - **Consumer story** — `npx` + `scripts/install.sh`: [`README.md`](README.md).
27
- - **Personas** — 11 review lenses (6 + 5): [`docs/personas.md`](docs/personas.md).
27
+ - **Personas** — 34 lenses (5 core + 24 specialists + 5 advisors): [`docs/personas.md`](docs/personas.md).
28
28
  - **Discovery** — workspaces/packs: [`ADR-013`](docs/decisions/ADR-013-discovery-frontmatter-contract.md) + [`customization`](docs/customization.md#workspaces--packs-discovery).
29
29
  - **Root & `agents/` layout** — `src/` = source ([`ADR-050`](docs/decisions/ADR-050-workspace-vs-package-root-boundary.md)); `agents/` contract: [`agents-layout`](docs/contracts/agents-layout.md).
30
30
  - **Security** — [`SECURITY.md`](SECURITY.md); [`docs/threat-model.md`](docs/threat-model.md).
package/CHANGELOG.md CHANGED
@@ -262,6 +262,80 @@ Entry-shape contract: [`docs/contracts/CHANGELOG-conventions.md`](docs/contracts
262
262
  > that forces a new era split (`# Era: 9.16.x`, etc.) — see
263
263
  > [`docs/contracts/CHANGELOG-conventions.md § Era splits`](docs/contracts/CHANGELOG-conventions.md).
264
264
 
265
+ ## [9.17.0](https://github.com/event4u-app/agent-config/compare/9.16.0...9.17.0) (2026-08-04)
266
+
267
+ ### Release highlights
268
+
269
+ <!-- Curated head: fill before merge, keep it under 10 lines, and leave `_none_` where it is genuinely the answer. The generated log below is unchanged. -->
270
+ - **Behaviour changes:** `/optimize:deep` is now bounded — plan-only with a schema-backed limits block, a 5-loop ceiling, a pre-registered target metric, and hard exclusions for kernel rules and stable contracts (980b4f1).
271
+ - **Default changes + migration:** `/optimize:deep` defaults to plan-only; push/PR/loop execution now requires an explicit `--mode=execute`. No data or config migration.
272
+ - **Security and correctness:** symlink traversal is confined in the catalog/count walkers (514189a); `ip-address` and `fast-uri` bumped past high npm-audit advisories (be9fb0f, 22887ba).
273
+ - **Honest nulls:** no new nulls in this span — the highlight-plausibility gate itself ships here, and the false-`_none_` 9.13.0/9.14.0 heads were backfilled retroactively (491f98b).
274
+ - **Known limitations:** _none_
275
+
276
+ ### Features
277
+
278
+ * **agent-handoff:** CLI-backed resume flow as the primary command surface ([0ca1ee9](https://github.com/event4u-app/agent-config/commit/0ca1ee9136263e03eff3a62aed83b4cc70aed36f))
279
+ * **cli:** agent-config handoff — picker, launch adapters, print mode ([d88eea9](https://github.com/event4u-app/agent-config/commit/d88eea976c2752f67c6d342011904a664d9e4329))
280
+ * **handoff:** session enumeration + deterministic handoff generator ([55d2459](https://github.com/event4u-app/agent-config/commit/55d24597150c1155379d22e37593d1c78fca3826))
281
+ * **hooks:** one-shot handoff-context session_start concern ([9fa684d](https://github.com/event4u-app/agent-config/commit/9fa684d62800b21871b09582fb2c6f109ea03166))
282
+ * **commands:** bound /optimize:deep — plan-only default, enforced limits ([980b4f1](https://github.com/event4u-app/agent-config/commit/980b4f18319db38b0a2c4d9bd2ab0783c17de672))
283
+ * **release:** finding-disposition ledger with stable ids ([4428e57](https://github.com/event4u-app/agent-config/commit/4428e5788f5cc8ef6c98da1e05fd6879374f3fb8))
284
+ * **release:** highlight plausibility gate + backfill the 9.13.0/9.14.0 heads ([491f98b](https://github.com/event4u-app/agent-config/commit/491f98b32767f5c84e0d46f5d2938fa298fb0f4b))
285
+ * **release:** derive all four release surfaces from the changelog at head ([d947247](https://github.com/event4u-app/agent-config/commit/d9472472de75755583fd6220975e602804f46096))
286
+ * **release:** drill — run the real step machinery against a simulated git/gh world ([a937e59](https://github.com/event4u-app/agent-config/commit/a937e5908edcf3953fc73a6a552de1a51fdc98cd))
287
+
288
+ ### Bug Fixes
289
+
290
+ * **agent-handoff:** trim suggestion.trigger_context under the 240-char schema cap ([708f963](https://github.com/event4u-app/agent-config/commit/708f963e3bf674f9ec1449673608fbf413897641))
291
+ * **deps:** bump ip-address past the SSRF advisory trio (npm audit high) ([be9fb0f](https://github.com/event4u-app/agent-config/commit/be9fb0f1f58c39570deb38ab317d159c657fc14b))
292
+ * **deps:** bump fast-uri past GHSA-7p8r-x3mc-p8w7 (npm audit high) ([22887ba](https://github.com/event4u-app/agent-config/commit/22887badc0e18f7e3fb7301e9aa02465e02e90e5))
293
+ * **ci:** gate the findings-artifact upload on the file, not hashFiles ([7779d55](https://github.com/event4u-app/agent-config/commit/7779d55efb79b98f7ee6dabd84ed1659db6b4ec6))
294
+ * **security:** confine symlink traversal in the catalog/count walkers ([514189a](https://github.com/event4u-app/agent-config/commit/514189a18f44d55cd45cb6a2b5a7236365e4d0a3))
295
+
296
+ ### Documentation
297
+
298
+ * **roadmap:** close and archive road-to-package-renewal (central) ([01b7ff6](https://github.com/event4u-app/agent-config/commit/01b7ff66b7886dfed9362682fc1262b15145adaa))
299
+ * **handoff:** regenerate index catalogs ([a12e89e](https://github.com/event4u-app/agent-config/commit/a12e89e4f56c2bac0877f6f87c79a7ebb7168210))
300
+ * **handoff:** sync generated catalogs, contracts, and archive the roadmap ([3505bb5](https://github.com/event4u-app/agent-config/commit/3505bb522fc69d2fdc9c5c3f4abc4ab35c3727ca))
301
+ * **roadmap:** close and archive road-to-release-truth ([e8c1200](https://github.com/event4u-app/agent-config/commit/e8c120005250cfa116194b2aad54e237a8e09d8e))
302
+
303
+ ### Tests
304
+
305
+ * **release:** script the release-truth surface interactions in the drill ([6ce8025](https://github.com/event4u-app/agent-config/commit/6ce8025597c0502f25b4cd350f69d20424568d1c))
306
+
307
+ ### CI
308
+
309
+ * **release:** wire surface-equality, highlight-plausibility, finding-dispositions ([86866ed](https://github.com/event4u-app/agent-config/commit/86866edc918f4fbe3f2b2a1f6047584e2bc78b44))
310
+
311
+ ### Chores
312
+
313
+ * ignore worktrees ([1c97785](https://github.com/event4u-app/agent-config/commit/1c9778549a4ea2dcb5c9a63b1e1252e5584876ce))
314
+ * **budgets:** cli_help_command_count 81 -> 82 for the handoff subcommand ([b27e14d](https://github.com/event4u-app/agent-config/commit/b27e14d2a71ec4e682fbae34eec4b710d0165022))
315
+
316
+ Tests: 10692 (+104 since 9.16.0)
317
+
318
+ ## [9.16.0](https://github.com/event4u-app/agent-config/compare/9.15.0...9.16.0) (2026-08-03)
319
+
320
+ ### Release highlights
321
+
322
+ <!-- Curated head: fill before merge, keep it under 10 lines, and leave `_none_` where it is genuinely the answer. The generated log below is unchanged. -->
323
+ - **Behaviour changes:** _none_
324
+ - **Default changes + migration:** _none_
325
+ - **Security and correctness:** _none_
326
+ - **Honest nulls:** _none_
327
+ - **Known limitations:** _none_
328
+
329
+ ### Features
330
+
331
+ * **gates:** fail the PR that moves the CLI registry without the evaluator budget ([84740f3](https://github.com/event4u-app/agent-config/commit/84740f3aba1cd7e9fd3e2fa6eb304a1ad106e149))
332
+
333
+ ### Chores
334
+
335
+ * **deps:** bump the github-actions group across 1 directory with 5 updates ([5e272d8](https://github.com/event4u-app/agent-config/commit/5e272d89e6e9b5bcc1fff053e9448da294998221))
336
+
337
+ Tests: 10588 (+8 since 9.15.0)
338
+
265
339
  ## [9.15.0](https://github.com/event4u-app/agent-config/compare/9.14.0...9.15.0) (2026-08-03)
266
340
 
267
341
  ### Release highlights
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![Smoke](https://github.com/event4u-app/agent-config/actions/workflows/smoke.yml/badge.svg)](https://github.com/event4u-app/agent-config/actions/workflows/smoke.yml) [![Public install smoke (3 OS × 2 Node)](https://github.com/event4u-app/agent-config/actions/workflows/smoke-public-install.yml/badge.svg)](https://github.com/event4u-app/agent-config/actions/workflows/smoke-public-install.yml) [![npm](https://img.shields.io/npm/v/@event4u/agent-config?style=flat-square&label=npm&color=orange)](https://www.npmjs.com/package/@event4u/agent-config) [![agent-config MCP server](https://glama.ai/mcp/servers/event4u-app/agent-config/badges/score.svg)](https://glama.ai/mcp/servers/event4u-app/agent-config) [![MCP Toplist](https://mcptoplist.com/badge/glama%2Fevent4u-app%2Fagent-config.svg)](https://mcptoplist.com/server/glama%2Fevent4u-app%2Fagent-config)
6
6
 
7
- [![Skills](https://img.shields.io/badge/Skills-288-orange?style=flat-square)](dist/agent-src/skills/) [![Rules](https://img.shields.io/badge/Rules-111-orange?style=flat-square)](dist/agent-src/rules/) [![Commands](https://img.shields.io/badge/Commands-193-orange?style=flat-square)](dist/agent-src/commands/) [![Guidelines](https://img.shields.io/badge/Guidelines-101-orange?style=flat-square)](docs/guidelines/) [![Personas](https://img.shields.io/badge/Personas-29-orange?style=flat-square)](dist/agent-src/personas/) [![Advisors](https://img.shields.io/badge/Advisors-5-orange?style=flat-square)](dist/agent-src/personas/advisors/)
7
+ [![Skills](https://img.shields.io/badge/Skills-288-orange?style=flat-square)](dist/agent-src/skills/) [![Rules](https://img.shields.io/badge/Rules-111-orange?style=flat-square)](dist/agent-src/rules/) [![Commands](https://img.shields.io/badge/Commands-193-orange?style=flat-square)](dist/agent-src/commands/) [![Guidelines](https://img.shields.io/badge/Guidelines-102-orange?style=flat-square)](docs/guidelines/) [![Personas](https://img.shields.io/badge/Personas-29-orange?style=flat-square)](dist/agent-src/personas/) [![Advisors](https://img.shields.io/badge/Advisors-5-orange?style=flat-square)](dist/agent-src/personas/advisors/)
8
8
 
9
9
  **Try it in 30 seconds** — drop one read-only subagent into any repo and watch it gate "done": `@production-validator check this branch is actually done`. No wizard, no lock-in, nothing else installed — the [30-second wedge ↓](#quickstart) is the whole first step. Start at the proof, not the catalog: **[event4u-app.github.io/agent-config/proof/](https://event4u-app.github.io/agent-config/proof/)**.
10
10
 
@@ -2,18 +2,18 @@
2
2
  model_tier: medium
3
3
  name: agent-handoff
4
4
  pack: meta
5
- intent: "Generate a session-handoff summary to continue work in a fresh chat"
5
+ intent: "Resume a previous session in a fresh chat: pick a session, generate a handoff, auto-seed the next session"
6
6
  routes_to: [agent-docs-writing]
7
7
  replaces: []
8
8
  tier: 0
9
9
  visibility: visible
10
10
  skills: [agent-docs-writing]
11
- description: Generate a context summary for continuing work in a fresh chat. Replaces the session system.
12
- argument-hint: "[with tasks]"
11
+ description: Pick a recent session, generate a handoff from its transcript, and seed a fresh session with it — or summarize the live conversation for copy-paste.
12
+ argument-hint: "[--print | --file | with tasks]"
13
13
  suggestion:
14
14
  eligible: true
15
- trigger_description: "user asks for an agent handoff, fresh-chat summary, or context-summary to paste into a new chat"
16
- trigger_context: "explicit verbatim ask — 'agent handoff', 'agend handoff' (typo), 'fasse für neuen chat zusammen', 'handoff summary', 'context summary for fresh chat'. Never inferred without a direct handoff / summary intent."
15
+ trigger_description: "user asks for an agent handoff, to resume/continue a previous session in a fresh chat, or a context-summary to paste into a new chat"
16
+ trigger_context: "explicit ask — 'agent handoff'/'agend handoff' (typo), 'handoff summary', 'context summary for fresh chat', 'resume/continue an old session in a fresh chat', 'fasse für neuen chat zusammen', 'neue session mit altem stand'. Never inferred."
17
17
  workspaces:
18
18
  - agent-config-maintainer
19
19
  packs:
@@ -22,24 +22,63 @@ packs:
22
22
 
23
23
  # /agent-handoff
24
24
 
25
- Generates a concise handoff prompt the user can paste into a new chat.
26
- This replaces the old session system — no files to save/load, just a copy-paste prompt.
25
+ Resume-style flow: pick one of the recent sessions, a handoff is generated
26
+ deterministically from its transcript, and the next session starts with that
27
+ handoff already injected as context. The legacy copy-paste summary of the
28
+ *live* conversation stays available as `--print`.
27
29
 
28
- ## Steps
30
+ ## Steps — primary flow (CLI-backed session picker)
29
31
 
30
- ### 1. Gather context
32
+ ### 1. List the recent sessions
31
33
 
32
- Collect the following from the current conversation:
34
+ ```bash
35
+ agent-config handoff --list
36
+ ```
37
+
38
+ Sources, merged newest-first: the cross-host chat-history log (primary),
39
+ native Claude Code transcripts (`~/.claude/projects/<slug>/`), and the Codex
40
+ session store (`~/.codex/sessions/`, Codex's only source).
33
41
 
34
- - **Branch**: `git branch --show-current`
35
- - **Uncommitted changes**: `git status --short`
36
- - **Recent commits**: `git log --oneline -5`
37
- - **Active roadmap**: Check `agents/roadmaps/` for any active roadmap
38
- - **Task list**: Only include if the user explicitly asks for it (e.g., "/agent-handoff with tasks")
42
+ ### 2. Present the picker
39
43
 
40
- ### 2. Generate handoff prompt
44
+ Show the sessions as ONE numbered-options block (per `user-interaction` —
45
+ date · branch · summary per line) and let the user pick. One question, then
46
+ wait.
41
47
 
42
- Create a fenced code block the user can copy-paste into a new chat:
48
+ ### 3. Generate the handoff for the pick
49
+
50
+ ```bash
51
+ agent-config handoff --session <id>
52
+ ```
53
+
54
+ The generator extracts the handoff sections deterministically from the
55
+ transcript — no LLM spend, reproducible, privacy-floored per line (violating
56
+ lines are DROPPED and counted, never rewritten) — and writes the result
57
+ atomically to `agents/runtime/state/handoff-context.md` (gitignored runtime
58
+ state, one-shot).
59
+
60
+ ### 4. Hand over to the fresh session
61
+
62
+ Tell the user: **start a new session — the handoff is injected
63
+ automatically** (the `handoff-context` session_start hook consumes the file
64
+ exactly once, then deletes it). In a terminal-capable context, offer
65
+ `agent-config handoff --session <id> --launch claude` (or `--launch codex`)
66
+ to spawn the fresh session directly:
67
+
68
+ - `claude` — seeds via the session_start hook (clean first message).
69
+ - `codex` — no hook surface there; the adapter passes the handoff as the
70
+ initial prompt instead. Same UX, different transport.
71
+ - Bundle hosts without hooks (Antigravity, Copilot) → use `--print` and
72
+ copy-paste.
73
+
74
+ ## Fallback mode — summarize the LIVE conversation (`--print`)
75
+
76
+ On `/agent-handoff --print` (or when no session log exists), summarize the
77
+ current conversation in-model — the original flow. Collect branch
78
+ (`git branch --show-current`), uncommitted changes (`git status --short`),
79
+ recent commits (`git log --oneline -5`), the active roadmap under
80
+ `agents/roadmaps/`, and the task list only when explicitly asked
81
+ ("/agent-handoff with tasks"). Then emit:
43
82
 
44
83
  ```
45
84
  ---
@@ -80,12 +119,39 @@ Roadmap: {roadmap file if active, or "none"}
80
119
  - {list of files that were edited or are important for context}
81
120
  ```
82
121
 
122
+ The CLI generator emits the same section set (minus the live-only
123
+ *Repeatable workflow* / *Feedback history* refinements) — the template above
124
+ stays the single source of the section contract.
125
+
83
126
  **Verbatim-first is the load-bearing rule:** the *User instructions* and
84
127
  *Feedback history* sections are preserved word-for-word and never compressed —
85
128
  lossy re-summarization of the user's own constraints is the exact failure this
86
129
  template prevents. Everything else (Done / Key decisions) stays concise.
87
130
 
88
- ### 2b. File-artifact mode — `HANDOFF.md` (optional, host-neutral)
131
+ ### Present the fallback to the user
132
+
133
+ Show the handoff prompt in a fenced code block and say:
134
+
135
+ ```
136
+ > Copy this into a new chat to continue where we left off.
137
+ ```
138
+
139
+ ## Iron Law — printed output is ALWAYS a fenced code block
140
+
141
+ ```
142
+ THE HANDOFF MUST BE WRAPPED IN A FENCED ```markdown CODE BLOCK
143
+ SO THE USER CAN COPY IT IN ONE CLICK. NEVER RENDER IT AS LIVE
144
+ MARKDOWN. NEVER SPLIT IT ACROSS MULTIPLE BLOCKS.
145
+ ```
146
+
147
+ Applies to every in-chat emission (`--print` fallback, bundle hosts). Use
148
+ ` ```markdown ` as the fence so consumers get syntax highlighting and the
149
+ inner content is preserved verbatim. Add one short prose line above the
150
+ block (e.g. *"Copy this into a new chat:"*) and nothing after — no follow-up
151
+ questions, no numbered options. The picker in Step 2 is the one exception:
152
+ it is the flow's single question, asked BEFORE any handoff is generated.
153
+
154
+ ## 2b. File-artifact mode — `HANDOFF.md` (optional, host-neutral)
89
155
 
90
156
  On `/agent-handoff --file` (or when a workflow skill's phase boundary asks
91
157
  for a standing handoff), ALSO write the contract to
@@ -119,27 +185,6 @@ next to it (`HANDOFF.md.<ts>.bak`) before overwrite; duplicate-check before
119
185
  appending (never double-append a section); preserve the section structure;
120
186
  post-verify the write by re-reading the required fields.
121
187
 
122
- ### 3. Present to user
123
-
124
- Show the handoff prompt in a fenced code block and say:
125
-
126
- ```
127
- > Copy this into a new chat to continue where we left off.
128
- ```
129
-
130
- ## Iron Law — output is ALWAYS a fenced code block
131
-
132
- ```
133
- THE HANDOFF MUST BE WRAPPED IN A FENCED ```markdown CODE BLOCK
134
- SO THE USER CAN COPY IT IN ONE CLICK. NEVER RENDER IT AS LIVE
135
- MARKDOWN. NEVER SPLIT IT ACROSS MULTIPLE BLOCKS.
136
- ```
137
-
138
- Use ` ```markdown ` as the fence so consumers get syntax highlighting
139
- and the inner content is preserved verbatim. Add one short prose line
140
- above the block (e.g. *"Copy this into a new chat:"*) and nothing
141
- after — no follow-up questions, no numbered options.
142
-
143
188
  ## Detection — when natural-language triggers count as explicit
144
189
 
145
190
  The user does not need to type `/agent-handoff` literally. Treat as
@@ -149,6 +194,9 @@ explicit invocation when the prompt contains a verbatim mention of:
149
194
  - `fresh chat`, `neuer chat`, `for a new chat`
150
195
  - `context summary for {fresh,new} chat`
151
196
  - `fasse … für … chat zusammen`
197
+ - `resume {a,the} previous session`, `continue {an,the} old session`
198
+ - `neue session mit dem stand von {gestern,letzter session}`,
199
+ `alte session … weitermachen`
152
200
 
153
201
  A vague *"summarize this conversation"* without handoff/new-chat
154
202
  framing → NOT a trigger. Surface `/agent-handoff` as a numbered option,
@@ -156,6 +204,9 @@ do not auto-execute.
156
204
 
157
205
  ## Rules
158
206
 
207
+ - **Primary flow is CLI-backed.** When `agent-config` is reachable, route
208
+ through the picker (Steps 1–4); fall back to the in-model summary only on
209
+ `--print`, on bundle hosts, or when the CLI reports no sessions.
159
210
  - **Concise everywhere EXCEPT the verbatim sections.** Keep Done / Key
160
211
  decisions tight, but never truncate *User instructions* or *Feedback history*
161
212
  to hit a line target — losing a user constraint costs far more than the
@@ -168,13 +219,13 @@ do not auto-execute.
168
219
  - **Open tasks are critical** — the new chat needs to know what's left.
169
220
  - **Decisions are important** — prevents the new chat from re-asking settled questions.
170
221
  - **File list is optional** — only include if the new chat will need to edit specific files.
171
- - **NEVER render the handoff as live markdown** — see Iron Law above.
222
+ - **NEVER render a printed handoff as live markdown** — see Iron Law above.
172
223
 
173
224
  ## When to use this vs. `agents/runtime/.agent-chat-history`
174
225
 
175
- - `/agent-handoff` is **push-based**: you copy a short summary into the
176
- new chat. Works across tools (Augment → Claude Code), across machines,
177
- and without any persistent file.
226
+ - `/agent-handoff` picks a **past session** and seeds the next one (or, with
227
+ `--print`, pushes a copy-paste summary of the live one). Works across
228
+ tools; the auto-inject path needs a hook-capable host on the same machine.
178
229
  - `agents/runtime/.agent-chat-history` is **pull-based** and **multi-session**: every
179
230
  session writes its own entries tagged with a 16-char session
180
231
  fingerprint derived from the platform `session_id` (schema v4, see
@@ -185,13 +236,14 @@ do not auto-execute.
185
236
  session for project-improving learnings with
186
237
  `/memory mine-session --mode=proposals`.
187
238
 
188
- Prefer `/agent-handoff` for planned context switches across tools or
189
- machines; use `/chat-history import` after a crash or fresh-chat reopen
190
- on the same workspace to surface prior-session context verbatim.
239
+ Prefer `/agent-handoff` for planned context switches and session resumes;
240
+ use `/chat-history import` after a crash or fresh-chat reopen on the same
241
+ workspace to surface prior-session context verbatim.
191
242
 
192
243
  Three distinct mechanisms — do not conflate them:
193
244
 
194
- - **handoff** (this command) — a one-shot push summary for the *next* chat;
195
- ephemeral, copy-paste, verbatim on the user's instructions.
245
+ - **handoff** (this command) — a one-shot seed for the *next* chat;
246
+ generated from a picked session (or pushed from the live one), ephemeral,
247
+ verbatim on the user's instructions.
196
248
  - **[`chat-history import`](../chat-history/import/command.md)** — pull a prior *session's* logged context into the current chat.
197
249
  - **durable memory** ([`memory-consolidation`](../../../skills/memory-consolidation/SKILL.md)) — cross-*run* curated facts; a handoff is not memory, and memory is not a transcript.
@@ -193,7 +193,7 @@ Read `verbosity.post_action_reports` from `.agent-settings.yml` (default
193
193
 
194
194
  ## Rules
195
195
 
196
- - **Never commit before the user confirms** the plan.
196
+ - **Preview path: never commit before the user confirms the plan — once, for the whole plan.** On the terse path (`preview_artifacts: false` AND `routine_confirmations: false`) the `/commit` invocation itself is the confirmation (`commit-policy` exception 3); proceed without a prompt.
197
197
  - **Never push** — pushing is left to the user.
198
198
  - **Never modify files** — only stage and commit existing changes.
199
199
  - **Do NOT add untracked files** unless they are clearly part of the change (check with `git status`).
@@ -20,8 +20,8 @@ packs:
20
20
 
21
21
  # condense
22
22
 
23
- Condense agent config `.md` files from `src/` into token-efficient telegraph format
24
- and write the condensed output to `dist/agent-src/`.
23
+ Project agent config `.md` files from `src/` into `dist/agent-src/` — verbatim
24
+ copy with the path rewriter applied (ADR-201; the LLM prose rewrite is removed).
25
25
 
26
26
  The projection is deterministic: `dist == rewrite(src)` byte-for-byte. A file is
27
27
  out of date only when its projection does not match that rewrite.
@@ -96,76 +96,31 @@ Read `verbosity.post_action_reports` from `.agent-settings.yml` (default
96
96
  `minimal`).
97
97
 
98
98
  - `off` → emit nothing on success; surface errors only.
99
- - `minimal` (default) → one line: `→ N files condensed (avg X% savings)`.
100
- - `full` → multi-line table with per-category stats (files condensed,
101
- avg savings).
99
+ - `minimal` (default) → one line: `→ N files synced`.
100
+ - `full` → multi-line table with per-category stats (files synced,
101
+ stale files reaped).
102
102
 
103
- ## Iron Laws — do not touch
103
+ ## Iron Laws — preserved by construction
104
104
 
105
105
  Sections under headings matching `Iron Law`, `Iron Laws`, or `The Iron Law` (any
106
106
  heading level, numbered variants like `Iron Law 1` included) are **load-bearing
107
- behavioral rules**. Condensation rules above do **not** apply to them.
108
-
109
- For every Iron Law section in a source file:
110
-
111
- - **Copy the heading verbatim**, exact text, exact `#` level. NEVER downgrade
112
- `## Iron Law` to `### Iron Law` or to inline `**Iron Law:**`.
113
- - **Copy the fenced code block byte-for-byte**, including capitalization, line
114
- breaks, and trailing punctuation.
115
- - **Copy the negation clauses verbatim** — `NO X`, `NEVER Y`, `NOT Z`. These
116
- are the law's exception denials; stripping them weakens the rule.
117
- - **Telegraph the prose, keep every passage** — every paragraph, every list
118
- item, and every fenced code block from the source must appear in the
119
- condensed output, in order. Drop articles, shorten phrasing, primitive
120
- grammar, terse cave-speak — all encouraged. What's forbidden is dropping
121
- whole sentences, merging two paragraphs into one, or skipping a bullet.
122
- One paragraph → one paragraph; one bullet → one bullet.
123
- - **No word-count budget** — condense the prose as hard as telegraph style
124
- allows. The check is structural (passage count), not quantitative.
125
-
126
- `scripts/check_condensation.ts` enforces these mechanically — `iron_law_missing`,
127
- `iron_law_passage_dropped`, and `iron_law_heading_downgrade` are `error`-level
128
- and block CI.
107
+ behavioral rules**. Post-ADR-201 the projection is a verbatim copy, so headings,
108
+ fenced blocks, and negation clauses survive by construction — there is no manual
109
+ preservation step for the agent to perform.
129
110
 
130
- If an Iron Law section genuinely contains filler (rare): edit the SOURCE in
131
- `src/`, not the condensed copy. Source is the truth.
132
-
133
- ## Condensation quality checklist
134
-
135
- **Also apply the [preservation-guard](../rules/preservation-guard.md) rule** — strongest validation, example, anti-pattern, and decision hints must survive condensation. Iron Laws are non-negotiable.
136
-
137
- See also: [markdown-safe-codeblocks](../rules/markdown-safe-codeblocks.md) for fenced-block hygiene.
138
-
139
- After condensing each file, verify:
111
+ `scripts/check_condensation.ts` enforces this mechanically — since ADR-201 it
112
+ asserts `dist == rewrite(src)` byte-for-byte; `iron_law_missing`,
113
+ `iron_law_passage_dropped`, and `iron_law_heading_downgrade` remain `error`-level
114
+ diagnostics that name what differs when the bytes do.
140
115
 
141
- - [ ] All code blocks preserved exactly (no content changes)
142
- - [ ] All inline code, URLs, file paths unchanged
143
- - [ ] YAML frontmatter identical to source
144
- - [ ] Headings match source exactly
145
- - [ ] Tables structure preserved (cell text may be shortened)
146
- - [ ] "NEVER", "MUST", "Do NOT" and other strong language preserved
147
- - [ ] Technical terms, library names, API names unchanged
148
- - [ ] No meaning lost — condensed version says the same thing, shorter
149
- - [ ] No sections accidentally removed
150
- - [ ] Word count reduction is 20-50% (typical range for prose-heavy files)
151
-
152
- ### Safe vs unsafe condensation
153
-
154
- Safe:
155
- - "You should always make sure to run the tests before committing" → "Run tests before commit"
156
- - "In order to ensure that the configuration is correct" → "To verify config"
157
- - "It is important to note that this feature requires" → "Requires"
158
-
159
- Unsafe (DO NOT do this):
160
- - Removing a bullet point that contains unique information
161
- - Changing `php artisan test --filter=MyTest` to `php artisan test`
162
- - Shortening "Do NOT use float for money" to "Avoid float"
163
- - Removing "NEVER" from "NEVER add to phpstan-baseline.neon"
116
+ If an Iron Law section genuinely contains filler (rare): edit the SOURCE in
117
+ `src/`, not the projected copy. Source is the truth. Authoring-time transforms
118
+ (merges, splits, refactors) remain governed by
119
+ [preservation-guard](../rules/preservation-guard.md).
164
120
 
165
121
  ## Rules
166
122
 
167
123
  - **Do NOT commit or push.** Only write files.
168
124
  - **Do NOT modify `src/`** — it is the source of truth.
169
- - **Only write to `.augment/`** — the condensed output directory.
170
- - **Preserve ALL technical content** — only condense natural language prose.
171
- - **YAML frontmatter** in command/skill files must be preserved exactly.
125
+ - **Only write to `dist/agent-src/`** (via `condense.sh` / the script) — never
126
+ hand-edit any projection.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "command": "agent-handoff",
3
- "intent": "Generate a session-handoff summary to continue work in a fresh chat",
3
+ "intent": "Resume a previous session in a fresh chat: pick a session, generate a handoff, auto-seed the next session",
4
4
  "cases": [
5
5
  {
6
6
  "prompt": "summarize where we are so I can paste it into a new chat",
@@ -29,6 +29,18 @@
29
29
  {
30
30
  "prompt": "show me the current message count and token cost",
31
31
  "expected": "agent-status"
32
+ },
33
+ {
34
+ "prompt": "let me continue an old session in a fresh chat",
35
+ "expected": "agent-handoff"
36
+ },
37
+ {
38
+ "prompt": "starte eine neue session mit dem stand von gestern",
39
+ "expected": "agent-handoff"
40
+ },
41
+ {
42
+ "prompt": "resume my previous session where we left off, but in a clean chat",
43
+ "expected": "agent-handoff"
32
44
  }
33
45
  ]
34
46
  }
@@ -184,7 +184,20 @@ echo '{"type":"supersede","supersedes":"<sig-id>","promoted_to":"<curated id>"}'
184
184
  This keeps the intake stream truthful — lookups will ignore the
185
185
  superseded signal.
186
186
 
187
- ### 6. Open a promotion PR
187
+ ### 6. Open a promotion PR — git ops are permission-gated
188
+
189
+ Branch, commit, and push are NOT authorized by invoking this command
190
+ (per `scope-control` § git-ops and the `non-destructive-by-default`
191
+ push floor — invoking `/memory:promote` names the promotion, not a git
192
+ destination). Surface the exact operations and wait for explicit
193
+ confirmation this turn:
194
+
195
+ > Promotion is written. Ship it as a PR?
196
+ >
197
+ > 1. Yes — branch `memory/promote-<curated-id>`, commit, push, then `/create-pr`
198
+ > 2. No — keep the promotion local, I'll ship it myself
199
+
200
+ Only on option 1:
188
201
 
189
202
  ```bash
190
203
  git checkout -b memory/promote-<curated-id>
@@ -63,7 +63,9 @@ Extract `roles.default_role` and `roles.active_role`.
63
63
 
64
64
  Echo the full contract body for the target mode from `role-contracts.md`:
65
65
 
66
- - Goal / Constraints / Output fields
66
+ - The mode's contract-skeleton fields (each mode's skeleton differs —
67
+ e.g. developer: Goal / Plan / Changes / Tests / Open questions;
68
+ planner: Goal / Constraints / Option set / …)
67
69
  - Default skills the mode loads first
68
70
  - Structured mode marker the agent will emit when closing
69
71
 
@@ -85,7 +87,7 @@ Do NOT write anything for `/mode` without an argument (status only).
85
87
  Announce the switch as:
86
88
 
87
89
  ```
88
- > entering {mode} mode — contract: {goal-field} / {constraints-field} / {output-field}
90
+ > entering {mode} mode — contract fields: {first-3-field-names-from-skeleton}
89
91
  ```
90
92
 
91
93
  From this point in the session: the rule
@@ -105,7 +107,7 @@ numbered prompt:
105
107
  ## Output format
106
108
 
107
109
  ```
108
- > entering {mode} mode — contract: …
110
+ > entering {mode} mode — contract fields: …
109
111
  >
110
112
  > Default skills: {skill-a}, {skill-b}, {skill-c}
111
113
  > Closing marker: <!-- role-mode: {mode} | contract: … -->
@@ -121,8 +123,10 @@ For `/mode` (status only):
121
123
  ## Gotchas
122
124
 
123
125
  - `.agent-settings.yml` is git-ignored. `/mode` never commits the file.
124
- - If the file is missing the `roles:` section, add it in the correct
125
- place (between `subagents:` and EOF) using the template layout.
126
+ - If the file is missing the `roles:` section, add it — note
127
+ `agent-settings.template.yml` ships no `roles:` block; the reference
128
+ `roles:` layout lives in
129
+ `src/agent-src/templates/agents/agent-project-settings.example.yml`.
126
130
  - Mode names are case-sensitive in the file; case-insensitive on input.
127
131
  - The contract is the source of truth, not this command — if the
128
132
  guideline changes, this command reflects the new contract on next run.