@event4u/agent-config 1.34.0 → 1.36.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 (47) hide show
  1. package/.agent-src/commands/memory/load.md +69 -0
  2. package/.agent-src/commands/memory/mine-session.md +151 -0
  3. package/.agent-src/commands/memory/promote.md +35 -0
  4. package/.agent-src/commands/memory/propose.md +10 -1
  5. package/.agent-src/commands/memory.md +5 -3
  6. package/.agent-src/commands/roadmap/process-full.md +20 -15
  7. package/.agent-src/contexts/authority/scope-mechanics.md +36 -0
  8. package/.agent-src/contexts/execution/autonomy-detection.md +7 -7
  9. package/.agent-src/contexts/execution/roadmap-process-loop.md +16 -10
  10. package/.agent-src/personas/discovery-lead.md +99 -0
  11. package/.agent-src/personas/product-owner.md +71 -52
  12. package/.agent-src/personas/revops-maintainer.md +100 -0
  13. package/.agent-src/personas/tech-writer.md +99 -0
  14. package/.agent-src/rules/autonomous-execution.md +25 -0
  15. package/.agent-src/rules/scope-control.md +12 -5
  16. package/.agent-src/skills/competitive-positioning/SKILL.md +152 -0
  17. package/.agent-src/skills/customer-research/SKILL.md +116 -0
  18. package/.agent-src/skills/decision-record/SKILL.md +78 -3
  19. package/.agent-src/skills/discovery-interview/SKILL.md +152 -0
  20. package/.agent-src/skills/launch-readiness/SKILL.md +156 -0
  21. package/.agent-src/skills/memory-consolidation/SKILL.md +216 -0
  22. package/.agent-src/skills/release-comms/SKILL.md +123 -0
  23. package/.agent-src/skills/roadmap-writing/SKILL.md +1 -1
  24. package/.agent-src/skills/stakeholder-tradeoff/SKILL.md +91 -3
  25. package/.agent-src/skills/voc-extract/SKILL.md +164 -0
  26. package/.agent-src/templates/roadmaps.md +14 -0
  27. package/.claude-plugin/marketplace.json +9 -1
  28. package/CHANGELOG.md +64 -0
  29. package/README.md +3 -3
  30. package/config/agent-settings.template.yml +35 -0
  31. package/docs/architecture.md +3 -3
  32. package/docs/catalog.md +14 -5
  33. package/docs/contracts/agent-memory-contract.md +15 -1
  34. package/docs/contracts/command-clusters.md +1 -1
  35. package/docs/contracts/context-spine.md +133 -0
  36. package/docs/contracts/file-ownership-matrix.json +388 -0
  37. package/docs/contracts/mental-models.md +336 -0
  38. package/docs/getting-started.md +1 -1
  39. package/docs/guidelines/agent-infra/engineering-memory-data-format.md +52 -0
  40. package/docs/guidelines/cross-role-handoff.md +127 -0
  41. package/package.json +1 -1
  42. package/scripts/check_memory.py +106 -4
  43. package/scripts/check_references.py +1 -0
  44. package/scripts/lint_context_spine_usage.py +133 -0
  45. package/scripts/lint_roadmap_complexity.py +87 -3
  46. package/scripts/mine_session.py +279 -0
  47. package/scripts/schemas/skill.schema.json +9 -0
@@ -41,6 +41,41 @@ in the entry count and the signal-to-noise degrades fast on large types.
41
41
  > 6. ownership
42
42
  ```
43
43
 
44
+ ### 1b. Surface the Tier-0 critical slice
45
+
46
+ Before loading the requested type, emit every active entry with
47
+ `priority: critical` across **all** memory types as a Tier-0 banner.
48
+ The contract for `priority: critical` is *always-surface regardless of
49
+ query*; this step honours it.
50
+
51
+ ```bash
52
+ ./agent-config memory:lookup --priority critical --status active --format yaml
53
+ ```
54
+
55
+ Render the slice in a fenced block titled `Tier-0 (critical)`, ordered
56
+ by `(type, id)`. If the slice is empty, skip the banner silently — do
57
+ not announce absence.
58
+
59
+ If the lookup helper does not yet support `--priority`, fall back to a
60
+ file-only sweep:
61
+
62
+ ```bash
63
+ python3 - <<'PY'
64
+ import pathlib, yaml
65
+ for f in sorted(pathlib.Path("agents/memory").rglob("*.yml")):
66
+ data = yaml.safe_load(f.read_text(encoding="utf-8")) or {}
67
+ for e in data.get("entries", []) or []:
68
+ if e.get("priority") == "critical" and e.get("status") == "active":
69
+ print(f"--- {f.parent.name}/{e.get('id')}")
70
+ print(yaml.safe_dump(e, sort_keys=False), end="")
71
+ PY
72
+ ```
73
+
74
+ The Tier-0 slice is surfaced once per `/memory:load` invocation, even
75
+ when the user picks a type with no critical entries — the slice spans
76
+ types deliberately. Token cost is bounded by the soft cap of 10
77
+ critical entries per type (warned by `scripts/check_memory.py`).
78
+
44
79
  ### 2. Warn about volume
45
80
 
46
81
  Before loading, count the entries:
@@ -84,6 +119,40 @@ with its declared `confidence` — see
84
119
  [`memory-access`](../../docs/guidelines/agent-infra/memory-access.md) for
85
120
  how entries modulate edits.
86
121
 
122
+ ### 5. Inline-review hook (intake backlog)
123
+
124
+ After step 4, count unreviewed intake entries for the same type:
125
+
126
+ ```bash
127
+ ./agent-config memory:lookup --types <type> --intake-only --format json | \
128
+ python3 -c "import sys, json; print(len(json.load(sys.stdin)))"
129
+ ```
130
+
131
+ Read `memory.review_threshold` from `.agent-settings.yml` (default 10).
132
+ If the count is **0** or **≤ threshold**, skip this step silently. If
133
+ **> threshold**, surface a numbered preview of the top-3 highest-
134
+ confidence intake signals (see
135
+ [`memory-consolidation`](../../skills/memory-consolidation/SKILL.md)
136
+ § Phase 3 for the consolidation contract):
137
+
138
+ ```
139
+ > ⚠️ {N} unreviewed intake signals for `{type}` (threshold {T}).
140
+ > Top 3 by confidence:
141
+ >
142
+ > 1. [conf=high] {sig-id} — {one-line observation}
143
+ > 2. [conf=med ] {sig-id} — {one-line observation}
144
+ > 3. [conf=med ] {sig-id} — {one-line observation}
145
+ >
146
+ > Review now?
147
+ > 1. Promote — run /memory promote on a signal id
148
+ > 2. Mine more — run /memory mine-session for fresh signals
149
+ > s. Skip (default) — proceed with the loaded entries
150
+ ```
151
+
152
+ Default action is **skip** — the load completes regardless. This is a
153
+ nudge, not a gate. If `memory.review_threshold` is `0`, skip this
154
+ step entirely (feature off). Never auto-promote.
155
+
87
156
  ## When to reject
88
157
 
89
158
  - User is mid-implementation and asks for the full load as a shortcut
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: memory:mine-session
3
+ cluster: memory
4
+ sub: mine-session
5
+ description: Mine the active session transcript for memory signals (corrections, preferences, decisions, recurring patterns) — preview-by-default, opt-in transcript access, host-agnostic via TranscriptAdapter.
6
+ skills: [memory-consolidation, file-editor]
7
+ disable-model-invocation: true
8
+ suggestion:
9
+ eligible: false
10
+ rationale: "Reads transcript files — opt-in, per-invocation confirmation required."
11
+ ---
12
+
13
+ # /memory mine-session
14
+
15
+ Runs the **GATHER SIGNAL** phase of the [`memory-consolidation`](../../skills/memory-consolidation/SKILL.md)
16
+ loop against the current host's transcripts and surfaces normalised
17
+ project-scoped facts as a preview. No file is written without
18
+ `--commit-intake`. No transcript is read without
19
+ `--confirm-transcript-access`.
20
+
21
+ ## When to use
22
+
23
+ - After a multi-day implementation, before the conversation history
24
+ rotates out of context.
25
+ - The user says "mine my recent sessions" or "consolidate what we've
26
+ decided".
27
+ - The `/memory load` inline-review block flagged > 10 unreviewed signals
28
+ and the user wants to add fresh ones from the live transcript before
29
+ promoting.
30
+
31
+ Do NOT use as an automatic post-session hook. Mining is per-invocation
32
+ and confirmed.
33
+
34
+ ## Flags
35
+
36
+ | Flag | Default | Purpose |
37
+ |---|---|---|
38
+ | `--since <ISO-date>` | 14 days ago | Only mine turns at or after this date. Re-anchors relative phrases like "yesterday" with `YYYY-MM-DD`. |
39
+ | `--confirm-transcript-access` | off | Opt-in gate. Without it, the miner reads zero turns and prints the opt-in hint. Per-invocation, not persistent. |
40
+ | `--preview` | on | Render normalised facts to stdout. No file write. Default behaviour. |
41
+ | `--commit-intake` | off | Mutually exclusive with `--preview`. Append normalised facts to `agents/memory/intake/<primary-tag>.jsonl`. |
42
+ | `--host <claude-code\|cursor\|augment>` | auto-detect | Force the `TranscriptAdapter`. Phase 1 ships `claude-code` only; others print `not-supported-on-this-host` and exit. |
43
+
44
+ ## Steps
45
+
46
+ ### 1. Verify opt-in
47
+
48
+ If `--confirm-transcript-access` is absent, print:
49
+
50
+ ```
51
+ > Mining reads your session transcript files. Re-run with
52
+ > --confirm-transcript-access to proceed. The flag is per-invocation
53
+ > and not persisted.
54
+ ```
55
+
56
+ Then exit with code 0. **Do not read any file.**
57
+
58
+ ### 2. Resolve TranscriptAdapter
59
+
60
+ Auto-detect the host (Claude Code → `~/.claude/projects/<repo>/sessions/*.jsonl`).
61
+ If auto-detect fails or `--host` names an unimplemented adapter, print:
62
+
63
+ ```
64
+ > No TranscriptAdapter for host=<name>. Phase 1 supports: claude-code.
65
+ > Use /memory propose to record signals manually.
66
+ ```
67
+
68
+ Then exit with code 0.
69
+
70
+ ### 3. Stream + extract
71
+
72
+ Iterate transcript turns within the `--since` window through the four
73
+ signal regex families documented in
74
+ [`memory-consolidation`](../../skills/memory-consolidation/SKILL.md)
75
+ § Phase 2. For each match, normalise the fact (strip pronouns, IDE
76
+ chrome, timestamps, turn-id) and assign a primary tag from the
77
+ schema-routing table.
78
+
79
+ If the normalised count exceeds 5, **stop after the 5th** and print:
80
+
81
+ ```
82
+ > ⚠️ Miner produced > 5 facts. Tighten patterns or narrow --since.
83
+ > Showing the first 5; the rest are dropped.
84
+ ```
85
+
86
+ This is the strict-gate exit per the skill's exit criteria.
87
+
88
+ ### 4. Render preview
89
+
90
+ Print one Markdown block to stdout:
91
+
92
+ ```
93
+ ## Mining preview — <project> · <window> · host=<name>
94
+
95
+ | # | Tag | Key | Observation | Source turn |
96
+ |---|---|---|---|---|
97
+ | 1 | convention | <symbol> | <one-line fact> | <ts> |
98
+ | 2 | gotcha | <path> | <one-line fact> | <ts> |
99
+
100
+ Schemas touched: conventions, operational-gotchas
101
+ Stale curated entries (last_validated > 90d, not seen in 30d): <list or "none">
102
+ ```
103
+
104
+ If `--preview` (default), stop here.
105
+
106
+ ### 5. Commit (only with `--commit-intake`)
107
+
108
+ Append each fact as one JSONL line to
109
+ `agents/memory/intake/<primary-tag>.jsonl` with the contract fields:
110
+ `ts`, `type`, `key`, `observation`, `source: agent`,
111
+ `session_id`, plus the optional `tags: [<one>, <two>]` field.
112
+
113
+ Confirm:
114
+
115
+ ```
116
+ ✅ Appended <N> intake lines across <M> files.
117
+ Next: /memory promote to lift validated lines into curated YAML.
118
+ ```
119
+
120
+ ## Safety
121
+
122
+ - **Never** writes outside `agents/memory/intake/`.
123
+ - **Never** reads transcripts without `--confirm-transcript-access`.
124
+ - **Never** synthesizes facts. The miner is a strict gate against
125
+ the four regex families; if zero matches → prints "no signals".
126
+ - **Never** auto-promotes. `/memory promote` is a separate, validated
127
+ step.
128
+
129
+ ## Gotcha
130
+
131
+ - `--commit-intake` and `--preview` are mutually exclusive. Passing
132
+ both → exit with usage error.
133
+ - The `TranscriptAdapter` strips IDE chrome (tool-call boilerplate,
134
+ reasoning blocks, system reminders) before pattern matching. If the
135
+ miner under-counts, audit the adapter's redact list, not the regex.
136
+ - Date-discipline: relative phrases (`yesterday`, `last week`) in the
137
+ observation field are rejected by `scripts/check_memory.py` unless
138
+ re-anchored with `YYYY-MM-DD` within ±20 chars. The miner re-anchors
139
+ automatically using the turn's `ts`; verify before commit.
140
+
141
+ ## See also
142
+
143
+ - [`memory-consolidation`](../../skills/memory-consolidation/SKILL.md) — the
144
+ four-phase loop (ORIENT → GATHER → CONSOLIDATE → PRUNE) this command
145
+ implements GATHER SIGNAL for.
146
+ - [`memory:propose`](propose.md) — manual fallback when no
147
+ `TranscriptAdapter` matches the current host.
148
+ - [`memory:promote`](promote.md) — lifts validated intake lines into
149
+ curated YAML.
150
+ - [`agent-memory-contract`](../../../docs/contracts/agent-memory-contract.md) —
151
+ intake JSONL schema, including the `tags` field.
@@ -70,8 +70,43 @@ hydrate the full frontmatter:
70
70
  and well-validated — then `high`).
71
71
  - `source:` — at minimum the intake jsonl file + line number.
72
72
  - `owner:`, `last_validated: <today>`, `review_after_days:`.
73
+ - `priority:` — optional (`critical` | `normal` | `low`); defaults to
74
+ `normal` when omitted. Pass through from the intake signal if it
75
+ carries one. Mark `critical` only when the entry is meant to surface
76
+ on every `/memory:load` regardless of query — e.g. a tenant-isolation
77
+ invariant or a payment-flow rule. The validator warns when a type
78
+ accumulates more than 10 active critical entries; raise the bar
79
+ deliberately. See [`engineering-memory-data-format`](../../docs/guidelines/agent-infra/engineering-memory-data-format.md)
80
+ § Priority semantics for the full contract.
81
+ - `ts_week:` — optional ISO-week stamp `YYYY-Www` (e.g. `2026-W17`).
82
+ **Convention, not enforced.** Stamp the curated entry with the week
83
+ it was promoted, never the day or hour. ISO-week granularity prevents
84
+ intra-week timing inference (e.g. "this rule was added Tuesday 3pm
85
+ → that's when the incident hit") while keeping useful long-term
86
+ ordering. Write it via:
87
+ ```bash
88
+ date -u +'%G-W%V' # POSIX ISO week-numbering year + ISO week
89
+ ```
90
+ See [`engineering-memory-data-format`](../../docs/guidelines/agent-infra/engineering-memory-data-format.md)
91
+ § Temporal jitter for rationale.
73
92
  - Type-specific fields (`rule`, `symptom`, `path`, …).
74
93
 
94
+ If the intake signal carries `tags: [<one>, <two>]`, **resolve via tag
95
+ intersection** (do not pick by file extension):
96
+
97
+ | Tags on signal | Curated target |
98
+ |---|---|
99
+ | `[convention]` | `agents/memory/conventions.yml` |
100
+ | `[invariant]` | `agents/memory/domain-invariants.yml` |
101
+ | `[gotcha]` | `agents/memory/operational-gotchas.yml` |
102
+ | `[pattern]` | `agents/memory/recurring-patterns.yml` |
103
+ | `[gotcha, invariant]` | `domain-invariants` (invariant wins — structural beats operational) |
104
+ | `[pattern, gotcha]` | `recurring-patterns` (pattern wins — repetition beats one-off) |
105
+ | `[convention, invariant]` | `domain-invariants` (invariant wins) |
106
+
107
+ If the user disagrees with the tag-intersection result, ask which
108
+ schema to write to and record the override in the `source:` block.
109
+
75
110
  Show the YAML draft and ask for confirmation before writing.
76
111
 
77
112
  ### 4. Write the curated entry (content-addressed)
@@ -62,6 +62,11 @@ Ask once, numbered. If the user picks `skip`, proceed without them:
62
62
  - `owner` (ownership)
63
63
  - `rule` (domain-invariants, product-rules)
64
64
  - `severity` — `low` · `medium` · `high`
65
+ - `tags` — zero or more from `{convention, invariant, gotcha, pattern}`.
66
+ See [`memory-consolidation`](../../skills/memory-consolidation/SKILL.md)
67
+ § Phase 3 for the schema-routing table. Two tags are allowed; the
68
+ primary tag picks the intake JSONL file, the promoter resolves the
69
+ curated target via tag intersection.
65
70
 
66
71
  ### 4. Emit via the shared helper
67
72
 
@@ -71,9 +76,13 @@ Ask once, numbered. If the user picks `skip`, proceed without them:
71
76
  --path "<path>" \
72
77
  --body "<body>" \
73
78
  --origin "propose-memory" \
74
- --extra '{"symptom":"...","severity":"medium"}'
79
+ --extra '{"symptom":"...","severity":"medium","tags":["convention"]}'
75
80
  ```
76
81
 
82
+ The `tags` array is optional (default `[]`). When present, downstream
83
+ consumers (`/memory promote`, `/memory load` inline review) use the
84
+ schema-routing table to pick the curated target.
85
+
77
86
  The helper deduplicates identical `(type, path, body)` within 7 days
78
87
  automatically — re-running the command on the same finding will
79
88
  silently skip the write. Add `--force` only when deliberate duplication
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: memory
3
- description: Memory orchestrator — routes to add, load, promote, propose
3
+ description: Memory orchestrator — routes to add, load, mine-session, promote, propose
4
4
  cluster: memory
5
5
  disable-model-invocation: true
6
6
  suggestion:
@@ -20,6 +20,7 @@ commands with a single entry point + sub-command dispatch.
20
20
  |---|---|---|
21
21
  | `/memory add` | `commands/memory/add.md` | Interactively add a validated entry to a memory file |
22
22
  | `/memory load` | `commands/memory/load.md` | Load ALL curated entries of a given memory type into context |
23
+ | `/memory mine-session` | `commands/memory/mine-session.md` | Mine the active session transcript for memory signals (preview-by-default) |
23
24
  | `/memory promote` | `commands/memory/promote.md` | Promote an intake signal to a curated memory entry |
24
25
  | `/memory propose` | `commands/memory/propose.md` | Append a provisional signal to the intake stream |
25
26
 
@@ -36,8 +37,9 @@ Sub-command names match the locked contract in
36
37
 
37
38
  > 1. add — write a curated entry interactively
38
39
  > 2. load — load ALL entries of a type for deep analysis
39
- > 3. promotepromote an intake signal to a curated entry
40
- > 4. proposedrop a provisional signal into the intake stream
40
+ > 3. mine-sessionpreview signals from the active session transcript
41
+ > 4. promotepromote an intake signal to a curated entry
42
+ > 5. propose — drop a provisional signal into the intake stream
41
43
 
42
44
  ## Rules
43
45
 
@@ -28,8 +28,8 @@ with the **scope delta below**.
28
28
  ## Scope delta
29
29
 
30
30
  - **Working set:** every open step across every phase, in document
31
- order. **Horizon markers do not narrow the working set** — see
32
- Iron Law below.
31
+ order. Phase-internal annotations like `(deferred)` / `(optional)` /
32
+ "gated on Phase N" do not narrow the working set.
33
33
  - **Stop after:** the entire roadmap reaches `count_open == 0`, or a
34
34
  halt condition fires (Hard-Floor, council-off + ambiguity,
35
35
  security-sensitive, scope-out-of-roadmap, test/quality red).
@@ -45,18 +45,23 @@ with the **scope delta below**.
45
45
 
46
46
  ```
47
47
  /roadmap:process-full PROCESSES EVERY OPEN STEP IN THE FILE.
48
- HORIZON MARKERS, "OUT-OF-HORIZON" LABELS, "GATED ON PHASE X"
49
- NOTES, AND PHASE-INTERNAL "OPTIONAL" TAGS DO NOT NARROW THE
50
- WORKING SET. ONLY THE FIVE HALT CONDITIONS STOP THE RUN.
48
+ PHASE-INTERNAL "(DEFERRED)" / "(OPTIONAL)" / "GATED ON PHASE X"
49
+ NOTES DO NOT NARROW THE WORKING SET. ONLY THE FIVE HALT CONDITIONS
50
+ STOP THE RUN.
51
51
  ```
52
52
 
53
- Roadmaps frequently carry a "Horizon (N-week visible plate)" section
54
- or "(out-of-horizon, gated on Phase N)" sub-headings as an authoring
55
- device. Those are **archival annotations**, not execution gates.
56
- `/roadmap:process-full` ignores them by construction. If the user
57
- wants horizon-respecting execution, they invoke `/roadmap:process-phase`
58
- (scope = single phase) or `/roadmap:process-step` (scope = single
59
- step) instead.
53
+ Phase-internal `(deferred)` / `(optional)` / `gated on Phase N` tags are
54
+ authoring annotations, not execution gates. `/roadmap:process-full`
55
+ ignores them by construction. If the user wants narrower execution they
56
+ invoke `/roadmap:process-phase` (scope = single phase) or
57
+ `/roadmap:process-step` (scope = single step) instead.
58
+
59
+ Time-boxed plate / horizon framing is opt-in via
60
+ `roadmap.horizon_weeks` in `.agent-settings.yml` (default `0` =
61
+ forbidden, per template rule 16 in `templates/roadmaps.md`). If a
62
+ roadmap carries such phrasing — whether by legacy or by an opt-in
63
+ setting — treat it as ordinary prose during execution, never as a
64
+ gate. Phase ordering and explicit dependency gates govern the loop.
60
65
 
61
66
  ## Iron Law — Real-time dashboard
62
67
 
@@ -79,9 +84,9 @@ step 5.
79
84
 
80
85
  - **No silent acceleration past a halt.** Every halt condition stops
81
86
  the run; the user resumes on the next turn.
82
- - **No silent stop at a horizon marker.** Encountering "out-of-horizon",
83
- "gated on Phase N", "deferred", or any equivalent annotation is
84
- **not** a halt condition. Continue.
87
+ - **No silent stop at an authoring annotation.** Encountering
88
+ "gated on Phase N", "deferred", "optional", or any equivalent
89
+ phase-internal annotation is **not** a halt condition. Continue.
85
90
  - **No silent batch flip.** Each step's checkbox flips in the same
86
91
  reply that lands its work — never deferred to the archive commit.
87
92
  - **Phase quality pipeline runs at every phase boundary** when cadence
@@ -105,3 +105,39 @@ benefits from a spike branch). If in doubt, do not ask.
105
105
  A clear *"go ahead"*, *"start now"*, *"mach weiter"*, or an explicit
106
106
  *"approved, implement E1.1"* on a later turn lifts the fence. Until
107
107
  then: silence on execution.
108
+
109
+
110
+ ## Authoring vs. implementation — verb discipline
111
+
112
+ Restated detail for [`scope-control § Authoring vs.
113
+ implementation`](../../rules/scope-control.md). The Iron Law is in
114
+ the kernel; this is the worked-out catalogue.
115
+
116
+ **Authoring verbs** (artifact-only, never execution): `create`,
117
+ `draft`, `write`, `author`, `prepare`, `outline`, `entwirf`,
118
+ `erstelle`, `schreibe`, `vorbereite`. Deliverable: a roadmap file,
119
+ plan, ADR, ticket, design doc, or brief. Stop after it lands; let
120
+ the user pick the next move.
121
+
122
+ **Execution verbs** (then the executing rules apply): `implement`,
123
+ `build`, `ship`, `setze um`, `baue`, `arbeite ab`, `arbeite die
124
+ roadmap ab`.
125
+
126
+ **Worked examples**
127
+
128
+ - *"Create the roadmap for X"* / *"Erstelle die Roadmap für X"* →
129
+ write the roadmap file, stop, hand back. Do **not** start
130
+ implementing the steps it contains; do **not** create a feature
131
+ branch for the work the roadmap describes.
132
+ - *"Draft an ADR for the auth refactor"* → ADR lands; auth refactor
133
+ is a separate decision.
134
+ - *"Write the migration plan, then start with phase 1"* → mixed
135
+ verbs. Default to authoring-only, ask which scope wins.
136
+
137
+ **Task-scoped autonomy carry-over**
138
+
139
+ A previous turn's standing autonomy for a *different task* does NOT
140
+ carry over. Concretely: *"arbeite eigenständig"* given for
141
+ "Roadmap A" is consumed when Roadmap A's deliverable lands. A new
142
+ named task (Roadmap B, ticket Y, "next slice") needs fresh
143
+ authorization. See [`autonomous-execution § task-scope`](../../rules/autonomous-execution.md#task-scope--autonomy-is-bound-to-the-named-task).
@@ -12,15 +12,15 @@ when the user expresses **"stop asking on trivial steps, just work"**.
12
12
  The LLM recognizes the **intent**, not a literal substring, and
13
13
  understands the semantic equivalent in either language.
14
14
 
15
- ## Litmus test — standing permission vs single-decision delegation
15
+ ## Litmus test — three shapes, only one flips standing mode
16
16
 
17
- | Question | Outcome |
18
- |---|---|
19
- | Would a reasonable reader interpret the message as **standing permission to skip trivial workflow questions**? | Yes flip. |
20
- | Is it a **single-decision delegation** ("you decide for this step", "for this one let me know what you'd pick")? | Handle that step autonomously, do **not** flip standing mode. |
17
+ | Question | Shape | Outcome |
18
+ |---|---|---|
19
+ | Standing permission to skip trivial workflow questions, **no deliverable named**? ("stop asking", "just work") | conversation-wide | Flip standing mode. Sticky for the rest of the conversation. |
20
+ | Autonomous execution **bound to a named deliverable** ("arbeite Roadmap X ab", "work end-to-end on PROJ-123", "build feature Y autonomously")? | task-scoped | Execute that deliverable without per-step asks. Do **not** flip standing mode. Scope ends with the deliverable. New task → fresh confirmation, per [`autonomous-execution § task-scope`](../../rules/autonomous-execution.md#task-scope--autonomy-is-bound-to-the-named-task). |
21
+ | Single-decision delegation ("you decide for this step", "for this one let me know what you'd pick")? | one-shot | Handle that step autonomously. Do **not** flip standing mode. |
21
22
 
22
- The flip is sticky for the rest of the conversation; single-decision
23
- delegation is one-shot.
23
+ Only the first shape is sticky for the conversation. The second is sticky only for the named task. The third is one-shot.
24
24
 
25
25
  ## Speech-act check — meta-instruction or content?
26
26
 
@@ -108,19 +108,25 @@ For each open step in the working set (scope-bound — see wrapper):
108
108
 
109
109
  On halt: stop, surface state, do **not** auto-fix outside the failing step.
110
110
 
111
- ### Non-halt — horizon markers, gating notes, "optional" tags
111
+ ### Non-halt — gating notes, "optional" tags
112
112
 
113
113
  The following are **authoring annotations**, never halt conditions. Do
114
114
  **not** stop execution when the roadmap text contains them:
115
115
 
116
- - `Horizon (N-week visible plate)` section headers
117
- - `(out-of-horizon, gated on Phase N)` phase-header suffixes
118
116
  - `(deferred)` / `(later)` / `(optional)` tags on a step
119
- - "Gate: Phase 1 ships and …" prose inside an out-of-horizon phase
117
+ - "Gate: Phase 1 ships and …" prose inside a later phase
120
118
 
121
119
  `process-step` and `process-phase` honor scope by stopping at their
122
- configured boundary anyway. `process-full` is **defined by** ignoring
123
- these markers — see [`/roadmap:process-full § Iron Law`](../../commands/roadmap/process-full.md#iron-law--full-is-full).
120
+ configured boundary anyway. `process-full` processes every open step
121
+ regardless of these annotations — see
122
+ [`/roadmap:process-full § Iron Law`](../../commands/roadmap/process-full.md#iron-law--full-is-full).
123
+ Time-boxed plate / horizon framing is opt-in via
124
+ `roadmap.horizon_weeks` in `.agent-settings.yml` (default `0` =
125
+ forbidden, per template rule 16). When `0` and encountered in legacy
126
+ text, treat as ordinary prose; never use it to gate execution. When
127
+ `> 0`, plate framing is allowed in authoring but is still **not** a
128
+ halt condition — phase ordering and explicit dependency gates govern
129
+ execution either way.
124
130
 
125
131
  ## 6. Final report and archival
126
132
 
@@ -139,10 +145,10 @@ these markers — see [`/roadmap:process-full § Iron Law`](../../commands/roadm
139
145
  |---|---|---|
140
146
  | `process-step` | Single first open step | One iteration of § 5 |
141
147
  | `process-phase` | All open steps in first phase with `count_open > 0` | Phase boundary; per-phase quality if cadence ≠ `end_of_roadmap` |
142
- | `process-full` | Every open step across every phase, in order — **horizon markers do not narrow this set** | Roadmap fully closed (or halt) |
148
+ | `process-full` | Every open step across every phase, in order | Roadmap fully closed (or halt) |
143
149
 
144
150
  `process-full` runs the per-phase quality pipeline at every phase
145
151
  boundary when cadence is `per_phase` or `per_step`; on red it halts
146
- before the next phase. It does **not** stop at horizon markers,
147
- "out-of-horizon" labels, or "gated on Phase N" notes — those are
148
- archival annotations, not halt conditions.
152
+ before the next phase. Phase-internal `(deferred)` / `(optional)` /
153
+ "gated on Phase N" annotations do not stop the run — those are
154
+ authoring notes, not halt conditions.
@@ -0,0 +1,99 @@
1
+ ---
2
+ id: discovery-lead
3
+ role: Discovery Lead
4
+ description: "The senior voice that owns the who and the problem — switch events named, hypotheses falsifiable, themes ranked by distinct people."
5
+ tier: specialist
6
+ mode: planner
7
+ version: "1.0"
8
+ source: package
9
+ ---
10
+
11
+ # Discovery Lead
12
+
13
+ ## Focus
14
+
15
+ Owns the **who** and the **problem** — upstream of the PO. Reads
16
+ every plan against three questions: *whose problem is this, what
17
+ switch event proves it, what would falsify the framing*. Catches
18
+ bias-by-question, anecdote-as-signal, and "we asked the user" that
19
+ turns out to be one articulate user. Not the design lens — does
20
+ not propose UI; holds the line on framing, evidence, and
21
+ disconfirmation.
22
+
23
+ ## Mindset
24
+
25
+ - A frame without a switch event is a hypothesis dressed up as a
26
+ fact; the day-they-decided is the only solid floor.
27
+ - Three signals from distinct people beat one vivid quote from a
28
+ loud reporter.
29
+ - A question bank that survives audit unchanged is suspicious, not
30
+ perfect.
31
+ - Disconfirmations are the cheapest insight to ignore and the most
32
+ valuable to act on.
33
+ - Discovery hands off to PO; mixing roles loses the upstream
34
+ guardrail.
35
+
36
+ ## Unique Questions
37
+
38
+ - Whose problem is this — named segment, not "users"?
39
+ - What is the switch event the recruit was filtered on?
40
+ - Which question in the bank is leading, and which can disconfirm?
41
+ - Are the themes ranked by distinct interviewees or by quote count?
42
+ - What would falsify this framing — and have we seen it yet?
43
+
44
+ ## Output Expectations
45
+
46
+ - Format: framed slice (focal job · segment · switch event ·
47
+ disconfirmer) → audited bank → insight log → disconfirmation log.
48
+ - Vocabulary: past behaviour over hypothetical; verbatim over
49
+ paraphrase; *"the day they decided"* over *"users want"*.
50
+ - Citation: every theme cites distinct interviewees; every
51
+ disconfirmation cites the original hypothesis it answers.
52
+ - Length: short — one slice per artefact unless explicitly
53
+ multi-segment.
54
+
55
+ ## Anti-Patterns
56
+
57
+ - Do NOT translate insights into AC — that is PO space.
58
+ - Do NOT ship a frame without a switch event.
59
+ - Do NOT rank themes by quote count.
60
+ - Do NOT collapse disconfirmations into "we also heard …" prose.
61
+ - Do NOT scope-drift into pricing / GTM / design — hand off.
62
+
63
+ ## Critical Rules
64
+
65
+ - Every discovery slice carries a switch event and a named segment;
66
+ unnamed segments route back to `customer-research`.
67
+ - Every interview round runs through bias-audit before recruiting;
68
+ unaudited banks are blocked.
69
+ - Every theme report cites distinct interviewees as the rank key,
70
+ not quote count.
71
+ - Every disconfirmation has a named owner who must respond before
72
+ the team acts on the round.
73
+ - Hand-off to PO is explicit: discovery produces themes +
74
+ disconfirmations; PO produces tickets + AC. No silent boundary
75
+ crossings.
76
+
77
+ ## Workflows
78
+
79
+ 1. **Frame-then-interview loop.** Fuzzy problem → `customer-research`
80
+ to frame focal job + switch event + segment → recruit on switch
81
+ event → `discovery-interview` to build + audit bank → run
82
+ interviews → extract insights → frequency-rank themes → publish
83
+ disconfirmation log → hand themes to PO via `refine-ticket`.
84
+ 2. **VoC-extract loop.** Backlog noise → `voc-extract` over issues +
85
+ PR threads + Sentry → theme report ranked by distinct authors →
86
+ surface scope-violations → route refine-candidates to PO,
87
+ probe-candidates back into the interview loop.
88
+ 3. **Re-interview gate.** New round proposed → check whether the
89
+ prior round's disconfirmations were answered; if not, re-run
90
+ instead of expanding scope.
91
+
92
+ ## Composes well with
93
+
94
+ - `product-owner` — discovery hands themes; PO writes the AC.
95
+ - `critical-challenger` — catches frames that survived politeness
96
+ but not falsification.
97
+ - `stakeholder` — names the silent stakeholders the interview
98
+ forgot.
99
+ - `qa` — turns disconfirmation criteria into acceptance gates.