@cubis/foundry 0.3.76 → 0.3.77

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 (165) hide show
  1. package/dist/cli/core.js +57 -0
  2. package/dist/cli/core.js.map +1 -1
  3. package/mcp/src/tools/skillTools.test.ts +34 -1
  4. package/package.json +1 -1
  5. package/src/cli/core.ts +66 -0
  6. package/workflows/skills/_schema/skill-platform-attributes.json +7 -0
  7. package/workflows/skills/deep-research/SKILL.md +81 -0
  8. package/workflows/skills/deep-research/evals/assertions.md +17 -0
  9. package/workflows/skills/deep-research/evals/evals.json +56 -0
  10. package/workflows/skills/deep-research/examples/01-latest-docs-check.md +12 -0
  11. package/workflows/skills/deep-research/examples/02-ecosystem-comparison.md +12 -0
  12. package/workflows/skills/deep-research/examples/03-research-to-implementation-handoff.md +12 -0
  13. package/workflows/skills/deep-research/references/comparison-checklist.md +57 -0
  14. package/workflows/skills/deep-research/references/research-output.md +69 -0
  15. package/workflows/skills/deep-research/references/source-ladder.md +81 -0
  16. package/workflows/skills/generated/skill-audit.json +11 -2
  17. package/workflows/skills/generated/skill-catalog.json +36 -4
  18. package/workflows/skills/skills_index.json +32 -0
  19. package/workflows/workflows/agent-environment-setup/generated/route-manifest.json +7 -7
  20. package/workflows/workflows/agent-environment-setup/manifest.json +27 -1
  21. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/orchestrator.md +6 -5
  22. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/project-planner.md +4 -3
  23. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/researcher.md +8 -4
  24. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/accessibility.toml +2 -0
  25. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/backend.toml +2 -0
  26. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/create.toml +2 -0
  27. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/database.toml +2 -0
  28. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/debug.toml +2 -0
  29. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/devops.toml +2 -0
  30. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/implement-track.toml +2 -0
  31. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/migrate.toml +2 -0
  32. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/mobile.toml +2 -0
  33. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/onboard.toml +2 -0
  34. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/orchestrate.toml +2 -0
  35. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/plan.toml +2 -0
  36. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/refactor.toml +2 -0
  37. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/release.toml +2 -0
  38. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/review.toml +2 -0
  39. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/security.toml +2 -0
  40. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/test.toml +2 -0
  41. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/vercel.toml +2 -0
  42. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +13 -8
  43. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/deep-research/SKILL.md +89 -0
  44. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/deep-research/evals/assertions.md +17 -0
  45. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/deep-research/evals/evals.json +56 -0
  46. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/deep-research/examples/01-latest-docs-check.md +12 -0
  47. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/deep-research/examples/02-ecosystem-comparison.md +12 -0
  48. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/deep-research/examples/03-research-to-implementation-handoff.md +12 -0
  49. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/deep-research/references/comparison-checklist.md +57 -0
  50. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/deep-research/references/research-output.md +69 -0
  51. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/deep-research/references/source-ladder.md +81 -0
  52. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/onboard.md +3 -3
  53. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/orchestrate.md +2 -2
  54. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/plan.md +4 -4
  55. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/orchestrator.md +6 -5
  56. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/project-planner.md +4 -3
  57. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/researcher.md +8 -4
  58. package/workflows/workflows/agent-environment-setup/platforms/claude/hooks/README.md +15 -0
  59. package/workflows/workflows/agent-environment-setup/platforms/claude/hooks/route-research-guard.mjs +39 -0
  60. package/workflows/workflows/agent-environment-setup/platforms/claude/hooks/settings.snippet.json +15 -0
  61. package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +15 -8
  62. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/SKILL.md +95 -0
  63. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/evals/assertions.md +17 -0
  64. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/evals/evals.json +56 -0
  65. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/examples/01-latest-docs-check.md +12 -0
  66. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/examples/02-ecosystem-comparison.md +12 -0
  67. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/examples/03-research-to-implementation-handoff.md +12 -0
  68. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/references/comparison-checklist.md +57 -0
  69. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/references/research-output.md +69 -0
  70. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/references/source-ladder.md +81 -0
  71. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/skills_index.json +32 -0
  72. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/onboard.md +3 -3
  73. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/orchestrate.md +2 -2
  74. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/plan.md +4 -4
  75. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/orchestrator.md +6 -5
  76. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/project-planner.md +4 -3
  77. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/researcher.md +8 -4
  78. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +13 -8
  79. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/deep-research/SKILL.md +89 -0
  80. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/deep-research/evals/assertions.md +17 -0
  81. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/deep-research/evals/evals.json +56 -0
  82. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/deep-research/examples/01-latest-docs-check.md +12 -0
  83. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/deep-research/examples/02-ecosystem-comparison.md +12 -0
  84. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/deep-research/examples/03-research-to-implementation-handoff.md +12 -0
  85. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/deep-research/references/comparison-checklist.md +57 -0
  86. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/deep-research/references/research-output.md +69 -0
  87. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/deep-research/references/source-ladder.md +81 -0
  88. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/onboard.md +3 -3
  89. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/orchestrate.md +2 -2
  90. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/plan.md +4 -4
  91. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/orchestrator.md +6 -5
  92. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/project-planner.md +4 -3
  93. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/researcher.md +8 -4
  94. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-accessibility.prompt.md +2 -1
  95. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-backend.prompt.md +2 -1
  96. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-create.prompt.md +2 -1
  97. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-database.prompt.md +2 -1
  98. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-debug.prompt.md +2 -1
  99. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-devops.prompt.md +2 -1
  100. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-implement-track.prompt.md +2 -1
  101. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-migrate.prompt.md +2 -1
  102. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-mobile.prompt.md +2 -1
  103. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-onboard.prompt.md +2 -1
  104. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-orchestrate.prompt.md +2 -1
  105. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-plan.prompt.md +2 -1
  106. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-refactor.prompt.md +2 -1
  107. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-release.prompt.md +2 -1
  108. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-review.prompt.md +2 -1
  109. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-security.prompt.md +2 -1
  110. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-test.prompt.md +2 -1
  111. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-vercel.prompt.md +2 -1
  112. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +13 -8
  113. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/SKILL.md +94 -0
  114. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/evals/assertions.md +17 -0
  115. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/evals/evals.json +56 -0
  116. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/examples/01-latest-docs-check.md +12 -0
  117. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/examples/02-ecosystem-comparison.md +12 -0
  118. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/examples/03-research-to-implementation-handoff.md +12 -0
  119. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/references/comparison-checklist.md +57 -0
  120. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/references/research-output.md +69 -0
  121. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/references/source-ladder.md +81 -0
  122. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/skills_index.json +32 -0
  123. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/onboard.md +3 -3
  124. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/orchestrate.md +2 -2
  125. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/plan.md +4 -4
  126. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/accessibility.toml +2 -0
  127. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/backend.toml +2 -0
  128. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/create.toml +2 -0
  129. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/database.toml +2 -0
  130. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/debug.toml +2 -0
  131. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/devops.toml +2 -0
  132. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/implement-track.toml +2 -0
  133. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/migrate.toml +2 -0
  134. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/mobile.toml +2 -0
  135. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/onboard.toml +2 -0
  136. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/orchestrate.toml +2 -0
  137. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/plan.toml +2 -0
  138. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/refactor.toml +2 -0
  139. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/release.toml +2 -0
  140. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/review.toml +2 -0
  141. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/security.toml +2 -0
  142. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/test.toml +2 -0
  143. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/vercel.toml +2 -0
  144. package/workflows/workflows/agent-environment-setup/platforms/gemini/rules/GEMINI.md +13 -8
  145. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/deep-research/SKILL.md +89 -0
  146. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/deep-research/evals/assertions.md +17 -0
  147. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/deep-research/evals/evals.json +56 -0
  148. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/deep-research/examples/01-latest-docs-check.md +12 -0
  149. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/deep-research/examples/02-ecosystem-comparison.md +12 -0
  150. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/deep-research/examples/03-research-to-implementation-handoff.md +12 -0
  151. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/deep-research/references/comparison-checklist.md +57 -0
  152. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/deep-research/references/research-output.md +69 -0
  153. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/deep-research/references/source-ladder.md +81 -0
  154. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/onboard.md +3 -3
  155. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/orchestrate.md +2 -2
  156. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/plan.md +4 -4
  157. package/workflows/workflows/agent-environment-setup/shared/agents/orchestrator.md +2 -1
  158. package/workflows/workflows/agent-environment-setup/shared/agents/project-planner.md +2 -1
  159. package/workflows/workflows/agent-environment-setup/shared/agents/researcher.md +5 -1
  160. package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +44 -13
  161. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/claude.md +2 -0
  162. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/gemini.md +20 -0
  163. package/workflows/workflows/agent-environment-setup/shared/workflows/onboard.md +1 -1
  164. package/workflows/workflows/agent-environment-setup/shared/workflows/orchestrate.md +1 -1
  165. package/workflows/workflows/agent-environment-setup/shared/workflows/plan.md +2 -2
@@ -0,0 +1,57 @@
1
+ # Comparison Checklist
2
+
3
+ Use this when evaluating tools, frameworks, APIs, or platforms.
4
+
5
+ ## 1. Scope the Comparison
6
+
7
+ Define:
8
+
9
+ - what is being compared
10
+ - whether the comparison is about implementation fit, operational cost, or product capability
11
+ - what time horizon matters: immediate migration, medium-term maintenance, or long-term platform fit
12
+
13
+ ## 2. Compare on Stable Axes
14
+
15
+ Use a short set of dimensions:
16
+
17
+ - integration fit with the current repo
18
+ - maturity and maintenance signal
19
+ - official documentation quality
20
+ - configuration complexity
21
+ - ecosystem and tooling support
22
+ - operational constraints
23
+ - migration cost
24
+
25
+ Do not compare on vague criteria like "better DX" without concrete evidence.
26
+
27
+ ## 3. Capture Repo Impact
28
+
29
+ Tie each option back to the current codebase:
30
+
31
+ - what code would change
32
+ - which workflows or agents would own the work
33
+ - what risks are specific to this repo
34
+ - whether new MCP tools or skills would be required
35
+
36
+ ## 4. Separate Product Claims from Team Constraints
37
+
38
+ An option can be technically stronger and still be a worse fit for the repo.
39
+
40
+ Keep these separate:
41
+
42
+ - product capability
43
+ - ecosystem quality
44
+ - team familiarity
45
+ - migration blast radius
46
+ - existing architecture constraints
47
+
48
+ ## 5. Decision Frame
49
+
50
+ Finish with one of:
51
+
52
+ - recommend option A
53
+ - recommend option B
54
+ - defer decision pending one missing verification
55
+ - keep current approach because switching cost outweighs gain
56
+
57
+ If the evidence is mixed, say what would change the recommendation.
@@ -0,0 +1,69 @@
1
+ # Research Output Contract
2
+
3
+ ## Required Sections
4
+
5
+ ### 1. Research question
6
+
7
+ State:
8
+
9
+ - the exact topic
10
+ - why research was necessary
11
+ - whether freshness or public comparison mattered
12
+ - the decision this research is meant to support
13
+
14
+ ### 2. Verified facts
15
+
16
+ List the strongest findings first.
17
+
18
+ For each fact:
19
+
20
+ - state the claim in one sentence
21
+ - cite the source class: repo, official docs, upstream repo, standard
22
+ - include the relevant link or file path
23
+ - include date/version when it matters
24
+
25
+ ### 3. Secondary / community evidence
26
+
27
+ Only include this when it adds signal the primary sources did not provide.
28
+
29
+ For each item:
30
+
31
+ - label it as secondary evidence
32
+ - state what practical signal it adds
33
+ - avoid presenting it as settled fact
34
+
35
+ ### 4. Gaps / unknowns
36
+
37
+ Document:
38
+
39
+ - unresolved conflicts
40
+ - missing official confirmation
41
+ - assumptions that still need validation
42
+ - risks if the team proceeds anyway
43
+
44
+ ### 5. Recommended next route
45
+
46
+ Research should end with one clear recommendation:
47
+
48
+ - direct execution
49
+ - a specific workflow like `/plan` or `/create`
50
+ - a specialist like `@researcher` or `@frontend-specialist`
51
+ - an exact skill like `stitch` or `deep-research`
52
+
53
+ Keep this recommendation concrete enough that the next step does not need another routing pass.
54
+
55
+ ## Compression Rules
56
+
57
+ - Prefer 5 strong findings over 20 weak ones.
58
+ - Do not paste long quotes from docs when a citation plus summary will do.
59
+ - If multiple sources say the same thing, summarize once and cite the strongest source.
60
+ - If research found nothing reliable, say that directly.
61
+
62
+ ## Handoff Pattern
63
+
64
+ When handing off to implementation or planning, include:
65
+
66
+ - the decision summary
67
+ - the highest-confidence constraints
68
+ - the unresolved risks
69
+ - the next route to take
@@ -0,0 +1,81 @@
1
+ # Source Ladder
2
+
3
+ ## Goal
4
+
5
+ Use the smallest amount of external research that still produces a decision-ready answer. Keep the evidence traceable and ordered by trust.
6
+
7
+ ## 1. Repo / Local Evidence First
8
+
9
+ Start by inspecting:
10
+
11
+ - application code and tests
12
+ - README files and internal docs
13
+ - generated workflow or skill assets
14
+ - lockfiles, config files, and package manifests
15
+ - existing integration code and migration history
16
+
17
+ If the repo already answers the question, stop there. Do not browse externally just because web research feels safer.
18
+
19
+ ## 2. Primary External Sources
20
+
21
+ Use these next:
22
+
23
+ - official vendor docs
24
+ - upstream repositories and release notes
25
+ - standards bodies and reference specs
26
+ - maintainer-authored examples
27
+
28
+ Prefer sources that expose:
29
+
30
+ - exact feature names
31
+ - current version constraints
32
+ - config formats
33
+ - dates or changelog context
34
+
35
+ When the topic is time-sensitive, capture the date you verified the source and the version or doc page involved.
36
+
37
+ ## 3. Secondary / Community Sources
38
+
39
+ Use these only after primary evidence:
40
+
41
+ - Reddit threads
42
+ - issue comments
43
+ - independent blog posts
44
+ - forum discussions
45
+ - third-party comparison articles
46
+
47
+ Community evidence is useful for:
48
+
49
+ - practical gotchas
50
+ - migration pain points
51
+ - missing-doc workarounds
52
+ - real-world adoption patterns
53
+
54
+ Community evidence is not enough on its own for authoritative claims about product behavior, supported configuration, or security guarantees.
55
+
56
+ ## 4. Conflict Handling
57
+
58
+ When sources disagree:
59
+
60
+ 1. Prefer repo evidence for the current codebase state.
61
+ 2. Prefer official docs over community claims for product behavior.
62
+ 3. Prefer newer dated material when the sources cover the same feature.
63
+ 4. If the conflict remains unresolved, report it as a gap instead of guessing.
64
+
65
+ ## 5. Evidence Labels
66
+
67
+ Use these labels in research output:
68
+
69
+ - **Verified fact** — backed by repo evidence or a primary source
70
+ - **Secondary evidence** — backed only by community or indirect sources
71
+ - **Inference** — reasoned conclusion not directly stated by a source
72
+ - **Gap** — could not be verified confidently
73
+
74
+ ## 6. Stop Conditions
75
+
76
+ Stop researching when:
77
+
78
+ - the decision is already clear
79
+ - new sources only repeat the same point
80
+ - the remaining uncertainty is small and clearly documented
81
+ - the task should move into implementation or planning
@@ -30,9 +30,9 @@ Use this when joining a new project, exploring an unfamiliar codebase, or prepar
30
30
 
31
31
  ## Skill Routing
32
32
 
33
- - Primary skills: `architecture-doc`, `system-design`
33
+ - Primary skills: `deep-research`, `system-design`
34
34
  - Supporting skills (optional): `system-design`, `database-design`, `typescript-best-practices`, `javascript-best-practices`, `python-best-practices`
35
- - Start with `architecture-doc` for systematic exploration and `system-design` for architecture mapping. Add `system-design` for undocumented systems.
35
+ - Start with `deep-research` for systematic exploration and `system-design` for architecture mapping. Add `system-design` for undocumented systems. Prefer repo evidence first; use external sources only when setup or dependency behavior cannot be confirmed locally.
36
36
 
37
37
  ## Workflow steps
38
38
 
@@ -55,7 +55,7 @@ Use this when joining a new project, exploring an unfamiliar codebase, or prepar
55
55
  ONBOARD_WORKFLOW_RESULT:
56
56
  primary_agent: researcher
57
57
  supporting_agents: [code-archaeologist?, backend-specialist?, frontend-specialist?]
58
- primary_skills: [architecture-doc, system-design]
58
+ primary_skills: [deep-research, system-design]
59
59
  supporting_skills: [system-design?, database-design?]
60
60
  project_overview:
61
61
  purpose: <string>
@@ -24,8 +24,8 @@ Use this when a task spans multiple domains (backend + frontend, security + infr
24
24
  ## Skill Routing
25
25
 
26
26
  - Primary skills: `system-design`, `api-design`
27
- - Supporting skills (optional): `database-design`, `architecture-doc`, `mcp-server-builder`, `tech-doc`, `prompt-engineering`, `skill-creator`
28
- - Start with `system-design` for system design coordination and `api-design` for integration contracts. Add supporting skills based on the coordination challenge.
27
+ - Supporting skills (optional): `database-design`, `deep-research`, `mcp-server-builder`, `tech-doc`, `prompt-engineering`, `skill-creator`
28
+ - Start with `system-design` for system design coordination and `api-design` for integration contracts. Add `deep-research` before implementation when the coordination challenge depends on fresh external facts or public comparison.
29
29
 
30
30
  ## Workflow steps
31
31
 
@@ -36,13 +36,13 @@ Use this when starting a new feature, project, or significant change that needs
36
36
  ## Skill Routing
37
37
 
38
38
  - Primary skills: `system-design`, `api-design`
39
- - Supporting skills (optional): `database-design`, `architecture-doc`, `mcp-server-builder`, `tech-doc`, `prompt-engineering`, `skill-creator`
40
- - Start with `system-design` for system design and `api-design` for API contracts. Add `database-design` when data modeling is central, `architecture-doc` when external knowledge is needed.
39
+ - Supporting skills (optional): `database-design`, `deep-research`, `mcp-server-builder`, `tech-doc`, `prompt-engineering`, `skill-creator`
40
+ - Start with `system-design` for system design and `api-design` for API contracts. Add `database-design` when data modeling is central, `deep-research` when fresh external knowledge or public comparison is needed.
41
41
 
42
42
  ## Workflow steps
43
43
 
44
44
  1. Clarify scope, success criteria, and constraints.
45
- 2. Research existing patterns and dependencies.
45
+ 2. Research existing patterns and dependencies, starting in-repo and escalating to `deep-research` only when outside evidence is required.
46
46
  3. Decompose into tasks with ownership and dependencies.
47
47
  4. Define interfaces, contracts, and failure modes.
48
48
  5. Produce acceptance criteria for each milestone.
@@ -62,7 +62,7 @@ PLAN_WORKFLOW_RESULT:
62
62
  primary_agent: project-planner
63
63
  supporting_agents: [orchestrator?, backend-specialist?, frontend-specialist?, database-architect?]
64
64
  primary_skills: [system-design, api-design]
65
- supporting_skills: [database-design?, architecture-doc?, mcp-server-builder?]
65
+ supporting_skills: [database-design?, deep-research?, mcp-server-builder?]
66
66
  plan:
67
67
  scope_summary: <string>
68
68
  tasks:
@@ -158,7 +158,8 @@ ANTI-LAZINESS:
158
158
  5. **Iterate, don't accept mediocrity** — if output is incomplete or wrong, re-delegate with feedback.
159
159
  6. **Track progress visibly** — maintain a task list showing status of each work item.
160
160
  7. **Fail fast on blockers** — if a dependency is missing or a task is stuck after 3 iterations, escalate.
161
- 8. **Synthesize at the end** — combine outputs with concrete actions, risks, and verification evidence.
161
+ 8. **Route research explicitly** — when freshness or public comparison matters, delegate to `@researcher` or load `deep-research` before implementation.
162
+ 9. **Synthesize at the end** — combine outputs with concrete actions, risks, and verification evidence.
162
163
 
163
164
  ## Anti-Patterns to Prevent
164
165
 
@@ -24,7 +24,7 @@ Decompose complex requests into implementable plans with clear ownership, depend
24
24
  - Load `architecture-designer` for system design tradeoffs in the plan.
25
25
  - Load `api-designer` when the plan involves API contract decisions.
26
26
  - Load `database-skills` when the plan involves data modeling or migration.
27
- - Load `deep-research` when planning requires external information or comparison.
27
+ - Load `deep-research` when planning requires fresh external information, public comparison, or evidence beyond the repo.
28
28
  - Use `skill_validate` before `skill_get`, and use `skill_get_reference` only for the specific sidecar file needed.
29
29
 
30
30
  ## Skill References
@@ -45,6 +45,7 @@ Decompose complex requests into implementable plans with clear ownership, depend
45
45
  - Every task needs an owner (agent), acceptance criteria, and verification approach.
46
46
  - Plan for rollback — every change should be reversible.
47
47
  - Front-load risk — tackle the hardest technical uncertainty first.
48
+ - When outside evidence is needed, send research through `deep-research` first instead of mixing web browsing into every implementation stream.
48
49
 
49
50
  ## Planning Methodology
50
51
 
@@ -31,7 +31,7 @@ Investigate thoroughly, synthesize findings, and deliver structured knowledge be
31
31
  ## Skill Loading Contract
32
32
 
33
33
  - Do not call `skill_search` for `deep-research`, `architecture-designer`, `database-skills`, `openai-docs`, or `prompt-engineer` when the task is clearly research work.
34
- - Load `deep-research` first for all research tasks — it defines the research methodology.
34
+ - Load `deep-research` first for all research tasks — it defines the source ladder, evidence labeling, and research output contract.
35
35
  - Add `architecture-designer` when research involves system design patterns or tradeoffs.
36
36
  - Add `database-skills` when research involves data storage options or migration approaches.
37
37
  - Add `openai-docs` when research involves OpenAI API or model behavior verification.
@@ -51,6 +51,9 @@ Investigate thoroughly, synthesize findings, and deliver structured knowledge be
51
51
  ## Operating Stance
52
52
 
53
53
  - Breadth first, then depth — survey the landscape before drilling into specifics.
54
+ - Repo first, then web — inspect local code, configs, and docs before using external sources.
55
+ - Official docs first — use vendor or maintainer documentation as primary evidence.
56
+ - Community evidence is secondary — Reddit, blog posts, and forum threads can inform implementation, but label them as lower-trust support.
54
57
  - Cite sources — every finding should be traceable to evidence.
55
58
  - Distinguish fact from inference — clearly label assumptions.
56
59
  - Produce actionable findings — research without recommendations is incomplete.
@@ -72,3 +75,4 @@ Investigate thoroughly, synthesize findings, and deliver structured knowledge be
72
75
  - Clear distinction between verified facts and educated guesses.
73
76
  - Actionable recommendations with tradeoff analysis.
74
77
  - Remaining knowledge gaps identified.
78
+ - Output order: verified facts, secondary/community evidence, gaps, recommended next route.
@@ -1,9 +1,9 @@
1
1
  # Cubis Foundry — Shared Steering Protocol
2
2
 
3
- This is the canonical steering template. Platform-specific rules files are generated from this template
4
- plus per-platform overrides. Edit only here never edit platform rules files directly.
3
+ This is the canonical steering source for routing policy and managed MCP block language.
4
+ Keep platform rule files aligned with this template plus per-platform overrides, and do not duplicate the managed block into agent or workflow markdown.
5
5
 
6
- Generation: `npm run generate:platform-assets` (or `cbx workflows sync-rules`)
6
+ Managed-block sync: `npm run inject:mcp-rules:all` (or `cbx workflows sync-rules`)
7
7
 
8
8
  ---
9
9
 
@@ -17,6 +17,10 @@ Follow this decision tree for EVERY user request:
17
17
  │ └─ Execute directly. No routing needed. Stop.
18
18
  ├─ Did user explicitly name a workflow or agent?
19
19
  │ └─ Honor that route first. Stop.
20
+ ├─ Did user explicitly name an exact skill ID?
21
+ │ └─ Run skill_validate on that exact ID.
22
+ │ ├─ Valid? → Load it and proceed. Stop.
23
+ │ └─ Invalid/unavailable? → Fall through. Do not guess.
20
24
  ├─ Is it multi-step work in ONE domain?
21
25
  │ └─ Pick the best-fit workflow. Load it. Stop.
22
26
  ├─ Is it cross-domain work spanning 2+ specialties?
@@ -28,6 +32,7 @@ Follow this decision tree for EVERY user request:
28
32
  ```
29
33
 
30
34
  > **Rule:** Inspect the repo and task locally BEFORE choosing a route or loading any skill.
35
+ > **Rule:** If the user already chose the route, do not re-route it unless the named workflow, agent, or skill is invalid.
31
36
 
32
37
  ---
33
38
 
@@ -38,6 +43,7 @@ Follow this decision tree for EVERY user request:
38
43
  | **Direct execution** | No routing needed | Small, clear, single-step tasks | Just do it | "rename this variable" |
39
44
  | **Workflow** | Multi-step recipe with verification | Structured task with known pattern | `/plan`, `/create`, `/debug`, `/test` | "plan the auth system" |
40
45
  | **Agent** | Specialist persona with domain skills | Domain expertise needed for execution | `@backend-specialist`, `@security-auditor` | "design the API schema" |
46
+ | **Named skill** | Exact skill selected by the user | User already named the skill and it validates cleanly | `skill_validate` → `skill_get` | "use stitch for this screen" |
41
47
  | **Skill (MCP)** | Supporting domain knowledge | Domain context that a workflow or agent doesn't cover | `skill_get` after `skill_validate` | loading `typescript-pro` for TS conventions |
42
48
  | **skill_search** | Fuzzy discovery tool | Domain unclear, no skill ID known yet | One narrow search AFTER route_resolve | "what skill covers Prisma?" |
43
49
  | **route_resolve** | Intent → route mapper | Free-text request doesn't match any known route | MCP tool call with task description | "I need to optimize my database" |
@@ -47,17 +53,41 @@ Follow this decision tree for EVERY user request:
47
53
 
48
54
  ## 3) Skill Loading Protocol
49
55
 
50
- Skills are **supporting context** always route first, then load what the route recommends.
56
+ Skills are **supporting context** unless the user explicitly named the exact skill. In that case validate the named skill first, then proceed without route discovery.
51
57
 
52
58
  1. **Never begin with `skill_search`.** Inspect the repo/task locally first.
53
- 2. Resolve the route (workflow, agent, or direct execution) before loading any skills.
54
- 3. **After routing: if `route_resolve` returned `primarySkillHint` or `primarySkills`, load the first via `skill_validate` → `skill_get` before executing. Not optional for non-trivial tasks.**
55
- 4. If `detectedLanguageSkill` is returned and matches the project, load it too (if not already loaded this session).
56
- 5. Domain still unclear after routing? ONE narrow `skill_search`. Not two.
57
- 6. Call `skill_get` with `includeReferences: false` by default.
58
- 7. Load reference files one at a time with `skill_get_reference` only when a specific reference is needed.
59
- 8. Do not auto-prime every specialist. Only load what `primarySkills` recommends or the task clearly needs.
60
- 9. Never pass workflow IDs or agent IDs to skill tools.
59
+ 2. If the user explicitly named an exact skill ID, run `skill_validate` on that ID before any `route_resolve` call.
60
+ 3. Resolve the route (workflow, agent, or direct execution) before loading any non-explicit skills.
61
+ 4. **After routing: if `route_resolve` returned `primarySkillHint` or `primarySkills`, load the first via `skill_validate` `skill_get` before executing. Not optional for non-trivial tasks.**
62
+ 5. If `detectedLanguageSkill` is returned and matches the project, load it too (if not already loaded this session).
63
+ 6. Domain still unclear after routing? → ONE narrow `skill_search`. Not two.
64
+ 7. Call `skill_get` with `includeReferences: false` by default.
65
+ 8. Load reference files one at a time with `skill_get_reference` only when a specific reference is needed.
66
+ 9. Do not auto-prime every specialist. Only load what `primarySkills` recommends or the task clearly needs.
67
+ 10. Never pass workflow IDs or agent IDs to skill tools.
68
+
69
+ ---
70
+
71
+ ## 4A) Research Escalation
72
+
73
+ Use external research only when one of these is true:
74
+
75
+ 1. Freshness matters: latest APIs, model behavior, vendor docs, pricing, policies, releases, or client capabilities.
76
+ 2. Public comparison matters: tradeoff analysis across tools, frameworks, libraries, or hosted services.
77
+ 3. The user explicitly asks to research, compare, verify, or gather outside evidence.
78
+
79
+ Research source ladder:
80
+
81
+ 1. **Repo/local evidence first** — inspect code, config, docs, tests, and installed artifacts before going outside the workspace.
82
+ 2. **Official docs next** — vendor docs, upstream repos, standards, or maintainer documentation are primary evidence.
83
+ 3. **Community evidence last** — Reddit, blog posts, issue threads, and forum posts are allowed only as labeled secondary evidence.
84
+
85
+ Research output contract:
86
+
87
+ - **Verified facts** — claims backed by primary sources or local repo evidence.
88
+ - **Secondary/community evidence** — useful but lower-trust signals, clearly labeled.
89
+ - **Gaps / unknowns** — what could not be verified.
90
+ - **Recommended next route** — workflow, agent, or skill to use after research.
61
91
 
62
92
  ---
63
93
 
@@ -151,7 +181,8 @@ Use the best specialist first:
151
181
  2. Keep diffs small and reversible when possible.
152
182
  3. Verify with focused checks before finalizing.
153
183
  4. State what was NOT validated.
154
- 5. Use web search only when information may be stale or the user explicitly asks.
184
+ 5. Use web search only when information may be stale, public comparison matters, or the user explicitly asks.
185
+ 6. Prefer official docs first. Treat Reddit/community sources as secondary evidence and label them that way.
155
186
 
156
187
  ---
157
188
 
@@ -5,6 +5,7 @@
5
5
  - Workflows: `.claude/workflows`
6
6
  - Agents: `.claude/agents`
7
7
  - Skills: `.claude/skills`
8
+ - Hook templates: `.claude/hooks`
8
9
  - Rules file: `CLAUDE.md`
9
10
  - Scoped rules: `.claude/rules/*.md` (with `paths:` frontmatter)
10
11
 
@@ -26,4 +27,5 @@
26
27
  - Scoped rules in `.claude/rules/*.md` use `paths:` frontmatter for targeted file-pattern matching.
27
28
  - Global rules live in `~/.claude/CLAUDE.md` and apply to all projects.
28
29
  - Skills with `context: fork` spawn as isolated subagents for research-heavy or exploratory tasks.
30
+ - Optional hook templates in `.claude/hooks/` can reinforce explicit-route honoring and research escalation at `UserPromptSubmit`.
29
31
  - Use `$ARGUMENTS` in skill content for dynamic parameterization from user queries.
@@ -0,0 +1,20 @@
1
+ # Gemini CLI — Platform Overrides
2
+
3
+ ## Platform Paths
4
+
5
+ - Workflows: `.gemini/workflows`
6
+ - Skills: `.gemini/skills`
7
+ - Commands: `.gemini/commands`
8
+ - Rules file: `.gemini/GEMINI.md` (or `GEMINI.md` at repo root when used directly)
9
+
10
+ ## Platform-Specific Routing
11
+
12
+ 1. **Explicit Gemini command** (`.gemini/commands/*.toml`) — highest priority route.
13
+ 2. **Explicit workflow or named skill** — honor it directly before route discovery.
14
+ 3. Standard workflow and MCP routing from shared steering.
15
+
16
+ ## Platform Notes
17
+
18
+ - Gemini CLI uses GEMINI.md plus TOML commands as the primary enforcement surface.
19
+ - Gemini specialist behavior is posture-based; it does not rely on standalone agent markdown in the project profile.
20
+ - Use command wrappers to reinforce route-resolved execution and research escalation when freshness or public comparison matters.
@@ -32,7 +32,7 @@ Use this when joining a new project, exploring an unfamiliar codebase, or prepar
32
32
 
33
33
  - Primary skills: `deep-research`, `architecture-designer`
34
34
  - Supporting skills (optional): `legacy-modernizer`, `database-skills`, `typescript-pro`, `javascript-pro`, `python-pro`
35
- - Start with `deep-research` for systematic exploration and `architecture-designer` for architecture mapping. Add `legacy-modernizer` for undocumented systems.
35
+ - Start with `deep-research` for systematic exploration and `architecture-designer` for architecture mapping. Add `legacy-modernizer` for undocumented systems. Prefer repo evidence first; use external sources only when setup or dependency behavior cannot be confirmed locally.
36
36
 
37
37
  ## Workflow steps
38
38
 
@@ -25,7 +25,7 @@ Use this when a task spans multiple domains (backend + frontend, security + infr
25
25
 
26
26
  - Primary skills: `architecture-designer`, `api-designer`
27
27
  - Supporting skills (optional): `database-skills`, `deep-research`, `mcp-builder`, `openai-docs`, `prompt-engineer`, `skill-creator`
28
- - Start with `architecture-designer` for system design coordination and `api-designer` for integration contracts. Add supporting skills based on the coordination challenge.
28
+ - Start with `architecture-designer` for system design coordination and `api-designer` for integration contracts. Add `deep-research` before implementation when the coordination challenge depends on fresh external facts or public comparison.
29
29
 
30
30
  ## Workflow steps
31
31
 
@@ -37,12 +37,12 @@ Use this when starting a new feature, project, or significant change that needs
37
37
 
38
38
  - Primary skills: `architecture-designer`, `api-designer`
39
39
  - Supporting skills (optional): `database-skills`, `deep-research`, `mcp-builder`, `openai-docs`, `prompt-engineer`, `skill-creator`
40
- - Start with `architecture-designer` for system design and `api-designer` for API contracts. Add `database-skills` when data modeling is central, `deep-research` when external knowledge is needed.
40
+ - Start with `architecture-designer` for system design and `api-designer` for API contracts. Add `database-skills` when data modeling is central, `deep-research` when fresh external knowledge or public comparison is needed.
41
41
 
42
42
  ## Workflow steps
43
43
 
44
44
  1. Clarify scope, success criteria, and constraints.
45
- 2. Research existing patterns and dependencies.
45
+ 2. Research existing patterns and dependencies, starting in-repo and escalating to `deep-research` only when outside evidence is required.
46
46
  3. Decompose into tasks with ownership and dependencies.
47
47
  4. Define interfaces, contracts, and failure modes.
48
48
  5. Produce acceptance criteria for each milestone.