Skip to content

refactor(migrate): move planner decision logic out of the skill prose into rules.json - #48

Merged
Facundo Santiago (santiagxf) merged 3 commits into
mainfrom
cli-b30
Nov 16, 2026
Merged

Facundo Santiago (santiagxf) merged 3 commits into
mainfrom
cli-b30

Conversation

@santiagxf

@santiagxf Facundo Santiago (santiagxf) commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Stacked 1 of 2. #53 builds on this branch.

Summary

Decision logic that the planner applies was written out in the migrate-apim skill's instructions as well as encoded in rules.json. Two copies of the same rules drift. This moves the logic into rules.json and leaves the skill describing what the planner does rather than restating how it decides.

Covers the telemetry rules and the asset rules for model APIs and MCP servers.

Also in this PR

ARCHITECTURE.md documents the capabilities.json + rules.json contract: what each file owns, which code reads it, and what has to change together.

Verification

python -m pytest -q → 466 passed.

🤖 Generated with Claude Code

@santiagxf Facundo Santiago (santiagxf) changed the title Support CLI b30: Add provider.import and mcp.import bulk-import capabilities Pin the capability catalog to CLI 1.0.0b31 and compile it against a real release Nov 16, 2026
…contract

Explain the two-file pairing that describes the target platform:
- capabilities.json: declares CLI commands pinned to a specific extension version
- rules.json: maps APIM shapes to those capabilities with verdicts and plan item kinds

Document how the planner uses both files, the version contract when capabilities
change, the probe reconciliation, and what stays out of the code/instructions.
… rules

The telemetry destination decision (item:telemetry/destination) is now fully
specified in capabilities/rules.json rather than split between skill.md and
the rules.

Added to the telemetry rule:
- Detailed consequences for each option (reuse, new, gateway-only, retain)
- Note about ApplicationInsights exporter not being offered
- Explicit prerequisite field (appinsights-otlp)
- Prerequisites guide for each outcome

Updated skill.md to reference the rules instead of prescribing behavior.
This keeps decision logic in data files, not in LLM instructions.
Move three cases where platform knowledge and decision logic were prescribed
in skill.md to the rules.json data files instead:

1. resolve-models auto-execution:
   - Added 'note' and 'autoResolvable' fields to the models rule for
     unresolved/empty statuses, explaining why this is not a question

2. MCP tool discovery route preferences:
   - Added 'toolDiscoveryGuidance' to the mcpServers runtimeOnly rule with
     preferred route, fallback meaning, and communication guidance

3. publishable routes fact:
   - Already in rules.json rationale; skill.md updated to reference it
     rather than restating the platform fact

Updated skill.md to reference the rules instead of prescribing behavior.
Agents now derive this logic from the data files, not instructions.
@santiagxf Facundo Santiago (santiagxf) changed the title Pin the capability catalog to CLI 1.0.0b31 and compile it against a real release Re-pin the capability catalog to CLI 1.0.0b31 and drop what the CLI does not have Nov 16, 2026
@santiagxf Facundo Santiago (santiagxf) changed the title Re-pin the capability catalog to CLI 1.0.0b31 and drop what the CLI does not have fix(migrate): re-pin the capability catalog to CLI 1.0.0b31 and drop invalid commands Nov 16, 2026
@santiagxf Facundo Santiago (santiagxf) changed the title fix(migrate): re-pin the capability catalog to CLI 1.0.0b31 and drop invalid commands Move planner decision logic out of the skill prose into rules.json Nov 16, 2026
@santiagxf Facundo Santiago (santiagxf) changed the title Move planner decision logic out of the skill prose into rules.json refactor(migrate): move planner decision logic out of the skill prose into rules.json Nov 16, 2026

@paulyuk Paul Yuknewicz (paulyuk) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@santiagxf
Facundo Santiago (santiagxf) merged commit a80e1c5 into main Nov 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants