2-discover
Surface a domain's EventStorming timeline, ubiquitous language, and hotspots from what the people who do the work actually say — the discovery step of the ddd-flow modelling loop. Use whenever a domain needs its behaviour discovered before any boundary is drawn: mining PRDs/specs/schemas for candidate events, interviewing for the gaps, or merging a discovery delta — invoked by ddd-flow:design or directly. This is initial event discovery; drawing bounded-context boundaries is 3-decompose.
- License 许可
- MIT
- 所属仓库
- baodq97/govkit
- 最近更新
- 2026-09-07
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- 2-discover
- paths
- docs/domain/**
- description
- Surface a domain's EventStorming timeline, ubiquitous language, and hotspots from what the people who do the work actually say — the discovery step of the ddd-flow modelling loop. Use whenever a domain needs its behaviour discovered before any boundary is drawn: mining PRDs/specs/schemas for candidate events, interviewing for the gaps, or merging a discovery delta — invoked by ddd-flow:design or directly. This is initial event discovery; drawing bounded-context boundaries is 3-decompose.
02 资源文件 7
- 参考文档references/eventstorming.md5.5 KB
- 参考文档references/interview-guide.md4.4 KB
- 参考文档references/measure-playbook.md24.7 KB
- 参考文档references/other-techniques.md4.3 KB
- 参考文档references/output-template.md7.1 KB
- 参考文档references/worked-example.md1.3 KB
- 脚本scripts/mine_coverage.py10.9 KB
03 SKILL.md 正文
Discover — what actually happens here, in the words of the people who do it?
You already know EventStorming, ubiquitous-language elicitation, and hotspot capture. This skill does not re-teach them — it gives only what a strong model gets wrong by default here, plus the exact output contract the gate parses.
Step 0 — load the law
Read ../../references/RULES.md (the shared ddd-flow rules). The Grounding, Honesty,
and Right-size sections govern this step. They are the rules, not the method — do not proceed
without them.
Consumes → produces
- Read: everything already written about the domain —
business-model.md, PRDs, ADRs, specs, schemas, the domain layer — plus any priordocs/domain/discovery/(UPDATE mode: merge a delta, never overwrite). With no artifacts, INTERVIEW mode elicits from people. - Write:
docs/domain/discovery/— the event timeline, ubiquitous language, hotspots (stableH1..ids), and the session/attendance record; drive the live surface viamodel.json.
Output contract (what the gate parses — obey exactly)
Author discovery/*.md and discovery/model.json to the shapes in
../../references/artifact-shapes.md. model.json is canonical: checks 13 and 16 read it
first, and the markdown fallback cannot tell a confirmed event from a confirmed rule, so the
grounding floor silently degrades to a whole-timeline ratio without it. Keep status (evidence)
and state (time) as two independent columns. No model.yaml here — boundaries and their schema
are 3-decompose.
MEASURE mode — a structured corpus is counted, not read
When RULES sends you to measure (structured and large: ≥20 files of one shape, or ≥200
definitions), write throwaway miners into .ddd-flow/mine/ in the consumer repo and commit
them — they are the provenance. Every stage emits out/manifest.yaml (or .json) carrying
source, invocation, total, parsed, skipped[], failed[] — each skip with a reason, each
failure with an error, and parsed + skipped + failed == total. Validate before quoting any number:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/2-discover/scripts/mine_coverage.py \
--manifest .ddd-flow/mine/out/manifest.yaml --corpus '<root>/**/*.<ext>' --strict
An unvalidated count is a guess with a number on it, and "not found" from a partial scan is an
unmeasured absence. Mined signals enter discovery/ as candidate, never confirmed.
The one rule most often broken (echoed for salience; full set in RULES.md)
Documented is not discovered. Every event, term, and rule carries whether a human confirmed it
or an artifact only implied it: mark everything mined from documents candidate, and only a person
flips it to confirmed. A run that merely re-read the schemas must not look identical to one that
talked to the business — a timeline that paraphrases a DDL has discovered nothing, however complete
it looks.
Done
Run ddd_check (budget + grounding gate); resolve blocking gaps; keep hotspots (H1.., never
renumbered) and open_questions populated honestly. Don't resolve a hotspot to keep the wall tidy,
and don't draw boundaries — hand the clustered events to 3-decompose, which will be only as good
as this discovery was.
04 同仓库更多 Skills
trigger-shaped
Use when the user says "plan a sprint retro"; drafts retro/notes.md for the team.
terse-unguarded
Step 2 — writes docs/x/output.json quietly.
guarded
Summarizes ledger totals into reports/monthly.csv.
open
Draft a spec. Use when asked to "draft a spec" or "write the RFC".
guarded
Deploy the thing.
working-discipline
Thinking-checkpoint discipline for substantive implementation, debugging, or autonomous work — 21 trigger-gated items (trigger → mandatory question → evidence to produce) that cut agent error and human escalation. Use before an autonomous or long-running run, when asked to "work carefully", "double-check", "làm cẩn thận", "reduce errors", "be more autonomous", or after looping twice on the same failing fix. NOT a procedure — checkpoints fire on their triggers and demand evidence, with an N/A escape valve so a strong model pays near-zero overhead.