@cubis/foundry 0.3.62 → 0.3.63
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/mcp/README.md +49 -3
- package/mcp/dist/index.js +238 -30
- package/mcp/src/tools/index.ts +14 -0
- package/mcp/src/tools/registry.test.ts +7 -5
- package/mcp/src/tools/registry.ts +38 -0
- package/mcp/src/tools/skillGetReference.ts +77 -0
- package/mcp/src/tools/skillTools.test.ts +156 -0
- package/mcp/src/tools/skillValidate.ts +101 -0
- package/mcp/src/vault/manifest.test.ts +101 -0
- package/mcp/src/vault/manifest.ts +90 -0
- package/package.json +1 -1
- package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +57 -78
- package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +58 -79
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md +57 -78
- package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +57 -78
package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md
CHANGED
|
@@ -29,7 +29,7 @@ Rules:
|
|
|
29
29
|
2. Otherwise choose the best workflow by intent from `.github/copilot/workflows` and reuse `.github/prompts/workflow-*.prompt.md` when available.
|
|
30
30
|
3. For cross-domain tasks, use `/orchestrate` and `@orchestrator`.
|
|
31
31
|
4. Keep one primary workflow; use others only as supporting references.
|
|
32
|
-
5. Before
|
|
32
|
+
5. Before loading any skill, inspect the repo/task locally first. Use MCP skill tools only when the user names a skill explicitly or local grounding still leaves the domain unclear (→ §6 MCP Skill Engine).
|
|
33
33
|
|
|
34
34
|
## 3) Request Classifier
|
|
35
35
|
|
|
@@ -68,9 +68,11 @@ Use the best specialist first:
|
|
|
68
68
|
|
|
69
69
|
Before handing off to any specialist agent, prime context with the relevant domain skill (→ §6 MCP Skill Engine):
|
|
70
70
|
|
|
71
|
-
1.
|
|
72
|
-
2. If
|
|
73
|
-
3.
|
|
71
|
+
1. Validate user-named exact skills with `skill_validate <id>` before loading them.
|
|
72
|
+
2. If the domain is still unclear after local grounding, run one narrow `skill_search <domain>` and then validate the chosen exact ID with `skill_validate <id>`.
|
|
73
|
+
3. Load the core skill with `skill_get <id>` using `includeReferences:false` by default.
|
|
74
|
+
4. Pull one sidecar markdown file at a time with `skill_get_reference` when the skill or task requires it.
|
|
75
|
+
5. Include the validated skill ID in the Decision Log for the routing decision.
|
|
74
76
|
|
|
75
77
|
This ensures the specialist starts with accurate domain knowledge, not just role intent.
|
|
76
78
|
|
|
@@ -90,33 +92,40 @@ The Foundry MCP server is the primary knowledge layer. Use tools decisively —
|
|
|
90
92
|
|
|
91
93
|
| Prefix | Tools | When to use |
|
|
92
94
|
| ----------- | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
93
|
-
| `skill_*` | `skill_list_categories`, `skill_search`, `skill_browse_category`, `skill_get`, `skill_budget_report` | Domain expertise for
|
|
95
|
+
| `skill_*` | `skill_list_categories`, `skill_search`, `skill_validate`, `skill_browse_category`, `skill_get`, `skill_get_reference`, `skill_budget_report` | Domain expertise for implementation, debug, or review without loading the full catalog |
|
|
94
96
|
| `postman_*` | `postman_get_mode`, `postman_set_mode`, `postman_get_status` | API testing or Postman configuration tasks |
|
|
95
97
|
| `stitch_*` | `stitch_get_mode`, `stitch_set_profile`, `stitch_get_status` | Stitch data pipeline tasks |
|
|
96
98
|
|
|
97
|
-
###
|
|
99
|
+
### Validated Skill Flow (Mandatory Order)
|
|
98
100
|
|
|
99
|
-
Stop at the earliest step that gives enough signal. Do not jump ahead.
|
|
101
|
+
Stop at the earliest step that gives enough signal. Do not jump ahead or front-load skill discovery.
|
|
100
102
|
|
|
101
|
-
1.
|
|
102
|
-
2.
|
|
103
|
-
3.
|
|
104
|
-
4.
|
|
105
|
-
5.
|
|
103
|
+
1. Inspect the codebase/task locally first; do not start with `skill_search`
|
|
104
|
+
2. If the user names an exact skill ID, call `skill_validate <id>` directly
|
|
105
|
+
3. Otherwise, if local grounding still leaves the domain unclear, run one narrow `skill_search <keyword>`
|
|
106
|
+
4. Validate the selected exact skill ID with `skill_validate <id>` before any load
|
|
107
|
+
5. Load only the core `SKILL.md` with `skill_get <id>` and `includeReferences:false`
|
|
108
|
+
6. Load at most one sidecar markdown file at a time with `skill_get_reference <id> <path>`
|
|
109
|
+
7. Use `skill_list_categories` or `skill_browse_category` only as fallback when targeted search fails
|
|
110
|
+
8. Use `skill_budget_report` internally only when the user explicitly asks for context accounting
|
|
106
111
|
|
|
107
112
|
### Postman Intent Trigger (Required)
|
|
108
113
|
|
|
109
114
|
When user intent includes Postman workflows (for example: workspace, collection, environment, runCollection, monitor, mock, or "run Postman tests"):
|
|
110
115
|
|
|
111
|
-
1.
|
|
112
|
-
2. If
|
|
113
|
-
3.
|
|
114
|
-
4.
|
|
116
|
+
1. Validate `postman` directly with `skill_validate "postman"` when the exact skill ID is known.
|
|
117
|
+
2. If validation fails and local grounding is still insufficient, run a narrow `skill_search "postman"` and validate the selected exact ID.
|
|
118
|
+
3. Load `skill_get "postman"` with `includeReferences:false` before workflow/agent routing.
|
|
119
|
+
4. Prefer Postman MCP tools (`postman.*`) over Newman/CLI fallback unless the user explicitly asks for fallback.
|
|
120
|
+
5. If `--postman` was installed but `postman` skill cannot be found, report installation drift and suggest reinstall with `cbx workflows install ... --postman`.
|
|
115
121
|
|
|
116
122
|
**Hard rules:**
|
|
117
123
|
|
|
118
|
-
- Never call `skill_get` without
|
|
124
|
+
- Never call `skill_get` from fuzzy search output without first validating the exact ID via `skill_validate`
|
|
125
|
+
- Never skip local repo inspection and jump straight to `skill_search`
|
|
119
126
|
- Never call `skill_get` with a workflow ID — `workflow-*` are routes, not skills; keep workflow mentions in workflow decisions (`/workflow`) and keep skill logs skill-only
|
|
127
|
+
- Never call `skill_get` with `includeReferences:true` by default in agent workflows
|
|
128
|
+
- Never bulk-load sibling/reference markdown files when one targeted `skill_get_reference` will do
|
|
120
129
|
- Never reload a skill already loaded this session — reuse content already in context
|
|
121
130
|
- If `skill_search` returns 0 results, try `skill_browse_category`, then fall back to built-in knowledge
|
|
122
131
|
|
|
@@ -146,12 +155,23 @@ After `skill_get`, include at most one short line:
|
|
|
146
155
|
|
|
147
156
|
Do not append budget tables or token summaries unless the user explicitly asks.
|
|
148
157
|
|
|
158
|
+
### Reference Files (Required When Relevant)
|
|
159
|
+
|
|
160
|
+
Reference markdown files are first-class skill context, but they must be loaded selectively.
|
|
161
|
+
|
|
162
|
+
1. Use `skill_validate` to see `availableReferences` for the exact skill
|
|
163
|
+
2. Start with `skill_get(..., includeReferences:false)` to load only the core skill body
|
|
164
|
+
3. If the skill points to a reference or the task clearly needs sidecar detail, load one file with `skill_get_reference`
|
|
165
|
+
4. Only load another reference if the first one still leaves a concrete gap
|
|
166
|
+
|
|
149
167
|
|
|
150
168
|
### Anti-Patterns (Never Do These)
|
|
151
169
|
|
|
152
170
|
- Loading skills speculatively "just in case" they might be useful
|
|
153
|
-
- Calling `skill_get` before
|
|
171
|
+
- Calling `skill_get` before `skill_validate`
|
|
154
172
|
- Using partial or guessed skill IDs in `skill_get`
|
|
173
|
+
- Treating `skill_search` results as an implicit final selection
|
|
174
|
+
- Starting a task with `skill_list_categories` or broad catalog browsing
|
|
155
175
|
- Publishing verbose budget fields (`full_catalog_est_tokens`, `loaded_est_tokens`, etc.) in responses
|
|
156
176
|
- Re-emitting the ctx stamp multiple times within a single response
|
|
157
177
|
- Treating workflow IDs as skill IDs in any MCP tool call
|
|
@@ -243,66 +263,25 @@ Selection policy:
|
|
|
243
263
|
<!-- cbx:workflows:auto:end -->
|
|
244
264
|
|
|
245
265
|
<!-- cbx:mcp:auto:start version=1 -->
|
|
246
|
-
## Cubis Foundry MCP
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
###
|
|
251
|
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
- `game-dev`: 1 skill(s)
|
|
266
|
-
- `general`: 26 skill(s)
|
|
267
|
-
- `localization`: 1 skill(s)
|
|
268
|
-
- `marketing`: 2 skill(s)
|
|
269
|
-
- `mobile`: 7 skill(s)
|
|
270
|
-
- `observability`: 1 skill(s)
|
|
271
|
-
- `payments`: 1 skill(s)
|
|
272
|
-
- `performance`: 2 skill(s)
|
|
273
|
-
- `practices`: 5 skill(s)
|
|
274
|
-
- `saas`: 1 skill(s)
|
|
275
|
-
- `security`: 4 skill(s)
|
|
276
|
-
- `testing`: 6 skill(s)
|
|
277
|
-
- `tooling`: 3 skill(s)
|
|
278
|
-
|
|
279
|
-
### Built-in Tools
|
|
280
|
-
|
|
281
|
-
**Skill Discovery:**
|
|
282
|
-
- `skill_list_categories`: List all skill categories available in the vault. Returns category names and skill counts.
|
|
283
|
-
- `skill_browse_category`: Browse skills within a specific category. Returns skill IDs and short descriptions.
|
|
284
|
-
- `skill_search`: Search skills by keyword. Matches against skill IDs and descriptions.
|
|
285
|
-
- `skill_get`: Get full content of a specific skill by ID. Returns SKILL.md content and referenced files.
|
|
286
|
-
- `skill_budget_report`: Report estimated context/token budget for selected and loaded skills.
|
|
287
|
-
|
|
288
|
-
**Postman Integration:**
|
|
289
|
-
- `postman_get_mode`: Get current Postman MCP mode from cbx_config.
|
|
290
|
-
- `postman_set_mode`: Set Postman MCP mode in cbx_config.
|
|
291
|
-
- `postman_get_status`: Get Postman integration status and active profile.
|
|
292
|
-
|
|
293
|
-
**Stitch Integration:**
|
|
294
|
-
- `stitch_get_mode`: Get Stitch MCP mode from cbx_config.
|
|
295
|
-
- `stitch_set_profile`: Switch active Stitch profile in cbx_config.
|
|
296
|
-
- `stitch_get_status`: Get Stitch integration status and active profile.
|
|
297
|
-
|
|
298
|
-
### Skill Discovery Flow
|
|
299
|
-
|
|
300
|
-
Use progressive disclosure to minimize context usage:
|
|
301
|
-
1. `skill_list_categories` → see available categories and counts
|
|
302
|
-
2. `skill_browse_category` → browse skills in a category with short descriptions
|
|
303
|
-
3. `skill_search` → search by keyword across all skills
|
|
304
|
-
4. `skill_get` → load full content of a specific skill (only tool that reads full content)
|
|
305
|
-
5. `skill_budget_report` → check token usage for selected/loaded skills; use result to emit the § Context Budget Tracking stamp
|
|
266
|
+
## Cubis Foundry MCP (auto-managed)
|
|
267
|
+
|
|
268
|
+
Keep MCP context lazy and exact. Do not front-load the skill catalog.
|
|
269
|
+
|
|
270
|
+
### Compact Tool Map
|
|
271
|
+
|
|
272
|
+
- Skill tools: `skill_search`, `skill_validate`, `skill_get`, `skill_get_reference`, `skill_budget_report`
|
|
273
|
+
- Fallback browsing only: `skill_list_categories`, `skill_browse_category`
|
|
274
|
+
- Config tools: `postman_*`, `stitch_*`
|
|
275
|
+
|
|
276
|
+
### Validated Skill Flow
|
|
277
|
+
|
|
278
|
+
1. Inspect the repo/task locally first. Do not start with `skill_search`.
|
|
279
|
+
2. If the user names an exact skill, run `skill_validate` directly. Otherwise use one narrow `skill_search` only if local grounding still leaves the domain unclear.
|
|
280
|
+
3. Always run `skill_validate` on the exact selected ID before `skill_get`.
|
|
281
|
+
4. Call `skill_get` with `includeReferences:false` by default.
|
|
282
|
+
5. Load at most one sidecar markdown file at a time with `skill_get_reference`.
|
|
283
|
+
6. Use `skill_list_categories` or `skill_browse_category` only as fallback when targeted search fails.
|
|
284
|
+
7. Never print catalog counts or budget details unless the user asks.
|
|
306
285
|
|
|
307
286
|
### Connection
|
|
308
287
|
|