@event4u/agent-config 2.13.0 → 2.15.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 (74) hide show
  1. package/.agent-src/commands/agents/user/accept.md +117 -0
  2. package/.agent-src/commands/agents/user/init.md +163 -0
  3. package/.agent-src/commands/agents/user/review.md +107 -0
  4. package/.agent-src/commands/agents/user/show.md +109 -0
  5. package/.agent-src/commands/agents/user/update.md +98 -0
  6. package/.agent-src/commands/agents/user.md +66 -0
  7. package/.agent-src/commands/agents.md +2 -0
  8. package/.agent-src/commands/memory/learn-low-impact.md +143 -0
  9. package/.agent-src/rules/ask-when-uncertain.md +10 -6
  10. package/.agent-src/rules/copilot-routing.md +1 -1
  11. package/.agent-src/rules/devcontainer-routing.md +1 -1
  12. package/.agent-src/rules/external-reference-deep-dive.md +1 -1
  13. package/.agent-src/rules/fast-path-marker-visibility.md +38 -0
  14. package/.agent-src/rules/low-impact-corpus-privacy-floor.md +74 -0
  15. package/.agent-src/rules/symfony-routing.md +1 -1
  16. package/.agent-src/skills/ai-council/SKILL.md +208 -8
  17. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  18. package/.claude-plugin/marketplace.json +8 -1
  19. package/CHANGELOG.md +328 -124
  20. package/README.md +21 -6
  21. package/config/agent-settings.template.yml +4 -0
  22. package/config/gitignore-block.txt +17 -0
  23. package/docs/architecture.md +12 -12
  24. package/docs/archive/CHANGELOG-pre-2.11.0.md +141 -0
  25. package/docs/catalog.md +16 -7
  26. package/docs/contracts/adr-architectural-consensus-mechanism.md +4 -3
  27. package/docs/contracts/adr-level-6-productization.md +7 -9
  28. package/docs/contracts/agent-user-schema.md +165 -0
  29. package/docs/contracts/ai-council-config.md +492 -20
  30. package/docs/contracts/command-clusters.md +2 -2
  31. package/docs/contracts/command-surface-tiers.md +3 -2
  32. package/docs/contracts/cost-profile-defaults.md +5 -0
  33. package/docs/contracts/decision-engine-gates.md +5 -0
  34. package/docs/contracts/decision-trace-v1.md +2 -2
  35. package/docs/contracts/file-ownership-matrix.json +1961 -108
  36. package/docs/contracts/installed-tools-lockfile.md +2 -1
  37. package/docs/contracts/low-impact-corpus-format.md +95 -0
  38. package/docs/contracts/mcp-beta-criteria.md +6 -5
  39. package/docs/contracts/mcp-cloud-scope.md +5 -4
  40. package/docs/contracts/multi-tool-projection-fidelity.md +8 -2
  41. package/docs/contracts/release-trunk-sync.md +4 -3
  42. package/docs/contracts/tier-3-contrib-plugin.md +5 -6
  43. package/docs/examples/agent-user.example.md +21 -0
  44. package/docs/getting-started.md +2 -2
  45. package/docs/guidelines/agent-infra/installed-tools-manifest.md +2 -1
  46. package/docs/installation.md +32 -0
  47. package/package.json +1 -1
  48. package/scripts/_cli/cmd_doctor.py +134 -0
  49. package/scripts/ai_council/airgap.py +165 -0
  50. package/scripts/ai_council/cli_hints.py +123 -0
  51. package/scripts/ai_council/clients.py +787 -5
  52. package/scripts/ai_council/compile_corpus.py +178 -0
  53. package/scripts/ai_council/confidence_gate.py +156 -0
  54. package/scripts/ai_council/config.py +1007 -11
  55. package/scripts/ai_council/consensus.py +41 -2
  56. package/scripts/ai_council/events_log.py +137 -0
  57. package/scripts/ai_council/learn_low_impact_preview.py +252 -0
  58. package/scripts/ai_council/low_impact.py +714 -0
  59. package/scripts/ai_council/low_impact_corpus.py +466 -0
  60. package/scripts/ai_council/low_impact_intake.py +163 -0
  61. package/scripts/ai_council/modes.py +6 -1
  62. package/scripts/ai_council/necessity.py +782 -0
  63. package/scripts/ai_council/orchestrator.py +252 -14
  64. package/scripts/ai_council/probation_gate.py +152 -0
  65. package/scripts/ai_council/redact_low_impact_entry.py +155 -0
  66. package/scripts/ai_council/replay.py +155 -0
  67. package/scripts/ai_council/session.py +19 -1
  68. package/scripts/ai_council/shadow_dispatch.py +235 -0
  69. package/scripts/ai_council/solo_dispatch.py +226 -0
  70. package/scripts/audit_cloud_compatibility.py +74 -0
  71. package/scripts/audit_command_surface.py +363 -0
  72. package/scripts/check_council_layout.py +11 -0
  73. package/scripts/council_cli.py +1046 -15
  74. package/scripts/install.sh +12 -0
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: agents:user-accept
3
+ tier: 2
4
+ cluster: agents
5
+ sub: user
6
+ description: Apply a buffered observation to .agent-user.md after explicit user confirmation; bumps last_updated and drops the applied observations from the buffer.
7
+ disable-model-invocation: true
8
+ suggestion:
9
+ eligible: false
10
+ rationale: "Mutates .agent-user.md — only run from /agents user review or explicit user invocation."
11
+ ---
12
+
13
+ # /agents user accept
14
+
15
+ Apply a buffered observation from
16
+ [`.agent-user.observations.jsonl`](../../../../../docs/contracts/agent-user-schema.md#observation-buffer)
17
+ to `.agent-user.md` after explicit confirmation.
18
+
19
+ Use when:
20
+
21
+ - `/agents user review` surfaced an observation worth applying.
22
+ - The user invoked `/agents user accept <field>` directly.
23
+
24
+ Never runs autonomously — always asks before writing.
25
+
26
+ ## Steps
27
+
28
+ ### 1. Preconditions
29
+
30
+ ```bash
31
+ ls .agent-user.md 2>/dev/null
32
+ ls .agent-user.observations.jsonl 2>/dev/null
33
+ ```
34
+
35
+ Either missing → print "Run `/agents user init` and accumulate
36
+ observations first." and stop.
37
+
38
+ ### 2. Resolve target field
39
+
40
+ | Invocation | Resolved field |
41
+ |---|---|
42
+ | Handed off from `/agents user review` option 1 | The most-frequent field |
43
+ | `/agents user accept <field>` | `<field>` (must match the schema enum) |
44
+ | `/agents user accept` with no arg | Print the field list, ask which |
45
+
46
+ Invalid field → print the schema enum and stop.
47
+
48
+ ### 3. Compute proposed change
49
+
50
+ For the resolved field:
51
+
52
+ 1. Read every matching observation from the buffer.
53
+ 2. Pick the **latest** `suggest` value (most recent `ts` wins).
54
+ 3. Read the current value from `.agent-user.md`.
55
+ 4. If they match, print "No change — current value already matches
56
+ the latest observation." and skip to step 6.
57
+
58
+ ### 4. Confirm
59
+
60
+ ```
61
+ Apply this change to .agent-user.md?
62
+
63
+ field : {field}
64
+ current : "{current_value}"
65
+ proposed: "{proposed_value}"
66
+ source : {n} observations between {oldest_ts} and {newest_ts}
67
+ evidence: {latest_evidence, truncated to 200 chars}
68
+
69
+ > 1. Apply
70
+ > 2. Skip — keep current value, drop these observations from the buffer
71
+ > 3. Cancel — leave .agent-user.md and buffer untouched
72
+ ```
73
+
74
+ One question per turn. Wait for the user's number.
75
+
76
+ ### 5. Write
77
+
78
+ On `1. Apply`:
79
+
80
+ 1. Rewrite the targeted field in `.agent-user.md` frontmatter.
81
+ Preserve every other field byte-for-byte (use a YAML round-trip
82
+ loader that keeps formatting).
83
+ 2. Bump `last_updated` to today (ISO `YYYY-MM-DD`).
84
+ 3. Validate the result: schema present, ≤100 lines, privacy floor
85
+ clean. Any violation → roll back and print the error.
86
+ 4. Drop **all** applied observations for that field from the buffer
87
+ (rewrite the JSONL minus matching lines).
88
+
89
+ On `2. Skip`: leave `.agent-user.md` untouched but still drop the
90
+ observations for that field from the buffer.
91
+
92
+ On `3. Cancel`: stop without any write.
93
+
94
+ ### 6. Confirm
95
+
96
+ ```
97
+ ✅ .agent-user.md updated ({field}: "{old}" → "{new}", last_updated: YYYY-MM-DD).
98
+ Buffer: {n} observations removed, {m} remaining.
99
+ ```
100
+
101
+ Do NOT commit. Do NOT auto-chain to a second field.
102
+
103
+ ## Rules
104
+
105
+ - One field per invocation. The user runs `/agents user accept` again
106
+ for the next field.
107
+ - Never write without explicit confirmation in step 4.
108
+ - Never bypass the privacy-floor scan, even if the buffer writer
109
+ already redacted.
110
+ - Mirror the user's language for prompts per
111
+ [`language-and-tone`](../../../../.agent-src/rules/language-and-tone.md).
112
+
113
+ ## See also
114
+
115
+ - Schema + buffer contract: [`agent-user-schema § Observation buffer`](../../../../../docs/contracts/agent-user-schema.md#observation-buffer).
116
+ - Parent: [`/agents user`](../user.md).
117
+ - Sibling: [`/agents user review`](review.md), [`/agents user update`](update.md).
@@ -0,0 +1,163 @@
1
+ ---
2
+ name: agents:user-init
3
+ tier: 2
4
+ cluster: agents
5
+ sub: user
6
+ description: Interactive interview that creates the project-root .agent-user.md from the locked v1 schema (name, language, role, style, voice_sample).
7
+ disable-model-invocation: true
8
+ suggestion:
9
+ eligible: false
10
+ rationale: "User-persona bootstrap — only deliberately, never auto-suggested."
11
+ ---
12
+
13
+ # /agents user init
14
+
15
+ Short interactive interview that creates **`.agent-user.md`** at the
16
+ project root from the locked v1 schema in
17
+ [`docs/contracts/agent-user-schema.md`](../../../../../docs/contracts/agent-user-schema.md).
18
+
19
+ Use when:
20
+
21
+ - The user wants the agent to address them by name / nickname / role.
22
+ - A fresh consumer project does not yet have `.agent-user.md`.
23
+
24
+ Refuses to overwrite an existing file without `--force`.
25
+
26
+ ## Steps
27
+
28
+ ### 1. Precondition checks
29
+
30
+ ```bash
31
+ ls .agent-user.md 2>/dev/null
32
+ ls docs/contracts/agent-user-schema.md 2>/dev/null
33
+ ```
34
+
35
+ | State | Action |
36
+ |---|---|
37
+ | `.agent-user.md` missing | Proceed |
38
+ | `.agent-user.md` exists, no `--force` | Abort; offer `/agents user update` instead |
39
+ | `.agent-user.md` exists, `--force` set | Proceed (will overwrite); back up to `.agent-user.md.bak` first |
40
+ | Schema contract missing | Abort with "package not installed / out of date" hint |
41
+
42
+ ### 2. Pre-fill from `.agent-settings.yml`
43
+
44
+ If `.agent-settings.yml` exists, read `personal.user_name` and offer
45
+ it as the default for `identity.name`. Do **not** read anything else —
46
+ the persona file is a separate primitive.
47
+
48
+ ### 3. Interview (one question per turn, numbered options)
49
+
50
+ Ask in this order. Each answer drives one frontmatter field.
51
+
52
+ 1. **Name** — required.
53
+ `Wie soll ich dich ansprechen? (Name)` / `What name should I use?`
54
+ Default: pre-fill from step 2 if available.
55
+
56
+ 2. **Nickname** — optional.
57
+ `Bevorzugter Spitzname für den Chat? (leer = wie Name)` /
58
+ `Preferred chat nickname? (blank = same as name)`
59
+
60
+ 3. **Language** — required, BCP-47-ish.
61
+ ```
62
+ > 1. de — Deutsch
63
+ > 2. en — English
64
+ > 3. other — type the code (e.g. "fr", "es")
65
+ ```
66
+ Default: detect from the user's last message.
67
+
68
+ 4. **Role** — required, short free-form.
69
+ `Kurze Rollenbeschreibung (z. B. "founder/engineer", "product manager", "designer")` /
70
+ `Short role label`
71
+
72
+ 5. **Style — formality**.
73
+ ```
74
+ > 1. informal — Du / first-name (default)
75
+ > 2. formal — Sie / full name
76
+ ```
77
+
78
+ 6. **Style — pace**.
79
+ ```
80
+ > 1. pragmatic — balanced (default)
81
+ > 2. thorough — more verification, longer replies
82
+ > 3. rapid — shorter replies, fewer caveats
83
+ ```
84
+
85
+ 7. **Voice sample** — required.
86
+ `Paste eine typische Nachricht von dir (1–3 Sätze, im normalen Schreibstil)` /
87
+ `Paste one typical message of yours (1–3 sentences, your normal style)`
88
+
89
+ ### 4. Privacy-floor sanity check
90
+
91
+ Before writing, scan the collected `voice_sample` and `role` for:
92
+
93
+ - Credentials, API keys, tokens, passwords (regex on common formats).
94
+ - Third-party full names that look like contacts (heuristic: capitalized first+last pair near words like "wife", "boss", "kid", "Frau", "Mann", "Chef").
95
+ - Financial figures (currency symbols + numbers).
96
+ - Health/legal status keywords.
97
+
98
+ Hit → surface the line and ask the user to redact before proceeding.
99
+ Per [`agent-user-schema § Explicit exclusions`](../../../../../docs/contracts/agent-user-schema.md#explicit-exclusions).
100
+
101
+ ### 5. Render and write
102
+
103
+ Render the frontmatter exactly as locked in the schema. Add an empty
104
+ `# Notes` body. Set `last_updated` to today (ISO date).
105
+
106
+ ```yaml
107
+ ---
108
+ version: 1
109
+ identity:
110
+ name: "..."
111
+ nickname: "..." # omit if blank
112
+ language: "..."
113
+ role: "..."
114
+ style:
115
+ formality: "..."
116
+ pace: "...""
117
+ voice_sample: |
118
+ ...
119
+ last_updated: "YYYY-MM-DD"
120
+ ---
121
+
122
+ # Notes
123
+ ```
124
+
125
+ Verify the rendered file is ≤100 lines (it will be — empty Notes body)
126
+ before writing to `.agent-user.md`.
127
+
128
+ ### 6. Gitignore check
129
+
130
+ If the consumer `.gitignore` does not yet contain `.agent-user.md`,
131
+ print a one-line nudge:
132
+
133
+ ```
134
+ ℹ️ .agent-user.md is not yet in your .gitignore. Run /sync-gitignore to add it.
135
+ ```
136
+
137
+ The package-managed block adds it automatically; this nudge only
138
+ fires when the block is missing or out of date.
139
+
140
+ ### 7. Confirm
141
+
142
+ Print the file path and a one-line summary:
143
+
144
+ ```
145
+ ✅ .agent-user.md written ({n} lines).
146
+ identity: {nickname or name} · language: {lang} · role: {role} · style: {formality}/{pace}
147
+ ```
148
+
149
+ Do NOT commit. Do NOT run any other `/agents user` sub-sub-command.
150
+
151
+ ## Rules
152
+
153
+ - One question per turn. Never batch.
154
+ - Numbered options where the answer is enum-like (per
155
+ [`user-interaction`](../../../../.agent-src/rules/user-interaction.md)).
156
+ - Never invent fields not in the locked v1 schema.
157
+ - Never write third-party PII even if the user pastes it — surface
158
+ and ask for redaction.
159
+
160
+ ## See also
161
+
162
+ - Schema: [`agent-user-schema`](../../../../../docs/contracts/agent-user-schema.md).
163
+ - Parent: [`/agents user`](../user.md).
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: agents:user-review
3
+ tier: 2
4
+ cluster: agents
5
+ sub: user
6
+ description: List buffered observations from .agent-user.observations.jsonl with numbered options to inspect or accept individually.
7
+ disable-model-invocation: true
8
+ suggestion:
9
+ eligible: true
10
+ trigger_description: "review user observations, see what the agent learned about me, list buffered persona updates"
11
+ trigger_context: "user wants to see what the agent has buffered about their preferences before applying changes"
12
+ ---
13
+
14
+ # /agents user review
15
+
16
+ List the buffered observations in `.agent-user.observations.jsonl`
17
+ and let the user choose which to inspect or accept.
18
+
19
+ Use when:
20
+
21
+ - You want to see what the agent has learned about your preferences.
22
+ - You suspect `.agent-user.md` is out of date and want a curated
23
+ diff before editing.
24
+ - You want to dismiss observations the agent collected.
25
+
26
+ Read-only by itself — actual changes go through
27
+ [`/agents user accept`](accept.md) or
28
+ [`/agents user update`](update.md).
29
+
30
+ ## Steps
31
+
32
+ ### 1. Locate buffer
33
+
34
+ ```bash
35
+ ls .agent-user.observations.jsonl 2>/dev/null
36
+ ```
37
+
38
+ | State | Action |
39
+ |---|---|
40
+ | Missing or empty | Print "No buffered observations. The agent has not learned anything new." and stop |
41
+ | Present | Proceed |
42
+
43
+ ### 2. Parse + group
44
+
45
+ Read every line as JSON. Drop malformed lines silently (one-line
46
+ warning at the end with the count). Group by `field`:
47
+
48
+ ```
49
+ .agent-user.observations.jsonl — {n} observations across {k} fields
50
+
51
+ 1. style.pace ({n}× since {oldest_ts})
52
+ latest suggest: "rapid" — evidence: user said 'mach kürzer' 3× this session
53
+ 2. identity.nickname ({n}× since {oldest_ts})
54
+ latest suggest: "Matze" — evidence: user signed last 3 messages "— Matze"
55
+ 3. language ({n}× since {oldest_ts})
56
+ latest suggest: "de" — evidence: last 12 messages in German, .agent-user.md says "en"
57
+ ```
58
+
59
+ Sort by frequency (most observations first), then by recency.
60
+
61
+ ### 3. Ask
62
+
63
+ ```
64
+ > 1. Accept the most-frequent suggestion ({field} → {value})
65
+ > 2. Inspect a specific field
66
+ > 3. Clear the buffer (discard all)
67
+ > 4. Cancel
68
+ ```
69
+
70
+ | Choice | Action |
71
+ |---|---|
72
+ | 1 | Hand off to [`/agents user accept`](accept.md) with the chosen field |
73
+ | 2 | Print every observation for that field with evidence + ts, then re-ask |
74
+ | 3 | Truncate `.agent-user.observations.jsonl` to zero bytes; print confirmation |
75
+ | 4 | Stop without changes |
76
+
77
+ One question per turn. Wait for the user's number.
78
+
79
+ ### 4. Privacy-floor verify
80
+
81
+ Before printing any observation's `evidence` text, scan it for the
82
+ [exclusions list](../../../../../docs/contracts/agent-user-schema.md#explicit-exclusions).
83
+ Match → replace the offending substring with `[redacted]` in the
84
+ rendered output.
85
+
86
+ The buffer writer is expected to redact on write, but treat this as
87
+ defense in depth — the user must never see leaked third-party PII or
88
+ credentials from a downstream agent's bad write.
89
+
90
+ ### 5. Stop
91
+
92
+ Do NOT commit. Do NOT auto-chain past one user-selected action per
93
+ turn.
94
+
95
+ ## Rules
96
+
97
+ - Read-only on `.agent-user.md`. Only `accept` writes to the persona
98
+ file.
99
+ - Buffer is the only mutable artefact (truncate via option 3).
100
+ - Mirror the user's language for prompts per
101
+ [`language-and-tone`](../../../../.agent-src/rules/language-and-tone.md).
102
+
103
+ ## See also
104
+
105
+ - Schema + buffer contract: [`agent-user-schema § Observation buffer`](../../../../../docs/contracts/agent-user-schema.md#observation-buffer).
106
+ - Parent: [`/agents user`](../user.md).
107
+ - Sibling: [`/agents user accept`](accept.md), [`/agents user update`](update.md).
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: agents:user-show
3
+ tier: 2
4
+ cluster: agents
5
+ sub: user
6
+ description: Read-only render of .agent-user.md — prints the persona summary the host agent loads at session start.
7
+ disable-model-invocation: true
8
+ suggestion:
9
+ eligible: true
10
+ trigger_description: "show user persona, render .agent-user.md, print who the user is"
11
+ trigger_context: "user wants to see what's currently in .agent-user.md without editing"
12
+ ---
13
+
14
+ # /agents user show
15
+
16
+ Read-only render of the project-root `.agent-user.md` per
17
+ [`docs/contracts/agent-user-schema.md`](../../../../../docs/contracts/agent-user-schema.md).
18
+
19
+ Use when:
20
+
21
+ - You want to see what persona the host agent currently loads.
22
+ - You want to confirm `last_updated` is fresh (≤90 days).
23
+ - You want a paste-ready summary for handoff or onboarding.
24
+
25
+ Does **not** edit, observe, or buffer anything. Pure read.
26
+
27
+ ## Steps
28
+
29
+ ### 1. Locate the file
30
+
31
+ ```bash
32
+ ls .agent-user.md 2>/dev/null
33
+ ```
34
+
35
+ | State | Action |
36
+ |---|---|
37
+ | Present | Proceed |
38
+ | Missing | Print "No `.agent-user.md` found at project root. Run `/agents user init` to create one." and stop |
39
+
40
+ ### 2. Parse frontmatter
41
+
42
+ Parse the YAML frontmatter and the body (everything after the second
43
+ `---`). Validate against the locked v1 schema:
44
+
45
+ - `version` is `1`.
46
+ - `identity.name`, `language`, `role`, `style.formality`, `style.pace`,
47
+ `voice_sample`, `last_updated` are all present.
48
+ - File is ≤100 lines total.
49
+
50
+ Any violation → print a one-line warning identifying the missing /
51
+ malformed field and continue with the render (so the user can fix it
52
+ via `/agents user update`).
53
+
54
+ ### 3. Render
55
+
56
+ Print the persona in this exact shape:
57
+
58
+ ```
59
+ .agent-user.md ({n} lines, last_updated: YYYY-MM-DD{staleness_marker})
60
+
61
+ Identity : {nickname or name} ({name} if nickname is set)
62
+ Language : {language}
63
+ Role : {role}
64
+ Style : {formality} · {pace}
65
+
66
+ Voice sample
67
+ ─────────────
68
+ {voice_sample, indented 2 spaces}
69
+
70
+ Notes
71
+ ─────────────
72
+ {body, indented 2 spaces; "(empty)" if no notes}
73
+ ```
74
+
75
+ Where `{staleness_marker}` is:
76
+
77
+ - empty when `last_updated` is within 90 days.
78
+ - ` ⚠️ >90 days` when older (per the schema staleness rule).
79
+
80
+ ### 4. Loader hint
81
+
82
+ If the host-agent loader has NOT yet picked up the file this session
83
+ (detect via session memory if available), print one line:
84
+
85
+ ```
86
+ ℹ️ Host agent will load this on next session start. Restart your chat to apply.
87
+ ```
88
+
89
+ Otherwise omit — agent already knows.
90
+
91
+ ### 5. Stop
92
+
93
+ Do NOT chain to other `/agents user *` commands. Do NOT commit.
94
+
95
+ ## Rules
96
+
97
+ - Read-only. Never write `.agent-user.md` from this command.
98
+ - Never print fields the schema does not define — even if they exist
99
+ in the file. (Forward-compat: an unexpected field is a warning, not
100
+ a render target.)
101
+ - Mirror the user's language for the rendered labels (`Identity` /
102
+ `Identität`, `Language` / `Sprache`, etc.) per
103
+ [`language-and-tone`](../../../../.agent-src/rules/language-and-tone.md).
104
+
105
+ ## See also
106
+
107
+ - Schema: [`agent-user-schema`](../../../../../docs/contracts/agent-user-schema.md).
108
+ - Parent: [`/agents user`](../user.md).
109
+ - Sibling: [`/agents user init`](init.md), [`/agents user update`](update.md).
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: agents:user-update
3
+ tier: 2
4
+ cluster: agents
5
+ sub: user
6
+ description: Open .agent-user.md in the user's IDE for manual edit; validates schema and 100-line cap on save.
7
+ disable-model-invocation: true
8
+ suggestion:
9
+ eligible: true
10
+ trigger_description: "edit user persona, update .agent-user.md, change nickname, change language, refresh voice sample"
11
+ trigger_context: "user wants to manually edit the persona file rather than answer interview questions"
12
+ ---
13
+
14
+ # /agents user update
15
+
16
+ Open `.agent-user.md` in the user's IDE for a manual edit, then
17
+ validate against the locked v1 schema on save.
18
+
19
+ Use when:
20
+
21
+ - The user knows exactly what they want to change (nickname, language,
22
+ voice sample) and doesn't need the interview flow.
23
+ - The user wants to edit the freeform `# Notes` body.
24
+ - `/agents user show` flagged a malformed field.
25
+
26
+ For agent-driven changes from buffered observations, use
27
+ [`/agents user review`](review.md) → [`/agents user accept`](accept.md).
28
+
29
+ ## Steps
30
+
31
+ ### 1. Precondition
32
+
33
+ ```bash
34
+ ls .agent-user.md 2>/dev/null
35
+ ```
36
+
37
+ Missing → print "No `.agent-user.md` found. Run `/agents user init`
38
+ first." and stop.
39
+
40
+ ### 2. Open in IDE
41
+
42
+ Use the [`file-editor`](../../../../.agent-src/skills/file-editor/SKILL.md)
43
+ skill — reads `personal.ide` from `.agent-settings.yml` (vscode,
44
+ phpstorm, cursor, etc.) and opens the file.
45
+
46
+ If `personal.ide` is unset or `auto_open_files: false`, print:
47
+
48
+ ```
49
+ ℹ️ Open .agent-user.md in your editor and re-run /agents user update --validate when done.
50
+ ```
51
+
52
+ ### 3. Wait for save → validate
53
+
54
+ When called with `--validate` (or after the user confirms "done"):
55
+
56
+ 1. Read `.agent-user.md`.
57
+ 2. Parse frontmatter; check every required field per
58
+ [`agent-user-schema § Field reference`](../../../../../docs/contracts/agent-user-schema.md#field-reference).
59
+ 3. Check file size ≤100 lines.
60
+ 4. Run the privacy-floor scan (same as `init` step 4): credentials,
61
+ third-party PII, financial figures, health/legal status.
62
+
63
+ | Result | Action |
64
+ |---|---|
65
+ | All checks pass | Bump `last_updated` to today; print one-line confirmation |
66
+ | Schema violation | Print the offending field + line, ask user to fix |
67
+ | >100 lines | Print line count, ask user to trim |
68
+ | Privacy-floor hit | Print the suspect line, ask user to redact |
69
+
70
+ ### 4. Bump `last_updated`
71
+
72
+ On successful validation, rewrite the `last_updated` field with
73
+ today's date (ISO `YYYY-MM-DD`). Preserve all other content
74
+ verbatim.
75
+
76
+ ### 5. Confirm
77
+
78
+ ```
79
+ ✅ .agent-user.md validated ({n} lines, last_updated: YYYY-MM-DD).
80
+ ```
81
+
82
+ Do NOT commit. Do NOT chain to another `/agents user *` command.
83
+
84
+ ## Rules
85
+
86
+ - Never edit `.agent-user.md` directly from this command except for
87
+ the `last_updated` bump in step 4. All other edits go through the
88
+ user's IDE.
89
+ - Never write third-party PII even if it appears in the user's edit —
90
+ re-surface and ask for redaction.
91
+ - Mirror the user's language for all prompts per
92
+ [`language-and-tone`](../../../../.agent-src/rules/language-and-tone.md).
93
+
94
+ ## See also
95
+
96
+ - Schema: [`agent-user-schema`](../../../../../docs/contracts/agent-user-schema.md).
97
+ - Parent: [`/agents user`](../user.md).
98
+ - Sibling: [`/agents user init`](init.md), [`/agents user show`](show.md), [`/agents user review`](review.md).
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: agents:user
3
+ tier: 2
4
+ cluster: agents
5
+ sub: user
6
+ description: User-persona file (.agent-user.md) — interview, render, and maintain who the user is and how they want to be addressed.
7
+ disable-model-invocation: true
8
+ type: orchestrator
9
+ suggestion:
10
+ eligible: true
11
+ trigger_description: "create user persona, render .agent-user.md, review observations, accept observations, edit user file"
12
+ trigger_context: "user wants to bootstrap or maintain the .agent-user.md persona file (name, language, role, style, voice sample)"
13
+ ---
14
+
15
+ # /agents user
16
+
17
+ Sub-dispatcher for the user-persona file
18
+ [`/.agent-user.md`](../../../docs/contracts/agent-user-schema.md) — a
19
+ single, project-root, gitignored Markdown file that captures who the
20
+ user is and how they want the agent to address them.
21
+
22
+ **Why this is its own cluster:** `AGENTS.md` describes the *project*
23
+ to the agent. `.agent-user.md` describes the *user* to the agent.
24
+ Two distinct primitives — same `/agents` family for discoverability,
25
+ separate sub-commands for separation of concerns.
26
+
27
+ ## Sub-sub-commands
28
+
29
+ | Sub-sub-command | Routes to | Purpose |
30
+ |---|---|---|
31
+ | `/agents user init` | `commands/agents/user/init.md` | Short interview → creates `.agent-user.md` |
32
+ | `/agents user show` | `commands/agents/user/show.md` | Read-only render of the persona |
33
+ | `/agents user review` | `commands/agents/user/review.md` | List buffered observations from `.agent-user.observations.jsonl` |
34
+ | `/agents user accept` | `commands/agents/user/accept.md` | Apply a buffered observation with confirmation |
35
+ | `/agents user update` | `commands/agents/user/update.md` | Open in IDE for manual edit; validate on save |
36
+
37
+ Schema contract:
38
+ [`docs/contracts/agent-user-schema.md`](../../../docs/contracts/agent-user-schema.md).
39
+
40
+ ## Dispatch
41
+
42
+ 1. Parse the user's argument: `/agents user <sub-sub-command> [args]`.
43
+ 2. Look up the sub-sub-command in the table above.
44
+ 3. Load the routed file and follow its `## Steps` section verbatim
45
+ with the remaining args.
46
+ 4. Unknown or missing sub-sub-command → print the table above and
47
+ ask which one. **One sub-sub-command per turn**; do not chain.
48
+
49
+ ## Rules
50
+
51
+ - **Do NOT commit, push, or open a PR** unless the sub-sub-command
52
+ explicitly authorizes it.
53
+ - **Do NOT write third-party PII** — names, dates, financial figures,
54
+ health/legal status. See the
55
+ [exclusions list](../../../docs/contracts/agent-user-schema.md#explicit-exclusions).
56
+ - **Do NOT introduce network code** in this package. External
57
+ enrichment is rejected for v1 — see the
58
+ [determinism floor](../../../docs/contracts/agent-user-schema.md#determinism-floor).
59
+ - **Edit `.agent-src.uncompressed/` only.** `.agent-src/` and
60
+ `.augment/` regenerate from source.
61
+
62
+ ## See also
63
+
64
+ - [`agent-user-schema`](../../../docs/contracts/agent-user-schema.md) — locked v1 frontmatter and field reference.
65
+ - [`/agents`](../AGENTS.md) — parent cluster.
66
+ - [`/agents init`](init.md) — project-side bootstrap (separate primitive).
@@ -28,6 +28,7 @@ agent infrastructure (rules, skills, pointers).
28
28
  | `/agents init` | `commands/agents/init.md` | Bootstrap the agent layer — create `AGENTS.md` + tool stubs from the canonical template |
29
29
  | `/agents optimize` | `commands/agents/optimize.md` | Refactor `AGENTS.md` to the Thin-Root contract; propagate to multi-tool stubs |
30
30
  | `/agents audit` | `commands/agents/audit.md` | Read-only health check — token overhead, rule triggers, AGENTS.md health, stale references |
31
+ | `/agents user` | `commands/agents/user.md` | User-persona file (`.agent-user.md`) — interview, render, maintenance |
31
32
 
32
33
  Sub-command names match the locked contract in
33
34
  [`docs/contracts/command-clusters.md`](../docs/contracts/command-clusters.md).
@@ -43,6 +44,7 @@ Sub-command names match the locked contract in
43
44
  > 1. init — bootstrap AGENTS.md + tool stubs
44
45
  > 2. optimize — refactor AGENTS.md to the Thin-Root contract
45
46
  > 3. audit — read-only health check on the agent layer
47
+ > 4. user — manage `.agent-user.md` (user-persona file)
46
48
 
47
49
  ## Rules
48
50