@cubis/foundry 0.3.71 → 0.3.72
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/CHANGELOG.md +15 -0
- package/dist/cli/core.js +4 -18
- package/dist/cli/core.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/core.ts +4 -18
- package/workflows/powers/accessibility/POWER.md +83 -94
- package/workflows/powers/accessibility/SKILL.md +82 -94
- package/workflows/powers/agent-design/POWER.md +201 -0
- package/workflows/powers/agent-design/SKILL.md +198 -0
- package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/powers/agent-design/references/skill-testing.md +164 -0
- package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/powers/agentic-eval/POWER.md +62 -0
- package/workflows/powers/agentic-eval/SKILL.md +59 -0
- package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
- package/workflows/powers/api-designer/POWER.md +43 -71
- package/workflows/powers/api-designer/SKILL.md +43 -71
- package/workflows/powers/api-patterns/POWER.md +42 -56
- package/workflows/powers/api-patterns/SKILL.md +42 -57
- package/workflows/powers/architecture-designer/POWER.md +43 -60
- package/workflows/powers/architecture-designer/SKILL.md +43 -60
- package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
- package/workflows/powers/auth-architect/POWER.md +69 -0
- package/workflows/powers/auth-architect/SKILL.md +66 -0
- package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
- package/workflows/powers/behavioral-modes/POWER.md +100 -9
- package/workflows/powers/c-pro/POWER.md +105 -0
- package/workflows/powers/c-pro/SKILL.md +102 -0
- package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
- package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
- package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
- package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
- package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
- package/workflows/powers/changelog-generator/POWER.md +127 -63
- package/workflows/powers/changelog-generator/SKILL.md +126 -63
- package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
- package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
- package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
- package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
- package/workflows/powers/cli-developer/POWER.md +152 -95
- package/workflows/powers/cli-developer/SKILL.md +152 -95
- package/workflows/powers/cpp-pro/POWER.md +111 -0
- package/workflows/powers/cpp-pro/SKILL.md +108 -0
- package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
- package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
- package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
- package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
- package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
- package/workflows/powers/csharp-pro/POWER.md +47 -22
- package/workflows/powers/csharp-pro/SKILL.md +47 -22
- package/workflows/powers/dart-pro/POWER.md +68 -0
- package/workflows/powers/dart-pro/SKILL.md +65 -0
- package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
- package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
- package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
- package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
- package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
- package/workflows/powers/database-design/POWER.md +47 -33
- package/workflows/powers/database-design/SKILL.md +47 -33
- package/workflows/powers/database-optimizer/POWER.md +43 -64
- package/workflows/powers/database-optimizer/SKILL.md +43 -64
- package/workflows/powers/database-skills/POWER.md +59 -93
- package/workflows/powers/database-skills/SKILL.md +59 -93
- package/workflows/powers/debugging-strategies/POWER.md +69 -0
- package/workflows/powers/debugging-strategies/SKILL.md +66 -0
- package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
- package/workflows/powers/deep-research/POWER.md +67 -0
- package/workflows/powers/deep-research/SKILL.md +64 -0
- package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
- package/workflows/powers/design-system-builder/POWER.md +130 -116
- package/workflows/powers/design-system-builder/SKILL.md +130 -116
- package/workflows/powers/devops-engineer/POWER.md +120 -57
- package/workflows/powers/devops-engineer/SKILL.md +120 -57
- package/workflows/powers/docker-kubernetes/POWER.md +94 -0
- package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
- package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
- package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
- package/workflows/powers/documentation-templates/POWER.md +158 -127
- package/workflows/powers/documentation-templates/SKILL.md +158 -127
- package/workflows/powers/drizzle-expert/POWER.md +66 -0
- package/workflows/powers/drizzle-expert/SKILL.md +63 -0
- package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
- package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
- package/workflows/powers/error-ux-observability/POWER.md +144 -131
- package/workflows/powers/error-ux-observability/SKILL.md +143 -131
- package/workflows/powers/fastapi-expert/POWER.md +46 -60
- package/workflows/powers/fastapi-expert/SKILL.md +46 -60
- package/workflows/powers/firebase/POWER.md +65 -0
- package/workflows/powers/firebase/SKILL.md +62 -0
- package/workflows/powers/firebase/references/platform-routing.md +16 -0
- package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
- package/workflows/powers/flutter-design-system/POWER.md +63 -0
- package/workflows/powers/flutter-design-system/SKILL.md +60 -0
- package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
- package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
- package/workflows/powers/flutter-drift/POWER.md +65 -0
- package/workflows/powers/flutter-drift/SKILL.md +62 -0
- package/workflows/powers/flutter-drift/references/migrations.md +22 -0
- package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
- package/workflows/powers/flutter-feature/POWER.md +65 -0
- package/workflows/powers/flutter-feature/SKILL.md +62 -0
- package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
- package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
- package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
- package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
- package/workflows/powers/flutter-go-router/POWER.md +64 -0
- package/workflows/powers/flutter-go-router/SKILL.md +61 -0
- package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
- package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
- package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
- package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
- package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
- package/workflows/powers/flutter-repository/POWER.md +64 -0
- package/workflows/powers/flutter-repository/SKILL.md +61 -0
- package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
- package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
- package/workflows/powers/flutter-riverpod/POWER.md +70 -0
- package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
- package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
- package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
- package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
- package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
- package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
- package/workflows/powers/flutter-state-machine/POWER.md +62 -0
- package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
- package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
- package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
- package/workflows/powers/flutter-testing/POWER.md +64 -0
- package/workflows/powers/flutter-testing/SKILL.md +61 -0
- package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
- package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
- package/workflows/powers/frontend-code-review/POWER.md +137 -0
- package/workflows/powers/frontend-code-review/SKILL.md +134 -0
- package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
- package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
- package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
- package/workflows/powers/frontend-design/POWER.md +163 -362
- package/workflows/powers/frontend-design/SKILL.md +163 -362
- package/workflows/powers/game-development/POWER.md +57 -140
- package/workflows/powers/game-development/SKILL.md +57 -140
- package/workflows/powers/geo-fundamentals/POWER.md +64 -126
- package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
- package/workflows/powers/git-workflow/POWER.md +135 -0
- package/workflows/powers/git-workflow/SKILL.md +132 -0
- package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
- package/workflows/powers/golang-pro/POWER.md +46 -35
- package/workflows/powers/golang-pro/SKILL.md +46 -35
- package/workflows/powers/graphql-architect/POWER.md +44 -62
- package/workflows/powers/graphql-architect/SKILL.md +44 -62
- package/workflows/powers/i18n-localization/POWER.md +118 -103
- package/workflows/powers/i18n-localization/SKILL.md +118 -103
- package/workflows/powers/java-pro/POWER.md +47 -22
- package/workflows/powers/java-pro/SKILL.md +47 -22
- package/workflows/powers/javascript-pro/POWER.md +47 -34
- package/workflows/powers/javascript-pro/SKILL.md +47 -34
- package/workflows/powers/kotlin-pro/POWER.md +46 -23
- package/workflows/powers/kotlin-pro/SKILL.md +46 -23
- package/workflows/powers/legacy-modernizer/POWER.md +43 -60
- package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
- package/workflows/powers/mcp-builder/POWER.md +65 -0
- package/workflows/powers/mcp-builder/SKILL.md +62 -0
- package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
- package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
- package/workflows/powers/microservices-architect/POWER.md +43 -70
- package/workflows/powers/microservices-architect/SKILL.md +43 -70
- package/workflows/powers/mobile-design/POWER.md +110 -345
- package/workflows/powers/mobile-design/SKILL.md +110 -345
- package/workflows/powers/mongodb/POWER.md +67 -0
- package/workflows/powers/mongodb/SKILL.md +64 -0
- package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
- package/workflows/powers/mysql/POWER.md +67 -0
- package/workflows/powers/mysql/SKILL.md +64 -0
- package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
- package/workflows/powers/neki/POWER.md +67 -0
- package/workflows/powers/neki/SKILL.md +64 -0
- package/workflows/powers/neki/references/neki-checklist.md +18 -0
- package/workflows/powers/nestjs-expert/POWER.md +45 -91
- package/workflows/powers/nestjs-expert/SKILL.md +45 -91
- package/workflows/powers/nextjs-developer/POWER.md +51 -44
- package/workflows/powers/nextjs-developer/SKILL.md +51 -44
- package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
- package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
- package/workflows/powers/observability/POWER.md +109 -0
- package/workflows/powers/observability/SKILL.md +106 -0
- package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
- package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
- package/workflows/powers/openai-docs/POWER.md +61 -0
- package/workflows/powers/openai-docs/SKILL.md +58 -0
- package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
- package/workflows/powers/performance-profiling/POWER.md +61 -114
- package/workflows/powers/performance-profiling/SKILL.md +61 -114
- package/workflows/powers/php-pro/POWER.md +116 -0
- package/workflows/powers/php-pro/SKILL.md +113 -0
- package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
- package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
- package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
- package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
- package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
- package/workflows/powers/playwright-e2e/POWER.md +85 -0
- package/workflows/powers/playwright-e2e/SKILL.md +82 -0
- package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
- package/workflows/powers/postgres/POWER.md +67 -0
- package/workflows/powers/postgres/SKILL.md +64 -0
- package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
- package/workflows/powers/prompt-engineer/POWER.md +47 -30
- package/workflows/powers/prompt-engineer/SKILL.md +47 -30
- package/workflows/powers/python-pro/POWER.md +47 -36
- package/workflows/powers/python-pro/SKILL.md +47 -36
- package/workflows/powers/react-best-practices/POWER.md +56 -33
- package/workflows/powers/react-best-practices/SKILL.md +56 -33
- package/workflows/powers/react-expert/POWER.md +47 -37
- package/workflows/powers/react-expert/SKILL.md +47 -37
- package/workflows/powers/redis/POWER.md +67 -0
- package/workflows/powers/redis/SKILL.md +64 -0
- package/workflows/powers/redis/references/redis-checklist.md +19 -0
- package/workflows/powers/ruby-pro/POWER.md +118 -0
- package/workflows/powers/ruby-pro/SKILL.md +115 -0
- package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
- package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
- package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
- package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
- package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
- package/workflows/powers/rust-pro/POWER.md +45 -31
- package/workflows/powers/rust-pro/SKILL.md +45 -31
- package/workflows/powers/security-engineer/POWER.md +129 -0
- package/workflows/powers/security-engineer/SKILL.md +126 -0
- package/workflows/powers/seo-fundamentals/POWER.md +59 -102
- package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
- package/workflows/powers/serverless-patterns/POWER.md +171 -0
- package/workflows/powers/serverless-patterns/SKILL.md +168 -0
- package/workflows/powers/skill-creator/POWER.md +90 -0
- package/workflows/powers/skill-creator/SKILL.md +87 -0
- package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
- package/workflows/powers/skill-creator/references/schemas.md +430 -0
- package/workflows/powers/spec-miner/POWER.md +49 -57
- package/workflows/powers/spec-miner/SKILL.md +49 -57
- package/workflows/powers/sqlite/POWER.md +67 -0
- package/workflows/powers/sqlite/SKILL.md +64 -0
- package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
- package/workflows/powers/sre-engineer/POWER.md +123 -64
- package/workflows/powers/sre-engineer/SKILL.md +123 -64
- package/workflows/powers/static-analysis/POWER.md +121 -77
- package/workflows/powers/static-analysis/SKILL.md +121 -77
- package/workflows/powers/stripe-best-practices/POWER.md +140 -17
- package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
- package/workflows/powers/supabase/POWER.md +67 -0
- package/workflows/powers/supabase/SKILL.md +64 -0
- package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
- package/workflows/powers/swift-pro/POWER.md +118 -0
- package/workflows/powers/swift-pro/SKILL.md +115 -0
- package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
- package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
- package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
- package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
- package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
- package/workflows/powers/tailwind-patterns/POWER.md +71 -240
- package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
- package/workflows/powers/testing-patterns/POWER.md +155 -10
- package/workflows/powers/testing-patterns/SKILL.md +155 -10
- package/workflows/powers/typescript-pro/POWER.md +47 -38
- package/workflows/powers/typescript-pro/SKILL.md +47 -38
- package/workflows/powers/vitess/POWER.md +67 -0
- package/workflows/powers/vitess/SKILL.md +64 -0
- package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
- package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
- package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
- package/workflows/powers/web-perf/POWER.md +43 -170
- package/workflows/powers/web-perf/SKILL.md +43 -170
- package/workflows/powers/webapp-testing/POWER.md +43 -164
- package/workflows/powers/webapp-testing/SKILL.md +43 -164
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
````markdown
|
|
2
|
+
---
|
|
3
|
+
inclusion: manual
|
|
4
|
+
name: deep-research
|
|
5
|
+
description: "Use when a task needs multi-round research rather than a quick lookup: iterative search, gap finding, corroboration across sources, contradiction handling, evidence-led synthesis before planning or implementation. Also use when the user asks for 'deep research', 'latest info', or 'how does X compare to Y publicly'."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "1.1"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Deep Research
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
You are the specialist for iterative evidence gathering and synthesis.
|
|
18
|
+
|
|
19
|
+
Your job is to find what is missing, not just summarize the first page of results. Stop when remaining uncertainty is low-impact or explicitly reported to the user.
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
- The task needs deep web or repo research before planning or implementation
|
|
24
|
+
- The first-pass answer is incomplete, contradictory, or likely stale
|
|
25
|
+
- The user explicitly asks for research, latest information, or public-repo comparison
|
|
26
|
+
- Claims are contested or the topic changes fast (AI tooling, frameworks, protocols)
|
|
27
|
+
|
|
28
|
+
## Instructions
|
|
29
|
+
|
|
30
|
+
### STANDARD OPERATING PROCEDURE (SOP)
|
|
31
|
+
|
|
32
|
+
1. Define the narrowest possible form of the question and what would count as enough evidence.
|
|
33
|
+
2. Run a first pass and identify gaps, contradictions, and missing facts.
|
|
34
|
+
3. Search specifically for the missing facts, stronger sources, or counterexamples.
|
|
35
|
+
4. Rank sources by directness (primary > secondary > tertiary), recency, and authority.
|
|
36
|
+
5. Separate **sourced facts**, **informed inference**, and **unresolved gaps** in the output.
|
|
37
|
+
6. Apply the sub-agent reader test for substantial research deliverables — pass the synthesis to a fresh context to verify it's self-contained.
|
|
38
|
+
|
|
39
|
+
### Constraints
|
|
40
|
+
|
|
41
|
+
- Do not stop at one source when the claim is unstable or contested.
|
|
42
|
+
- Do not present inference as sourced fact.
|
|
43
|
+
- Do not turn research into implementation before the evidence is good enough.
|
|
44
|
+
- Do not bloat the final answer with low-signal citations.
|
|
45
|
+
|
|
46
|
+
## Output Format
|
|
47
|
+
|
|
48
|
+
Structure clearly as:
|
|
49
|
+
|
|
50
|
+
- **Key findings** — the answer, directly stated
|
|
51
|
+
- **Evidence** — sourced facts with citations ranked by confidence
|
|
52
|
+
- **Inference** — what follows logically from the evidence (labeled as inference)
|
|
53
|
+
- **Open questions** — what remains unresolved and why it matters
|
|
54
|
+
|
|
55
|
+
## References
|
|
56
|
+
|
|
57
|
+
| File | Load when |
|
|
58
|
+
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
+
| `references/multi-round-research-loop.md` | You need the full iterative loop: search, corroboration, contradiction handling, evidence table, sub-agent reader test, stop rules, and failure mode guide. |
|
|
60
|
+
|
|
61
|
+
## Examples
|
|
62
|
+
|
|
63
|
+
- "Research how Anthropic structures their agent skills — compare to what CBX does"
|
|
64
|
+
- "What's the latest on evaluator-optimizer patterns in production agent systems?"
|
|
65
|
+
- "Deep research on OKLCH vs HSL for design systems — what do practitioners actually use?"
|
|
66
|
+
- "Find counterexamples to the claim that parallel agents always improve speed"
|
|
67
|
+
````
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deep-research
|
|
3
|
+
description: "Use when a task needs multi-round research rather than a quick lookup: iterative search, gap finding, corroboration across sources, contradiction handling, evidence-led synthesis before planning or implementation. Also use when the user asks for 'deep research', 'latest info', or 'how does X compare to Y publicly'."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "1.1"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Deep Research
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
You are the specialist for iterative evidence gathering and synthesis.
|
|
16
|
+
|
|
17
|
+
Your job is to find what is missing, not just summarize the first page of results. Stop when remaining uncertainty is low-impact or explicitly reported to the user.
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- The task needs deep web or repo research before planning or implementation
|
|
22
|
+
- The first-pass answer is incomplete, contradictory, or likely stale
|
|
23
|
+
- The user explicitly asks for research, latest information, or public-repo comparison
|
|
24
|
+
- Claims are contested or the topic changes fast (AI tooling, frameworks, protocols)
|
|
25
|
+
|
|
26
|
+
## Instructions
|
|
27
|
+
|
|
28
|
+
### STANDARD OPERATING PROCEDURE (SOP)
|
|
29
|
+
|
|
30
|
+
1. Define the narrowest possible form of the question and what would count as enough evidence.
|
|
31
|
+
2. Run a first pass and identify gaps, contradictions, and missing facts.
|
|
32
|
+
3. Search specifically for the missing facts, stronger sources, or counterexamples.
|
|
33
|
+
4. Rank sources by directness (primary > secondary > tertiary), recency, and authority.
|
|
34
|
+
5. Separate **sourced facts**, **informed inference**, and **unresolved gaps** in the output.
|
|
35
|
+
6. Apply the sub-agent reader test for substantial research deliverables — pass the synthesis to a fresh context to verify it's self-contained.
|
|
36
|
+
|
|
37
|
+
### Constraints
|
|
38
|
+
|
|
39
|
+
- Do not stop at one source when the claim is unstable or contested.
|
|
40
|
+
- Do not present inference as sourced fact.
|
|
41
|
+
- Do not turn research into implementation before the evidence is good enough.
|
|
42
|
+
- Do not bloat the final answer with low-signal citations.
|
|
43
|
+
|
|
44
|
+
## Output Format
|
|
45
|
+
|
|
46
|
+
Structure clearly as:
|
|
47
|
+
|
|
48
|
+
- **Key findings** — the answer, directly stated
|
|
49
|
+
- **Evidence** — sourced facts with citations ranked by confidence
|
|
50
|
+
- **Inference** — what follows logically from the evidence (labeled as inference)
|
|
51
|
+
- **Open questions** — what remains unresolved and why it matters
|
|
52
|
+
|
|
53
|
+
## References
|
|
54
|
+
|
|
55
|
+
| File | Load when |
|
|
56
|
+
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
57
|
+
| `references/multi-round-research-loop.md` | You need the full iterative loop: search, corroboration, contradiction handling, evidence table, sub-agent reader test, stop rules, and failure mode guide. |
|
|
58
|
+
|
|
59
|
+
## Examples
|
|
60
|
+
|
|
61
|
+
- "Research how Anthropic structures their agent skills — compare to what CBX does"
|
|
62
|
+
- "What's the latest on evaluator-optimizer patterns in production agent systems?"
|
|
63
|
+
- "Deep research on OKLCH vs HSL for design systems — what do practitioners actually use?"
|
|
64
|
+
- "Find counterexamples to the claim that parallel agents always improve speed"
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Multi-Round Research Loop
|
|
2
|
+
|
|
3
|
+
Load this when the research task is broad, unstable, contested, or likely to have conflicting public sources — or when the user explicitly asks for deep or latest research.
|
|
4
|
+
|
|
5
|
+
## The Core Principle
|
|
6
|
+
|
|
7
|
+
Your job is to find what is _missing_, not just summarize the first page of results. Stop when remaining uncertainty is low-impact or explicitly reported back to the user.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## The Loop
|
|
12
|
+
|
|
13
|
+
### Round 1: Define and search broadly
|
|
14
|
+
|
|
15
|
+
1. **Narrow the question** — State the most specific version of what you're trying to find. Vague questions produce vague results.
|
|
16
|
+
2. **Search** — Run initial queries across the most likely sources (official docs, engineering blogs, GitHub repos, research papers as appropriate).
|
|
17
|
+
3. **Record gaps** — What did this pass _not_ answer? What's contradictory? What's suspiciously absent?
|
|
18
|
+
|
|
19
|
+
### Round 2: Target the gaps
|
|
20
|
+
|
|
21
|
+
4. **Search directly for the missing facts** — Use specific, targeted queries (not broad topic queries). Prefer: official docs > primary source blog > authoritative community reference > general article.
|
|
22
|
+
5. **Search for contradictions** — If two sources disagree, search specifically for why. Age, version differences, and context often explain it.
|
|
23
|
+
6. **Seek counterexamples** — Actively search for "X doesn't work", "X is wrong", "problems with X" — not just confirmation.
|
|
24
|
+
|
|
25
|
+
### Round 3: Corroborate and synthesize
|
|
26
|
+
|
|
27
|
+
7. **Cross-verify** unstable claims against at least one independent source.
|
|
28
|
+
8. **Rank sources** by directness (primary > secondary > tertiary), recency (newer > older for fast-moving topics), and authority (official > community > anecdotal).
|
|
29
|
+
9. **Write the evidence table** — Track what you found, not just conclusions:
|
|
30
|
+
|
|
31
|
+
| Fact | Source | Confidence | Open question |
|
|
32
|
+
| ------- | ------------ | ------------------- | ------------------------ |
|
|
33
|
+
| [Claim] | [URL or doc] | High / Medium / Low | [What's still uncertain] |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Stop Rule
|
|
38
|
+
|
|
39
|
+
Stop when:
|
|
40
|
+
|
|
41
|
+
- Remaining uncertainty is low-impact (won't change the recommendation)
|
|
42
|
+
- OR the question is genuinely unresolvable from public sources (report this explicitly)
|
|
43
|
+
- OR you've completed 3 rounds without new signal (diminishing returns — report what's known and what's not)
|
|
44
|
+
|
|
45
|
+
Do NOT stop after one source when the claim is unstable, contested, or from a secondary source.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Output Format
|
|
50
|
+
|
|
51
|
+
Separate clearly:
|
|
52
|
+
|
|
53
|
+
- **Sourced facts** — you have direct evidence
|
|
54
|
+
- **Informed inference** — logically follows from evidence but not directly stated
|
|
55
|
+
- **Unresolved gaps** — you searched and didn't find it; note what's unknown
|
|
56
|
+
|
|
57
|
+
Do not present inference as fact. Do not present absence of evidence as evidence of absence.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Common Research Failure Modes
|
|
62
|
+
|
|
63
|
+
| Failure | Fix |
|
|
64
|
+
| ------------------------------------- | -------------------------------------------------- |
|
|
65
|
+
| Stopping at first result | Check at least 2-3 sources for any unstable claim |
|
|
66
|
+
| Only finding confirmation | Actively search for counterexamples and criticisms |
|
|
67
|
+
| Treating recent = correct | Cross-check recency with authority and context |
|
|
68
|
+
| Vague queries returning vague results | Restate the question as a specific, narrow query |
|
|
69
|
+
| Reporting uncertainty as fact | Use "inference" or "unknown" tags explicitly |
|
|
70
|
+
| Burying the answer in context | Lead with the finding; evidence follows |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Sub-Agent Reader Test
|
|
75
|
+
|
|
76
|
+
After completing research, if the output will be used by another agent or handed to a human without context:
|
|
77
|
+
|
|
78
|
+
- Pass the research summary to a fresh sub-agent with no conversation history
|
|
79
|
+
- Ask: "What is the main finding?", "What is still uncertain?", "What sources support the key claims?"
|
|
80
|
+
- If the fresh reader gets it wrong, the synthesis has context bleed — revise before delivery
|
|
@@ -1,153 +1,167 @@
|
|
|
1
1
|
````markdown
|
|
2
2
|
---
|
|
3
3
|
inclusion: manual
|
|
4
|
-
name:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"component design",
|
|
12
|
-
"tokens",
|
|
13
|
-
"theming",
|
|
14
|
-
"variants",
|
|
15
|
-
"widget api",
|
|
16
|
-
]
|
|
4
|
+
name: design-system-builder
|
|
5
|
+
description: Build and maintain token-driven design systems with reusable components, semantic APIs, variant patterns, and theming support across frameworks.
|
|
6
|
+
license: Apache-2.0
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "3.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot, Gemini CLI
|
|
17
11
|
---
|
|
18
12
|
|
|
19
13
|
# Design System Builder
|
|
20
14
|
|
|
21
|
-
##
|
|
15
|
+
## Purpose
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
Guide the creation and maintenance of design systems — the foundational layer of tokens, primitives, and components that ensure visual and behavioral consistency across an application.
|
|
24
18
|
|
|
25
19
|
## When to Use
|
|
26
20
|
|
|
27
|
-
- Creating new
|
|
28
|
-
-
|
|
29
|
-
- Reviewing component
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
),
|
|
54
|
-
)
|
|
55
|
-
```
|
|
21
|
+
- Creating a new design system or component library from scratch
|
|
22
|
+
- Adding components to an existing design system
|
|
23
|
+
- Reviewing component APIs for consistency and composability
|
|
24
|
+
- Setting up design tokens (color, spacing, typography, motion)
|
|
25
|
+
- Building theming support (light/dark, brand variants)
|
|
26
|
+
- Auditing an existing system for token coverage or API drift
|
|
27
|
+
|
|
28
|
+
## Instructions
|
|
29
|
+
|
|
30
|
+
### Step 1 — Audit the Current State
|
|
31
|
+
|
|
32
|
+
Before building anything, understand what exists:
|
|
33
|
+
|
|
34
|
+
1. Inventory existing components — list every reusable UI element
|
|
35
|
+
2. Catalog design tokens — identify hardcoded values that should be tokens
|
|
36
|
+
3. Check naming conventions — are components and tokens named consistently?
|
|
37
|
+
4. Identify gaps — what's missing vs. what the product actually needs?
|
|
38
|
+
|
|
39
|
+
**DO**: Start from real product needs, not hypothetical components.
|
|
40
|
+
**DON'T**: Build components speculatively — every component must have at least 2 real use cases.
|
|
41
|
+
|
|
42
|
+
### Step 2 — Define the Token Layer
|
|
43
|
+
|
|
44
|
+
Tokens are the single source of truth for all visual decisions.
|
|
45
|
+
|
|
46
|
+
#### Token Categories
|
|
56
47
|
|
|
57
|
-
### 2. Semantic API
|
|
58
|
-
|
|
59
|
-
```dart
|
|
60
|
-
// ✅ Semantic, clear API
|
|
61
|
-
class AppButton extends StatelessWidget {
|
|
62
|
-
final String label;
|
|
63
|
-
final VoidCallback? onPressed;
|
|
64
|
-
final bool isLoading;
|
|
65
|
-
final bool isDisabled;
|
|
66
|
-
final Widget? leading;
|
|
67
|
-
final Widget? trailing;
|
|
68
|
-
|
|
69
|
-
// Named constructors for variants
|
|
70
|
-
AppButton.primary({...});
|
|
71
|
-
AppButton.secondary({...});
|
|
72
|
-
AppButton.ghost({...});
|
|
73
|
-
}
|
|
74
48
|
```
|
|
49
|
+
├── color/
|
|
50
|
+
│ ├── primitive/ (blue-500, gray-100 — raw palette)
|
|
51
|
+
│ ├── semantic/ (text-primary, surface-elevated — meaning-based)
|
|
52
|
+
│ └── component/ (button-bg, card-border — component-specific)
|
|
53
|
+
├── spacing/ (space-1 through space-12, based on 4px or 8px grid)
|
|
54
|
+
├── typography/ (font-family, font-size scale, line-height, font-weight)
|
|
55
|
+
├── radius/ (radius-sm, radius-md, radius-lg, radius-full)
|
|
56
|
+
├── shadow/ (shadow-sm, shadow-md, shadow-lg — elevation levels)
|
|
57
|
+
├── motion/ (duration-fast, duration-normal, easing-default)
|
|
58
|
+
└── breakpoint/ (sm, md, lg, xl — responsive thresholds)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Rules**:
|
|
62
|
+
- Primitive tokens hold raw values (never use directly in components)
|
|
63
|
+
- Semantic tokens reference primitives and encode meaning
|
|
64
|
+
- Component tokens reference semantic tokens for local overrides
|
|
65
|
+
- Never hardcode values in components — always reference tokens
|
|
66
|
+
|
|
67
|
+
### Step 3 — Design Component APIs
|
|
68
|
+
|
|
69
|
+
Every component should follow these API principles:
|
|
70
|
+
|
|
71
|
+
1. **Predictable** — props follow consistent patterns across components
|
|
72
|
+
2. **Composable** — small components combine into larger patterns
|
|
73
|
+
3. **Constrained** — expose only the variants the system supports
|
|
74
|
+
4. **Accessible** — ARIA, keyboard, and screen reader support built-in
|
|
75
|
+
|
|
76
|
+
#### Component Anatomy
|
|
75
77
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
AppCard.elevated({...}) : this(
|
|
86
|
-
padding: EdgeInsets.all(AppSpacing.lg),
|
|
87
|
-
backgroundColor: Theme.of(context).colorScheme.surface,
|
|
88
|
-
elevation: 2,
|
|
89
|
-
);
|
|
90
|
-
}
|
|
78
|
+
```
|
|
79
|
+
ComponentName/
|
|
80
|
+
├── index.{ts,tsx} (public API — exports only what consumers need)
|
|
81
|
+
├── ComponentName.{tsx} (implementation)
|
|
82
|
+
├── ComponentName.test.{tsx} (unit + interaction tests)
|
|
83
|
+
├── ComponentName.stories.{tsx} (visual documentation)
|
|
84
|
+
├── variants.ts (variant definitions — size, color, state)
|
|
85
|
+
└── tokens.ts (component-level token overrides)
|
|
91
86
|
```
|
|
92
87
|
|
|
93
|
-
|
|
88
|
+
#### Variant Pattern
|
|
94
89
|
|
|
95
|
-
|
|
90
|
+
Use variants (not boolean flags) for visual options:
|
|
96
91
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
```
|
|
93
|
+
// DO: Constrained variants
|
|
94
|
+
<Button variant="primary" size="md" />
|
|
95
|
+
<Button variant="ghost" size="sm" />
|
|
101
96
|
|
|
102
|
-
|
|
97
|
+
// DON'T: Boolean flag explosion
|
|
98
|
+
<Button primary large outlined rounded />
|
|
99
|
+
```
|
|
103
100
|
|
|
104
|
-
|
|
105
|
-
- [ ] No hardcoded spacing (use spacing tokens)
|
|
106
|
-
- [ ] No hardcoded typography (use text styles)
|
|
107
|
-
- [ ] No hardcoded radius (use radius tokens)
|
|
101
|
+
### Step 4 — Build Theming Support
|
|
108
102
|
|
|
109
|
-
|
|
103
|
+
Themes override semantic tokens without changing component logic.
|
|
110
104
|
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
105
|
+
**Light/Dark**:
|
|
106
|
+
- Swap surface lightness, reduce chroma in dark mode
|
|
107
|
+
- Test contrast ratios in both themes
|
|
108
|
+
- Never use `color-scheme: dark` alone — define explicit token overrides
|
|
114
109
|
|
|
115
|
-
|
|
110
|
+
**Brand Variants**:
|
|
111
|
+
- Override only the accent/brand color tokens
|
|
112
|
+
- Keep neutral palette, spacing, and typography consistent across brands
|
|
116
113
|
|
|
117
|
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
114
|
+
**Implementation**:
|
|
115
|
+
- CSS: Use CSS custom properties scoped to `[data-theme]` or `:root`
|
|
116
|
+
- JS frameworks: Use context/provider pattern for runtime theming
|
|
117
|
+
- Ensure tokens cascade correctly (component < semantic < primitive)
|
|
120
118
|
|
|
121
|
-
###
|
|
119
|
+
### Step 5 — Document and Enforce
|
|
122
120
|
|
|
123
|
-
|
|
124
|
-
- [ ] At least 2 usage examples
|
|
125
|
-
- [ ] Migration notes from raw Flutter widgets
|
|
121
|
+
Every component needs:
|
|
126
122
|
|
|
127
|
-
|
|
123
|
+
1. **API docs** — props table with types, defaults, and descriptions
|
|
124
|
+
2. **Usage examples** — at least one "do" and one "don't"
|
|
125
|
+
3. **Visual examples** — rendered variants (Storybook or equivalent)
|
|
126
|
+
4. **Accessibility notes** — keyboard behavior, ARIA attributes, screen reader output
|
|
128
127
|
|
|
129
|
-
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
128
|
+
**Enforcement**:
|
|
129
|
+
- Lint rules preventing hardcoded values (e.g., no raw hex colors)
|
|
130
|
+
- Visual regression tests for all component variants
|
|
131
|
+
- Bundle size tracking per component
|
|
132
|
+
- Prop type validation / TypeScript strict mode
|
|
133
|
+
|
|
134
|
+
### Step 6 — Keep the System Small
|
|
135
|
+
|
|
136
|
+
**Rules for growth**:
|
|
137
|
+
- A component must have ≥ 2 real use cases before extraction
|
|
138
|
+
- Prefer composition over new components — combine existing primitives first
|
|
139
|
+
- Regularly audit for unused or redundant components
|
|
140
|
+
- Remove components that lost their second use case
|
|
133
141
|
|
|
134
142
|
## Output Format
|
|
135
143
|
|
|
136
|
-
When creating
|
|
144
|
+
When creating or reviewing design system work, structure responses as:
|
|
145
|
+
|
|
146
|
+
1. **Token audit** — what's hardcoded vs. tokenized
|
|
147
|
+
2. **Component API** — props, variants, composition points
|
|
148
|
+
3. **Theme compatibility** — does it work in light/dark/brand contexts?
|
|
149
|
+
4. **Code** — implementation with token references, accessibility, tests
|
|
150
|
+
5. **Migration notes** — how to adopt without breaking existing usage
|
|
151
|
+
|
|
152
|
+
## References
|
|
153
|
+
|
|
154
|
+
- [references/token-architecture.md](references/token-architecture.md) — token naming, layering, and CSS custom property patterns
|
|
155
|
+
- [references/component-api-checklist.md](references/component-api-checklist.md) — API review checklist for new components
|
|
156
|
+
- [references/theming-patterns.md](references/theming-patterns.md) — light/dark and brand theming implementation
|
|
137
157
|
|
|
138
|
-
|
|
139
|
-
2. **Token Usage** (which tokens are used)
|
|
140
|
-
3. **Implementation Notes** (composition, theming)
|
|
141
|
-
4. **Examples** (2+ usage snippets)
|
|
142
|
-
5. **Tests** (widget tests + golden ideas)
|
|
143
|
-
6. **Migration Notes** (how to replace old widgets)
|
|
158
|
+
## Examples
|
|
144
159
|
|
|
145
|
-
|
|
160
|
+
**User**: "Create a Button component for our design system"
|
|
146
161
|
|
|
147
|
-
|
|
162
|
+
**Response approach**: Define variants (primary, secondary, ghost, danger), sizes (sm, md, lg), states (default, hover, active, disabled, loading). Use tokens for all visual properties. Include ARIA attributes, keyboard handling, and loading state. Show usage examples with composition (Button + Icon, ButtonGroup).
|
|
148
163
|
|
|
149
|
-
|
|
164
|
+
**User**: "Audit our design system tokens"
|
|
150
165
|
|
|
151
|
-
|
|
152
|
-
- `component_widget_test` - Widget test template
|
|
166
|
+
**Response approach**: Scan codebase for hardcoded values. Categorize them (color, spacing, typography, shadow, radius). Propose token names following the naming convention. Show before/after migration for each category.
|
|
153
167
|
````
|