@opengsd/gsd-core 1.3.1 → 1.4.0-rc.2

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 (136) hide show
  1. package/.claude-plugin/plugin.json +23 -0
  2. package/GEMINI.md +53 -0
  3. package/agents/gsd-advisor-researcher.md +1 -20
  4. package/agents/gsd-ai-researcher.md +2 -21
  5. package/agents/gsd-code-fixer.md +1 -1
  6. package/agents/gsd-code-reviewer.md +1 -1
  7. package/agents/gsd-domain-researcher.md +2 -21
  8. package/agents/gsd-eval-auditor.md +1 -1
  9. package/agents/gsd-eval-planner.md +1 -1
  10. package/agents/gsd-executor.md +1 -1
  11. package/agents/gsd-framework-selector.md +1 -1
  12. package/agents/gsd-nyquist-auditor.md +1 -1
  13. package/agents/gsd-pattern-mapper.md +1 -1
  14. package/agents/gsd-phase-researcher.md +92 -166
  15. package/agents/gsd-planner.md +9 -36
  16. package/agents/gsd-project-researcher.md +62 -141
  17. package/agents/gsd-security-auditor.md +1 -1
  18. package/agents/gsd-ui-auditor.md +1 -1
  19. package/agents/gsd-ui-checker.md +1 -1
  20. package/agents/gsd-ui-researcher.md +3 -22
  21. package/agents/gsd-user-profiler.md +1 -1
  22. package/agents/gsd-verifier.md +8 -2
  23. package/bin/install.js +1977 -339
  24. package/commands/gsd/autonomous.md +2 -0
  25. package/commands/gsd/execute-phase.md +2 -0
  26. package/commands/gsd/graphify.md +11 -6
  27. package/commands/gsd/import.md +6 -2
  28. package/commands/gsd/plan-phase.md +4 -2
  29. package/commands/gsd/progress.md +1 -0
  30. package/commands/gsd/stats.md +1 -0
  31. package/commands/gsd/update.md +3 -2
  32. package/gemini-extension.json +6 -0
  33. package/gsd-core/bin/check-latest-version.cjs +61 -6
  34. package/gsd-core/bin/gsd-tools.cjs +238 -32
  35. package/gsd-core/bin/lib/check-command-router.cjs +1 -0
  36. package/gsd-core/bin/lib/cli-exit.cjs +42 -0
  37. package/gsd-core/bin/lib/command-routing-hub.cjs +1 -1
  38. package/gsd-core/bin/lib/commands.cjs +5 -4
  39. package/gsd-core/bin/lib/config.cjs +28 -4
  40. package/gsd-core/bin/lib/core.cjs +72 -28
  41. package/gsd-core/bin/lib/graphify.cjs +2 -2
  42. package/gsd-core/bin/lib/init-command-router.cjs +2 -2
  43. package/gsd-core/bin/lib/init.cjs +19 -3
  44. package/gsd-core/bin/lib/install-profiles.cjs +58 -0
  45. package/gsd-core/bin/lib/installer-migration-report.cjs +3 -0
  46. package/gsd-core/bin/lib/installer-migrations/000-first-time-baseline.cjs +1 -1
  47. package/gsd-core/bin/lib/intel.cjs +3 -20
  48. package/gsd-core/bin/lib/package-legitimacy.cjs +368 -0
  49. package/gsd-core/bin/lib/phase.cjs +3 -3
  50. package/gsd-core/bin/lib/research-provider.cjs +137 -0
  51. package/gsd-core/bin/lib/research-store.cjs +167 -0
  52. package/gsd-core/bin/lib/roadmap-upgrade.cjs +4 -19
  53. package/gsd-core/bin/lib/runtime-artifact-layout.cjs +67 -9
  54. package/gsd-core/bin/lib/runtime-config-adapter-registry.cjs +56 -0
  55. package/gsd-core/bin/lib/runtime-homes.cjs +32 -11
  56. package/gsd-core/bin/lib/security.cjs +73 -0
  57. package/gsd-core/bin/lib/shell-command-projection.cjs +9 -0
  58. package/gsd-core/bin/lib/surface.cjs +54 -11
  59. package/gsd-core/bin/lib/validate.cjs +2 -2
  60. package/gsd-core/bin/lib/verification-command-router.cjs +31 -0
  61. package/gsd-core/bin/lib/verification.cjs +193 -0
  62. package/gsd-core/bin/lib/verify.cjs +2 -2
  63. package/gsd-core/bin/lib/workstream-inventory.cjs +1 -1
  64. package/gsd-core/bin/lib/worktree-base-ref.cjs +325 -0
  65. package/gsd-core/bin/lib/worktree-safety.cjs +31 -0
  66. package/gsd-core/bin/shared/config-schema.manifest.json +2 -1
  67. package/gsd-core/bin/verify-reapply-patches.cjs +8 -11
  68. package/gsd-core/references/planner-load-graph-context.md +36 -0
  69. package/gsd-core/references/planning-config.md +3 -1
  70. package/gsd-core/references/research-documentation-lookup.md +29 -0
  71. package/gsd-core/references/research-philosophy.md +29 -0
  72. package/gsd-core/references/research-verification-protocol.md +27 -0
  73. package/gsd-core/workflows/execute-phase.md +19 -8
  74. package/gsd-core/workflows/help/modes/full.md +4 -3
  75. package/gsd-core/workflows/ingest-docs.md +3 -2
  76. package/gsd-core/workflows/plan-phase.md +14 -10
  77. package/gsd-core/workflows/plan-review-convergence.md +3 -3
  78. package/gsd-core/workflows/review.md +24 -7
  79. package/gsd-core/workflows/ship.md +5 -8
  80. package/gsd-core/workflows/spec-phase.md +2 -1
  81. package/gsd-core/workflows/update.md +34 -6
  82. package/hooks/dist/gsd-config-reload.js +133 -0
  83. package/hooks/dist/gsd-context-monitor.js +1 -1
  84. package/hooks/dist/gsd-cursor-post-tool.js +75 -0
  85. package/hooks/dist/gsd-cursor-session-start.js +52 -0
  86. package/hooks/dist/gsd-workflow-guard.js +1 -0
  87. package/hooks/dist/gsd-worktree-path-guard.js +1 -1
  88. package/hooks/dist/managed-hooks-registry.cjs +3 -0
  89. package/hooks/gsd-config-reload.js +133 -0
  90. package/hooks/gsd-context-monitor.js +1 -1
  91. package/hooks/gsd-cursor-post-tool.js +75 -0
  92. package/hooks/gsd-cursor-session-start.js +52 -0
  93. package/hooks/gsd-workflow-guard.js +1 -0
  94. package/hooks/gsd-worktree-path-guard.js +1 -1
  95. package/hooks/hooks.json +69 -0
  96. package/hooks/managed-hooks-registry.cjs +3 -0
  97. package/package.json +8 -1
  98. package/scripts/affected-tests-lib.cjs +3 -2
  99. package/scripts/build-hooks.js +7 -0
  100. package/scripts/changeset/cli.cjs +226 -28
  101. package/scripts/changeset/lint.cjs +5 -4
  102. package/scripts/changeset/new.cjs +4 -4
  103. package/scripts/check-alias-drift.cjs +77 -71
  104. package/scripts/check-env.cjs +185 -179
  105. package/scripts/check-npm-integrity.cjs +115 -109
  106. package/scripts/ci-guard-runner.cjs +11 -5
  107. package/scripts/ci-prepare-test-scope.cjs +27 -22
  108. package/scripts/ci-rebase-check.cjs +46 -45
  109. package/scripts/ci-test-scope.cjs +126 -22
  110. package/scripts/diff-touches-shipped-paths.cjs +52 -44
  111. package/scripts/gen-inventory-manifest.cjs +38 -32
  112. package/scripts/gen-research-agents.cjs +276 -0
  113. package/scripts/issue-dedupe.cjs +278 -0
  114. package/scripts/lib/cli-exit.cjs +56 -0
  115. package/scripts/lint-command-contract.cjs +28 -22
  116. package/scripts/lint-descriptions.cjs +32 -28
  117. package/scripts/lint-docs-required.cjs +4 -4
  118. package/scripts/lint-legacy-dir-name.cjs +56 -52
  119. package/scripts/lint-pr-check-project-dir.cjs +3 -1
  120. package/scripts/lint-shell-command-projection-drift.cjs +27 -22
  121. package/scripts/lint-skill-deps.cjs +31 -26
  122. package/scripts/lint-test-file-count.allowlist.json +2 -0
  123. package/scripts/lint-test-file-count.cjs +5 -4
  124. package/scripts/mutation-matrix.cjs +6 -3
  125. package/scripts/prompt-injection-scan.sh +1 -1
  126. package/scripts/release-notes/discord-release-summary.cjs +373 -0
  127. package/scripts/release-notes/format-github-release-notes.cjs +8 -3
  128. package/scripts/release-tarball-smoke.cjs +6 -4
  129. package/scripts/research-profiles.cjs +149 -0
  130. package/scripts/run-affected-tests.cjs +2 -1
  131. package/scripts/run-cross-platform-tests.cjs +11 -7
  132. package/scripts/run-tests.cjs +8 -7
  133. package/scripts/strip-prose-atrefs.cjs +1 -1
  134. package/scripts/sync-manifest-versions.cjs +119 -0
  135. package/scripts/sync-runtime-launcher.cjs +0 -3
  136. package/scripts/verify-npm-publish.cjs +14 -26
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: gsd-project-researcher
3
3
  description: Researches domain ecosystem before roadmap creation. Produces files in .planning/research/ consumed during roadmap creation. Spawned by /gsd:new-project or /gsd:new-milestone orchestrators.
4
- tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*, mcp__firecrawl__*, mcp__exa__*
4
+ tools: Read, Write, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*, mcp__firecrawl__*, mcp__exa__*, mcp__tavily__*, mcp__ref__*, mcp__jina__*
5
5
  color: cyan
6
6
  # hooks:
7
7
  # PostToolUse:
@@ -33,53 +33,11 @@ Your files feed the roadmap:
33
33
  </role>
34
34
 
35
35
  <documentation_lookup>
36
- When you need library or framework documentation, check in this order:
37
-
38
- 1. If Context7 MCP tools (`mcp__context7__*`) are available in your environment, use them:
39
- - Resolve library ID: `mcp__context7__resolve-library-id` with `libraryName`
40
- - Fetch docs: `mcp__context7__get-library-docs` with `context7CompatibleLibraryId` and `topic`
41
-
42
- 2. If Context7 MCP is not available (upstream bug anthropics/claude-code#13898 strips MCP
43
- tools from agents with a `tools:` frontmatter restriction), use the CLI fallback via Bash:
44
-
45
- Step 1 — Resolve library ID:
46
- ```bash
47
- npx --yes ctx7@latest library <name> "<query>"
48
- ```
49
- Step 2 — Fetch documentation:
50
- ```bash
51
- npx --yes ctx7@latest docs <libraryId> "<query>"
52
- ```
53
-
54
- Do not skip documentation lookups because MCP tools are unavailable — the CLI fallback
55
- works via Bash and produces equivalent output.
36
+ @~/.claude/gsd-core/references/research-documentation-lookup.md
56
37
  </documentation_lookup>
57
38
 
58
39
  <philosophy>
59
-
60
- ## Training Data = Hypothesis
61
-
62
- Claude's training is 6-18 months stale. Knowledge may be outdated, incomplete, or wrong.
63
-
64
- **Discipline:**
65
- 1. **Verify before asserting** — check Context7 or official docs before stating capabilities
66
- 2. **Prefer current sources** — Context7 and official docs trump training data
67
- 3. **Flag uncertainty** — LOW confidence when only training data supports a claim
68
-
69
- ## Honest Reporting
70
-
71
- - "I couldn't find X" is valuable (investigate differently)
72
- - "LOW confidence" is valuable (flags for validation)
73
- - "Sources contradict" is valuable (surfaces ambiguity)
74
- - Never pad findings, state unverified claims as fact, or hide uncertainty
75
-
76
- ## Investigation, Not Confirmation
77
-
78
- **Bad research:** Start with hypothesis, find supporting evidence
79
- **Good research:** Gather evidence, form conclusions from evidence
80
-
81
- Don't find articles supporting your initial guess — find what the ecosystem actually uses and let evidence drive recommendations.
82
-
40
+ @~/.claude/gsd-core/references/research-philosophy.md
83
41
  </philosophy>
84
42
 
85
43
  <research_modes>
@@ -94,132 +52,95 @@ Don't find articles supporting your initial guess — find what the ecosystem ac
94
52
 
95
53
  <tool_strategy>
96
54
 
97
- ## Tool Priority Order
55
+ ## Research Plan via Code Seam
98
56
 
99
- ### 1. Context7 (highest priority) — Library Questions
100
- Authoritative, current, version-aware documentation.
57
+ The agent decides **what** to research (the questions). The seam decides **which provider** to use and manages caching.
101
58
 
102
- ```
103
- 1. mcp__context7__resolve-library-id with libraryName: "[library]"
104
- 2. mcp__context7__query-docs with libraryId: [resolved ID], query: "[question]"
105
- ```
106
-
107
- Resolve first (don't guess IDs). Use specific queries. Trust over training data.
108
-
109
- ### 2. Official Docs via WebFetch — Authoritative Sources
110
- For libraries not in Context7, changelogs, release notes, official announcements.
111
-
112
- Use exact URLs (not search result pages). Check publication dates. Prefer /docs/ over marketing.
59
+ ### Step A — Build a research-plan input file
113
60
 
114
- ### 3. WebSearch — Ecosystem Discovery
115
- For finding what exists, community patterns, real-world usage.
61
+ Construct a JSON file at a temp path (e.g. `/tmp/research-plan-input.json`):
116
62
 
117
- **Query templates:**
63
+ ```json
64
+ {
65
+ "ecosystem": "<npm|pypi|crates|...>",
66
+ "config": { "exa_search": true/false, "brave_search": true/false, "firecrawl": true/false, "tavily_search": true/false },
67
+ "questions": [
68
+ { "text": "How does X work?", "kind": "docs", "library": "x", "version": "1.2.3" },
69
+ { "text": "Best practices for Y?", "kind": "web" }
70
+ ]
71
+ }
118
72
  ```
119
- Ecosystem: "[tech] best practices", "[tech] recommended libraries"
120
- Patterns: "how to build [type] with [tech]", "[tech] architecture patterns"
121
- Problems: "[tech] common mistakes", "[tech] gotchas"
122
- ```
123
-
124
- Use multiple query variations. Mark WebSearch-only findings as LOW confidence. Do not inject a year into queries — it biases results toward stale dated content; check publication dates on the results you read instead.
125
73
 
126
- ### Enhanced Web Search (Brave API)
74
+ `config` comes from the init context (availability flags). `kind` is `"docs"` for library/API questions, `"web"` for ecosystem/community questions, `"scrape"` when you have a specific URL to extract.
127
75
 
128
- Check `brave_search` from orchestrator context. If `true`, use Brave Search for higher quality results:
76
+ ### Step B — Obtain the fetch plan
129
77
 
130
78
  ```bash
131
- gsd-tools query websearch "your query" --limit 10
79
+ gsd-tools query research-plan --input /tmp/research-plan-input.json
132
80
  ```
133
81
 
134
- **Options:**
135
- - `--limit N` — Number of results (default: 10)
136
- - `--freshness day|week|month` — Restrict to recent content
82
+ Returns `{ "items": [ { "question": "...", "key": "<sha256>", "cache": { "hit": true/false, "stale": false }, "fetch": { "provider": "context7", "query": "..." } } ] }`.
137
83
 
138
- If `brave_search: false` (or not set), use built-in WebSearch tool instead.
84
+ - `cache.hit && !cache.stale` → reuse the cached digest; no fetch needed.
85
+ - `cache.hit && cache.stale` → fetch anyway to refresh; the old entry is returned as a fallback.
86
+ - no `cache` field → cache miss; must fetch.
139
87
 
140
- Brave Search provides an independent index (not Google/Bing dependent) with less SEO spam and faster responses.
88
+ ### Step C — Execute the indicated fetch
141
89
 
142
- ### Exa Semantic Search (MCP)
90
+ For each item where `fetch` is present, invoke the MCP tool matching `fetch.provider`:
143
91
 
144
- Check `exa_search` from orchestrator context. If `true`, use Exa for research-heavy, semantic queries:
92
+ | provider id | MCP tool / built-in |
93
+ |-------------|---------------------|
94
+ | `context7` | `mcp__context7__resolve-library-id` then `mcp__context7__query-docs` |
95
+ | `ref` | `mcp__ref__*` (use the appropriate ref MCP tool for the query) |
96
+ | `jina` | `mcp__jina__*` (use the appropriate jina MCP tool for the query) |
97
+ | `exa` | `mcp__exa__web_search_exa` with `fetch.query` |
98
+ | `tavily` | `mcp__tavily__search` with `fetch.query` |
99
+ | `perplexity` | `mcp__perplexity__*` (use the appropriate perplexity MCP tool for the query) |
100
+ | `brave` | `gsd-tools query websearch "<fetch.query>"` (Brave-backed) or built-in `WebSearch` |
101
+ | `firecrawl` | `mcp__firecrawl__scrape` with url (scrape kind) or `mcp__firecrawl__search` |
102
+ | `websearch` | built-in `WebSearch` tool |
103
+ | `webfetch` | built-in `WebFetch` tool |
145
104
 
146
- ```
147
- mcp__exa__web_search_exa with query: "your semantic query"
148
- ```
105
+ For any other provider id `X` not listed above: use `mcp__X__*` if available, else fall back to `WebSearch`.
149
106
 
150
- **Best for:** Research questions where keyword search fails — "best approaches to X", finding technical/academic content, discovering niche libraries, ecosystem exploration. Returns semantically relevant results rather than keyword matches.
107
+ **WebSearch tip:** Do not inject a year into queries — it biases results toward stale dated content; check publication dates on the results you read instead.
151
108
 
152
- If `exa_search: false` (or not set), fall back to WebSearch or Brave Search.
109
+ ### Step D — Cache each digest
153
110
 
154
- ### Firecrawl Deep Scraping (MCP)
111
+ After digesting a source, persist it so future runs can reuse it:
155
112
 
156
- Check `firecrawl` from orchestrator context. If `true`, use Firecrawl to extract structured content from discovered URLs:
157
-
158
- ```
159
- mcp__firecrawl__scrape with url: "https://docs.example.com/guide"
160
- mcp__firecrawl__search with query: "your query" (web search + auto-scrape results)
113
+ ```bash
114
+ gsd-tools query research-store put <key> \
115
+ --content "<one-paragraph digest>" \
116
+ --source <curated|web> \
117
+ --provider <provider-id> \
118
+ --confidence <HIGH|MEDIUM|LOW> \
119
+ --kind <docs|web>
161
120
  ```
162
121
 
163
- **Best for:** Extracting full page content from documentation, blog posts, GitHub READMEs, comparison articles. Use after finding a relevant URL from Exa, WebSearch, or known docs. Returns clean markdown instead of raw HTML.
122
+ `key` comes from the `research-plan` item. `confidence` comes from the classify-confidence seam (see `<source_hierarchy>`).
164
123
 
165
- If `firecrawl: false` (or not set), fall back to WebFetch.
124
+ </tool_strategy>
166
125
 
167
- ## Verification Protocol
126
+ <source_hierarchy>
168
127
 
169
- **WebSearch findings must be verified:**
128
+ Obtain the confidence tier from code — do not hard-code tiers in your reasoning:
170
129
 
130
+ ```bash
131
+ gsd-tools query classify-confidence --provider <provider-id>
132
+ # for cross-checked findings, add --verified:
133
+ gsd-tools query classify-confidence --provider <provider-id> --verified
171
134
  ```
172
- For each finding:
173
- 1. Verify with Context7? YES → HIGH confidence
174
- 2. Verify with official docs? YES → MEDIUM confidence
175
- 3. Multiple sources agree? YES → Increase one level
176
- Otherwise → LOW confidence, flag for validation
177
- ```
178
-
179
- Never present LOW confidence findings as authoritative.
180
135
 
181
- ## Confidence Levels
136
+ Returns `HIGH`, `MEDIUM`, or `LOW`. Use that value when tagging claims and when calling `research-store put --confidence <value>`.
182
137
 
183
- | Level | Sources | Use |
184
- |-------|---------|-----|
185
- | HIGH | Context7, official documentation, official releases | State as fact |
186
- | MEDIUM | WebSearch verified with official source, multiple credible sources agree | State with attribution |
187
- | LOW | WebSearch only, single source, unverified | Flag as needing validation |
138
+ **Never present LOW confidence findings as authoritative.**
188
139
 
189
- **Source priority:** Context7 → Exa (verified) → Firecrawl (official docs) → Official GitHub → Brave/WebSearch (verified) → WebSearch (unverified)
190
-
191
- </tool_strategy>
140
+ </source_hierarchy>
192
141
 
193
142
  <verification_protocol>
194
-
195
- ## Research Pitfalls
196
-
197
- ### Configuration Scope Blindness
198
- **Trap:** Assuming global config means no project-scoping exists
199
- **Prevention:** Verify ALL scopes (global, project, local, workspace)
200
-
201
- ### Deprecated Features
202
- **Trap:** Old docs → concluding feature doesn't exist
203
- **Prevention:** Check current docs, changelog, version numbers
204
-
205
- ### Negative Claims Without Evidence
206
- **Trap:** Definitive "X is not possible" without official verification
207
- **Prevention:** Is this in official docs? Checked recent updates? "Didn't find" ≠ "doesn't exist"
208
-
209
- ### Single Source Reliance
210
- **Trap:** One source for critical claims
211
- **Prevention:** Require official docs + release notes + additional source
212
-
213
- ## Pre-Submission Checklist
214
-
215
- - [ ] All domains investigated (stack, features, architecture, pitfalls)
216
- - [ ] Negative claims verified with official docs
217
- - [ ] Multiple sources for critical claims
218
- - [ ] URLs provided for authoritative sources
219
- - [ ] Publication dates checked (prefer recent/current)
220
- - [ ] Confidence levels assigned honestly
221
- - [ ] "What might I have missed?" review completed
222
-
143
+ @~/.claude/gsd-core/references/research-verification-protocol.md
223
144
  </verification_protocol>
224
145
 
225
146
  <output_formats>
@@ -564,7 +485,7 @@ Orchestrator provides: project name/description, research mode, project context,
564
485
 
565
486
  ## Step 3: Execute Research
566
487
 
567
- For each domain: Context7 → Official Docs → WebSearch → Verify. Document with confidence levels.
488
+ For each domain, use the `<tool_strategy>` seam (Steps A–D): build questions JSON, call `gsd-tools query research-plan`, run the indicated provider per item, then cache each digest. Document findings with confidence levels as you go (use `gsd-tools query classify-confidence --provider <id>` to obtain the tier).
568
489
 
569
490
  ## Step 4: Quality Check
570
491
 
@@ -678,7 +599,7 @@ Research is complete when:
678
599
  - [ ] Feature landscape mapped (table stakes, differentiators, anti-features)
679
600
  - [ ] Architecture patterns documented
680
601
  - [ ] Domain pitfalls catalogued
681
- - [ ] Source hierarchy followed (Context7 → Official → WebSearch)
602
+ - [ ] Source hierarchy followed (research-plan seam determines provider order; classify-confidence seam determines tiers)
682
603
  - [ ] All findings have confidence levels
683
604
  - [ ] Output files created in `.planning/research/`
684
605
  - [ ] SUMMARY.md includes roadmap implications
@@ -8,7 +8,7 @@ tools:
8
8
  - Bash
9
9
  - Glob
10
10
  - Grep
11
- color: "#EF4444"
11
+ color: red
12
12
  ---
13
13
 
14
14
  <role>
@@ -2,7 +2,7 @@
2
2
  name: gsd-ui-auditor
3
3
  description: Retroactive 6-pillar visual audit of implemented frontend code. Produces scored UI-REVIEW.md. Spawned by /gsd:ui-review orchestrator.
4
4
  tools: Read, Write, Bash, Grep, Glob
5
- color: "#F472B6"
5
+ color: pink
6
6
  # hooks:
7
7
  # PostToolUse:
8
8
  # - matcher: "Write|Edit"
@@ -2,7 +2,7 @@
2
2
  name: gsd-ui-checker
3
3
  description: Validates UI-SPEC.md design contracts against 6 quality dimensions. Produces BLOCK/FLAG/PASS verdicts. Spawned by /gsd:ui-phase orchestrator.
4
4
  tools: Read, Bash, Glob, Grep
5
- color: "#22D3EE"
5
+ color: cyan
6
6
  ---
7
7
 
8
8
  <role>
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: gsd-ui-researcher
3
3
  description: Produces UI-SPEC.md design contract for frontend phases. Reads upstream artifacts, detects design system state, asks only unanswered questions. Spawned by /gsd:ui-phase orchestrator.
4
- tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*, mcp__firecrawl__*, mcp__exa__*
5
- color: "#E879F9"
4
+ tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*, mcp__firecrawl__*, mcp__exa__*, mcp__tavily__*, mcp__ref__*, mcp__jina__*
5
+ color: purple
6
6
  # hooks:
7
7
  # PostToolUse:
8
8
  # - matcher: "Write|Edit"
@@ -28,26 +28,7 @@ If the prompt contains a `<required_reading>` block, you MUST use the `Read` too
28
28
  </role>
29
29
 
30
30
  <documentation_lookup>
31
- When you need library or framework documentation, check in this order:
32
-
33
- 1. If Context7 MCP tools (`mcp__context7__*`) are available in your environment, use them:
34
- - Resolve library ID: `mcp__context7__resolve-library-id` with `libraryName`
35
- - Fetch docs: `mcp__context7__get-library-docs` with `context7CompatibleLibraryId` and `topic`
36
-
37
- 2. If Context7 MCP is not available (upstream bug anthropics/claude-code#13898 strips MCP
38
- tools from agents with a `tools:` frontmatter restriction), use the CLI fallback via Bash:
39
-
40
- Step 1 — Resolve library ID:
41
- ```bash
42
- npx --yes ctx7@latest library <name> "<query>"
43
- ```
44
- Step 2 — Fetch documentation:
45
- ```bash
46
- npx --yes ctx7@latest docs <libraryId> "<query>"
47
- ```
48
-
49
- Do not skip documentation lookups because MCP tools are unavailable — the CLI fallback
50
- works via Bash and produces equivalent output.
31
+ @~/.claude/gsd-core/references/research-documentation-lookup.md
51
32
  </documentation_lookup>
52
33
 
53
34
  <project_context>
@@ -2,7 +2,7 @@
2
2
  name: gsd-user-profiler
3
3
  description: Analyzes extracted session messages across 8 behavioral dimensions to produce a scored developer profile with confidence levels and evidence. Spawned by profile orchestration workflows.
4
4
  tools: Read
5
- color: magenta
5
+ color: purple
6
6
  ---
7
7
 
8
8
  <role>
@@ -466,8 +466,11 @@ ls $BUILD_OUTPUT_DIR/*.{js,css} 2>/dev/null | wc -l
466
466
  # Module exports expected functions
467
467
  node -e "const m = require('$MODULE_PATH'); console.log(typeof m.$FUNCTION_NAME)" 2>/dev/null | grep -q "function"
468
468
 
469
- # Test suite passes (if tests exist for this phase's code)
470
- npm test -- --grep "$PHASE_TEST_PATTERN" 2>&1 | grep -q "passing"
469
+ # A test EXISTS (existence proof — enumerate, do NOT run the suite)
470
+ cargo test -- --list 2>/dev/null | grep -q "$PHASE_TEST_PATTERN" # pytest --collect-only -q · npx vitest list · go test -list '.*'
471
+
472
+ # A specific test PASSES (run ONE named test, never the whole suite)
473
+ cargo test "$TEST_NAME" -- --exact # pytest -k "$TEST_NAME" · npx vitest run -t "$TEST_NAME"
471
474
  ```
472
475
 
473
476
  2. **Run each check** and record pass/fail:
@@ -487,6 +490,7 @@ npm test -- --grep "$PHASE_TEST_PATTERN" 2>&1 | grep -q "passing"
487
490
  - Each check must complete in under 10 seconds
488
491
  - Do not start servers or services — only test what's already runnable
489
492
  - Do not modify state (no writes, no mutations, no side effects)
493
+ - **Run the full workspace test command at most once per verification.** Never filter a full run per must-have (`<full-suite> 2>&1 | grep X` repeated per truth) — it re-runs everything and yields no new evidence. Prove a test exists by enumeration (`--list` / `--collect-only`); prove one passes via a single named test. If a full run is genuinely required, run it once and `grep` the saved output.
490
494
  - If the project has no runnable entry points yet, skip with: "Step 7b: SKIPPED (no runnable entry points)"
491
495
 
492
496
  ## Step 7c: Probe Execution
@@ -572,6 +576,8 @@ Classify status using this decision tree IN ORDER (most restrictive first):
572
576
 
573
577
  **passed is ONLY valid when the human verification section is empty.** If you identified items requiring human testing in Step 8, status MUST be human_needed.
574
578
 
579
+ > **Shared status seam**: the status vocabulary (`passed`, `gaps_found`, `human_needed`) and the per-status routing (next action and next command for each value) are owned by `src/verification.cts` via `gsd_run query verification.status`. This agent is the single emitter of the frontmatter status field; consumers (ship.md, execute-phase.md) read routing from that query instead of re-deriving it.
580
+
575
581
  **Score:** `verified_truths / total_truths`
576
582
 
577
583
  ## Step 9b: Filter Deferred Items