Skip to content

Commit fbcc2ed

Browse files
authored
Merge pull request #360 from TencentCloudBase/review/pr-340-clean
merge(pr340): 🔀 integrate main and restore converged function tools
2 parents 7c10709 + 0759af0 commit fbcc2ed

91 files changed

Lines changed: 13945 additions & 5086 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/commands/mcp_design_review.mdc

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ When the user types `/mcp_design_review`.
1515
2. **Evaluate design against the guidelines**
1616
For each tool and its surrounding design, check:
1717

18+
- **Confirmed target shape takes precedence**
19+
- If the current spec, task, or explicit user feedback has already locked a shape (for example “this module must converge to one `queryXxx` and one `manageXxx`”), treat deviations as failures, not optional suggestions.
20+
- Do not propose a locally elegant alternative if it breaks an already confirmed module boundary, naming style, or migration target.
21+
1822
- **Tool responsibility & naming**
1923
- Single clear responsibility per tool (no “god” tools).
2024
- Names follow `verbNoun` style and reflect the domain (e.g. `getFunctionLayers`, `writeFunctionLayers`).
@@ -25,11 +29,17 @@ When the user types `/mcp_design_review`.
2529
- a manage tool: `manageXxx` – performs all mutations via a required `action` field.
2630
- The `manageXxx` tool:
2731
- Uses a string literal union for `action` (e.g. `"create" | "update" | "delete" | "attachLayer" | "detachLayer"`).
28-
- Groups parameters by `action` (discriminated unions or clearly documented per‑action payload).
32+
- Uses action-specific parameters that are easy for AI to map correctly. Prefer the repository’s established style first; do not invent namespaced actions or grouped payloads unless the surrounding modules already use that pattern.
2933
- Treats missing/unknown `action` as invalid and fails safely.
3034
- Tool count control: avoid creating many small tools (e.g. `createX`, `updateX`, `deleteX`) in the same domain when a single `manageXxx` with multiple actions is sufficient.
35+
- Before approving any new fine-grained tool, explicitly check whether the capability can be merged into an existing `queryXxx` / `manageXxx` primary entrance in the same module.
3136
- Safety & annotations: tools must clearly indicate whether they are read‑only or mutating in their metadata, and dangerous actions (delete, publish, reset, overwrite, etc.) must require explicit confirmation flags with safe defaults.
3237

38+
- **Cross-module consistency**
39+
- Compare the proposed schema with neighboring modules in `mcp/src/tools/`, not just the local file.
40+
- Flag designs that introduce one-off conventions, such as namespaced action strings or special payload grouping, when other modules use flat action names and top-level fields.
41+
- Check whether target identifiers stay consistent across actions (`functionName`, `layerName`, `triggerName`) instead of mixing generic `name` with domain-specific names.
42+
3343
- **Read vs write separation**
3444
- Read tools are side‑effect free and focused on querying.
3545
- Write tools perform explicit mutations with clear targets and payloads.
@@ -63,7 +73,7 @@ When the user types `/mcp_design_review`.
6373
- Output a markdown report with three sections:
6474
- **Summary**: overall pass/fail status and high‑level observations.
6575
- **Per‑tool checklist**: for each major tool group (`functions`, `env`, `database`, `storage`, etc.), list which guidelines are satisfied and which are violated or unclear.
66-
- **Actionable recommendations**: concrete refactoring suggestions (e.g. “split X into read/write”, “add `nextActions` to Y”, “add `confirm` flag to Z delete operation”).
76+
- **Actionable recommendations**: concrete refactoring suggestions (e.g. “merge X into existing `queryXxx`”, “keep flat actions to match other modules”, “add `confirm` flag to Z delete operation”).
6777

6878
4. **Optional follow‑up**
69-
- If requested, generate a prioritized refactoring plan based on the findings (smallest, safest changes first), referencing the existing refactoring checklist in `specs/code-quality-analysis/REFACTORING_CHECKLIST.md`.
79+
- If requested, generate a prioritized refactoring plan based on the findings (smallest, safest changes first), referencing the existing refactoring checklist in `specs/code-quality-analysis/REFACTORING_CHECKLIST.md`.

config/.agent/rules/miniprogram-development/references/cloudbase-integration.md

Lines changed: 0 additions & 191 deletions
This file was deleted.

config/.agent/rules/miniprogram-development/references/devtools-debug-preview.md

Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
 (0)