@event4u/agent-config 1.19.0 → 1.20.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 (88) hide show
  1. package/.agent-src/commands/agent-handoff.md +14 -10
  2. package/.agent-src/commands/chat-history/import.md +170 -0
  3. package/.agent-src/commands/chat-history/learn.md +178 -0
  4. package/.agent-src/commands/chat-history/show.md +17 -18
  5. package/.agent-src/commands/chat-history.md +26 -25
  6. package/.agent-src/commands/council/default.md +4 -7
  7. package/.agent-src/commands/create-pr.md +28 -8
  8. package/.agent-src/commands/sync-gitignore.md +1 -1
  9. package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +76 -0
  10. package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +3 -3
  11. package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +5 -12
  12. package/.agent-src/rules/direct-answers.md +10 -2
  13. package/.agent-src/rules/language-and-tone.md +37 -6
  14. package/.agent-src/rules/no-attribution-footers.md +48 -0
  15. package/.agent-src/rules/no-roadmap-references.md +1 -1
  16. package/.agent-src/rules/skill-quality.md +49 -0
  17. package/.agent-src/rules/user-interaction.md +21 -5
  18. package/.agent-src/skills/ai-council/SKILL.md +4 -5
  19. package/.agent-src/skills/dcf-modeling/SKILL.md +89 -0
  20. package/.agent-src/skills/funnel-analysis/SKILL.md +100 -0
  21. package/.agent-src/skills/md-language-check/SKILL.md +1 -1
  22. package/.agent-src/skills/okr-tree-modeling/SKILL.md +93 -0
  23. package/.agent-src/skills/rice-prioritization/SKILL.md +100 -0
  24. package/.agent-src/skills/subagent-orchestration/SKILL.md +34 -2
  25. package/.agent-src/skills/unit-economics-modeling/SKILL.md +104 -0
  26. package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -0
  27. package/.agent-src/templates/agent-settings.md +5 -26
  28. package/.agent-src/templates/scripts/work_engine/hook_bootstrap.py +7 -5
  29. package/.agent-src/templates/scripts/work_engine/hooks/__init__.py +0 -4
  30. package/.agent-src/templates/scripts/work_engine/hooks/builtin/__init__.py +0 -4
  31. package/.agent-src/templates/scripts/work_engine/hooks/builtin/_chat_history_base.py +7 -51
  32. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_append.py +1 -2
  33. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_halt_append.py +1 -2
  34. package/.agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.py +2 -3
  35. package/.agent-src/templates/skill.md +30 -1
  36. package/.claude-plugin/marketplace.json +8 -4
  37. package/AGENTS.md +44 -3
  38. package/CHANGELOG.md +111 -0
  39. package/README.md +6 -6
  40. package/config/agent-settings.template.yml +19 -13
  41. package/config/gitignore-block.txt +4 -4
  42. package/docs/architecture.md +3 -3
  43. package/docs/catalog.md +14 -12
  44. package/docs/contracts/adr-chat-history-split.md +10 -1
  45. package/docs/contracts/command-clusters.md +1 -1
  46. package/docs/contracts/cross-wing-handoff.md +133 -0
  47. package/docs/contracts/file-ownership-matrix.json +341 -126
  48. package/docs/contracts/hook-architecture-v1.md +8 -1
  49. package/docs/contracts/memory-visibility-v1.md +8 -24
  50. package/docs/customization.md +1 -1
  51. package/docs/getting-started.md +21 -29
  52. package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +1 -1
  53. package/docs/hook-payload-capture.md +221 -0
  54. package/docs/migrations/commands-1.15.0.md +17 -12
  55. package/docs/skills-catalog.md +5 -4
  56. package/llms.txt +4 -3
  57. package/package.json +1 -1
  58. package/scripts/agent-config +1 -1
  59. package/scripts/ai_council/_default_prices.py +4 -4
  60. package/scripts/ai_council/clients.py +1 -1
  61. package/scripts/ai_council/modes.py +3 -4
  62. package/scripts/ai_council/pricing.py +10 -9
  63. package/scripts/build_rule_trigger_matrix.py +1 -9
  64. package/scripts/chat_history.py +952 -596
  65. package/scripts/check_references.py +12 -2
  66. package/scripts/council_cli.py +54 -4
  67. package/scripts/hook_manifest.yaml +33 -0
  68. package/scripts/hooks/augment-chat-history.sh +10 -0
  69. package/scripts/hooks/cowork-dispatcher.sh +98 -0
  70. package/scripts/hooks/dispatch_hook.py +35 -0
  71. package/scripts/hooks_status.py +12 -1
  72. package/scripts/install-hooks.sh +2 -2
  73. package/scripts/install.sh +37 -0
  74. package/scripts/lint_handoffs.py +214 -0
  75. package/scripts/lint_hook_manifest.py +2 -1
  76. package/scripts/redact_hook_capture.py +148 -0
  77. package/scripts/schemas/skill.schema.json +5 -0
  78. package/scripts/skill_linter.py +163 -1
  79. package/scripts/update_prices.py +3 -3
  80. package/.agent-src/commands/chat-history/checkpoint.md +0 -126
  81. package/.agent-src/commands/chat-history/clear.md +0 -103
  82. package/.agent-src/commands/chat-history/resume.md +0 -183
  83. package/.agent-src/rules/chat-history-cadence.md +0 -143
  84. package/.agent-src/rules/chat-history-ownership.md +0 -124
  85. package/.agent-src/rules/chat-history-visibility.md +0 -97
  86. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_heartbeat.py +0 -50
  87. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_turn_check.py +0 -49
  88. package/scripts/check_phase_coupling.py +0 -148
@@ -11,10 +11,9 @@ Complements [`agent-memory-contract.md`](agent-memory-contract.md):
11
11
  that doc describes the **CLI surface and backend states**; this doc
12
12
  describes the **operator-facing surface** the engine emits per turn.
13
13
 
14
- **Scope.** Defines the line shape, the privacy floor, the opt-out
15
- toggle, and the interaction with the chat-history heartbeat. Does
16
- **not** define how memory entries are scored or routed — that is the
17
- sibling agent-memory package.
14
+ **Scope.** Defines the line shape, the privacy floor, and the opt-out
15
+ toggle. Does **not** define how memory entries are scored or routed —
16
+ that is the sibling agent-memory package.
18
17
 
19
18
  Last refreshed: 2026-05-04.
20
19
 
@@ -78,28 +77,13 @@ Off-mode does not silence the underlying memory calls; it only stops
78
77
  the line from rendering. The decision-trace JSON still records the
79
78
  counts and ids for downstream metrics.
80
79
 
81
- ## Interaction with chat-history heartbeat
82
-
83
- The chat-history heartbeat (`📒` marker) and the memory-visibility
84
- line are **independent**:
85
-
86
- - Heartbeat fires on cadence boundaries
87
- (`per_turn` / `per_phase` / `per_tool`).
88
- - Visibility line fires whenever `asks ≥ 1` for the current turn,
89
- regardless of cadence.
90
- - Both render on the same reply when both fire — heartbeat first,
91
- visibility line second, separated by a single newline.
92
-
93
- The visibility line is **not** part of the heartbeat payload — that
94
- keeps the heartbeat contract bytes-stable.
95
-
96
80
  ## Cadence interaction
97
81
 
98
- | Cost profile | Visibility line | Heartbeat |
99
- |---|---|---|
100
- | `lean` | suppress unless `asks ≥ 3` | per-phase |
101
- | `standard` | always when `asks ≥ 1` | per-turn |
102
- | `verbose` | always when `asks ≥ 1` | per-tool |
82
+ | Cost profile | Visibility line |
83
+ |---|---|
84
+ | `lean` | suppress unless `asks ≥ 3` |
85
+ | `standard` | always when `asks ≥ 1` |
86
+ | `verbose` | always when `asks ≥ 1` |
103
87
 
104
88
  Cost-profile lookup respects `.agent-settings.yml`'s `cost_profile`
105
89
  key. Default is `standard`.
@@ -53,7 +53,7 @@ those sections.
53
53
  | `personal.open_edited_files` | `false` | Open edited files in IDE |
54
54
  | `personal.ide` | *(empty)* | IDE for file opening (`cursor`, `code`, `phpstorm`) |
55
55
  | `pipelines.skill_improvement` | `true` | Post-task learning capture. Included in every profile except `custom`. |
56
- | `chat_history.enabled` | `true` | Persistent JSONL log at `.agent-chat-history` for crash recovery. |
56
+ | `chat_history.enabled` | `true` | Persistent JSONL log at `agents/.agent-chat-history` for crash recovery. |
57
57
  | `chat_history.frequency` | per profile | Logging granularity: `per_turn`, `per_phase`, or `per_tool` (see matrix below). |
58
58
  | `chat_history.max_size_kb` | per profile | Max file size before overflow handling (see matrix below). |
59
59
  | `chat_history.on_overflow` | per profile | `rotate` drops oldest, `compress` marks for summarization (see matrix below). |
@@ -115,7 +115,7 @@ Your agent is now:
115
115
  - **Respecting your codebase** — no conflicting patterns
116
116
  - **Following standards** — consistent code quality
117
117
 
118
- This is enforced automatically by 58 rules. No configuration needed.
118
+ This is enforced automatically by 56 rules. No configuration needed.
119
119
 
120
120
  ---
121
121
 
@@ -151,41 +151,33 @@ Your agent now understands slash commands:
151
151
  | `/optimize skills` | Audit skills, find duplicates, run linter |
152
152
  | `/feature plan` | Interactively plan a feature |
153
153
  | `/quality-fix` | Run and fix all quality checks |
154
- | `/chat-history` | Inspect the persistent chat-history log |
155
- | `/chat-history-resume` | Recover context after a crashed or switched session |
156
- | `/chat-history-clear` | Wipe the chat-history log (with confirmation) |
154
+ | `/chat-history` | Inspect the persistent chat-history log (read-only `show`) |
157
155
 
158
- → [Browse all 95 active commands](../.agent-src/commands/)
156
+ → [Browse all 94 active commands](../.agent-src/commands/)
159
157
 
160
158
  ---
161
159
 
162
- ## Crash recovery — `.agent-chat-history`
160
+ ## Crash recovery — `agents/.agent-chat-history`
163
161
 
164
162
  When `chat_history.enabled: true` in `.agent-settings.yml` (on by default
165
163
  for every profile), the agent keeps a JSONL log of your conversation in
166
- `.agent-chat-history` at the project root. The file is git-ignored and
167
- rotates at the size configured in the profile (`128 KB` on `minimal`,
168
- `256 KB` on `balanced`, `512 KB` on `full`).
169
-
170
- When a chat opens and finds an existing log, the host agent is
171
- instructed to run a 4-state ownership check and choose the right
172
- flow:
173
-
174
- - **match** — this chat already owns the file. Append silently.
175
- - **foreign** — a different session's file. You get 3 options:
176
- Resume (adopt), New start (archive + init), Ignore (skip logging).
177
- - **returning** this chat once owned the file, but another session
178
- took over in between. You get 3 options: Merge (your history in front
179
- of the foreign entries), Replace (wipe foreign entries, keep yours
180
- only), Continue (just leave the file and append from now on).
181
- - **missing** — no file yet. Init and proceed.
182
-
183
- Run `/chat-history-resume` to walk through the prompts explicitly, or
184
- let the agent ask on the first turn of a new chat. All merge/replace/
185
- resume paths read the on-disk entries into context before any write.
186
-
187
- See the [`chat-history` rule](../.agent-src/rules/chat-history-ownership.md) and
188
- [`scripts/chat_history.py`](../scripts/chat_history.py) for the mechanics.
164
+ `agents/.agent-chat-history`. The file is git-ignored and rotates at the
165
+ size configured in the profile (`128 KB` on `minimal`, `256 KB` on
166
+ `balanced`, `512 KB` on `full`).
167
+
168
+ Logging is **hook-only**: a structural Augment hook fires on
169
+ `session_start` and binds the log to the current session via auto-adopt
170
+ — no agent prompts, no ownership questions. The file is rewritten
171
+ transparently if the fingerprint does not match (fresh chat) and
172
+ otherwise appended to.
173
+
174
+ Run `/chat-history` (a.k.a. `/chat-history show`) any time to inspect
175
+ the log size, last entries, and current fingerprint. For the rare case
176
+ where auto-adopt misfires (corrupted file, hook misconfiguration), run
177
+ `./agent-config chat-history:adopt` as the manual recovery lever.
178
+
179
+ See [`agents/contexts/chat-history-platform-hooks.md`](../agents/contexts/chat-history-platform-hooks.md)
180
+ and [`scripts/chat_history.py`](../scripts/chat_history.py) for the mechanics.
189
181
 
190
182
  ---
191
183
 
@@ -106,7 +106,7 @@ Agent: Bevor ich die Roadmap übergebe:
106
106
  - Welcher Branch?
107
107
  - Soll ich PRs erwähnen?
108
108
  - Welches Modell für die Fortsetzung?
109
- - Soll ich .agent-chat-history zitieren?
109
+ - Soll ich agents/.agent-chat-history zitieren?
110
110
 
111
111
  Antworte als 1, 2, 3, 4.
112
112
  ```
@@ -0,0 +1,221 @@
1
+ # Hook payload capture guide
2
+
3
+ **Purpose:** walk through the live-session payload capture for one platform
4
+ in roughly 5 minutes, so the corresponding entry in
5
+ [`agents/contexts/chat-history-platform-hooks.md`](../agents/contexts/chat-history-platform-hooks.md)
6
+ can move from `docs-verified` to `payload-verified`.
7
+
8
+ **Scope:** Cursor · Cline · Windsurf · Gemini CLI. Augment Code and Claude
9
+ Code already shipped as `docs-verified` in Phase 1 of the now-archived
10
+ [`road-to-verified-chat-history-platforms.md`](../agents/roadmaps/archive/road-to-verified-chat-history-platforms.md).
11
+ Cowork is upstream-blocked separately
12
+ ([`#40495`](https://github.com/anthropics/claude-code/issues/40495)) and
13
+ not in scope here.
14
+
15
+ **Why this is opportunistic:** the payload-verified upgrade is a nice-to-have.
16
+ The shipping `docs-verified` extractors already match the vendor docs —
17
+ captures are insurance against silent vendor-side schema drift. Pick one
18
+ platform when convenient; do not run all four in one sitting unless you
19
+ already have all four IDEs installed and licensed.
20
+
21
+ ## Pre-flight (one-time, ~30 seconds)
22
+
23
+ ```bash
24
+ cd /path/to/agent-config
25
+
26
+ # Confirm the dispatcher is wired in this project (idempotent — safe to rerun).
27
+ # Replace <platform> with cursor / cline / windsurf / gemini as appropriate
28
+ # when you reach that platform's section.
29
+ python3 scripts/install.py --<platform>
30
+
31
+ # Confirm the trampoline + project-scope hooks file landed.
32
+ ./agent-config hooks:status | grep -E "^[ ✓✅⚠️❌·] (cursor|cline|windsurf|gemini)"
33
+ ```
34
+
35
+ `hooks:status` should report `installed` for the platform you just wired
36
+ (or `missing` if the project-scope file did not land — in that case rerun
37
+ the install with `--force`).
38
+
39
+ ## Common capture loop (steps reused on every platform)
40
+
41
+ ```bash
42
+ # 1. Pick a per-platform capture dir (gitignored; never committed).
43
+ export AGENT_HOOK_CAPTURE_DIR="$HOME/.agent-config-captures/<platform>"
44
+ mkdir -p "$AGENT_HOOK_CAPTURE_DIR"
45
+
46
+ # 2. Restart / reload the platform so it picks up the env var.
47
+ # Per-platform commands below.
48
+
49
+ # 3. Run ONE short, boring session in the platform.
50
+ # Recommended prompt: "echo hello" or "what time is it".
51
+ # Goal is to capture the envelope shape, not interesting content.
52
+
53
+ # 4. Confirm capture files exist.
54
+ ls -1 "$AGENT_HOOK_CAPTURE_DIR" | head
55
+
56
+ # 5. Redact (replaces user-content fields with <REDACTED>;
57
+ # envelope keys preserved).
58
+ python3 scripts/redact_hook_capture.py "$AGENT_HOOK_CAPTURE_DIR" --strict
59
+
60
+ # 6. Pick the smallest representative file.
61
+ ls -1Sr "$AGENT_HOOK_CAPTURE_DIR"/*.redacted.json | head -1
62
+
63
+ # 7. cat it; copy the JSON; paste into the archived roadmap section
64
+ # (see § Where to paste below).
65
+ ```
66
+
67
+ The redaction step is non-negotiable. The goal is to lock schemas, not to
68
+ archive conversations.
69
+
70
+ ## Per-platform notes
71
+
72
+ ### Cursor (~5 min)
73
+
74
+ - **Install:** `python3 scripts/install.py --cursor` (project) or
75
+ `--cursor-user-hooks` (covers every project you open).
76
+ - **Restart:** quit Cursor (Cmd+Q on macOS), then relaunch from the
77
+ shell where you exported `AGENT_HOOK_CAPTURE_DIR` so the env var
78
+ propagates to the renderer process. Reopening a window from the
79
+ Dock will not inherit the env.
80
+ - **Trigger event:** type a prompt in Cursor's agent panel and let it
81
+ finish. Expected captures: one `sessionStart`, one
82
+ `beforeSubmitPrompt`, one `afterAgentResponse` and/or `stop`,
83
+ zero or more `postToolUse`.
84
+ - **File pattern:** `cursor__afterAgentResponse__<ts>__<pid>.json` is
85
+ the most useful one to paste.
86
+ - **CLI vs IDE:** Cursor CLI fires only
87
+ `beforeShellExecution`/`afterShellExecution` — for the
88
+ per-turn payload you need the IDE.
89
+
90
+ ### Cline (~5 min)
91
+
92
+ - **Install:** `python3 scripts/install.py --cline` (project) or
93
+ `--cline-user-hooks` (user-scope, covers every workspace).
94
+ - **Restart:** in VS Code or JetBrains, run "Developer: Reload
95
+ Window" (Cmd+Shift+P) from a terminal where the env is exported.
96
+ Cline reads hooks at task start, so a fresh task is required —
97
+ closing and reopening the side panel is not enough.
98
+ - **Trigger event:** start a new Cline task and let one turn complete.
99
+ Cline calls them "tasks" not "sessions"; the equivalent boundaries
100
+ are `TaskStart` → `UserPromptSubmit` → `PostToolUse`* →
101
+ `TaskComplete`.
102
+ - **File pattern:** `cline__TaskComplete__<ts>__<pid>.json` if you let
103
+ the task finish; `cline__UserPromptSubmit__<ts>__<pid>.json` is also
104
+ acceptable (carries the `prompt` envelope).
105
+ - **Windows caveat:** hooks are unsupported on Windows
106
+ ([`cline/cline#8073`](https://github.com/cline/cline/issues/8073));
107
+ capture from macOS or Linux.
108
+
109
+ ### Windsurf (~5 min)
110
+
111
+ - **Install:** `python3 scripts/install.py --windsurf` (project) or
112
+ `--windsurf-user-hooks` (user-scope at `~/.codeium/windsurf/hooks.json`).
113
+ - **Restart:** quit Cascade fully, then relaunch from the shell with
114
+ the env exported. The `pre_user_prompt` event fires on every turn —
115
+ no full restart needed once Cascade is up, but the *first* turn after
116
+ launch must be the captured one.
117
+ - **Trigger event:** ask Cascade one short question and let it answer.
118
+ Expected captures: `pre_user_prompt`,
119
+ `post_cascade_response_with_transcript`. The
120
+ `_with_transcript` variant is the more useful one to paste because it
121
+ carries the full response inline.
122
+ - **File pattern:** `windsurf__post_cascade_response_with_transcript__<ts>__<pid>.json`.
123
+ - **Async caveat:** `post_cascade_response` fires asynchronously off
124
+ the critical path. The capture file might land a second or two after
125
+ the response renders — wait briefly before running the redact step.
126
+
127
+ ### Gemini CLI (~5 min)
128
+
129
+ - **Install:** `python3 scripts/install.py --gemini` (project) or
130
+ `--gemini-user-hooks` (user-scope at `~/.gemini/settings.json`).
131
+ - **Restart:** Gemini CLI is invoked per command — no daemon to
132
+ restart. Just open a new shell with `AGENT_HOOK_CAPTURE_DIR`
133
+ exported and run the next session there.
134
+ - **Trigger event:** any short Gemini CLI session
135
+ (`gemini "what time is it"` or similar). Hooks fire on
136
+ `SessionStart` → `BeforeAgent` → `AfterTool`* → `AfterAgent` →
137
+ `SessionEnd`.
138
+ - **File pattern:** `gemini__AfterAgent__<ts>__<pid>.json` carries the
139
+ per-turn close envelope and is the recommended paste target.
140
+ - **Advisory hooks:** `SessionStart` and `SessionEnd` are advisory only
141
+ in Gemini CLI — do not be alarmed if those captures look thinner than
142
+ the others.
143
+
144
+ ## Where to paste the redacted payload
145
+
146
+ The roadmap is now archived. Paste under the matching phase:
147
+
148
+ [`agents/roadmaps/archive/road-to-verified-chat-history-platforms.md`](../agents/roadmaps/archive/road-to-verified-chat-history-platforms.md)
149
+
150
+ - Cursor → § Phase 2 — Cursor
151
+ - Cline → § Phase 3 — Cline
152
+ - Windsurf → § Phase 4 — Windsurf
153
+ - Gemini CLI → § Phase 5 — Gemini CLI
154
+
155
+ In the chosen phase, paste the redacted JSON inside a fenced
156
+ `json` block under a heading like `### <Platform> payload shape (captured 2026-MM-DD)`,
157
+ then flip the `[ ] Optional upgrade — payload-verified` checkbox to
158
+ `[x]`.
159
+
160
+ Then update the matching row in
161
+ [`agents/contexts/chat-history-platform-hooks.md`](../agents/contexts/chat-history-platform-hooks.md):
162
+ the `Verification` column moves from `docs-verified` to
163
+ `payload-verified`.
164
+
165
+ If the captured shape diverges from the docs-verified extractor
166
+ branch, that is the trigger for a code patch — open a tiny new roadmap
167
+ under `agents/roadmaps/` for the divergence work, do **not** edit the
168
+ archived roadmap to track new code work
169
+ (see [`no-roadmap-references`](../.agent-src/rules/no-roadmap-references.md)).
170
+
171
+ ## Final verify
172
+
173
+ After pasting and flipping the checkbox:
174
+
175
+ ```bash
176
+ # Lint gates must stay green.
177
+ python3 scripts/lint_hook_manifest.py
178
+ python3 scripts/check_references.py
179
+ python3 scripts/check_portability.py
180
+
181
+ # Tests still green.
182
+ python3 -m pytest tests/hooks/ -q
183
+
184
+ # Optional: regenerate the dashboard if the archived roadmap's
185
+ # checkbox change should bubble up. Iron Law from
186
+ # `roadmap-progress-sync` says yes if it does.
187
+ ./agent-config roadmap:progress
188
+ ```
189
+
190
+ Per
191
+ [`commit-policy`](../.agent-src/rules/commit-policy.md):
192
+ do **not** commit unless explicitly told to. The user owns the commit
193
+ step.
194
+
195
+ ## Cleanup after capture
196
+
197
+ ```bash
198
+ # Raw captures (not redacted) contain real prompt content.
199
+ # Either delete the directory or leave it for repeat captures.
200
+ rm -rf "$AGENT_HOOK_CAPTURE_DIR"
201
+
202
+ # Or keep redacted ones only:
203
+ # find "$AGENT_HOOK_CAPTURE_DIR" -type f ! -name '*.redacted.json' -delete
204
+
205
+ # Unset the env var when done so subsequent sessions do not capture.
206
+ unset AGENT_HOOK_CAPTURE_DIR
207
+ ```
208
+
209
+ The capture directory is gitignored project-wide; raw captures are
210
+ never accidentally committed. The redaction step is still mandatory
211
+ before paste because the redacted output goes into a tracked file
212
+ (the archived roadmap) and would otherwise leak.
213
+
214
+ ## Sources
215
+
216
+ - Capture engine: [`scripts/hooks/dispatch_hook.py`](../scripts/hooks/dispatch_hook.py) — `_maybe_capture_payload`
217
+ - Redactor: [`scripts/redact_hook_capture.py`](../scripts/redact_hook_capture.py)
218
+ - Per-platform install logic: [`scripts/install.py`](../scripts/install.py) — search `ensure_<platform>_bridge` / `ensure_<platform>_user_hooks`
219
+ - Platform matrix + payload schemas: [`agents/contexts/chat-history-platform-hooks.md`](../agents/contexts/chat-history-platform-hooks.md)
220
+ - Hook architecture: [`docs/contracts/hook-architecture-v1.md`](contracts/hook-architecture-v1.md)
221
+ - Archived roadmap with per-phase paste sections: [`agents/roadmaps/archive/road-to-verified-chat-history-platforms.md`](../agents/roadmaps/archive/road-to-verified-chat-history-platforms.md)
@@ -85,18 +85,23 @@ the deprecation cycle for Phase 1 closes. Tracked in
85
85
  [`agents/roadmaps/archive/road-to-governance-cleanup.md`](../../agents/roadmaps/archive/road-to-governance-cleanup.md)
86
86
  § F2.
87
87
 
88
- ## Related rule split — `chat-history` (post-1.15.0)
89
-
90
- The monolithic `rules/chat-history.md` was split into three sibling
91
- `always` rules in the post-1.15.0 optimization phase:
92
-
93
- - [`chat-history-ownership`](../../.agent-src/rules/chat-history-ownership.md) sole owner of file I/O + first-turn handshake.
94
- - [`chat-history-cadence`](../../.agent-src/rules/chat-history-cadence.md) when to persist (SessionStart / StepEnd / append boundaries).
95
- - [`chat-history-visibility`](../../.agent-src/rules/chat-history-visibility.md)heartbeat marker contract for user-facing reporting.
96
-
97
- Decision record: [`docs/contracts/adr-chat-history-split.md`](../contracts/adr-chat-history-split.md).
98
- Cross-references in commands and contexts now point to
99
- `chat-history-ownership` as the entry point.
88
+ ## Related rule split — `chat-history` (post-1.15.0, superseded)
89
+
90
+ > **Superseded · 2026-05-04** by
91
+ > [`agents/contexts/chat-history-platform-hooks.md`](../../agents/contexts/chat-history-platform-hooks.md).
92
+ > The three sibling rules (`chat-history-ownership`,
93
+ > `chat-history-cadence`, `chat-history-visibility`) and the heartbeat
94
+ > marker no longer exist. Persistence is now a pure platform-hook
95
+ > contract`session_start` auto-adopts foreign sessions silently;
96
+ > the agent never reads or writes `agents/.agent-chat-history` cooperatively.
97
+ > Manual recovery lever: `./agent-config chat-history:adopt`.
98
+
99
+ For historical context: the monolithic `rules/chat-history.md` was
100
+ first split into three sibling `always` rules in the post-1.15.0
101
+ optimization phase, recorded in
102
+ [`docs/contracts/adr-chat-history-split.md`](../contracts/adr-chat-history-split.md)
103
+ (also marked superseded). The hook-only roadmap then collapsed all
104
+ three rules into structural-only artefacts.
100
105
 
101
106
  ## Rollback
102
107
 
@@ -1,6 +1,6 @@
1
1
  # Skills Catalog
2
2
 
3
- All **128 skills** available in this package, in alphabetical order.
3
+ All **129 skills** available in this package, in alphabetical order.
4
4
  Click a skill name to open its SKILL.md and read the full guidance.
5
5
 
6
6
  > **Regenerate:** `python3 scripts/generate_catalog.py`
@@ -10,6 +10,7 @@ Click a skill name to open its SKILL.md and read the full guidance.
10
10
  |---|---|
11
11
  | [`adversarial-review`](../.agent-src/skills/adversarial-review/SKILL.md) | ONLY when user explicitly requests adversarial review, devil's advocate analysis, stress-testing a plan, or 'poke holes in this' — NOT for regular code review or design feedback. |
12
12
  | [`agent-docs-writing`](../.agent-src/skills/agent-docs-writing/SKILL.md) | Use when reading, creating, or updating agent documentation, module docs, roadmaps, or AGENTS.md. Understands the full .augment/, agents/, and copilot-instructions structure. |
13
+ | [`ai-council`](../.agent-src/skills/ai-council/SKILL.md) | Use when polling external AIs (OpenAI, Anthropic) outside the host session for a neutral second opinion on a roadmap, diff, prompt, or file set — or 'cross-check with another model'. |
13
14
  | [`analysis-autonomous-mode`](../.agent-src/skills/analysis-autonomous-mode/SKILL.md) | ONLY when user explicitly requests autonomous analysis, deep investigation, multi-step research, or 'dig into this end-to-end without asking me each step' — NOT for normal feature work. |
14
15
  | [`analysis-skill-router`](../.agent-src/skills/analysis-skill-router/SKILL.md) | Use when picking which analysis or project-analysis-* skill fits a request — routes by scope, framework, and symptom — even if the user just says 'analyze this' or 'dig into the codebase'. |
15
16
  | [`api-design`](../.agent-src/skills/api-design/SKILL.md) | Use when designing APIs, planning endpoints, REST conventions, versioning, or deprecation — even when the user just says 'expose this as an endpoint' without naming API design. |
@@ -18,7 +19,7 @@ Click a skill name to open its SKILL.md and read the full guidance.
18
19
  | [`artisan-commands`](../.agent-src/skills/artisan-commands/SKILL.md) | Use when creating or modifying Artisan commands. Covers clear signatures, safe execution flow, helpful output, and project conventions for console tooling. |
19
20
  | [`authz-review`](../.agent-src/skills/authz-review/SKILL.md) | Use when reviewing authorization end-to-end — route → gate → policy → query scope → response filter — before changes to permissions, tenants, ownership, or admin flows. |
20
21
  | [`aws-infrastructure`](../.agent-src/skills/aws-infrastructure/SKILL.md) | Use when working with AWS resources — ECS Fargate, ECR, EFS, Secrets Manager, gomplate templates, multi-env deployments — even when the user says 'deploy to staging' without naming AWS. |
21
- | [`blade-ui`](../.agent-src/skills/blade-ui/SKILL.md) | Stack-implementation skill for Laravel Blade — dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project's frontend stack is Blade. Covers views, components, partials, layouts, and view logic. |
22
+ | [`blade-ui`](../.agent-src/skills/blade-ui/SKILL.md) | Use when the project's frontend stack is Blade — dispatched by `directives/ui/{apply,review,polish}.py`. Covers views, components, partials, layouts, and view logic. |
22
23
  | [`blast-radius-analyzer`](../.agent-src/skills/blast-radius-analyzer/SKILL.md) | Use BEFORE editing shared code — enumerates every call site, event consumer, queue worker, API client, migration, and test that a planned change will touch, with a file:line citation per dependency. |
23
24
  | [`bug-analyzer`](../.agent-src/skills/bug-analyzer/SKILL.md) | Use when the user shares a Sentry error, Jira bug ticket, or error description and wants root cause analysis. Also for proactive bug hunting and code audits for hidden bugs. |
24
25
  | [`check-refs`](../.agent-src/skills/check-refs/SKILL.md) | Use when verifying cross-references between skills, rules, commands, guidelines, and context documents are not broken after edits, renames, or deletions. |
@@ -49,7 +50,7 @@ Click a skill name to open its SKILL.md and read the full guidance.
49
50
  | [`feature-planning`](../.agent-src/skills/feature-planning/SKILL.md) | Use when the user says "plan a feature", "brainstorm", "explore this idea", or wants to go from idea to structured plan and roadmap. |
50
51
  | [`file-editor`](../.agent-src/skills/file-editor/SKILL.md) | Use when opening edited files in the user's IDE. Reads settings from .agent-settings.yml to determine IDE and whether auto-open is enabled. |
51
52
  | [`finishing-a-development-branch`](../.agent-src/skills/finishing-a-development-branch/SKILL.md) | Use when the feature is implementation-complete and the next step is 'ship it' — verifies, cleans up, and routes to merge/PR/park/discard — even when the user just says 'I'm done, what now?'. |
52
- | [`flux`](../.agent-src/skills/flux/SKILL.md) | Stack-implementation skill for Laravel Flux — dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project uses `livewire/flux`. Covers Flux components, slots, variants, and form primitives. |
53
+ | [`flux`](../.agent-src/skills/flux/SKILL.md) | Use when the project uses `livewire/flux` — dispatched by `directives/ui/{apply,review,polish}.py`. Covers Flux components, slots, variants, and form primitives. |
53
54
  | [`git-workflow`](../.agent-src/skills/git-workflow/SKILL.md) | Use when working with Git — branch naming, commit messages, PR creation, rebasing, or the code review process — even when the user says 'push this' or 'merge the branch' without naming Git. |
54
55
  | [`github-ci`](../.agent-src/skills/github-ci/SKILL.md) | Use when working with GitHub Actions — workflow YAML, quality gates, test matrices, deployment triggers, reusable workflows — even when the user just says 'my CI is failing' or 'add a check'. |
55
56
  | [`grafana`](../.agent-src/skills/grafana/SKILL.md) | Use when working with Grafana — dashboards, Loki LogQL queries, alerting rules, monitoring panels — even when the user just says 'build me a dashboard' or 'query the logs' without naming Grafana. |
@@ -72,7 +73,7 @@ Click a skill name to open its SKILL.md and read the full guidance.
72
73
  | [`laravel-validation`](../.agent-src/skills/laravel-validation/SKILL.md) | Use when writing validation — Form Requests, rules, custom rule objects, request-boundary design — even when the user just says 'validate this input' or 'check the request' without naming it. |
73
74
  | [`learning-to-rule-or-skill`](../.agent-src/skills/learning-to-rule-or-skill/SKILL.md) | Use when a repeated learning, mistake, or successful pattern should be turned into a new rule or skill. Also use after completing a task to capture learnings from the work. |
74
75
  | [`lint-skills`](../.agent-src/skills/lint-skills/SKILL.md) | Use when running the package's skill linter against all skills and rules to validate frontmatter, required sections, and execution metadata. |
75
- | [`livewire`](../.agent-src/skills/livewire/SKILL.md) | Stack-implementation skill for Livewire — dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project's frontend stack is Livewire. Covers reactive state, events, lifecycle hooks, and component/view separation. |
76
+ | [`livewire`](../.agent-src/skills/livewire/SKILL.md) | Use when the project's frontend stack is Livewire — dispatched by `directives/ui/{apply,review,polish}.py`. Covers reactive state, events, lifecycle hooks, and component/view separation. |
76
77
  | [`logging-monitoring`](../.agent-src/skills/logging-monitoring/SKILL.md) | Use when working with logging or monitoring — Sentry error tracking, Grafana/Loki log aggregation, structured logging channels, or monitoring helpers. |
77
78
  | [`mcp`](../.agent-src/skills/mcp/SKILL.md) | Use when working with MCP (Model Context Protocol) servers — their tools, capabilities, and best practices for effective agent workflows. |
78
79
  | [`md-language-check`](../.agent-src/skills/md-language-check/SKILL.md) | Use BEFORE saving any .md under .augment/, .agent-src*/, or agents/ — scans umlauts, German function words, and quoted German phrases outside DE:/EN: anchor blocks. Hard gate per language-and-tone. |
package/llms.txt CHANGED
@@ -8,6 +8,7 @@ Catalog: docs/skills-catalog.md
8
8
 
9
9
  adversarial-review: ONLY when user explicitly requests adversarial review, devil's advocate analysis, stress-testing a plan, or 'poke holes in this' — NOT for regular code review or design feedback.
10
10
  agent-docs-writing: Use when reading, creating, or updating agent documentation, module docs, roadmaps, or AGENTS.md. Understands the full .augment/, agents/, and copilot-instructions structure.
11
+ ai-council: Use when polling external AIs (OpenAI, Anthropic) outside the host session for a neutral second opinion on a roadmap, diff, prompt, or file set — or 'cross-check with another model'.
11
12
  analysis-autonomous-mode: ONLY when user explicitly requests autonomous analysis, deep investigation, multi-step research, or 'dig into this end-to-end without asking me each step' — NOT for normal feature work.
12
13
  analysis-skill-router: Use when picking which analysis or project-analysis-* skill fits a request — routes by scope, framework, and symptom — even if the user just says 'analyze this' or 'dig into the codebase'.
13
14
  api-design: Use when designing APIs, planning endpoints, REST conventions, versioning, or deprecation — even when the user just says 'expose this as an endpoint' without naming API design.
@@ -16,7 +17,7 @@ api-testing: Use when writing API endpoint tests — integration tests, contract
16
17
  artisan-commands: Use when creating or modifying Artisan commands. Covers clear signatures, safe execution flow, helpful output, and project conventions for console tooling.
17
18
  authz-review: Use when reviewing authorization end-to-end — route → gate → policy → query scope → response filter — before changes to permissions, tenants, ownership, or admin flows.
18
19
  aws-infrastructure: Use when working with AWS resources — ECS Fargate, ECR, EFS, Secrets Manager, gomplate templates, multi-env deployments — even when the user says 'deploy to staging' without naming AWS.
19
- blade-ui: Stack-implementation skill for Laravel Blade — dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project's frontend stack is Blade. Covers views, components, partials, layouts, and view logic.
20
+ blade-ui: Use when the project's frontend stack is Blade — dispatched by `directives/ui/{apply,review,polish}.py`. Covers views, components, partials, layouts, and view logic.
20
21
  blast-radius-analyzer: Use BEFORE editing shared code — enumerates every call site, event consumer, queue worker, API client, migration, and test that a planned change will touch, with a file:line citation per dependency.
21
22
  bug-analyzer: Use when the user shares a Sentry error, Jira bug ticket, or error description and wants root cause analysis. Also for proactive bug hunting and code audits for hidden bugs.
22
23
  check-refs: Use when verifying cross-references between skills, rules, commands, guidelines, and context documents are not broken after edits, renames, or deletions.
@@ -47,7 +48,7 @@ fe-design: Reference for frontend-design heuristics — component architecture,
47
48
  feature-planning: Use when the user says "plan a feature", "brainstorm", "explore this idea", or wants to go from idea to structured plan and roadmap.
48
49
  file-editor: Use when opening edited files in the user's IDE. Reads settings from .agent-settings.yml to determine IDE and whether auto-open is enabled.
49
50
  finishing-a-development-branch: Use when the feature is implementation-complete and the next step is 'ship it' — verifies, cleans up, and routes to merge/PR/park/discard — even when the user just says 'I'm done, what now?'.
50
- flux: Stack-implementation skill for Laravel Flux — dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project uses `livewire/flux`. Covers Flux components, slots, variants, and form primitives.
51
+ flux: Use when the project uses `livewire/flux` — dispatched by `directives/ui/{apply,review,polish}.py`. Covers Flux components, slots, variants, and form primitives.
51
52
  git-workflow: Use when working with Git — branch naming, commit messages, PR creation, rebasing, or the code review process — even when the user says 'push this' or 'merge the branch' without naming Git.
52
53
  github-ci: Use when working with GitHub Actions — workflow YAML, quality gates, test matrices, deployment triggers, reusable workflows — even when the user just says 'my CI is failing' or 'add a check'.
53
54
  grafana: Use when working with Grafana — dashboards, Loki LogQL queries, alerting rules, monitoring panels — even when the user just says 'build me a dashboard' or 'query the logs' without naming Grafana.
@@ -70,7 +71,7 @@ laravel-scheduling: Use when configuring Laravel task scheduling — cron expres
70
71
  laravel-validation: Use when writing validation — Form Requests, rules, custom rule objects, request-boundary design — even when the user just says 'validate this input' or 'check the request' without naming it.
71
72
  learning-to-rule-or-skill: Use when a repeated learning, mistake, or successful pattern should be turned into a new rule or skill. Also use after completing a task to capture learnings from the work.
72
73
  lint-skills: Use when running the package's skill linter against all skills and rules to validate frontmatter, required sections, and execution metadata.
73
- livewire: Stack-implementation skill for Livewire — dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project's frontend stack is Livewire. Covers reactive state, events, lifecycle hooks, and component/view separation.
74
+ livewire: Use when the project's frontend stack is Livewire — dispatched by `directives/ui/{apply,review,polish}.py`. Covers reactive state, events, lifecycle hooks, and component/view separation.
74
75
  logging-monitoring: Use when working with logging or monitoring — Sentry error tracking, Grafana/Loki log aggregation, structured logging channels, or monitoring helpers.
75
76
  mcp: Use when working with MCP (Model Context Protocol) servers — their tools, capabilities, and best practices for effective agent workflows.
76
77
  md-language-check: Use BEFORE saving any .md under .augment/, .agent-src*/, or agents/ — scans umlauts, German function words, and quoted German phrases outside DE:/EN: anchor blocks. Hard gate per language-and-tone.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@event4u/agent-config",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "Shared agent configuration \u2014 skills, rules, commands, guidelines, and templates for AI coding tools",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -68,7 +68,7 @@ Commands:
68
68
  refine-ticket:detect Run the deterministic refine-ticket detection helper
69
69
  chat-history:hook Platform hook entry point (read JSON from stdin)
70
70
  Usage: chat-history:hook --platform <claude|augment|cursor|cline|windsurf|gemini>
71
- chat-history:checkpoint Append a phase-boundary entry to .agent-chat-history
71
+ chat-history:checkpoint Append a phase-boundary entry to agents/.agent-chat-history
72
72
  (CHECKPOINT fallback for platforms without native hooks)
73
73
  roadmap-progress:hook PostToolUse hook entry point (read JSON from stdin)
74
74
  Regenerates roadmaps-progress.md when a tool wrote under agents/roadmaps/
@@ -1,7 +1,7 @@
1
1
  """Shipped baseline prices for the AI Council.
2
2
 
3
- This file is the bootstrap source for `.agent-prices.md` when the
4
- runtime file is missing. It is also the network-fallback source for
3
+ This file is the bootstrap source for `agents/.agent-prices.md` when
4
+ the runtime file is missing. It is also the network-fallback source for
5
5
  `scripts/update_prices.py` when the upstream feed (LiteLLM) is
6
6
  unreachable.
7
7
 
@@ -9,8 +9,8 @@ Prices are USD per **1 000 000** tokens. Models are identified by the
9
9
  exact `model:` string the user puts into `.agent-settings.yml`.
10
10
 
11
11
  Numbers below are a hand-curated snapshot — they will drift. The
12
- runtime never reads them directly once `.agent-prices.md` exists; the
13
- weekly refresh and user edits are the live source of truth.
12
+ runtime never reads them directly once `agents/.agent-prices.md`
13
+ exists; the weekly refresh and user edits are the live source of truth.
14
14
  """
15
15
 
16
16
  from __future__ import annotations
@@ -100,7 +100,7 @@ class ExternalAIClient(ABC):
100
100
 
101
101
  name: str = ""
102
102
  model: str = ""
103
- billable: bool = True # API-mode subclasses spend money; manual/playwright don't.
103
+ billable: bool = True # API-mode subclasses spend money; manual doesn't.
104
104
 
105
105
  @abstractmethod
106
106
  def ask(
@@ -4,14 +4,13 @@ Each council member runs in exactly one transport mode per invocation:
4
4
 
5
5
  - ``api`` — direct SDK call against the provider's API (billable).
6
6
  - ``manual`` — copy-paste loop with the user as transport (free).
7
- - ``playwright`` — browser automation (Phase 2c, not yet wired).
8
7
 
9
8
  Resolution precedence — first non-empty wins:
10
9
 
11
10
  1. Invocation flag e.g. ``/council mode:manual``
12
11
  2. Per-member setting ``ai_council.members.<name>.mode``
13
12
  3. Global setting ``ai_council.mode``
14
- 4. Built-in default ``api``
13
+ 4. Built-in default ``manual``
15
14
 
16
15
  This mirrors how ``cost_profile`` resolves in
17
16
  ``.augment/guidelines/agent-infra/layered-settings.md``.
@@ -24,9 +23,9 @@ from __future__ import annotations
24
23
 
25
24
  from typing import Mapping
26
25
 
27
- VALID_MODES: frozenset[str] = frozenset({"api", "manual", "playwright"})
26
+ VALID_MODES: frozenset[str] = frozenset({"api", "manual"})
28
27
 
29
- DEFAULT_MODE: str = "api"
28
+ DEFAULT_MODE: str = "manual"
30
29
 
31
30
 
32
31
  class InvalidModeError(ValueError):
@@ -1,18 +1,19 @@
1
1
  """Runtime pricing layer for the AI Council.
2
2
 
3
- Reads `.agent-prices.md` from the repo root, parses YAML frontmatter
4
- and the Markdown table, and exposes:
3
+ Reads `agents/.agent-prices.md` from the repo root, parses YAML
4
+ frontmatter and the Markdown table, and exposes:
5
5
 
6
- - `load_prices()` — parse `.agent-prices.md` (bootstraps if missing)
6
+ - `load_prices()` — parse `agents/.agent-prices.md` (bootstraps if missing)
7
7
  - `estimate_input_tokens()` — chars / 4 heuristic
8
8
  - `estimate_cost()` — input + output USD for a single member
9
9
  - `is_stale()` — True if `last_updated` is older than the
10
10
  most recent UTC Monday 00:00
11
- - `bootstrap_from_defaults()` — write a fresh `.agent-prices.md` from
12
- `_default_prices.DEFAULT_PRICES`
11
+ - `bootstrap_from_defaults()` — write a fresh `agents/.agent-prices.md`
12
+ from `_default_prices.DEFAULT_PRICES`
13
13
 
14
14
  The orchestrator never reads `_default_prices` directly. It always
15
- goes through `load_prices()` so user edits to `.agent-prices.md` win.
15
+ goes through `load_prices()` so user edits to
16
+ `agents/.agent-prices.md` win.
16
17
  """
17
18
 
18
19
  from __future__ import annotations
@@ -24,7 +25,7 @@ from pathlib import Path
24
25
  from scripts.ai_council._default_prices import DEFAULT_PRICES, LAST_UPDATED, as_rows
25
26
 
26
27
  REPO_ROOT = Path(__file__).resolve().parents[2]
27
- PRICES_FILE = REPO_ROOT / ".agent-prices.md"
28
+ PRICES_FILE = REPO_ROOT / "agents" / ".agent-prices.md"
28
29
 
29
30
  # Heuristic: 1 token ≈ 4 characters of English text. OpenAI's tiktoken
30
31
  # is more accurate but pulls in a heavy dep we explicitly avoid.
@@ -115,14 +116,14 @@ def is_stale(table: PriceTable, now: _dt.datetime | None = None) -> bool:
115
116
 
116
117
 
117
118
  def load_prices(path: Path = PRICES_FILE) -> PriceTable:
118
- """Parse `.agent-prices.md`; bootstrap from defaults if missing."""
119
+ """Parse `agents/.agent-prices.md`; bootstrap from defaults if missing."""
119
120
  if not path.exists():
120
121
  bootstrap_from_defaults(path)
121
122
  return _parse(path.read_text(encoding="utf-8"))
122
123
 
123
124
 
124
125
  def bootstrap_from_defaults(path: Path = PRICES_FILE) -> None:
125
- """Write a fresh `.agent-prices.md` from `_default_prices.py`."""
126
+ """Write a fresh `agents/.agent-prices.md` from `_default_prices.py`."""
126
127
  rows = as_rows()
127
128
  body = _render_markdown(LAST_UPDATED, "shipped-default", rows)
128
129
  path.write_text(body, encoding="utf-8")