@tanstack/intent 0.0.1
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.
- package/README.md +66 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +327 -0
- package/dist/feedback-DKreHfB1.mjs +300 -0
- package/dist/feedback-FIUBOL0g.mjs +3 -0
- package/dist/index.d.mts +61 -0
- package/dist/index.mjs +8 -0
- package/dist/init-DEzzXm9j.mjs +3 -0
- package/dist/init-DNxmjQfU.mjs +70 -0
- package/dist/intent-library.d.mts +1 -0
- package/dist/intent-library.mjs +123 -0
- package/dist/library-scanner-BrznE00j.mjs +111 -0
- package/dist/library-scanner.d.mts +16 -0
- package/dist/library-scanner.mjs +4 -0
- package/dist/scanner-BuWPDJ4P.mjs +4 -0
- package/dist/scanner-CpsJAHXT.mjs +147 -0
- package/dist/setup-CNGz26qL.mjs +116 -0
- package/dist/setup-N5dttGp_.d.mts +10 -0
- package/dist/setup.d.mts +2 -0
- package/dist/setup.mjs +3 -0
- package/dist/staleness-CnomT9Hm.mjs +72 -0
- package/dist/staleness-DyhsrqQ5.mjs +4 -0
- package/dist/types-kbQfN_is.d.mts +70 -0
- package/dist/utils-DjkEPBxu.mjs +39 -0
- package/meta/domain-discovery/SKILL.md +681 -0
- package/meta/generate-skill/SKILL.md +419 -0
- package/meta/skill-staleness-check/SKILL.md +282 -0
- package/meta/templates/oz/domain-discovery.md +53 -0
- package/meta/templates/oz/feedback-collection.md +69 -0
- package/meta/templates/oz/skill-update.md +47 -0
- package/meta/templates/oz/tree-generation.md +48 -0
- package/meta/templates/workflows/generate-skills-oz.yml +86 -0
- package/meta/templates/workflows/notify-playbooks.yml +52 -0
- package/meta/templates/workflows/update-skills-oz.yml +98 -0
- package/meta/templates/workflows/validate-skills.yml +52 -0
- package/meta/tree-generator/SKILL.md +859 -0
- package/package.json +38 -0
|
@@ -0,0 +1,681 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-domain-discovery
|
|
3
|
+
description: >
|
|
4
|
+
Analyze library documentation and source code, then interview maintainers
|
|
5
|
+
to discover capability domains and task-focused skills for AI coding
|
|
6
|
+
agents. Activate when creating skills for a new library, organizing
|
|
7
|
+
existing documentation into skill categories, or when a maintainer wants
|
|
8
|
+
help deciding how to structure their library's agent-facing knowledge.
|
|
9
|
+
Produces a domain_map.yaml and skill_spec.md that feed directly into
|
|
10
|
+
the skill-tree-generator skill.
|
|
11
|
+
metadata:
|
|
12
|
+
version: '3.0'
|
|
13
|
+
category: meta-tooling
|
|
14
|
+
output_artifacts:
|
|
15
|
+
- skills/_artifacts/domain_map.yaml
|
|
16
|
+
- skills/_artifacts/skill_spec.md
|
|
17
|
+
skills:
|
|
18
|
+
- tree-generator
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Domain Discovery & Maintainer Interview
|
|
22
|
+
|
|
23
|
+
You are extracting domain knowledge for a library to produce a structured
|
|
24
|
+
domain map. Your job is not to summarize documentation — it is to build a
|
|
25
|
+
deep understanding of the library first, then use that understanding to
|
|
26
|
+
surface the implicit knowledge that maintainers carry but docs miss.
|
|
27
|
+
|
|
28
|
+
The output is a set of **task-focused skills** — each one matching a
|
|
29
|
+
specific developer moment ("implement a proxy", "set up auth", "audit
|
|
30
|
+
before launch"). Domains are an intermediate conceptual grouping you use
|
|
31
|
+
during analysis; the final skills emerge from the intersection of domains
|
|
32
|
+
and developer tasks.
|
|
33
|
+
|
|
34
|
+
There are five phases. Always run them in order.
|
|
35
|
+
|
|
36
|
+
1. **Quick scan** — orient yourself (autonomous)
|
|
37
|
+
2. **High-level interview** — extract the maintainer's task map
|
|
38
|
+
3. **Deep read** — fill in failure modes and detail (autonomous)
|
|
39
|
+
4. **Detail interview** — gap-targeted questions, AI-agent failures
|
|
40
|
+
5. **Finalize artifacts**
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Phase 1 — Quick scan (autonomous, ~10 minutes)
|
|
45
|
+
|
|
46
|
+
Orient yourself in the library. You are building a structural map, not
|
|
47
|
+
reading exhaustively yet.
|
|
48
|
+
|
|
49
|
+
### 1a — Read orientation material
|
|
50
|
+
|
|
51
|
+
1. **README** — vocabulary, mental model, what the library does
|
|
52
|
+
2. **Getting started / quickstart** — the happy path
|
|
53
|
+
3. **Package structure** — if monorepo, identify which packages are
|
|
54
|
+
client-facing vs internal. Focus on the 2–3 packages most relevant
|
|
55
|
+
to skill consumers (usually client SDKs and primary framework adapters)
|
|
56
|
+
4. **AGENTS.md or .cursorrules** — if the library already has agent
|
|
57
|
+
guidance, read it. This is high-signal for what the maintainer
|
|
58
|
+
considers important
|
|
59
|
+
|
|
60
|
+
### 1b — Note initial impressions
|
|
61
|
+
|
|
62
|
+
Log (but do not group yet):
|
|
63
|
+
|
|
64
|
+
- What the library does in one sentence
|
|
65
|
+
- The core abstractions a developer interacts with
|
|
66
|
+
- Which frameworks it supports
|
|
67
|
+
- Any existing skill files, agent configs, or playbooks
|
|
68
|
+
- Whether the library is a monorepo and which packages matter
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Phase 2 — High-level interview
|
|
73
|
+
|
|
74
|
+
The maintainer's mental model of developer tasks IS the skill map. Your
|
|
75
|
+
job in this phase is to extract it — not to propose your own structure.
|
|
76
|
+
|
|
77
|
+
### Rules for Phase 2
|
|
78
|
+
|
|
79
|
+
1. One topic per message for open-ended questions. You may batch 2–3
|
|
80
|
+
yes/no or short-confirmation questions together.
|
|
81
|
+
2. Take notes silently. Do not summarize back unless asked.
|
|
82
|
+
3. If the maintainer gives a short answer, probe deeper before moving on.
|
|
83
|
+
|
|
84
|
+
### 2a — Developer tasks (2–4 questions)
|
|
85
|
+
|
|
86
|
+
Start with the maintainer's view of what developers do:
|
|
87
|
+
|
|
88
|
+
> "Walk me through what a developer actually does with your library —
|
|
89
|
+
> not the elevator pitch, but the tasks they come to you for help with,
|
|
90
|
+
> from first install through production."
|
|
91
|
+
|
|
92
|
+
Follow up to enumerate distinct tasks:
|
|
93
|
+
|
|
94
|
+
> "If you listed every distinct thing a developer asks an agent to help
|
|
95
|
+
> with using your library, what would that list look like? I'm thinking
|
|
96
|
+
> things like 'set up the client', 'implement auth', 'debug sync issues'
|
|
97
|
+
> — each one a separate moment where they'd want focused guidance."
|
|
98
|
+
|
|
99
|
+
### 2b — Developer journeys (1–2 questions)
|
|
100
|
+
|
|
101
|
+
Surface lifecycle/journey skills that cross-cut task areas:
|
|
102
|
+
|
|
103
|
+
> "Are there developer journeys that cut across multiple features?
|
|
104
|
+
> For example: a getting-started guide, a go-to-production checklist,
|
|
105
|
+
> a migrate-from-v4 walkthrough. Which of these exist in your docs
|
|
106
|
+
> or would be valuable as standalone skills?"
|
|
107
|
+
|
|
108
|
+
### 2c — Composition and ecosystem (1–2 questions)
|
|
109
|
+
|
|
110
|
+
> "Which other libraries does yours compose with most often? Are there
|
|
111
|
+
> integration patterns important enough to warrant their own skill —
|
|
112
|
+
> for example, using your library with [framework/ORM/router]?"
|
|
113
|
+
|
|
114
|
+
### 2d — Confirm initial skill map
|
|
115
|
+
|
|
116
|
+
Synthesize what you heard into a proposed skill list and present it:
|
|
117
|
+
|
|
118
|
+
> "Based on what you've told me, here's my proposed skill list:
|
|
119
|
+
> [enumerate skills with one-line descriptions]. Does this match how
|
|
120
|
+
> you think about your library? What would you add, remove, or rename?"
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Phase 3 — Deep read (autonomous)
|
|
125
|
+
|
|
126
|
+
You now have the maintainer's task map. Read docs and source to fill
|
|
127
|
+
each skill area with concrete content — failure modes, code patterns,
|
|
128
|
+
gotchas.
|
|
129
|
+
|
|
130
|
+
### Reading order
|
|
131
|
+
|
|
132
|
+
Read in this order. Each step builds context for the next.
|
|
133
|
+
|
|
134
|
+
1. **Every narrative guide** — the how-to content, not API reference tables
|
|
135
|
+
2. **Migration guides** — highest-yield source for failure modes; every
|
|
136
|
+
breaking change is exactly what agents trained on older versions produce
|
|
137
|
+
3. **API reference** — scan for exports, type signatures, option shapes
|
|
138
|
+
4. **Changelog for major versions** — API renames, removed exports,
|
|
139
|
+
behavioral changes
|
|
140
|
+
5. **GitHub issues and discussions** — scan for frequently reported
|
|
141
|
+
confusion, common misunderstandings, recurring questions. Also look
|
|
142
|
+
for what users are implicitly arguing for architecturally — not just
|
|
143
|
+
"people are confused about X" but "users keep expecting X to work
|
|
144
|
+
like Y, which reveals a tension between [design force] and [design force]."
|
|
145
|
+
If no web access, check for FAQ.md, TROUBLESHOOTING.md, or docs/faq
|
|
146
|
+
as proxies.
|
|
147
|
+
6. **Source code** — verify ambiguities from docs, check defaults, find
|
|
148
|
+
assertions and invariant checks. For monorepos, read the 2–3 core
|
|
149
|
+
packages deeply. For adapter packages, read one representative adapter
|
|
150
|
+
deeply, then scan others for deviations from the pattern.
|
|
151
|
+
|
|
152
|
+
### What to log
|
|
153
|
+
|
|
154
|
+
Produce a flat concept inventory. One item per line. No grouping yet.
|
|
155
|
+
|
|
156
|
+
Log every:
|
|
157
|
+
|
|
158
|
+
- Named concept, abstraction, or lifecycle stage
|
|
159
|
+
- Public export: function, hook, class, type, constant
|
|
160
|
+
- Configuration key, its type, and its default value
|
|
161
|
+
- Constraint or invariant (especially any enforced by `throw` or assertion)
|
|
162
|
+
- Doc callout: any "note", "warning", "caution", "important", "avoid", "do not"
|
|
163
|
+
- Dual API: any place the library has two ways to do the same thing (old/new,
|
|
164
|
+
verbose/shorthand, lower-level/higher-level)
|
|
165
|
+
- Environment branch: any place behavior depends on SSR/CSR, dev/prod,
|
|
166
|
+
framework, bundler, or config flag
|
|
167
|
+
- Type gap: any type documented as accepting X but source shows X | Y or
|
|
168
|
+
rejects a subtype of X
|
|
169
|
+
- Source assertion: any `if (!x) throw`, `invariant()`, or `assert()` with
|
|
170
|
+
the error message text
|
|
171
|
+
|
|
172
|
+
### What to extract from migration guides specifically
|
|
173
|
+
|
|
174
|
+
For each breaking change between major versions:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
Old pattern: [code that agents trained on older versions will produce]
|
|
178
|
+
New pattern: [current correct code]
|
|
179
|
+
What changed: [one sentence — the specific mechanism]
|
|
180
|
+
Version boundary: [e.g. "v4 → v5"]
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
These become high-priority failure modes.
|
|
184
|
+
|
|
185
|
+
### 3a — Group concepts into domains
|
|
186
|
+
|
|
187
|
+
Move concept inventory items into groups. Two items belong together when:
|
|
188
|
+
|
|
189
|
+
- A developer reasons about them together when solving a problem
|
|
190
|
+
- Solving one correctly requires understanding how the other works
|
|
191
|
+
- They share a lifecycle, configuration scope, or architectural tradeoff
|
|
192
|
+
- Getting one wrong tends to produce bugs in the other
|
|
193
|
+
|
|
194
|
+
Target 4–7 domains. These are conceptual groupings, not the final skills.
|
|
195
|
+
|
|
196
|
+
Do not create a group for:
|
|
197
|
+
|
|
198
|
+
- A single hook, function, or class
|
|
199
|
+
- A single doc or reference page
|
|
200
|
+
- "Miscellaneous", "Advanced", or "Other"
|
|
201
|
+
- Configuration knobs that only affect another group's behavior
|
|
202
|
+
|
|
203
|
+
Name each domain as work being performed, not what the library provides.
|
|
204
|
+
|
|
205
|
+
### 3b — Map domains × tasks → skills
|
|
206
|
+
|
|
207
|
+
Merge your conceptual domains with the maintainer's task list from
|
|
208
|
+
Phase 2. Each skill should match a specific developer moment while
|
|
209
|
+
carrying the conceptual depth of its parent domain(s).
|
|
210
|
+
|
|
211
|
+
A skill is well-shaped when:
|
|
212
|
+
|
|
213
|
+
- A developer would ask for it by name ("help me set up sync")
|
|
214
|
+
- It covers enough for the agent to complete the task end-to-end
|
|
215
|
+
- It doesn't require loading 3 other skills to be useful
|
|
216
|
+
|
|
217
|
+
Some domains produce multiple skills (a broad domain like "data access"
|
|
218
|
+
might yield "live-queries", "mutations", "offline-sync"). Some tasks
|
|
219
|
+
span domains (a "go-live" checklist touches security, performance, and
|
|
220
|
+
configuration). Both are fine.
|
|
221
|
+
|
|
222
|
+
Also consider:
|
|
223
|
+
|
|
224
|
+
- **Lifecycle/journey skills** — if the library's docs include a
|
|
225
|
+
quickstart guide, go-to-production checklist, or migration path,
|
|
226
|
+
suggest these as standalone skills. Don't force them if the docs
|
|
227
|
+
don't have the material.
|
|
228
|
+
- **Composition skills** — when peer deps or examples show consistent
|
|
229
|
+
co-usage with another library, output a full skill for the
|
|
230
|
+
integration, not a footnote on a domain.
|
|
231
|
+
|
|
232
|
+
### 3c — Flag subsystems within skills
|
|
233
|
+
|
|
234
|
+
Check each skill area for internal diversity. A skill may be
|
|
235
|
+
conceptually unified but contain multiple independent subsystems with
|
|
236
|
+
distinct config interfaces — for example, 5 sync adapters that all
|
|
237
|
+
solve "connectivity" but each with unique setup, options, and failure
|
|
238
|
+
modes.
|
|
239
|
+
|
|
240
|
+
For each skill, ask: "Does this cover 3+ backends, adapters, drivers,
|
|
241
|
+
or providers with distinct configuration surfaces?" If yes, list them
|
|
242
|
+
as `subsystems`. These tell the skill-tree-generator to produce
|
|
243
|
+
per-subsystem reference files.
|
|
244
|
+
|
|
245
|
+
Also flag dense API surfaces — if a topic has >10 distinct operators,
|
|
246
|
+
option shapes, or patterns (e.g. query operators, schema validation
|
|
247
|
+
rules), note it as a `reference_candidates` entry.
|
|
248
|
+
|
|
249
|
+
### 3d — Extract failure modes
|
|
250
|
+
|
|
251
|
+
For each skill, extract failure modes that pass all three tests:
|
|
252
|
+
|
|
253
|
+
- **Plausible** — An agent would generate this because it looks correct
|
|
254
|
+
based on the library's design, a similar API, or an older version
|
|
255
|
+
- **Silent** — No immediate crash; fails at runtime or under specific conditions
|
|
256
|
+
- **Grounded** — Traceable to a specific doc page, source location, or issue
|
|
257
|
+
|
|
258
|
+
**Where to find them:**
|
|
259
|
+
|
|
260
|
+
| Source | What to extract |
|
|
261
|
+
| -------------------- | ------------------------------------------------------------------ |
|
|
262
|
+
| Migration guides | Every breaking change → old pattern is the wrong code |
|
|
263
|
+
| Doc callouts | Any "note", "warning", "avoid" with surrounding context |
|
|
264
|
+
| Source assertions | `throw` and `invariant()` messages describe the failure |
|
|
265
|
+
| Default values | Undocumented or surprising defaults that cause wrong behavior |
|
|
266
|
+
| Type precision | Source type more restrictive than docs imply |
|
|
267
|
+
| Environment branches | `typeof window`, SSR flags, `NODE_ENV` — behavior differs silently |
|
|
268
|
+
|
|
269
|
+
Target 3 failure modes per skill minimum. Complex skills target 5–6.
|
|
270
|
+
|
|
271
|
+
**Cross-skill failure modes.** Some failure modes belong to multiple
|
|
272
|
+
skills. A developer doing SSR work and a developer doing state management
|
|
273
|
+
both need to know about "stale state during hydration" — they load
|
|
274
|
+
different skills but need the same advice. When a failure mode spans
|
|
275
|
+
skills, list all relevant skill slugs in its `skills` field. The
|
|
276
|
+
skill-tree-generator will write it into every corresponding SKILL file.
|
|
277
|
+
|
|
278
|
+
List a cross-skill failure mode once, under its primary skill. Set
|
|
279
|
+
the `skills` field to all skill slugs it applies to. Do not duplicate
|
|
280
|
+
the entry in the YAML — the skill-tree-generator handles duplication
|
|
281
|
+
into multiple SKILL files at generation time.
|
|
282
|
+
|
|
283
|
+
### 3e — Identify cross-skill tensions
|
|
284
|
+
|
|
285
|
+
Look for places where design forces between skills conflict. A tension
|
|
286
|
+
is not a failure mode — it's a structural pull where optimizing for one
|
|
287
|
+
task makes another harder. Examples:
|
|
288
|
+
|
|
289
|
+
- "Getting-started simplicity conflicts with production operational safety"
|
|
290
|
+
- "Type-safety strictness conflicts with rapid prototyping flexibility"
|
|
291
|
+
- "SSR correctness requires patterns that hurt client-side performance"
|
|
292
|
+
|
|
293
|
+
Tensions are where agents fail most because they optimize for one task
|
|
294
|
+
without seeing the tradeoff. Each tension should name the skills in
|
|
295
|
+
conflict, describe the pull, and state what an agent gets wrong when it
|
|
296
|
+
only considers one side.
|
|
297
|
+
|
|
298
|
+
Target 2–4 tensions. If you find none, the skills may be too isolated —
|
|
299
|
+
revisit whether you're missing cross-connections.
|
|
300
|
+
|
|
301
|
+
### 3f — Identify gaps
|
|
302
|
+
|
|
303
|
+
For each skill, explicitly list what you could NOT determine from docs
|
|
304
|
+
and source alone. These become interview questions in Phase 4.
|
|
305
|
+
|
|
306
|
+
Common gaps:
|
|
307
|
+
|
|
308
|
+
- "Docs describe X but don't explain when you'd choose X over Y"
|
|
309
|
+
- "Migration guide mentions this changed but doesn't say what the old
|
|
310
|
+
behavior was"
|
|
311
|
+
- "Source has an assertion here but no doc explains what triggers it"
|
|
312
|
+
- "GitHub issues show confusion about X but docs don't address it"
|
|
313
|
+
- "I found two patterns for doing X — unclear which is current/preferred"
|
|
314
|
+
|
|
315
|
+
### 3g — Discover composition targets
|
|
316
|
+
|
|
317
|
+
Scan `package.json` for peer dependencies, optional dependencies, and
|
|
318
|
+
`peerDependenciesMeta`. Scan example directories and integration tests
|
|
319
|
+
for import patterns. For each frequently co-used library, log:
|
|
320
|
+
|
|
321
|
+
- Library name and which features interact
|
|
322
|
+
- Whether it's a required or optional integration
|
|
323
|
+
- Any example code showing the integration pattern
|
|
324
|
+
|
|
325
|
+
These become targeted composition questions in Phase 4e.
|
|
326
|
+
|
|
327
|
+
### 3h — Produce the draft
|
|
328
|
+
|
|
329
|
+
Write the full `domain_map.yaml` (format in Output Artifacts below) with
|
|
330
|
+
a `status: draft` field. Flag every gap in the `gaps` section.
|
|
331
|
+
|
|
332
|
+
Present the draft to the maintainer before starting Phase 4:
|
|
333
|
+
|
|
334
|
+
> "I've read the docs and source for [library] and produced a draft with
|
|
335
|
+
> [N] skills and [M] failure modes. I've flagged [K] specific gaps where
|
|
336
|
+
> I need your input."
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Phase 4 — Detail interview (builds on Phase 1–3)
|
|
341
|
+
|
|
342
|
+
You have the maintainer's task map and a deep read. The interview now
|
|
343
|
+
fills gaps, validates your understanding, and surfaces implicit knowledge.
|
|
344
|
+
|
|
345
|
+
### Rules for Phase 4
|
|
346
|
+
|
|
347
|
+
1. One topic per message for open-ended questions. You may batch 2–3
|
|
348
|
+
yes/no or short-confirmation questions together.
|
|
349
|
+
2. Each question must reference something specific from your reading.
|
|
350
|
+
3. If the maintainer gives a short answer, probe deeper before moving on.
|
|
351
|
+
4. Take notes silently. Do not summarize back unless asked.
|
|
352
|
+
|
|
353
|
+
### 4a — Draft review (2–3 questions)
|
|
354
|
+
|
|
355
|
+
Start by confirming or correcting your skill list and failure modes:
|
|
356
|
+
|
|
357
|
+
> "Here's the skill list I've built from our earlier conversation plus
|
|
358
|
+
> the deep read: [list skills with brief descriptions]. Does this still
|
|
359
|
+
> match your thinking? Anything to add, remove, or rename?"
|
|
360
|
+
|
|
361
|
+
Follow up on any corrections. Then:
|
|
362
|
+
|
|
363
|
+
> "I identified [M] failure modes from the docs and migration guides. Are
|
|
364
|
+
> there important ones I missed — especially patterns that look correct
|
|
365
|
+
> but fail silently?"
|
|
366
|
+
|
|
367
|
+
### 4b — Gap-targeted questions (3–8 questions)
|
|
368
|
+
|
|
369
|
+
For each gap flagged in Phase 3f, ask a specific question. These are not
|
|
370
|
+
generic — they reference what you found:
|
|
371
|
+
|
|
372
|
+
**Instead of:** "What do developers get wrong?"
|
|
373
|
+
**Ask:** "I noticed the migration guide from v4 to v5 changed how [X] works,
|
|
374
|
+
but the docs don't show the old pattern. Do agents still commonly generate
|
|
375
|
+
the v4 pattern? What does it look like?"
|
|
376
|
+
|
|
377
|
+
**Instead of:** "Are there surprising interactions?"
|
|
378
|
+
**Ask:** "The source throws an invariant error if [X] is called before [Y],
|
|
379
|
+
but the docs don't mention ordering. How often do developers hit this?"
|
|
380
|
+
|
|
381
|
+
**Instead of:** "What's different in SSR vs client?"
|
|
382
|
+
**Ask:** "I found a `typeof window` check in [file] that changes behavior
|
|
383
|
+
for [feature]. What goes wrong when developers test only in the browser
|
|
384
|
+
and deploy with SSR?"
|
|
385
|
+
|
|
386
|
+
Adapt from this bank of gap-targeted question templates:
|
|
387
|
+
|
|
388
|
+
- "I found two patterns for [X] in the docs — [pattern A] and [pattern B].
|
|
389
|
+
Which is current, and does the old one still work?"
|
|
390
|
+
- "The source defaults [config option] to [value], which seems surprising
|
|
391
|
+
for [reason]. Is this intentional? Do developers need to override it?"
|
|
392
|
+
- "GitHub issues show [N] reports of confusion about [X]. What's the
|
|
393
|
+
underlying misunderstanding?"
|
|
394
|
+
- "I couldn't find docs for how [feature A] interacts with [feature B].
|
|
395
|
+
What should an agent know about using them together?"
|
|
396
|
+
- "The API reference shows [type signature], but the guide examples use
|
|
397
|
+
a different shape. Which is accurate?"
|
|
398
|
+
|
|
399
|
+
### 4c — AI-agent-specific failure modes (2–4 questions)
|
|
400
|
+
|
|
401
|
+
These target mistakes that AI coding agents make but human developers
|
|
402
|
+
typically don't. Agent-specific failures are often the highest-value
|
|
403
|
+
findings — in testing, maintainer answers to these questions produced
|
|
404
|
+
the most critical failure modes.
|
|
405
|
+
|
|
406
|
+
- "What mistakes would an AI coding agent make that a human developer
|
|
407
|
+
wouldn't? Think about: hallucinating APIs that don't exist, defaulting
|
|
408
|
+
to language primitives instead of library abstractions, choosing the
|
|
409
|
+
wrong adapter or integration path."
|
|
410
|
+
- "When an agent generates code using your library, what's the first
|
|
411
|
+
thing you'd check? What pattern would make you immediately say
|
|
412
|
+
'an AI wrote this'?"
|
|
413
|
+
- "Are there parts of your API where the naming or design is misleading
|
|
414
|
+
enough that an agent with no prior context would pick the wrong
|
|
415
|
+
approach? What would it pick, and what should it pick instead?"
|
|
416
|
+
- "Are there features where the docs are comprehensive for human
|
|
417
|
+
developers but would still mislead an agent? For example, features
|
|
418
|
+
that require understanding unstated context, or where the 'obvious'
|
|
419
|
+
approach from reading the API surface is wrong."
|
|
420
|
+
|
|
421
|
+
### 4d — Implicit knowledge extraction (3–5 questions)
|
|
422
|
+
|
|
423
|
+
These surface knowledge that doesn't appear in any docs:
|
|
424
|
+
|
|
425
|
+
- "What does a senior developer using your library know that a mid-level
|
|
426
|
+
developer doesn't — something that isn't written down anywhere?"
|
|
427
|
+
- "Are there patterns that work fine for prototyping but are dangerous
|
|
428
|
+
in production? What makes them dangerous?"
|
|
429
|
+
- "What question do you answer most often in Discord or GitHub issues
|
|
430
|
+
that the docs technically cover but people still miss?"
|
|
431
|
+
- "Is there anything you'd change about the API design if you could break
|
|
432
|
+
backwards compatibility? What's the current workaround?"
|
|
433
|
+
|
|
434
|
+
### 4e — Composition questions (if library interacts with others)
|
|
435
|
+
|
|
436
|
+
Use what you discovered in Phase 3g. For each integration target
|
|
437
|
+
identified from peer dependencies and example code, ask targeted
|
|
438
|
+
questions:
|
|
439
|
+
|
|
440
|
+
- "I see [library] is a peer dependency and [N] examples import it
|
|
441
|
+
alongside yours. What's the most common integration mistake?"
|
|
442
|
+
- "When developers use [your library] with [other library], are there
|
|
443
|
+
patterns that only matter when both are present?"
|
|
444
|
+
- "I found [specific integration pattern] in the examples. Is this the
|
|
445
|
+
recommended approach, or is there a better way that isn't documented?"
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## Phase 5 — Finalize artifacts
|
|
450
|
+
|
|
451
|
+
Merge interview findings into the draft. For each interview answer:
|
|
452
|
+
|
|
453
|
+
1. If it confirms a skill or failure mode — no action needed
|
|
454
|
+
2. If it corrects something — update the map
|
|
455
|
+
3. If it adds a new failure mode — add it with source "maintainer interview"
|
|
456
|
+
4. If it reveals a new skill — add it
|
|
457
|
+
5. If it fills a gap — remove from gaps section
|
|
458
|
+
|
|
459
|
+
Update `status: draft` to `status: reviewed`.
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
## Output artifacts
|
|
464
|
+
|
|
465
|
+
If the maintainer uses a custom skills root, replace `skills/` in the paths
|
|
466
|
+
below with their chosen directory.
|
|
467
|
+
|
|
468
|
+
### 1. skills/\_artifacts/domain_map.yaml
|
|
469
|
+
|
|
470
|
+
```yaml
|
|
471
|
+
# domain_map.yaml
|
|
472
|
+
# Generated by skill-domain-discovery
|
|
473
|
+
# Library: [name]
|
|
474
|
+
# Version: [version this map targets]
|
|
475
|
+
# Date: [ISO date]
|
|
476
|
+
# Status: [draft | reviewed]
|
|
477
|
+
|
|
478
|
+
library:
|
|
479
|
+
name: '[package-name]'
|
|
480
|
+
version: '[version]'
|
|
481
|
+
repository: '[repo URL]'
|
|
482
|
+
description: '[one line]'
|
|
483
|
+
primary_framework: '[React | Vue | Svelte | framework-agnostic]'
|
|
484
|
+
|
|
485
|
+
domains:
|
|
486
|
+
- name: '[work-oriented domain name]'
|
|
487
|
+
slug: '[kebab-case]'
|
|
488
|
+
description: '[conceptual grouping — what a developer is reasoning about]'
|
|
489
|
+
|
|
490
|
+
skills:
|
|
491
|
+
- name: '[task-focused skill name]'
|
|
492
|
+
slug: '[kebab-case]'
|
|
493
|
+
domain: '[parent domain slug]'
|
|
494
|
+
description: '[what a developer is doing — matches a specific task/moment]'
|
|
495
|
+
type: '[core | framework | lifecycle | composition]'
|
|
496
|
+
covers:
|
|
497
|
+
- '[API/hook/concept 1]'
|
|
498
|
+
- '[API/hook/concept 2]'
|
|
499
|
+
tasks:
|
|
500
|
+
- '[example task 1]'
|
|
501
|
+
- '[example task 2]'
|
|
502
|
+
- '[example task 3]'
|
|
503
|
+
subsystems: # omit if skill has no independent subsystems
|
|
504
|
+
- name: '[adapter/backend name]'
|
|
505
|
+
package: '[npm package if separate]'
|
|
506
|
+
config_surface: '[brief description of unique config]'
|
|
507
|
+
reference_candidates: # omit if no dense API surfaces
|
|
508
|
+
- topic: '[e.g. query operators, schema validation]'
|
|
509
|
+
reason: '[e.g. >10 distinct operators with signatures]'
|
|
510
|
+
failure_modes:
|
|
511
|
+
- mistake: '[5-10 word phrase]'
|
|
512
|
+
mechanism: '[one sentence]'
|
|
513
|
+
source: '[doc page, source file, issue link, or maintainer interview]'
|
|
514
|
+
priority: '[CRITICAL | HIGH | MEDIUM]'
|
|
515
|
+
status: '[active | fixed-but-legacy-risk | removed]'
|
|
516
|
+
version_context: "[e.g. 'Fixed in v5.2 but agents trained on older code still generate this']"
|
|
517
|
+
skills: ['[this-skill-slug]'] # list all skills this belongs to; omit if single-skill
|
|
518
|
+
compositions:
|
|
519
|
+
- library: '[other library name]'
|
|
520
|
+
skill: '[composition skill name if applicable]'
|
|
521
|
+
|
|
522
|
+
tensions:
|
|
523
|
+
- name: '[short phrase describing the pull]'
|
|
524
|
+
skills: ['[skill-slug-a]', '[skill-slug-b]']
|
|
525
|
+
description: '[what conflicts — one sentence]'
|
|
526
|
+
implication: '[what an agent gets wrong when it only considers one side]'
|
|
527
|
+
|
|
528
|
+
gaps:
|
|
529
|
+
- skill: '[skill slug]'
|
|
530
|
+
question: '[what still needs input]'
|
|
531
|
+
context: '[why this matters]'
|
|
532
|
+
status: '[open | resolved]'
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
### 2. skills/\_artifacts/skill_spec.md
|
|
536
|
+
|
|
537
|
+
A human-readable companion document. Follow this structure:
|
|
538
|
+
|
|
539
|
+
```markdown
|
|
540
|
+
# [Library Name] — Skill Spec
|
|
541
|
+
|
|
542
|
+
[2–3 sentences: what this library is, what problem it solves. Factual,
|
|
543
|
+
not promotional.]
|
|
544
|
+
|
|
545
|
+
## Domains
|
|
546
|
+
|
|
547
|
+
| Domain | Description | Skills |
|
|
548
|
+
| ------ | --------------------- | ----------------------- |
|
|
549
|
+
| [name] | [conceptual grouping] | [skill-1, skill-2, ...] |
|
|
550
|
+
|
|
551
|
+
## Skill Inventory
|
|
552
|
+
|
|
553
|
+
| Skill | Type | Domain | What it covers | Failure modes |
|
|
554
|
+
| ------ | -------------------------------------- | -------- | -------------- | ------------- |
|
|
555
|
+
| [name] | [core/framework/lifecycle/composition] | [domain] | [list] | [count] |
|
|
556
|
+
|
|
557
|
+
## Failure Mode Inventory
|
|
558
|
+
|
|
559
|
+
### [Skill name] ([count] failure modes)
|
|
560
|
+
|
|
561
|
+
| # | Mistake | Priority | Source | Cross-skill? |
|
|
562
|
+
| --- | -------- | -------- | ---------------------- | ------------------------ |
|
|
563
|
+
| 1 | [phrase] | CRITICAL | [doc/source/interview] | [other skill slugs or —] |
|
|
564
|
+
|
|
565
|
+
[Repeat table for each skill.]
|
|
566
|
+
|
|
567
|
+
## Tensions
|
|
568
|
+
|
|
569
|
+
| Tension | Skills | Agent implication |
|
|
570
|
+
| -------------- | ------------------- | ----------------------- |
|
|
571
|
+
| [short phrase] | [slug-a] ↔ [slug-b] | [what agents get wrong] |
|
|
572
|
+
|
|
573
|
+
## Subsystems & Reference Candidates
|
|
574
|
+
|
|
575
|
+
| Skill | Subsystems | Reference candidates |
|
|
576
|
+
| ------ | ------------------------------ | -------------------------- |
|
|
577
|
+
| [slug] | [adapter1, adapter2, ...] or — | [topic needing depth] or — |
|
|
578
|
+
|
|
579
|
+
## Remaining Gaps
|
|
580
|
+
|
|
581
|
+
| Skill | Question | Status |
|
|
582
|
+
| ------ | ------------------------ | ------ |
|
|
583
|
+
| [slug] | [what still needs input] | open |
|
|
584
|
+
|
|
585
|
+
[Omit this section if all gaps were resolved in the interview.]
|
|
586
|
+
|
|
587
|
+
## Recommended Skill File Structure
|
|
588
|
+
|
|
589
|
+
- **Core skills:** [list which skills are framework-agnostic]
|
|
590
|
+
- **Framework skills:** [list per-framework skills needed]
|
|
591
|
+
- **Lifecycle skills:** [list journey/lifecycle skills if applicable]
|
|
592
|
+
- **Composition skills:** [list integration seams needing composition skills]
|
|
593
|
+
- **Reference files:** [list skills needing references/ based on subsystems
|
|
594
|
+
or dense API surfaces]
|
|
595
|
+
|
|
596
|
+
## Composition Opportunities
|
|
597
|
+
|
|
598
|
+
| Library | Integration points | Composition skill needed? |
|
|
599
|
+
| ------- | ------------------ | ----------------------------- |
|
|
600
|
+
| [name] | [what interacts] | [yes/no — if yes, skill name] |
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
---
|
|
604
|
+
|
|
605
|
+
## Constraints
|
|
606
|
+
|
|
607
|
+
| Check | Rule |
|
|
608
|
+
| ------------------------------------- | -------------------------------------------------------------------------- |
|
|
609
|
+
| Quick scan before interview | Never interview without at least reading README and package structure |
|
|
610
|
+
| High-level interview before deep read | The maintainer's task map informs what you read deeply |
|
|
611
|
+
| Batch only confirmations | Yes/no questions may batch 2–3; open-ended questions get their own message |
|
|
612
|
+
| Questions reference findings | No generic questions — cite what you found |
|
|
613
|
+
| Skills are task-focused | Each skill matches a developer moment, not a conceptual area |
|
|
614
|
+
| 3+ failure modes per skill | Complex skills target 5–6 |
|
|
615
|
+
| Every failure mode sourced | Doc page, source file, issue link, or maintainer interview |
|
|
616
|
+
| Gaps are explicit | Unknown areas flagged, not guessed |
|
|
617
|
+
| No marketing prose | Library description is factual, not promotional |
|
|
618
|
+
| domain_map.yaml is valid YAML | Parseable by any YAML parser |
|
|
619
|
+
| Draft before detail interview | Present draft for review before Phase 4 |
|
|
620
|
+
| Agent-specific failures probed | Always ask AI-agent-specific questions in Phase 4c |
|
|
621
|
+
| Compositions discovered from code | Scan peer deps and examples before asking composition questions |
|
|
622
|
+
| Cross-skill failure modes tagged | Failure modes spanning skills list all relevant slugs |
|
|
623
|
+
| Tensions identified | 2–4 cross-skill tensions; if none found, revisit skill boundaries |
|
|
624
|
+
| Subsystems flagged | Skills with 3+ adapters/backends list them as subsystems |
|
|
625
|
+
| Dense surfaces flagged | Topics with >10 patterns noted as reference_candidates |
|
|
626
|
+
| Lifecycle skills considered | Suggest journey skills when docs have the material |
|
|
627
|
+
|
|
628
|
+
---
|
|
629
|
+
|
|
630
|
+
## Cross-model compatibility notes
|
|
631
|
+
|
|
632
|
+
This skill is designed to produce consistent results across Claude, GPT-4+,
|
|
633
|
+
Gemini, and open-source models. To achieve this:
|
|
634
|
+
|
|
635
|
+
- All instructions use imperative sentences, not suggestions
|
|
636
|
+
- Output formats use YAML (universally parsed) and Markdown tables
|
|
637
|
+
(universally rendered)
|
|
638
|
+
- Examples use concrete values, not placeholders like "[your value here]"
|
|
639
|
+
- Section boundaries use Markdown headers (##) for navigation and --- for
|
|
640
|
+
phase separation
|
|
641
|
+
- No model-specific features (no XML tags in output, no tool_use assumptions)
|
|
642
|
+
|
|
643
|
+
---
|
|
644
|
+
|
|
645
|
+
## Meta-skill feedback (alpha default)
|
|
646
|
+
|
|
647
|
+
After finalizing artifacts, create or update a single Markdown feedback draft
|
|
648
|
+
for all three meta skills used in scaffolding. Use this exact template and
|
|
649
|
+
fill only the **Domain Discovery** section now. Leave the other sections in
|
|
650
|
+
place for later steps to complete.
|
|
651
|
+
|
|
652
|
+
```
|
|
653
|
+
# Intent Meta Skill Feedback
|
|
654
|
+
|
|
655
|
+
## Domain Discovery
|
|
656
|
+
- What worked well:
|
|
657
|
+
- What was confusing or missing:
|
|
658
|
+
- Suggestions for improvement:
|
|
659
|
+
- Overall rating: good | mixed | bad
|
|
660
|
+
|
|
661
|
+
## Tree Generator
|
|
662
|
+
- What worked well:
|
|
663
|
+
- What was confusing or missing:
|
|
664
|
+
- Suggestions for improvement:
|
|
665
|
+
- Overall rating: good | mixed | bad
|
|
666
|
+
|
|
667
|
+
## Generate Skill
|
|
668
|
+
- What worked well:
|
|
669
|
+
- What was confusing or missing:
|
|
670
|
+
- Suggestions for improvement:
|
|
671
|
+
- Overall rating: good | mixed | bad
|
|
672
|
+
|
|
673
|
+
## Context (optional)
|
|
674
|
+
- Library:
|
|
675
|
+
- Repo:
|
|
676
|
+
- Docs:
|
|
677
|
+
- Notes:
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
Do not submit feedback yet. Tell the maintainer to carry this draft forward
|
|
681
|
+
to the next meta skill step.
|