Files
action-topology-engine/docs/design/no-llm-topology-engine.md
2026-06-16 14:26:08 +08:00

40 lines
1.5 KiB
Markdown

# No-LLM Topology Engine Design
## Purpose
Build a small deterministic engine that maps a website into a verifiable action topology. Other projects can consume the graph for planning, orchestration, or LLM-assisted behavior. This project stays narrow: it observes, indexes, and verifies browser-operable structure.
## Core Unit
```text
State A -- action(element, params) --> State B / Effect
```
The engine does not index DOM nodes in isolation. It indexes actionable elements inside a state, the locators that can find them, the action that can be applied, and the observable effect.
## First Implementation Slice
1. Capture a page state from an entry URL.
2. Extract visible actionable elements.
3. Generate locator candidates and verify uniqueness.
4. Explore a bounded set of low-risk click actions from the entry state.
5. Record resulting states and effects.
6. Emit a graph JSON artifact.
## Explicit Non-Goals
- No LLM.
- No natural-language task planner.
- No uncontrolled high-risk actions.
- No deep frontend function reconstruction in the first version.
- No complete arbitrary-site crawler.
## Risk Policy
The first explorer only clicks low-risk candidates. Terms such as delete, submit, pay, confirm, authorize, and their Chinese equivalents are classified as high risk and skipped. Form fields are treated as medium risk and are captured but not automatically filled.
## Storage
The first version emits JSON. SQLite or Postgres can be added later after the graph shape stabilizes.