adding ABANDON in multi-intent/intent-shift

This commit is contained in:
2026-09-17 00:06:00 -03:00
parent 0d0c95f9f8
commit 0d2b0f1084
960 changed files with 1983 additions and 80 deletions

View File

@@ -1293,6 +1293,28 @@ Agents:
This second template shows how to reuse the same architecture for another business domain.
### Transaction decisions: CONTINUE, SHIFT, and ABANDON
When a transaction is active, the `EnterpriseRouter` semantic classifier distinguishes three outcomes:
- `CONTINUE`: the message still belongs to the active transaction;
- `SHIFT`: the message starts another goal without explicitly giving up the current action;
- `ABANDON`: the user explicitly gives up the current action/transaction.
`ABANDON` is a routing decision, not a new persisted `transaction_status`. The operational terminal state remains `CANCELLED`. The router publishes `transaction_interruption=explicit_abandonment`; the runtime closes the active transaction, clears its live latches, and records `cancelled_by_explicit_abandonment`. For a pure abandonment with no new goal, the router uses `state:TRANSACTION_ABANDONED` with `mcp_tools=[]` so the abandoned tool cannot be selected again by the same turn.
The decision does not globally clear `pending_topics`. In multi-intent flows, unrelated pending operations remain available. `SHIFT` must not be interpreted as abandoning the entire plan either.
Examples:
```text
"before that, show my subscribed services" -> SHIFT
"I don't want to cancel anymore" -> ABANDON
"the order is PED-1001" -> CONTINUE
```
When `ABANDON` also contains a new goal, `intent` and `agent` point to that goal. For pure abandonment, the LLM may omit them and the framework creates the technical abandonment intent.
### Generic deterministic intent shift — current behavior
> Content consolidated from `Documentacao/RELEASE_NOTES_GENERIC_DETERMINISTIC_INTENT_SHIFT_V15.md`.

View File

@@ -1295,6 +1295,28 @@ Agentes:
Este segundo template mostra como reutilizar a mesma arquitetura para outro domínio de negócio.
### Decisões transacionais: CONTINUE, SHIFT e ABANDON
Quando existe uma transação ativa, o classificador semântico do `EnterpriseRouter` diferencia três resultados:
- `CONTINUE`: a mensagem ainda responde à transação ativa;
- `SHIFT`: a mensagem inicia outro objetivo sem uma desistência explícita da ação corrente;
- `ABANDON`: a mensagem desiste explicitamente da ação/transação corrente.
`ABANDON` é uma decisão de roteamento. O estado operacional terminal permanece `CANCELLED`. O router publica `transaction_interruption=explicit_abandonment`; o runtime encerra a transação ativa, limpa seus latches e registra `cancelled_by_explicit_abandonment`. Em abandono puro, sem uma nova intent, o router usa `state:TRANSACTION_ABANDONED` e `mcp_tools=[]`, impedindo a reseleção da tool abandonada.
A decisão não limpa globalmente `pending_topics`. Em multi-intent, operações pendentes não relacionadas continuam disponíveis. `SHIFT` também não deve ser interpretado como abandono de todo o plano.
Exemplos:
```text
"antes disso, quero consultar meus serviços" -> SHIFT
"não quero mais cancelar" -> ABANDON
"é o pedido PED-1001" -> CONTINUE
```
Com `ABANDON` acompanhado de um novo objetivo, `intent` e `agent` apontam para esse novo objetivo. Em abandono puro, ambos podem ser omitidos pelo LLM e o framework cria o intent técnico de abandono.
### Intent shift determinístico genérico — comportamento atual
> Conteúdo consolidado a partir de `Documentacao/RELEASE_NOTES_GENERIC_DETERMINISTIC_INTENT_SHIFT_V15.md`.