@event4u/agent-config 2.18.0 → 2.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 (108) hide show
  1. package/.agent-src/commands/agent-status.md +29 -0
  2. package/.agent-src/commands/onboard.md +221 -81
  3. package/.agent-src/commands/refine-ticket.md +3 -0
  4. package/.agent-src/packs/README.md +49 -0
  5. package/.agent-src/packs/agency-delivery.yml +63 -0
  6. package/.agent-src/packs/content-engine.yml +53 -0
  7. package/.agent-src/packs/founder-mvp.yml +51 -0
  8. package/.agent-src/personas/README.md +8 -0
  9. package/.agent-src/presets/README.md +26 -0
  10. package/.agent-src/presets/balanced.yml +34 -0
  11. package/.agent-src/presets/fast.yml +31 -0
  12. package/.agent-src/presets/strict.yml +38 -0
  13. package/.agent-src/profiles/README.md +29 -0
  14. package/.agent-src/profiles/agency.yml +27 -0
  15. package/.agent-src/profiles/content_creator.yml +25 -0
  16. package/.agent-src/profiles/developer.yml +26 -0
  17. package/.agent-src/profiles/finance.yml +24 -0
  18. package/.agent-src/profiles/founder.yml +25 -0
  19. package/.agent-src/profiles/ops.yml +25 -0
  20. package/.agent-src/rules/no-cheap-questions.md +25 -17
  21. package/.agent-src/skills/adr-create/SKILL.md +78 -68
  22. package/.agent-src/skills/refine-ticket/SKILL.md +3 -0
  23. package/.agent-src/skills/subagent-orchestration/SKILL.md +33 -0
  24. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  25. package/.agent-src/templates/skill-archive-note.md +101 -0
  26. package/.agent-src/user-types/README.md +124 -0
  27. package/.agent-src/user-types/_template/user-type.md +95 -0
  28. package/.agent-src/user-types/galabau-field-crew.md +100 -0
  29. package/.agent-src/user-types/metalworking-shop.md +105 -0
  30. package/.agent-src/user-types/truck-driver.md +113 -0
  31. package/.claude-plugin/marketplace.json +1 -1
  32. package/CHANGELOG.md +91 -30
  33. package/README.md +68 -72
  34. package/config/agent-settings.template.yml +22 -0
  35. package/docs/adrs/caveman/0001-default-off-until-bench.md +93 -0
  36. package/docs/adrs/caveman/README.md +9 -0
  37. package/docs/adrs/cost/0001-hard-stop-hook.md +114 -0
  38. package/docs/adrs/cost/README.md +9 -0
  39. package/docs/adrs/memory/0001-consumer-side-snapshot.md +111 -0
  40. package/docs/adrs/memory/README.md +9 -0
  41. package/docs/adrs/router/0001-three-tier-routing.md +119 -0
  42. package/docs/adrs/router/README.md +9 -0
  43. package/docs/adrs/schema/0001-json-schema-frontmatter.md +102 -0
  44. package/docs/adrs/schema/README.md +9 -0
  45. package/docs/adrs/smoke/0001-per-tier-smoke-scripts.md +99 -0
  46. package/docs/adrs/smoke/README.md +9 -0
  47. package/docs/architecture/current-onboard-baseline.md +126 -0
  48. package/docs/architecture/current-safety-behavior.md +137 -0
  49. package/docs/archive/CHANGELOG-pre-2.16.0.md +48 -0
  50. package/docs/contracts/adr-layout.md +108 -0
  51. package/docs/contracts/adr-mcp-runtime.md +128 -0
  52. package/docs/contracts/adr-user-types-axis.md +127 -0
  53. package/docs/contracts/benchmark-corpus-spec.md +97 -0
  54. package/docs/contracts/benchmark-report-schema.md +111 -0
  55. package/docs/contracts/command-clusters.md +1 -0
  56. package/docs/contracts/command-taxonomy.md +137 -0
  57. package/docs/contracts/compression-default-kill-criterion.md +69 -0
  58. package/docs/contracts/config-presets.md +144 -0
  59. package/docs/contracts/cost-dashboard.md +143 -0
  60. package/docs/contracts/cost-enforcement.md +134 -0
  61. package/docs/contracts/file-ownership-matrix.json +0 -7
  62. package/docs/contracts/mcp-tool-inventory.md +53 -0
  63. package/docs/contracts/measurement-baseline.md +102 -0
  64. package/docs/contracts/namespace.md +125 -0
  65. package/docs/contracts/profile-system.md +142 -0
  66. package/docs/contracts/safety-model.md +129 -0
  67. package/docs/contracts/smoke-contracts.md +144 -0
  68. package/docs/contracts/user-type-schema.md +146 -0
  69. package/docs/contracts/workflow-packs.md +121 -0
  70. package/docs/decisions/ADR-010-profile-pack-preset-boundary.md +132 -0
  71. package/docs/decisions/INDEX.md +1 -0
  72. package/docs/featured-commands.md +27 -0
  73. package/docs/parity/bench-ruflo.json +58 -0
  74. package/docs/parity/bench.json +41 -0
  75. package/docs/parity/ruflo.md +46 -0
  76. package/docs/profiles.md +91 -0
  77. package/docs/recruits/_template.md +81 -0
  78. package/package.json +1 -1
  79. package/scripts/_cli/cmd_explain.py +250 -0
  80. package/scripts/_lib/bench_cost.py +138 -0
  81. package/scripts/_lib/bench_quality.py +118 -0
  82. package/scripts/_lib/bench_report.py +150 -0
  83. package/scripts/agent-config +13 -0
  84. package/scripts/audit_adr_coverage.py +175 -0
  85. package/scripts/audit_mcp_tools.py +146 -0
  86. package/scripts/bench_baseline_ready.py +108 -0
  87. package/scripts/bench_drift_check.py +151 -0
  88. package/scripts/bench_per_tool.py +216 -0
  89. package/scripts/bench_run.py +155 -0
  90. package/scripts/compress.py +48 -2
  91. package/scripts/config/__init__.py +9 -0
  92. package/scripts/config/presets.py +206 -0
  93. package/scripts/config/profiles.py +173 -0
  94. package/scripts/cost/budget.mjs +73 -12
  95. package/scripts/cost/preflight.mjs +89 -0
  96. package/scripts/lint_archived_skills.py +143 -0
  97. package/scripts/lint_bench_corpus.py +161 -0
  98. package/scripts/lint_namespace.py +135 -0
  99. package/scripts/schemas/user-type.schema.json +35 -0
  100. package/scripts/skill_linter.py +139 -4
  101. package/scripts/skill_overlap.py +204 -0
  102. package/scripts/skill_tools/audit_user_type_coverage.py +148 -0
  103. package/scripts/skill_usage_collect.py +191 -0
  104. package/scripts/skill_usage_report.py +162 -0
  105. package/scripts/smoke/kernel.sh +101 -0
  106. package/scripts/smoke/router.sh +129 -0
  107. package/scripts/smoke/schema.sh +71 -0
  108. package/scripts/smoke/skills.sh +101 -0
@@ -41,6 +41,22 @@ Calculate based on these estimates:
41
41
  | **Matched skills** | count skills triggered this request × ~1,500 avg | variable |
42
42
  | **Platform overhead** | system prompt, tool schemas | ~15,000 |
43
43
 
44
+ ### 3a. Read session cost ledger (measured, not estimated)
45
+
46
+ Run `node scripts/cost/track.mjs` (silent — `TRACK_QUIET=1`) and parse
47
+ the last record from `agents/cost-tracking/sessions.jsonl`. If the file
48
+ does not exist (tracker never run for this project), skip this step and
49
+ note `cost ledger: not initialised` in the dashboard.
50
+
51
+ Extract from latest record:
52
+
53
+ - `total_usd` — dollars spent in current session
54
+ - `by_model[]` — per-tier (haiku / sonnet / opus) input / output / cache split
55
+ - `budget.tier` — `under` / `50` / `75` / `90` / `100` (from `node scripts/cost/budget.mjs check`)
56
+
57
+ Pricing source: [`bench/pricing.yaml`](../../bench/pricing.yaml). Reader
58
+ implementation: [`scripts/cost/track.mjs`](../../scripts/cost/track.mjs).
59
+
44
60
  ### 4. Calculate freshness thresholds
45
61
 
46
62
  - **Message threshold**: Next multiple of 25 ≥ current count
@@ -70,6 +86,19 @@ Use Markdown tables and headings — NOT ASCII box art (breaks in non-monospace
70
86
  | Matched skills (~{n}) | ~{n×1500} |
71
87
  | **Total input** | **~{sum}** |
72
88
 
89
+ **💵 Session cost (measured)**
90
+
91
+ If ledger exists, render:
92
+
93
+ | | |
94
+ |---|---|
95
+ | 💵 Session total | ${total_usd} |
96
+ | Haiku / Sonnet / Opus | ${haiku} / ${sonnet} / ${opus} |
97
+ | 🎯 Budget tier | {emoji} {tier} ({utilization_pct}% of cap) |
98
+
99
+ Tier-emoji map: `under` / `50` → ✅ · `75` → ⚠️ · `90` → ⚠️⚠️ · `100` → ❌.
100
+ If ledger does not exist, render `Session cost: not initialised — run \`task cost:track\` to start measuring`.
101
+
73
102
  **⚡ Freshness**
74
103
 
75
104
  | | |
@@ -13,48 +13,51 @@ suggestion:
13
13
 
14
14
  # /onboard
15
15
 
16
- Centralized first-run flow. Bundles scattered "ask once" prompts (user_name,
17
- IDE, rtk install, cost profile, learning loop) into one interactive setup.
18
- Ends by setting `onboarding.onboarded: true` in `.agent-settings.yml`.
16
+ Centralized first-run flow. Bundles what used to be scattered "ask once"
17
+ prompts (user_name, IDE, rtk install, cost profile, learning loop) into a
18
+ single interactive setup. Ends by setting `onboarding.onboarded: true` in
19
+ `.agent-settings.yml`.
19
20
 
20
- Triggered by [`onboarding-gate`](../rules/onboarding-gate.md) when
21
- `onboarding.onboarded` is `false`, or by explicit re-run.
21
+ Triggered by the [`onboarding-gate`](../rules/onboarding-gate.md) rule when
22
+ `onboarding.onboarded` is `false` or by the user explicitly re-running it.
22
23
 
23
24
  ## When NOT to use
24
25
 
25
26
  - Change cost profile only → [`/set-cost-profile`](set-cost-profile.md).
26
- - Single-value edit → ask agent to change it, or edit `.agent-settings.yml`
27
- directly per [`layered-settings`](../docs/guidelines/agent-infra/layered-settings.md).
27
+ - Single-value edit → ask the agent to change it, or edit
28
+ `.agent-settings.yml` directly. The agent follows the merge rules in
29
+ [`layered-settings`](../docs/guidelines/agent-infra/layered-settings.md).
28
30
 
29
31
  ## Preconditions
30
32
 
31
- `.agent-settings.yml` exists. If missing, tell user to run `scripts/install`
32
- (or `python3 scripts/install.py`) first and stop — command assumes file +
33
- template defaults are in place.
33
+ `.agent-settings.yml` exists. If missing, tell the user to run
34
+ `scripts/install` (or `python3 scripts/install.py`) first and stop — this
35
+ command assumes the file and its template-derived defaults are in place.
34
36
 
35
37
  ## Steps
36
38
 
37
39
  ### 1. Greet and set expectations
38
40
 
39
- One line: one-time setup, six questions, one at a time (iron law from
40
- `user-interaction`).
41
+ Keep it short. One line explaining this is the one-time setup, up to
42
+ nine questions, one at a time, following the iron law (`user-interaction`).
41
43
 
42
44
  ### 2. Offer user-global cross-project defaults
43
45
 
44
- Detect whether `~/.event4u/agent-config/agent-settings.yml` exists (or
45
- legacy `~/.config/agent-config/agent-settings.yml`, read as fallback by
46
- every loader). New path namespaces every package-owned user-global
47
- artefact under one root — same place `anthropic.key`, `openai.key`,
48
- `council-spend.jsonl` now live.
49
-
50
- - **File exists** → skip step entirely. Re-onboarding never overwrites
51
- user-global file silently.
52
- - **File missing AND first-time setup heuristic** — heuristic for "first
53
- machine setup": no other `.agent-settings.yml` in any sibling project on
54
- disk. Conservative shell probe:
46
+ Detect whether `~/.event4u/agent-config/agent-settings.yml` already
47
+ exists (or the legacy `~/.config/agent-config/agent-settings.yml`,
48
+ which is read as a fallback by every loader). The new path namespaces
49
+ every package-owned user-global artefact under one root — same place
50
+ where `anthropic.key`, `openai.key`, and `council-spend.jsonl` now
51
+ live.
52
+
53
+ - **File exists** → skip this step entirely. Re-onboarding never
54
+ overwrites a user-global file silently.
55
+ - **File missing AND first-time setup heuristic** heuristic for
56
+ "first machine setup": no other `.agent-settings.yml` in any
57
+ sibling project on disk. Conservative shell probe:
55
58
  `find $(dirname "$PWD") -maxdepth 3 -name .agent-settings.yml 2>/dev/null | grep -v "^$PWD/" | head -1`
56
- → non-empty developer done this before, **skip**.
57
- → empty first-time setup, ask:
59
+ → non-empty means the developer has done this before, **skip**.
60
+ → empty means first-time setup, ask:
58
61
 
59
62
  ```
60
63
  > A user-global config at ~/.event4u/agent-config/agent-settings.yml lets
@@ -69,12 +72,13 @@ artefact under one root — same place `anthropic.key`, `openai.key`,
69
72
  > 2. No — keep settings project-local only
70
73
  ```
71
74
 
72
- If user picks `1`, **defer write** to tail step (see step 9). Capture choice
73
- in working memory only; do **not** create file here. File gets written
74
- **after** project-local values are confirmed, so initial values mirror
75
- what developer just chose for this project.
75
+ If the user picks `1`, **defer the write** to a tail step
76
+ (see step 9 below). Capture the choice in working memory only; do
77
+ **not** create the file here. The file gets written **after** the
78
+ project-local values are confirmed, so its initial values mirror
79
+ what the developer just chose for this project.
76
80
 
77
- If user picks `2`, set working-memory flag to skip step 9.
81
+ If the user picks `2`, set a working-memory flag to skip step 9.
78
82
 
79
83
  ### 3. Capture `personal.user_name`
80
84
 
@@ -87,11 +91,11 @@ Skip if already set (non-empty). Otherwise:
87
91
  > 2. Skip — stay anonymous
88
92
  ```
89
93
 
90
- Free-text → write to `personal.user_name`. `2` → leave empty.
94
+ Free-text answer → write to `personal.user_name`. `2` → leave empty.
91
95
 
92
96
  ### 4. Capture `personal.ide` (with auto-detect)
93
97
 
94
- Skip if set. Otherwise auto-detect first:
98
+ Skip if already set. Otherwise auto-detect first:
95
99
 
96
100
  ```bash
97
101
  ps aux | grep -iE '(Visual Studio Code|Code Helper|phpstorm|cursor)' | grep -v grep
@@ -109,13 +113,13 @@ ps aux | grep -iE '(Visual Studio Code|Code Helper|phpstorm|cursor)' | grep -v g
109
113
  > 4. Skip — I'll configure it later
110
114
  ```
111
115
 
112
- If IDE set, also ask `personal.open_edited_files` (`true`/`false`).
116
+ If IDE is set, also ask about `personal.open_edited_files` (`true`/`false`).
113
117
 
114
118
  ### 5. Capture `personal.pr_comment_bot_icon`
115
119
 
116
- Personal preference — each developer decides how own PR replies look. Skip
117
- only if user already set non-default deliberately (agent can't tell, so
118
- always ask on first run):
120
+ Personal preference — each developer decides how their own PR replies
121
+ should look. Skip only if the user has already set a non-default value
122
+ deliberately (agent can't tell, so always ask on first run):
119
123
 
120
124
  ```
121
125
  > When I reply to PR review comments on your behalf, should I prefix each
@@ -144,17 +148,16 @@ Silent `which rtk`.
144
148
  ```
145
149
 
146
150
  `1` or `2` → run install, on success set `rtk_installed: true` and apply
147
- rtk post-install steps (telemetry off, init --global) per
148
- [`rtk-output-filtering`](../skills/rtk-output-filtering/SKILL.md).
149
- `3` → leave `rtk_installed: false`, move on. No "ask again tomorrow"
150
- `/onboard` is one-shot.
151
-
151
+ rtk post-install steps (telemetry off, init --global) per the
152
+ [`rtk-output-filtering`](../skills/rtk-output-filtering/SKILL.md) skill.
153
+ `3` → leave `rtk_installed: false` and move on. No "ask again tomorrow"
154
+ logic — `/onboard` is one-shot.
152
155
 
153
156
  ### 7. Confirm `cost_profile` and learning loop
154
157
 
155
158
  Read current `cost_profile` and `pipelines.skill_improvement` values.
156
- Present plainly (sensible defaults from template — `balanced` +
157
- `skill_improvement: true`; rationale in
159
+ Present them plainly (they already have sensible defaults from the
160
+ template — `balanced` + `skill_improvement: true`; rationale lives in
158
161
  [`docs/contracts/cost-profile-defaults.md`](../docs/contracts/cost-profile-defaults.md)):
159
162
 
160
163
  ```
@@ -166,19 +169,148 @@ Present plainly (sensible defaults from template — `balanced` +
166
169
  > 3. Disable learning loop — sets pipelines.skill_improvement=false
167
170
  ```
168
171
 
169
- `2` → defer to `/set-cost-profile` and return here. `3` → flip toggle.
172
+ `2` → defer to `/set-cost-profile` and return here. `3` → flip the toggle.
173
+
174
+ ### 7a. Capture `user_type` and `profile.id` (role selection)
175
+
176
+ Skip if `profile.id` is already set in `.agent-settings.yml` — re-running
177
+ `/onboard` never silently overwrites a previously chosen role. If unset,
178
+ ask:
179
+
180
+ ```
181
+ > Which audience fits you best? This picks the audience profile that
182
+ > shapes which skills, rules, and MCP servers the agent surfaces.
183
+ >
184
+ > 1. Software — coder, engineer, technical lead → developer
185
+ > 2. Content — writer, creator, editorial → content_creator
186
+ > 3. Founder — solo founder, early-stage CEO → founder
187
+ > 4. Consulting — agency, freelance, client work → agency
188
+ > 5. Marketing — campaigns, growth, brand → content_creator
189
+ > 6. Finance — bookkeeping, controlling, CFO → finance
190
+ > 7. Handwerk — operations, trades, admin → ops
191
+ > 8. Self-configure — leave profile.id empty, I'll edit .agent-settings.yml manually
192
+ ```
193
+
194
+ Map answer → write **both** keys to `.agent-settings.yml` (one block,
195
+ section-aware merge):
196
+
197
+ - `personal.user_type`: the label as `"software" | "content" | "founder"
198
+ | "consulting" | "marketing" | "finance" | "handwerk" | "self_configure"`
199
+ (stable audit field; never auto-mutated).
200
+ - `profile.id`: the profile-loader id from the right column. Choice `8`
201
+ → leave `profile.id` unset (loader falls back to its default chain
202
+ documented in [`docs/contracts/profile-system.md`](../docs/contracts/profile-system.md)).
203
+
204
+ Six profile YAMLs ship today (`developer` · `content_creator` · `founder`
205
+ · `agency` · `finance` · `ops`) — Marketing collapses into
206
+ `content_creator` per the closest-audience mapping. Verify the chosen
207
+ id exists at
208
+ [`.agent-src.uncompressed/profiles/<id>.yml`](../../.agent-src.uncompressed/profiles/)
209
+ before writing; missing file → fall back to `self_configure` and surface
210
+ the path so the user can author it later.
211
+
212
+ ### 7b. Stack confirmation
213
+
214
+ Skip if `stack.detected` is already non-empty (re-runnable). Otherwise
215
+ run the offline shell probe and present the result for confirmation —
216
+ no network call, file-existence only:
217
+
218
+ ```bash
219
+ stacks=()
220
+ [ -f composer.json ] && stacks+=("php")
221
+ [ -f package.json ] && stacks+=("node")
222
+ [ -f Cargo.toml ] && stacks+=("rust")
223
+ [ -f go.mod ] && stacks+=("go")
224
+ [ -f pyproject.toml ] || [ -f requirements.txt ] && stacks+=("python")
225
+ [ -f Gemfile ] && stacks+=("ruby")
226
+ ```
227
+
228
+ Then:
229
+
230
+ - **One stack found** → confirm:
231
+ `> Detected {stack}. 1. Yes, use it 2. Override (pick from list) 3. Skip — I'll set stack.detected later`
232
+ - **Multiple stacks found** → list them:
233
+ `> Detected {a, b}. 1. Use all 2. Pick primary 3. Skip`
234
+ - **None found** → ask:
235
+ ```
236
+ > No stack manifest found in this project root. Pick the primary stack
237
+ > so profile-aware presets can resolve (this is advisory; the agent
238
+ > re-detects on each session):
239
+ >
240
+ > 1. php 2. node 3. rust
241
+ > 4. go 5. python 6. ruby
242
+ > 7. Skip — leave stack.detected empty
243
+ ```
244
+
245
+ Write the result to `.agent-settings.yml`:
246
+
247
+ ```yaml
248
+ stack:
249
+ detected: ["php"] # or ["php","node"], or [] for skip
250
+ source: "wizard" # audit field: wizard | probe | manual
251
+ ```
252
+
253
+ ### 7c. Risk-appetite (`preset.id`)
254
+
255
+ Skip if `preset.id` is already set. Otherwise ask:
256
+
257
+ ```
258
+ > Risk appetite for autonomy, cost caps, and council usage:
259
+ >
260
+ > 1. fast — minimal floors, higher daily caps, council auto-consult on
261
+ > 2. balanced — default — moderate caps, council on-demand
262
+ > 3. strict — tight caps, council disabled, high-confidence required
263
+ >
264
+ > Recommendation: 2 (balanced).
265
+ >
266
+ > See docs/contracts/config-presets.md for the per-knob comparison.
267
+ ```
268
+
269
+ Map answer → write `preset.id: "fast" | "balanced" | "strict"` to
270
+ `.agent-settings.yml`. Default fallback (no answer / cloud surface) is
271
+ `balanced`, mirroring the loader default at
272
+ [`scripts/config/presets.py`](../../scripts/config/presets.py).
170
273
 
171
274
  ### 8. Mark onboarded
172
275
 
173
- Write `onboarding.onboarded: true` to `.agent-settings.yml` using
276
+ Write `onboarding.onboarded: true` to `.agent-settings.yml` using the
174
277
  section-aware merge rules from
175
278
  [`layered-settings`](../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules)
176
- (preserve comments, key order, touch only changed fields).
279
+ (preserve comments, key order, touch only the changed fields).
280
+
281
+ At this point the file holds the full wizard output:
282
+
283
+ ```yaml
284
+ profile:
285
+ id: "developer" # step 7a (omitted if user picked Self-configure)
286
+ preset:
287
+ id: "balanced" # step 7c
288
+ personal:
289
+ user_type: "software" # step 7a — stable audit field
290
+ user_name: "..."
291
+ ide: "..."
292
+ # ...other personal.* from earlier steps
293
+ stack:
294
+ detected: ["php"] # step 7b
295
+ source: "wizard"
296
+ onboarding:
297
+ onboarded: true # this step
298
+ ```
299
+
300
+ Verify the chain resolves before flipping `onboarded: true`:
301
+
302
+ ```bash
303
+ ./agent-config explain config --json | python3 -c "import json,sys; d=json.load(sys.stdin); print(d['profile']['id'], d['preset']['id'])"
304
+ ```
305
+
306
+ Non-zero exit → surface the error, keep `onboarded: false`, ask the user
307
+ to re-run `/onboard`. Zero exit → write `onboarded: true`.
177
308
 
178
309
  ### 9. Write user-global file (only if opted in at step 2)
179
310
 
180
- Skip unless step 2 captured explicit "yes". Re-confirm intent in one line —
181
- never silent-write a file outside project tree:
311
+ Skip this step unless step 2 captured an explicit "yes" from the user.
312
+ Re-confirm intent in one line — never silent-write a file outside the
313
+ project tree:
182
314
 
183
315
  ```
184
316
  > Writing ~/.event4u/agent-config/agent-settings.yml with the six
@@ -196,16 +328,16 @@ never silent-write a file outside project tree:
196
328
  ```
197
329
 
198
330
  `1` → ensure `~/.event4u/agent-config/` exists (`mkdir -p`, mode `0700`;
199
- migration shim in `scripts/install.py` moves any legacy
200
- `~/.config/agent-config/` files into new namespace on first run),
201
- then write file with mode `0600`. Schema is **flat-or-nested YAML keyed on
202
- dotted paths** in whitelist documented in
331
+ the migration shim in `scripts/install.py` moves any legacy
332
+ `~/.config/agent-config/` files into the new namespace on first run),
333
+ then write the file with mode `0600`. The schema is **flat-or-nested
334
+ YAML keyed on the dotted paths** in the whitelist documented in
203
335
  [`scripts/_lib/agent_settings.py`](../../scripts/_lib/agent_settings.py).
204
- Use same section-aware merge rules from
336
+ Use the same section-aware merge rules from
205
337
  [`layered-settings`](../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules)
206
- **only if file unexpectedly already exists** between step 2 and this step
207
- (race condition); otherwise create from scratch with exact six keys above
208
- and a one-line file header comment:
338
+ **only if the file unexpectedly already exists** between step 2 and
339
+ this step (race condition); otherwise create from scratch with the
340
+ exact six keys above and a one-line file header comment:
209
341
 
210
342
  ```yaml
211
343
  # event4u/agent-config — user-global DX-comfort defaults
@@ -222,6 +354,10 @@ Echo what was captured, in one block:
222
354
  ```
223
355
  ✅ Onboarding complete.
224
356
 
357
+ profile.id: {value or — (Self-configure)}
358
+ preset.id: {value or balanced}
359
+ personal.user_type: {value}
360
+ stack.detected: {comma-list or —}
225
361
  personal.user_name: {value or —}
226
362
  personal.ide: {value or —}
227
363
  personal.open_edited_files: {value}
@@ -239,8 +375,8 @@ you ask it to change a value.
239
375
 
240
376
  ### 11. Quickstart pointer — next command after onboarding
241
377
 
242
- Print next-action block so developer does **not** have to re-find README
243
- to start work. One screen, no question, no prompt:
378
+ Print the next-action block so the developer does **not** have to re-find
379
+ the README to start work. One screen, no question, no prompt:
244
380
 
245
381
  ```
246
382
  🚀 Next step — your first real task
@@ -253,23 +389,23 @@ to start work. One screen, no question, no prompt:
253
389
  confirming the work-engine ran end-to-end.
254
390
 
255
391
  /implement-ticket PROJ-123
256
- Ticket-driven flow — pulls Jira/Linear context, runs same
392
+ Ticket-driven flow — pulls Jira/Linear context, runs the same
257
393
  refine → memory → analyze → plan → implement → test → verify
258
394
  → report sequence, halts on ambiguity.
259
395
 
260
- Both honour decision_engine gates in .agent-settings.yml
261
- (see docs/contracts/decision-engine-gates.md for schema).
396
+ Both honour the decision_engine gates in .agent-settings.yml
397
+ (see docs/contracts/decision-engine-gates.md for the schema).
262
398
  ```
263
399
 
264
- Skip block in cloud surfaces (cloud agent's invocation surface is
265
- already chat window).
400
+ Skip this block in cloud surfaces (the cloud agent's invocation surface
401
+ is already the chat window).
266
402
 
267
403
  ### 12. Maintainer-only feature pointer
268
404
 
269
- Print one-screen hint after summary — no question, no prompt, just pointer
270
- for maintainers who want to opt into artefact-engagement telemetry layer.
271
- Consumers can ignore; feature is **default-off** and stays off unless
272
- explicitly enabled.
405
+ Print a one-screen hint after the summary — no question, no prompt, just a
406
+ pointer for maintainers who want to opt into the artefact-engagement
407
+ telemetry layer. Consumers can ignore it; the feature is **default-off**
408
+ and stays off unless explicitly enabled.
273
409
 
274
410
  ```
275
411
  ℹ️ Maintainer telemetry (opt-in)
@@ -287,28 +423,32 @@ Skip this block in cloud surfaces (no settings file, no log path).
287
423
 
288
424
  ## Gotchas
289
425
 
290
- - `.agent-settings.yml` is git-ignored. Command never commits.
291
- - One question per turn. Iron law from `ask-when-uncertain` applies; do
292
- not stack questions 2–9 into single prompt.
426
+ - `.agent-settings.yml` is git-ignored. This command never commits.
427
+ - One question per turn. The iron law from `ask-when-uncertain` applies;
428
+ do not stack questions 2–9 into a single prompt.
293
429
  - Re-running `/onboard` when `onboarded: true` is allowed — walk through
294
- all steps again and rewrite values user confirms.
295
- - Never overwrite non-empty value without asking (applies to `user_name`,
296
- `ide`).
430
+ all steps again and rewrite the values the user confirms.
431
+ - Never overwrite a non-empty value without asking (applies to `user_name`,
432
+ `ide`, `profile.id`, `preset.id`, `personal.user_type`, and
433
+ `stack.detected`).
434
+ - **Offline-only.** Steps 7a / 7b / 7c never call out to the network.
435
+ Stack probe = file existence; profile / preset resolution = local YAML
436
+ reads only.
297
437
  - **User-global file is opt-in, one-shot, never silent.** Step 2 captures
298
- intent, step 9 re-confirms before actual write. If
299
- `~/.event4u/agent-config/agent-settings.yml` (or legacy
438
+ intent, step 9 re-confirms before the actual write. If
439
+ `~/.event4u/agent-config/agent-settings.yml` (or the legacy
300
440
  `~/.config/agent-config/agent-settings.yml`) already exists when
301
441
  `/onboard` starts, step 2 is skipped entirely — re-onboarding never
302
- silently rewrites developer's cross-project defaults. Use
303
- `/sync-agent-settings` (project-scoped only) or edit file manually for
304
- mid-life changes.
442
+ silently rewrites a developer's cross-project defaults. Use
443
+ `/sync-agent-settings` (project-scoped only) or edit the file
444
+ manually for mid-life changes.
305
445
 
306
446
  ## Cloud Behavior
307
447
 
308
448
  On cloud surfaces (Claude.ai Web, Skills API) this command is **fully inert** —
309
- no `.agent-settings.yml` to write, no `onboarding.onboarded` key to flip,
310
- no local IDE/rtk env to capture. First-run setup is local-agent concern;
311
- cloud agent should proceed without invoking it.
449
+ there is no `.agent-settings.yml` to write, no `onboarding.onboarded` key to
450
+ flip, and no local IDE/rtk environment to capture. First-run setup is a
451
+ local-agent concern; the cloud agent should proceed without invoking it.
312
452
 
313
453
  ## See also
314
454
 
@@ -77,6 +77,9 @@ persona voices) plus the close-prompt. Stop there. Do **not** chain into
77
77
  /refine-ticket PROJ-123
78
78
  /refine-ticket # uses current branch
79
79
  /refine-ticket --personas=+qa PROJ-123
80
+ /refine-ticket --user-type=galabau-field-crew PROJ-123
81
+ /refine-ticket --personas=+qa --user-type=truck-driver PROJ-123
82
+ /refine-ticket --user-type=metalworking-shop PROJ-123
80
83
  /refine-ticket --fresh-eyes https://acme.atlassian.net/browse/PROJ-123
81
84
  ```
82
85
 
@@ -0,0 +1,49 @@
1
+ # Workflow packs
2
+
3
+ Seed packs that bundle `(profile + preset + command-set +
4
+ skill-allowlist + personas)` into a single opinionated stance. A
5
+ user adopts a pack instead of picking five independent settings.
6
+
7
+ **Schema:** [`docs/contracts/workflow-packs.md`](../../docs/contracts/workflow-packs.md).
8
+
9
+ ## Shipped packs
10
+
11
+ | Pack id | Profile | Preset | One-liner |
12
+ |---|---|---|---|
13
+ | [`founder-mvp`](founder-mvp.yml) | `founder` | `fast` | Ship the MVP and the pitch deck in the same week. |
14
+ | [`content-engine`](content-engine.yml) | `content_creator` | `balanced` | Editorial calendar, brand voice, and ghostwriter on one loop. |
15
+ | [`agency-delivery`](agency-delivery.yml) | `agency` | `strict` | Multi-client refine → estimate → deliver with audit-grade trace. |
16
+
17
+ ## Activation
18
+
19
+ ```bash
20
+ # Adopt a pack at install time:
21
+ npx @event4u/agent-config init --pack founder-mvp
22
+
23
+ # Adopt a pack later (writes pack.id to .agent-settings.yml):
24
+ agent-config onboard --pack content-engine
25
+
26
+ # Revert to the underlying profile + preset defaults:
27
+ agent-config onboard --pack none
28
+ ```
29
+
30
+ Packs are an **opt-in layer above the profile + preset chain**.
31
+ Removing a pack reverts cleanly; no data is lost.
32
+
33
+ ## Constraints (enforced by the schema, not runtime)
34
+
35
+ - `commands_allowed` ≤ 12, `skills_allowed` ≤ 15, `personas` ≤ 4.
36
+ - Every referenced command / skill / persona / profile / preset
37
+ MUST resolve to an existing artefact.
38
+ - Packs cannot widen safety floors. Domain-safety rules apply
39
+ unconditionally.
40
+
41
+ ## Adding a pack
42
+
43
+ 1. Pick a `<pack-id>` that does not collide with any profile or preset id.
44
+ 2. Copy one of the shipped packs as a template.
45
+ 3. Fill in `rationale.*` — every pack must justify its composition in
46
+ plain prose.
47
+ 4. Add the row to the table above.
48
+ 5. Open a PR; reviewer validates against the schema by hand until
49
+ `scripts/lint_packs.py` lands.
@@ -0,0 +1,63 @@
1
+ # Seed pack — agency-delivery
2
+ # Schema: docs/contracts/workflow-packs.md
3
+ pack:
4
+ id: agency-delivery
5
+ audience:
6
+ label: "Multi-client delivery shop with audit-grade decision trace"
7
+ one_liner: "Multi-client refine → estimate → deliver with audit-grade trace."
8
+ composition:
9
+ profile_id: agency
10
+ preset_id: strict
11
+ surface:
12
+ commands_allowed:
13
+ - work
14
+ - implement-ticket
15
+ - refine-ticket
16
+ - estimate-ticket
17
+ - feature
18
+ - roadmap
19
+ - review-changes
20
+ - create-pr
21
+ - commit
22
+ - council
23
+ skills_allowed:
24
+ - doc-coauthoring
25
+ - decision-record
26
+ - refine-ticket
27
+ - estimate-ticket
28
+ - perf-feedback-craft
29
+ - adr-create
30
+ - rice-prioritization
31
+ - launch-readiness
32
+ - verify-completion-evidence
33
+ - minimal-safe-diff
34
+ - test-driven-development
35
+ - api-design
36
+ - threat-modeling
37
+ - logging-monitoring
38
+ - dashboard-design
39
+ personas:
40
+ - reviewer
41
+ - product-strategist
42
+ - editor
43
+ - security
44
+ rationale:
45
+ why_this_profile: |
46
+ Agency profile pre-loads the documentation, decision-record,
47
+ and refine/estimate skills — the artefacts a multi-client shop
48
+ hands to a client at every phase boundary. The decision-record
49
+ anchor is load-bearing: without it, a year of client work
50
+ becomes opaque the moment the lead engineer rotates off.
51
+ why_this_preset: |
52
+ Strict preset is mandatory for agencies. Client work is
53
+ contractually scoped, so silently widening scope is a billing
54
+ risk; confidence floor and evidence-required mean every diff
55
+ can be defended at a client review. Council auto-consult is
56
+ on for the dollar-value bands that hit the contract.
57
+ why_these_commands: |
58
+ /refine-ticket and /estimate-ticket sit at the start of every
59
+ engagement; /implement-ticket and /review-changes drive
60
+ delivery; /create-pr standardises the handoff back to the
61
+ client's repo; /roadmap and /feature handle multi-phase
62
+ engagements; /council provides a second opinion at decision
63
+ gates billed to the client.
@@ -0,0 +1,53 @@
1
+ # Seed pack — content-engine
2
+ # Schema: docs/contracts/workflow-packs.md
3
+ pack:
4
+ id: content-engine
5
+ audience:
6
+ label: "Writers, ghostwriters, marketers running an editorial pipeline"
7
+ one_liner: "Editorial calendar, brand voice, and ghostwriter on one loop."
8
+ composition:
9
+ profile_id: content_creator
10
+ preset_id: balanced
11
+ surface:
12
+ commands_allowed:
13
+ - work
14
+ - post-as
15
+ - ghostwriter
16
+ - optimize-prompt
17
+ - refine-prompt
18
+ - challenge-me
19
+ - commit
20
+ skills_allowed:
21
+ - voice-and-tone-design
22
+ - messaging-architecture
23
+ - editorial-calendar
24
+ - release-comms
25
+ - prompt-engineering-patterns
26
+ - content-funnel-design
27
+ - discovery-interview
28
+ - voc-extract
29
+ - deep-reading-analyst
30
+ - doc-coauthoring
31
+ personas:
32
+ - editor
33
+ - brand-voice
34
+ - product-strategist
35
+ rationale:
36
+ why_this_profile: |
37
+ Content creator profile pre-loads voice, tone, and editorial
38
+ planning skills — the three things a content operator returns
39
+ to every day. Ghostwriting and post-as primitives are surfaced
40
+ at the top of the command list because they are the package's
41
+ distinctive non-developer affordance.
42
+ why_this_preset: |
43
+ Balanced preset matches the content workflow: most drafts are
44
+ reversible, most calls do not touch prod data, the cost of an
45
+ extra clarifying question is small relative to a misframed
46
+ piece. Council auto-consult stays off — content trade-offs
47
+ are usually taste, not models.
48
+ why_these_commands: |
49
+ /work and /post-as are the daily entry points. /ghostwriter
50
+ handles voice fetches and disclosure-footed drafts.
51
+ /optimize-prompt and /refine-prompt sharpen briefs before they
52
+ reach the writing skills. /challenge-me grills positioning
53
+ before launch. /commit ships finished drafts as repo artefacts.