Skip to content

feat: recognise DEFINE AGENT - #6

Open
vitorbabo-cf wants to merge 2 commits into
CorefluxCommunity:mainfrom
vitorbabo-cf:feat/ENG-426/lint-define-agent
Open

vitorbabo-cf wants to merge 2 commits into
CorefluxCommunity:mainfrom
vitorbabo-cf:feat/ENG-426/lint-define-agent

Conversation

@vitorbabo-cf

Copy link
Copy Markdown
Contributor

Summary

  • Teach lot_lint / entity splitting about DEFINE AGENT, matching the broker parser on main (USES LLM ROUTE|CONNECTOR, required WITH DEFAULT_USER, ADD TOOL "…" WITH TOPICS|TARGET|LEVEL, deploy via -addAgent after routes).
  • Cover the Training showcase agents (DemoFlightsAgent, MaintenancePlanner, EnergyAgent, ComfortAgent) plus invalid cases.
  • Skip the false “model has no AS TRIGGER” warning when the model header inherits with FROM Parent.

Context

lot_lint lives in this plugin (plugins/coreflux/scripts/mcp/lib/lot.mjs), not the broker -validateLot. Other incomplete sites (left untouched): VSCodeLotNotebook/src/lot/lotAnalyzer.ts, coreflux-mcp/src/lot/parse.ts.

Test plan

  • npm run ci (validate + check + 72 tests) green locally
  • Showcase agent cells lint clean; malformed agents error; FROM child skips AS TRIGGER warning

…rning

lot_lint (Cursor plugin MCP) treated DEFINE AGENT as unknown. Mirror the
broker parser: USES LLM ROUTE|CONNECTOR first, required DEFAULT_USER,
ADD TOOL "name" with TOPICS|TARGET|LEVEL, deploy as -addAgent after routes.
Also skip the missing-AS-TRIGGER warning when a model inherits via FROM.
@github-actions github-actions Bot added area: mcp-server coreflux-broker MCP server and MQTT client area: tests Test suites and fixtures labels Oct 15, 2026
@vitorbabo-cf vitorbabo-cf changed the title feat(lot_lint): recognise DEFINE AGENT (ENG-426) feat(lot_lint): recognise DEFINE AGENT Oct 19, 2026
@vitorbabo-cf vitorbabo-cf changed the title feat(lot_lint): recognise DEFINE AGENT feat: recognise DEFINE AGENT Oct 19, 2026
HugoAVaz pushed a commit that referenced this pull request Oct 20, 2026
## Summary

The plugin stops carrying its own drifted copies of the LoT/broker
skills. It now ships a pinned copy of
[CorefluxCommunity/coreflux-skills](https://github.com/CorefluxCommunity/coreflux-skills),
which is generated from the broker's skill sources and tagged per broker
release.

- **Synced skills** (tag `2.21.16-rc.186`): `broker-tools`,
`lot-actions`, `lot-models`, `lot-routes`, `lot-rules`, `lot-agents`,
`lot-things`, `lot-panels`, `lot-themes`, `python-scripts`.
- **`scripts/sync-skills.mjs`**: `npm run skills:sync -- --ref <tag>`
moves the pin, which is recorded as `brokerVersion` in
`skills/skills.json`. `npm run skills:check` runs in CI and the release
flow, and fails if the bundle differs from the pinned tag. Fixes go to
the broker, not here.
- **Removed:** the hand-written `lot-authoring`, `broker-commands`,
`broker-observability`, `broker-security` and `lot-projects` skills.
Several of their claims were wrong against the broker, including Python
import blocklists, `USER HAS "AllowedSubscribe"`, user `SubscribeSys`
rules, `METHOD`/`SWITCH` keywords and a number of route settings.
- **New plugin-owned `coreflux-cursor-tools` skill:** the shared skills
name the broker's own MCP tools (`deploy_lot`, `validate_lot`,
`diagnose`, …), and this skill maps them to this plugin's tools.
- **Updated to the new skill names:** rules, agents, commands and the
session hook. `/coreflux-secure` no longer recommends user
`SubscribeSys` rules, which are never consulted.
- **`check-sources`:** the "only mention tools this server exposes"
check skips the synced skills, which describe the broker's tool surfaces
on purpose.
- **`lot_deploy` / `lotnb_deploy`** now deploy `DEFINE THING`: every
Thing block, templates included, goes as one `-addThing` after rules,
matching the broker's deploy and folder loader. `lot_remove` takes
`THING`.

## Stacked on #6

This branch merges `feat/ENG-426/lint-define-agent` (#6), which adds
`DEFINE AGENT` deploy and lint. **Merge #6 first**; until then this PR's
diff includes its changes.

## Content still missing from the broker skills

The guidance the old skills had that the broker lacked (the raw MQTT
command surface and reply format, the `$SYS` topic map, the
troubleshooting checklist, users and secrets, projects and `.lotnb`, and
LoT trigger and route examples) is being added to the broker as a new
`broker-operations` skill plus edits to the LoT skills. It reaches this
plugin with the next coreflux-skills tag, through `npm run skills:sync
-- --ref <tag>`.

## Test plan

- [x] `npm run ci`: validate, check-sources, skills:check, 74 unit tests
- [x] `skills:check` fails on a hand-edited synced file
- [ ] CI integration job against a real broker

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp-server coreflux-broker MCP server and MQTT client area: tests Test suites and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant