mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 11:19:27 +08:00
feat: skill selection rule
This commit is contained in:
parent
c1cfb9f672
commit
5129e6a4dc
@ -17,6 +17,17 @@ Enforce: **skill load -> API context -> file generation** for all Salesforce met
|
||||
- Search available skills and load the best-matching app-level skill first when the request asks for a Lightning app, end-to-end solution, or a business app spanning multiple metadata types.
|
||||
- Search available skills and load the best-matching per-type metadata skill first when the request targets individual metadata components.
|
||||
|
||||
## Task Planning and Skill Re-evaluation
|
||||
|
||||
Before starting metadata generation, create a short plan with clearly separated, atomic tasks.
|
||||
|
||||
- Each task must include `task=<name> selected_skill=<exact-skill-name|none>`.
|
||||
- Determine the most appropriate skill before each task.
|
||||
- Prefer specialized skills over general skills when both are available.
|
||||
- Re-evaluate the selected skill after each task completes.
|
||||
- Switch skills when a different skill is better suited.
|
||||
- Do not reuse the same skill across unrelated tasks unless it is still the best match.
|
||||
|
||||
## Initial Gate
|
||||
|
||||
Never create files or generate metadata before completing skill selection.
|
||||
@ -83,6 +94,7 @@ For each metadata type in scope, whether identified by an app-level skill or req
|
||||
| Never skip the API context attempt for any type | No schema for those types | Attempt API context for EVERY type |
|
||||
| Never write using API context alone without a loaded skill | Missing platform constraints | Stop and ask for guidance when no skill exists |
|
||||
| Never write without recorded `mcp_tools` or `mcp=unavailable` | No evidence of MCP gate completion | Record MCP tool usage before any write |
|
||||
| Never keep one skill for unrelated tasks | Poor task-skill fit | Re-evaluate and switch skills at each task boundary |
|
||||
| Never ask more than 1 clarifying question | Token waste | Max 1 question |
|
||||
| Never skip any gate in the loop (skill load, API context, pre-write, checkpoint) | Wrong artifacts | Follow all mandatory gates in the loop (a-e) |
|
||||
| Never write with a missing checkpoint | Aware violation | Stop and complete missing step |
|
||||
|
||||
19
rules/skill-selection-rule.md
Normal file
19
rules/skill-selection-rule.md
Normal file
@ -0,0 +1,19 @@
|
||||
# SKILL SELECTION RULE
|
||||
|
||||
## Task-First Planning
|
||||
- Create a plan with clearly separated tasks.
|
||||
- Each task must be small and atomic.
|
||||
- For each task, explicitly state the skill to use (for example: typescript, api, testing, performance).
|
||||
- Execute each task with the most appropriate skill.
|
||||
|
||||
## Execution Rules
|
||||
- Re-evaluate the skill before every task.
|
||||
- Switch skills when needed.
|
||||
- Do not reuse the same skill across unrelated tasks.
|
||||
|
||||
## Selection Behavior
|
||||
- Before each task, determine the most appropriate skill.
|
||||
- Do not stay locked into a single skill for the entire plan.
|
||||
- Switch skills when a different skill is better suited.
|
||||
- Prefer specialized skills over general ones.
|
||||
- Re-evaluate skill choice after completing each task.
|
||||
Loading…
Reference in New Issue
Block a user