agentera 3.0.0-dev.27 → 3.0.0-dev.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/CHANGELOG.md +10 -0
- package/bundle/DESIGN.md +3 -7
- package/bundle/README.md +1 -4
- package/bundle/UPGRADE.md +33 -0
- package/bundle/fixtures/routing/hybrid-corpus.yaml +154 -0
- package/bundle/references/adapters/package-registry.yaml +2 -0
- package/bundle/references/adapters/package-surface-characterization.md +2 -2
- package/bundle/references/analysis/benchmark.md +2 -9
- package/bundle/references/artifacts/state-storage-authority.yaml +298 -13
- package/bundle/references/cli/capability-instruction-structure.md +2 -2
- package/bundle/references/cli/hybrid-route-contract.yaml +416 -0
- package/bundle/references/cli/prime-consumer-compatibility.yaml +12 -11
- package/bundle/references/cli/routing-model.md +136 -91
- package/bundle/references/cli/trigger-schema-enrichment.md +50 -46
- package/bundle/references/cli/vocabulary.md +7 -9
- package/bundle/references/meta/documentation-inventory.md +1 -3
- package/bundle/skills/agentera/SKILL.md +50 -18
- package/bundle/skills/agentera/capabilities/audit/schemas/triggers.yaml +13 -35
- package/bundle/skills/agentera/capabilities/build/schemas/triggers.yaml +14 -36
- package/bundle/skills/agentera/capabilities/design/schemas/triggers.yaml +5 -34
- package/bundle/skills/agentera/capabilities/discuss/schemas/triggers.yaml +6 -40
- package/bundle/skills/agentera/capabilities/document/schemas/triggers.yaml +5 -34
- package/bundle/skills/agentera/capabilities/optimize/schemas/triggers.yaml +4 -35
- package/bundle/skills/agentera/capabilities/orchestrate/schemas/triggers.yaml +5 -37
- package/bundle/skills/agentera/capabilities/plan/schemas/triggers.yaml +8 -31
- package/bundle/skills/agentera/capabilities/profile/schemas/triggers.yaml +8 -37
- package/bundle/skills/agentera/capabilities/research/schemas/triggers.yaml +5 -29
- package/bundle/skills/agentera/capabilities/status/schemas/triggers.yaml +7 -47
- package/bundle/skills/agentera/capabilities/vision/schemas/triggers.yaml +7 -39
- package/bundle/skills/agentera/capability_schema_contract.yaml +29 -29
- package/bundle/skills/agentera/route-phrases.yaml +81 -0
- package/bundle/skills/agentera/schemas/artifacts/plan.yaml +1 -1
- package/dist/capabilities/discuss/instructions.js +1 -1
- package/dist/capabilities/discuss/instructions.js.map +1 -1
- package/dist/capabilities/plan/instructions.js +1 -1
- package/dist/capabilities/plan/instructions.js.map +1 -1
- package/dist/cli/capabilityContext/evidence.js +1 -1
- package/dist/cli/capabilityContext/evidence.js.map +1 -1
- package/dist/cli/commands/entityMigrate.js +7 -3
- package/dist/cli/commands/entityMigrate.js.map +1 -1
- package/dist/cli/commands/prime/briefOrientation.js +10 -3
- package/dist/cli/commands/prime/briefOrientation.js.map +1 -1
- package/dist/cli/commands/prime/collectEntityOrientation.js +64 -4
- package/dist/cli/commands/prime/collectEntityOrientation.js.map +1 -1
- package/dist/cli/commands/prime/orientationOutput.js +41 -15
- package/dist/cli/commands/prime/orientationOutput.js.map +1 -1
- package/dist/cli/commands/prime.js +4 -3
- package/dist/cli/commands/prime.js.map +1 -1
- package/dist/cli/commands/route.js +142 -0
- package/dist/cli/commands/route.js.map +1 -0
- package/dist/cli/commands/state/write.js +19 -0
- package/dist/cli/commands/state/write.js.map +1 -1
- package/dist/cli/commands/verify.js +17 -1
- package/dist/cli/commands/verify.js.map +1 -1
- package/dist/cli/dispatch/index.js +18 -0
- package/dist/cli/dispatch/index.js.map +1 -1
- package/dist/cli/errors.js +2 -2
- package/dist/cli/errors.js.map +1 -1
- package/dist/cli/help.js +20 -1
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/migrationRequired.js +1 -1
- package/dist/cli/migrationRequired.js.map +1 -1
- package/dist/eval/hybridRouteEvaluation.js +156 -0
- package/dist/eval/hybridRouteEvaluation.js.map +1 -0
- package/dist/registries/capabilityContract.js +5 -20
- package/dist/registries/capabilityContract.js.map +1 -1
- package/dist/registries/hybridRoute.js +203 -0
- package/dist/registries/hybridRoute.js.map +1 -0
- package/dist/registries/hybridRouteReceipt.js +221 -0
- package/dist/registries/hybridRouteReceipt.js.map +1 -0
- package/dist/registries/triggerLoader.js +7 -43
- package/dist/registries/triggerLoader.js.map +1 -1
- package/dist/release/releaseMetadata.js +2 -0
- package/dist/release/releaseMetadata.js.map +1 -1
- package/dist/state/archiveDiscovery.js +24 -35
- package/dist/state/archiveDiscovery.js.map +1 -1
- package/dist/state/canonicalMigrationRecord.js +37 -0
- package/dist/state/canonicalMigrationRecord.js.map +1 -0
- package/dist/state/decisionEntities.js +73 -33
- package/dist/state/decisionEntities.js.map +1 -1
- package/dist/state/decisionLegacyValidation.js +31 -0
- package/dist/state/decisionLegacyValidation.js.map +1 -1
- package/dist/state/decisionMigrationProvenance.js +117 -0
- package/dist/state/decisionMigrationProvenance.js.map +1 -0
- package/dist/state/durability.js +24 -5
- package/dist/state/durability.js.map +1 -1
- package/dist/state/entityCutover.js +2 -2
- package/dist/state/entityCutover.js.map +1 -1
- package/dist/state/entityMigrationCausality.js +99 -0
- package/dist/state/entityMigrationCausality.js.map +1 -0
- package/dist/state/entityMigrationPreview.js +138 -77
- package/dist/state/entityMigrationPreview.js.map +1 -1
- package/dist/state/entityStorage.js +59 -24
- package/dist/state/entityStorage.js.map +1 -1
- package/dist/state/healthEntities.js +28 -31
- package/dist/state/healthEntities.js.map +1 -1
- package/dist/state/legacySummaryRecord.js +7 -0
- package/dist/state/legacySummaryRecord.js.map +1 -0
- package/dist/state/listCursor.js +43 -0
- package/dist/state/listCursor.js.map +1 -0
- package/dist/state/migrationSourceBinding.js +29 -0
- package/dist/state/migrationSourceBinding.js.map +1 -0
- package/dist/state/progressEntities.js +35 -59
- package/dist/state/progressEntities.js.map +1 -1
- package/dist/state/retrievalAuthority.js +10 -0
- package/dist/state/retrievalAuthority.js.map +1 -1
- package/dist/state/summaryEntityRead.js +26 -0
- package/dist/state/summaryEntityRead.js.map +1 -0
- package/dist/state/summaryMigrationProvenance.js +67 -0
- package/dist/state/summaryMigrationProvenance.js.map +1 -0
- package/dist/state/summarySourceRowAuthority.js +37 -0
- package/dist/state/summarySourceRowAuthority.js.map +1 -0
- package/dist/validate/capability.js +11 -2
- package/dist/validate/capability.js.map +1 -1
- package/package.json +2 -2
- package/bundle/references/analysis/analytics-boundary-proportional-2026-07-20.yaml +0 -74
- package/bundle/references/analysis/evidence/analytics-boundary-proportional-2026-07-20/source-focused-1.json.gz +0 -0
- package/bundle/references/analysis/evidence/analytics-boundary-proportional-2026-07-20/source-focused-2.json.gz +0 -0
- package/bundle/references/analysis/evidence/analytics-boundary-proportional-2026-07-20/source-focused-3.json.gz +0 -0
- package/bundle/references/analysis/evidence/migration-pagination-proportional-2026-07-20/source-focused-1.json.gz +0 -0
- package/bundle/references/analysis/evidence/migration-pagination-proportional-2026-07-20/source-focused-2.json.gz +0 -0
- package/bundle/references/analysis/evidence/migration-pagination-proportional-2026-07-20/source-focused-3.json.gz +0 -0
- package/bundle/references/analysis/evidence/verification-baseline-2026-07-20/precommit-cli-route.log.gz +0 -0
- package/bundle/references/analysis/evidence/verification-baseline-2026-07-20/precommit-cli.log.gz +0 -0
- package/bundle/references/analysis/evidence/verification-baseline-2026-07-20/precommit-documentation.log.gz +0 -0
- package/bundle/references/analysis/evidence/verification-baseline-2026-07-20/recompute.mjs +0 -98
- package/bundle/references/analysis/evidence/verification-baseline-2026-07-20/source-1.json.gz +0 -0
- package/bundle/references/analysis/evidence/verification-baseline-2026-07-20/source-2.json.gz +0 -0
- package/bundle/references/analysis/evidence/verification-baseline-2026-07-20/source-3.json.gz +0 -0
- package/bundle/references/analysis/migration-pagination-proportional-2026-07-20.yaml +0 -64
- package/bundle/references/analysis/verification-baseline-2026-07-20.yaml +0 -313
- package/bundle/references/analysis/verification-final-proof-2026-07-21.yaml +0 -340
- package/bundle/references/analysis/worker-policy-2026-07-21.yaml +0 -207
|
@@ -1,94 +1,139 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
# Hybrid routing model
|
|
2
|
+
|
|
3
|
+
The portable shared skill and CLI use one hybrid cascade. Explicit routes and
|
|
4
|
+
curated, globally unique literal phrases provide deterministic tiers; open-ended
|
|
5
|
+
language remains host-owned. The normative protocol is
|
|
6
|
+
[`hybrid-route-contract.yaml`](./hybrid-route-contract.yaml); this page is a
|
|
7
|
+
reader-oriented model, not a second contract.
|
|
8
|
+
|
|
9
|
+
Decision 76 remains in force for natural-language judgment. Decision mpulyomlyl supersedes it only for the curated literal fast path: there is still no scoring engine, no confidence threshold, and no borderline band. Legacy trigger patterns, regexes, thresholds, and bands do not route requests.
|
|
10
|
+
|
|
11
|
+
## Cascade and precedence
|
|
12
|
+
|
|
13
|
+
1. **Bare `/agentera`.** With no added text, select status deterministically.
|
|
14
|
+
2. **Explicit direct route.** A canonical capability name or primary alias uses
|
|
15
|
+
the established direct-route grammar and passes its remaining text as topic.
|
|
16
|
+
3. **Curated leading phrase.** Match one active phrase from
|
|
17
|
+
[`skills/agentera/route-phrases.yaml`](../../skills/agentera/route-phrases.yaml)
|
|
18
|
+
only when it is the exact normalized leading phrase. It selects that phrase's
|
|
19
|
+
sole owner and preserves the original remainder as topic.
|
|
20
|
+
4. **Deterministic abstention.** Every other request returns
|
|
21
|
+
`semantic_required`. This tier never guesses from trigger prose, substrings,
|
|
22
|
+
regexes, scores, thresholds, bands, state, or `next_action`.
|
|
23
|
+
5. **Validated semantic receipt.** The host makes an LLM-native semantic
|
|
24
|
+
judgment and submits `select`, `clarify`, or `no_match`; the CLI validates it
|
|
25
|
+
before capability startup. `select` starts one selected capability, `clarify` starts none, and `no_match` must route to status for orientation only after no capability matches.
|
|
26
|
+
|
|
27
|
+
The direct grammar has precedence over phrase matching. A phrase collision is a
|
|
28
|
+
registry validation error, not a tie to resolve at runtime.
|
|
29
|
+
|
|
30
|
+
## Phase one: route request
|
|
31
|
+
|
|
32
|
+
`agentera.route_request.v1` takes the transient original request. Its response
|
|
33
|
+
is exactly one of:
|
|
34
|
+
|
|
35
|
+
- `deterministic_selection`: a `bare`, `direct`, or `phrase` selection with
|
|
36
|
+
capability, provenance, recognized span, and topic span.
|
|
37
|
+
- `semantic_required`: a request digest, semantic intent capsule, and canonical
|
|
38
|
+
capsule digest. It does not start a capability.
|
|
39
|
+
|
|
40
|
+
The request itself is not persisted. The semantic capsule contains active
|
|
41
|
+
trigger `description`, `priority`, and `disambiguates_against` documentation,
|
|
42
|
+
not executable matcher inputs. Its digest is SHA-256 over contract-owned
|
|
43
|
+
canonical JSON (recursively sorted object keys, no insignificant whitespace,
|
|
44
|
+
and the presented array order) for exactly that capsule. It excludes private
|
|
45
|
+
request text, request digests, diagnostics, state, and matcher authorities the
|
|
46
|
+
host did not see.
|
|
47
|
+
|
|
48
|
+
## Phase two: semantic receipt
|
|
49
|
+
|
|
50
|
+
For `semantic_required`, the host sends the same transient original request and
|
|
51
|
+
the complete nullable host receipt to `agentera route receipt --input - --format
|
|
52
|
+
json`. The receipt binds to the SHA-256 of the request's UTF-8 bytes and the
|
|
53
|
+
`semantic_capsule_sha256` returned in phase one. The CLI first validates the
|
|
54
|
+
unmodified host shape, removes only contract-listed nulls, then reruns
|
|
55
|
+
deterministic routing and accepts the receipt only when the same request still
|
|
56
|
+
produces `semantic_required` with both bound digests. It then validates the
|
|
57
|
+
projected CLI receipt with canonical-capability binding and request-bound span
|
|
58
|
+
rules:
|
|
59
|
+
|
|
60
|
+
| Receipt | Required result | Startup |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| `select` | one canonical capability and `none` or `preserve` compound disposition | selected capability only |
|
|
63
|
+
| `clarify` | one non-empty question | none |
|
|
64
|
+
| `no_match` | no capability or question | status only |
|
|
65
|
+
| invalid | bounded field-level correction, exit 64 | none |
|
|
66
|
+
|
|
67
|
+
The resulting `selected` or `status_fallback` authorization contains bounded
|
|
68
|
+
route provenance and the existing `agentera prime --context <capability>
|
|
69
|
+
--format json` startup path. A `clarification` contains exactly one bounded
|
|
70
|
+
question and no startup. This is intentionally a shared CLI contract, not a
|
|
71
|
+
runtime-specific adapter. The portable shared skill is the sole host integration
|
|
72
|
+
surface.
|
|
73
|
+
|
|
74
|
+
## Phrase, span, and topic behavior
|
|
75
|
+
|
|
76
|
+
The phrase registry owns stable IDs, capability ownership, literal phrases,
|
|
77
|
+
global collision detection, and deprecation. Per-capability trigger schemas
|
|
78
|
+
never create phrase ownership. Matching uses the contract's normalized token
|
|
79
|
+
view (Unicode NFKC, case folding, whitespace normalization) while returning
|
|
80
|
+
source UTF-8 byte offsets and exact slices from the original request. A `:`,
|
|
81
|
+
`-`, or `—` that terminates the final phrase token is recognized in the
|
|
82
|
+
comparison view but starts the preserved topic slice; other attached
|
|
83
|
+
punctuation abstains.
|
|
84
|
+
|
|
85
|
+
For example, `HELP\tME decide: migrate the store` recognizes only
|
|
86
|
+
`HELP\tME decide`; its topic is the exact original `: migrate the store`.
|
|
87
|
+
The separator is deliberately preserved. Quoted, negated, later-in-sentence,
|
|
88
|
+
partial, and unregistered wording abstains; it belongs to the semantic phase.
|
|
89
|
+
|
|
90
|
+
## Selection, ambiguity, and compounds
|
|
91
|
+
|
|
92
|
+
The LLM host owns semantic selection and genuine consequential ambiguity. It
|
|
93
|
+
consults trigger intent documentation, then chooses one of `select`, `clarify`,
|
|
94
|
+
or `no_match`. A compound request never authorizes implicit chaining:
|
|
95
|
+
|
|
96
|
+
- A direct or phrase selection preserves its entire original remainder as one
|
|
97
|
+
topic without interpreting it as follow-on work.
|
|
98
|
+
- A semantic `select` may mark one original, UTF-8 code-point-aligned trailing
|
|
99
|
+
remainder span `preserve`; it is deferred intent, not a second startup.
|
|
100
|
+
`clarify` is an outcome, never a compound disposition.
|
|
101
|
+
- Independent or consequential compound intent uses the `clarify` outcome when
|
|
102
|
+
one primary capability cannot be named safely.
|
|
103
|
+
|
|
104
|
+
`next_action` informs readiness only after classification and cannot override the message intent. It never classifies a request.
|
|
105
|
+
|
|
106
|
+
## Evaluation and privacy
|
|
107
|
+
|
|
108
|
+
The visible frozen development and adversarial regression data live in
|
|
109
|
+
[`fixtures/routing/hybrid-corpus.yaml`](../../fixtures/routing/hybrid-corpus.yaml).
|
|
110
|
+
They use synthetic or explicitly consented text only and are the sole frozen
|
|
111
|
+
implementation conformance corpus; no sealed holdout, credential, privacy
|
|
112
|
+
approval, or provider-host benchmark is required.
|
|
113
|
+
Retained evaluation evidence contains IDs, partition, outcome, tier,
|
|
114
|
+
capability, timing, and aggregate metrics; private raw request
|
|
115
|
+
text, topic text, receipt questions, and semantic rationale are absent by
|
|
116
|
+
default.
|
|
117
|
+
|
|
118
|
+
The portable host receipt shape has all fields required, using nullable fields
|
|
119
|
+
for outcome-inapplicable values; the bounded host-to-CLI normalization seam first
|
|
120
|
+
validates that unmodified shape, removes only contract-listed nulls, and preserves
|
|
121
|
+
every non-null value unchanged. The CLI schema then separately validates outcome
|
|
122
|
+
relationships, request binding, spans, canonical capabilities, and startup authorization.
|
|
123
|
+
Normalization never authorizes startup or weakens a cross-field rule.
|
|
124
|
+
The evaluator reports separate, run-specific local deterministic and
|
|
125
|
+
receipt-validation p95 values. They prove protocol conformance for this visible
|
|
126
|
+
corpus, not semantic generalization or an end-to-end latency commitment. Semantic
|
|
127
|
+
model quality and latency remain host-dependent and unmeasured; it makes no live
|
|
128
|
+
model calls.
|
|
79
129
|
|
|
80
130
|
## Ownership boundaries
|
|
81
131
|
|
|
82
|
-
-
|
|
83
|
-
and
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
consults for Layer 3 routing. `references/cli/trigger-schema-enrichment.md` is
|
|
91
|
-
the intent documentation contract; pattern matching and scoring belong to
|
|
92
|
-
neither, having been retired by Decision 76.
|
|
93
|
-
- **`skills/agentera/SKILL.md`** is the thin bootstrap routing surface per Decision
|
|
94
|
-
74; it cross-references this document rather than restating the full model.
|
|
132
|
+
- `references/cli/hybrid-route-contract.yaml` owns protocol, outcome vocabulary,
|
|
133
|
+
precedence, span rules, privacy, evaluation gates, and deprecations.
|
|
134
|
+
- `skills/agentera/route-phrases.yaml` owns the deterministic phrase inventory.
|
|
135
|
+
- `references/cli/trigger-schema-enrichment.md` owns semantic trigger intent
|
|
136
|
+
documentation only.
|
|
137
|
+
- `packages/cli/src/eval/hybridRouteEvaluation.ts` evaluates the frozen offline
|
|
138
|
+
conformance corpus; its tests verify the evaluator and protocol structure.
|
|
139
|
+
- `skills/agentera/SKILL.md` remains the thin portable host integration surface.
|
|
@@ -1,38 +1,31 @@
|
|
|
1
1
|
# Trigger intent documentation contract
|
|
2
2
|
|
|
3
|
-
Authority for
|
|
4
|
-
trigger-schema fields
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Authority for semantic-phase trigger intent documentation. This document
|
|
4
|
+
defines the trigger-schema fields a host consults only after the CLI
|
|
5
|
+
deterministically abstains, so it can make a semantic judgment and submit a
|
|
6
|
+
receipt. The fields are documentation, not inputs to a routing engine.
|
|
7
7
|
|
|
8
8
|
- **Authority path:** `references/cli/trigger-schema-enrichment.md`
|
|
9
9
|
- **Schema contract:** `skills/agentera/capability_schema_contract.yaml` (the
|
|
10
10
|
contract loader at `packages/cli/src/registries/capabilityContract.ts` consumes it)
|
|
11
11
|
- **Trigger files:** `skills/agentera/capabilities/<name>/schemas/triggers.yaml`
|
|
12
|
-
- **Scope:**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
Decision 76
|
|
19
|
-
|
|
20
|
-
routing
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
The
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Decision 75's request-vs-state mutual exclusivity is dissolved: request intent
|
|
30
|
-
and state-readiness are both advisory context the LLM consults. Decision 76
|
|
31
|
-
supersedes Decision 75 design choices 2 (request-derived scoring as router), 4
|
|
32
|
-
(mutual exclusivity), and 5 (pure request-derived).
|
|
33
|
-
|
|
34
|
-
Decision 76 records the design choices and rejected alternatives (including the
|
|
35
|
-
tuning-the-engine and reposition-`--route` alternatives that were rejected).
|
|
12
|
+
- **Scope:** The semantic phase of the two-phase route contract. See
|
|
13
|
+
`references/cli/hybrid-route-contract.yaml` for the authoritative precedence,
|
|
14
|
+
abstention, receipt validation, and startup authorization rules.
|
|
15
|
+
|
|
16
|
+
## Current boundary and obsolete layer numbering
|
|
17
|
+
|
|
18
|
+
Earlier Decision 76 material described open-ended routing as Layer 3 and folded
|
|
19
|
+
the former Layer 4 into it. That layer numbering is obsolete; it is not another
|
|
20
|
+
routing model. The hybrid route contract now has one deterministic request phase
|
|
21
|
+
(bare, direct, and curated phrase selection) and one semantic receipt phase.
|
|
22
|
+
|
|
23
|
+
Only a `semantic_required` response may expose these fields to a host. The host
|
|
24
|
+
uses them to choose `select`, `clarify`, or `no_match`, then submits the complete
|
|
25
|
+
receipt. The CLI validates that receipt before authorizing capability startup.
|
|
26
|
+
`priority` and `disambiguates_against` are advisory semantic-judgment context,
|
|
27
|
+
not scoring weights. There is no scoring algorithm, confidence threshold,
|
|
28
|
+
borderline band, or `prime --route` output schema.
|
|
36
29
|
|
|
37
30
|
## 1. Field shape
|
|
38
31
|
|
|
@@ -45,11 +38,11 @@ one capability.
|
|
|
45
38
|
### 1.1 `description`
|
|
46
39
|
|
|
47
40
|
- **Type:** non-empty string (required on every `TRIGGERS` entry).
|
|
48
|
-
- **Meaning:** the
|
|
49
|
-
|
|
50
|
-
the capability
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
- **Meaning:** the semantic-judgment explanation of this capability's intent.
|
|
42
|
+
After `semantic_required`, the host reads it to decide whether a request fits
|
|
43
|
+
the capability. Prose that names the capability's purpose and request shapes
|
|
44
|
+
reads better than keyword lists; write it for a reader who has never seen the
|
|
45
|
+
capability before.
|
|
53
46
|
- **Validation failure:** a missing, empty, or non-string `description` fails
|
|
54
47
|
validation with an error message naming the offending entry ID.
|
|
55
48
|
|
|
@@ -58,11 +51,11 @@ TRIGGERS:
|
|
|
58
51
|
1:
|
|
59
52
|
id: T2
|
|
60
53
|
description: >-
|
|
61
|
-
Audit
|
|
62
|
-
priority:
|
|
63
|
-
|
|
64
|
-
-
|
|
65
|
-
|
|
54
|
+
Audit local codebase health, architecture, quality, or technical debt.
|
|
55
|
+
priority: high
|
|
56
|
+
disambiguates_against:
|
|
57
|
+
- capability: document
|
|
58
|
+
hint: "audit owns code and architecture health; document owns documentation maintenance"
|
|
66
59
|
```
|
|
67
60
|
|
|
68
61
|
### 1.2 `disambiguates_against`
|
|
@@ -76,11 +69,10 @@ TRIGGERS:
|
|
|
76
69
|
- `hint` — non-empty string distinguishing this trigger's intent from the
|
|
77
70
|
named capability on near-equal requests.
|
|
78
71
|
- **Meaning:** declares which other capabilities this trigger's intent could be
|
|
79
|
-
confused with, with a hint the
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
judgment.
|
|
72
|
+
confused with, with a hint the host consults after `semantic_required`. The
|
|
73
|
+
list is advisory: the host resolves ambiguity and MAY surface the hint when
|
|
74
|
+
asking the user to clarify. The hint supplies the words; the host supplies the
|
|
75
|
+
judgment in a receipt the CLI validates.
|
|
84
76
|
- **Validation failure:** a `capability` value that is not one of the twelve
|
|
85
77
|
canonical IDs, a missing `hint`, an empty `hint`, or an entry that is not a
|
|
86
78
|
mapping fails validation with the offending entry ID and the constraint.
|
|
@@ -98,7 +90,8 @@ disambiguates_against:
|
|
|
98
90
|
- **Type:** string enum `high` | `medium` | `low` (required on every `TRIGGERS`
|
|
99
91
|
entry).
|
|
100
92
|
- **Meaning:** advisory relevance-precedence hint the LLM host reads alongside
|
|
101
|
-
`description` when deciding which capability best fits a
|
|
93
|
+
`description` when deciding which capability best fits a semantically
|
|
94
|
+
abstained request. `high`
|
|
102
95
|
marks a capability that owns the request strongly; `low` marks a capability
|
|
103
96
|
that is a plausible but weaker fit. It is not a scoring weight and feeds no
|
|
104
97
|
weighted-average calculation; the LLM host uses it as one signal among the
|
|
@@ -132,5 +125,16 @@ contract-owned values).
|
|
|
132
125
|
| `description` is a non-empty string on every `TRIGGERS` entry | §1.1 |
|
|
133
126
|
| `disambiguates_against` entries reference a valid capability ID and include a non-empty hint | §1.2 |
|
|
134
127
|
| `priority` is one of `high` / `medium` / `low` on every `TRIGGERS` entry | §1.3 |
|
|
135
|
-
|
|
|
136
|
-
|
|
|
128
|
+
| Trigger fields are semantic-phase documentation; no scoring algorithm, thresholds, borderline band, or `--route` output schema | Current boundary, §1 |
|
|
129
|
+
| Deterministic precedence and validated receipt authorization remain singular | `hybrid-route-contract.yaml` |
|
|
130
|
+
|
|
131
|
+
## 4. Legacy enriched fields
|
|
132
|
+
|
|
133
|
+
`patterns`, `patterns_regex`, `confidence_threshold`, and `borderline_band`
|
|
134
|
+
remain accepted only so inherited enriched trigger files validate and load. They
|
|
135
|
+
are discarded by the loader: the active trigger model does not expose strings,
|
|
136
|
+
`RegExp` objects, scores, thresholds, or bands from them. The capability
|
|
137
|
+
validator validates their compatibility shapes; specifically, it validates the
|
|
138
|
+
numeric fields' integer 0..100 range, while the loader accepts and discards
|
|
139
|
+
their values. Do not add them to new active trigger entries. Their presence
|
|
140
|
+
cannot change a natural-language classification.
|
|
@@ -53,11 +53,10 @@ examples. Diagnostics should state object, state, cause, and fix.
|
|
|
53
53
|
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
54
54
|
| Agentera | The agent. One persistent identity that thinks through every step and keeps working when you walk away — the colleague, not the team. The CLI is the brain and spine: it owns routing, memory, capability prose, and the worker-spec contract. Coding hosts consume the same shared skill and CLI contract; Agentera does not ship host-native package surfaces. Identity is per-project: same personality, same capabilities, different memory, no bleed. Headline: one agent, one CLI, many capabilities. | `README.md`, `.agentera/vision.yaml`, `.agentera/decisions.yaml` (D74), `skills/agentera/SKILL.md` |
|
|
55
55
|
| Host runtime (harness) | A coding agent host that provides the model, tools, and worker execution. Agentera is the agent; the host is the harness. Hosts consume the shared skill at `~/.agents/skills/agentera` and the JSON returned by `agentera prime`; Agentera does not install or repair host-native plugins, hooks, agents, or packages. | `.agentera/vision.yaml`, `.agentera/decisions.yaml` (D74), `skills/agentera/SKILL.md` |
|
|
56
|
-
| Product surface |
|
|
57
|
-
| @agentera/mobile | The flagship mobile/web app package at `packages/mobile`. SvelteKit, Cursor SDK, Cloudflare Worker. | `packages/mobile/README.md`, `packages/mobile/DESIGN.md` |
|
|
56
|
+
| Product surface | The fixed Agentera workflow ships through the `agentera` package and CLI. Coding hosts consume the shared skill and CLI rather than receiving native Agentera package surfaces. | `README.md`, `AGENTS.md`, `packages/cli/README.md`, `.agentera/decisions.yaml` |
|
|
58
57
|
| Agentera skill | Shared transport, not a product extension point. The source at `skills/agentera/` is installed once at `~/.agents/skills/agentera` and packages Agentera's routing entry and capability prose without host-native manifests. It is the same fixed workflow, not user extensibility. Per Decision 74, the product word is capabilities. | `skills/agentera/SKILL.md`, `README.md` Internals, `.agentera/decisions.yaml` (D74) |
|
|
59
58
|
| Capability | A routed behavioral unit of the single Agentera agent, driven through the CLI. Eleven top-level capabilities (status, vision, discuss, research, plan, build, optimize, audit, document, design, orchestrate) plus profile, which surfaces through existing capabilities but appears as a peer row in user-facing docs. Each capability has a prose module at `packages/cli/src/capabilities/<name>/instructions.ts` plus `triggers.yaml`, `artifacts.yaml`, `validation.yaml`, and `exit.yaml`. English names are canonical per Decision 70; the Swedish `-era` names are legacy v2 stable only (see Legacy Swedish capability names). | `AGENTS.md`, `skills/agentera/capabilities/*`, `packages/cli/src/capabilities/*`, `.agentera/decisions.yaml` (D70, D74) |
|
|
60
|
-
| Capability canonical name (v3) | The English name binding for v3+ capability invocation, per Decision 70, under the single-agent identity crystallized in Decision 74. Promoted from the Decision 43 alias set.
|
|
59
|
+
| Capability canonical name (v3) | The English name binding for v3+ capability invocation, per Decision 70, under the single-agent identity crystallized in Decision 74. Promoted from the Decision 43 alias set. Host runtimes and the CLI use the same English name; the v2 stable distribution uses the legacy Swedish `-era` IDs (see `Legacy Swedish capability names`). | `.agentera/decisions.yaml` (D43, D70, D74), `references/cli/vocabulary-index.yaml` (protected_surfaces) |
|
|
61
60
|
| Legacy Swedish capability names (v2 stable) | The historical Swedish `-era` IDs (e.g. `hej`, `resonera`) used by the v2 stable distribution (`npx -y agentera@latest`) and preserved as historical references in archived plans, decisions, and changelogs. Out of scope for v3 surface per Decisions 70 and 74; the single-agent identity uses English capability names exclusively. Coexistence probe surfaces per-distribution naming divergence. | `.agentera/decisions.yaml` (D70, D74), `references/cli/vocabulary-index.yaml` (protected_surfaces) |
|
|
62
61
|
| Shared protocol | Internal primitive vocabulary in `protocol.yaml`: confidence, severity, decision labels, exits, visual tokens, glyphs, and phases. | `skills/agentera/protocol.yaml` |
|
|
63
62
|
| Capability schema contract | The executable contract for capability schema groups, stable IDs, priorities, deprecations, and primitive references. | `skills/agentera/capability_schema_contract.yaml` |
|
|
@@ -132,12 +131,11 @@ authoritative recovery command.
|
|
|
132
131
|
| Direct route | A canonical capability name with optional following topic text, `/agentera <capability-name>` with optional topic text, or `/agentera <primary-alias>` routes directly to that capability and bypasses natural-language matching. |
|
|
133
132
|
| Canonical capability route | An English capability name such as `discuss`, `plan`, or `orchestrate`, optionally followed by topic text, plus the slash form `/agentera <capability-name>` with optional topic text. Canonical names remain protocol identity. |
|
|
134
133
|
| Primary route alias | The one plain `/agentera <alias>` direct route for a capability, owned by `ROUTE_ALIASES.primary_aliases`. Each canonical capability has exactly one primary alias. |
|
|
135
|
-
| Secondary request wording |
|
|
136
|
-
| Natural-language trigger | A
|
|
137
|
-
| Trigger priority | `high`, `medium`, or `low`; owned by the schema contract.
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
| Fallback to status | No sufficient match routes to status for orientation. |
|
|
134
|
+
| Secondary request wording | LLM-readable intent descriptions in capability trigger entries. They describe secondary wording and are not primary aliases. |
|
|
135
|
+
| Natural-language trigger | A trigger entry in `schemas/triggers.yaml` whose description and collision hints a host reads only after deterministic routing returns `semantic_required`. The host's semantic judgment must be submitted as a receipt the CLI validates before startup. |
|
|
136
|
+
| Trigger priority | `high`, `medium`, or `low`; an advisory relevance-precedence hint owned by the schema contract, not a score. |
|
|
137
|
+
| Genuine consequential ambiguity | Two materially plausible capabilities without enough intent to choose responsibly. Ask one clarification. |
|
|
138
|
+
| Fallback to status | Route to status for orientation only when no capability fits. |
|
|
141
139
|
| Concrete next action | A route suggestion tied to an object such as `PLAN Task N`, `TODO`, `OBJECTIVE`, or `VISION refresh`. |
|
|
142
140
|
| Suggest, don't force | Status recommends the next capability but waits for user confirmation. |
|
|
143
141
|
| Capability handoff label | A recommendation from one capability to another. Use glyph plus canonical name, such as `⧉ build` or `≡ plan`, not standalone slash-capability names. SG priority codes are internal protocol references and are not user-facing handoff labels. |
|
|
@@ -11,7 +11,6 @@ guides — not under `docs/`.
|
|
|
11
11
|
| Path | Topic |
|
|
12
12
|
| ---- | ----- |
|
|
13
13
|
| `docs/packaging/v3-packaging.md` | v3 CLI npm distribution and verification-lane contract |
|
|
14
|
-
| `docs/consolidation/monorepo-plan.md` | Product pivot, `@agentera/*` package layout, migration checklist (D67) |
|
|
15
14
|
|
|
16
15
|
## Authority stack
|
|
17
16
|
|
|
@@ -23,11 +22,10 @@ guides — not under `docs/`.
|
|
|
23
22
|
| Human vocabulary index | `references/cli/vocabulary.md` |
|
|
24
23
|
| Benchmark contract | `references/analysis/startup-measurement-contract.yaml` |
|
|
25
24
|
| Benchmark runbook | `references/analysis/benchmark.md` |
|
|
26
|
-
| Verification optimization baseline | `references/analysis/verification-baseline-2026-07-20.yaml` |
|
|
27
25
|
| Verification ownership and execution policy | `references/analysis/verification-policy.yaml` |
|
|
28
26
|
| State storage, path, API, compatibility, and output authority | `references/artifacts/state-storage-authority.yaml` |
|
|
29
27
|
| JSON surface budgets | `scripts/json_output_surface_manifest.yaml` |
|
|
30
|
-
| Project drafts | `docs/` (gitignored except `docs/README.md
|
|
28
|
+
| Project drafts | `docs/` (gitignored except `docs/README.md` and `docs/packaging/`) |
|
|
31
29
|
|
|
32
30
|
## `docs/` policy
|
|
33
31
|
|
|
@@ -25,9 +25,10 @@ capabilities:
|
|
|
25
25
|
|
|
26
26
|
# agentera
|
|
27
27
|
|
|
28
|
-
One agent, one CLI, many capabilities. The CLI
|
|
29
|
-
|
|
30
|
-
The host
|
|
28
|
+
One agent, one CLI, many capabilities. The CLI owns project memory,
|
|
29
|
+
capability instructions, the deterministic routing tiers, and the worker-spec
|
|
30
|
+
contract. The host owns open-ended semantic judgment from the trigger intent
|
|
31
|
+
documentation after deterministic abstention; it learns that contract from the CLI.
|
|
31
32
|
|
|
32
33
|
---
|
|
33
34
|
|
|
@@ -75,27 +76,58 @@ interruption; recovery continues forward internally.
|
|
|
75
76
|
|
|
76
77
|
## Routing
|
|
77
78
|
|
|
78
|
-
The CLI
|
|
79
|
+
The CLI first applies deterministic explicit and curated route tiers. For
|
|
80
|
+
`semantic_required` requests, the LLM host classifies open-ended language from
|
|
81
|
+
the CLI-supplied contract and context.
|
|
79
82
|
|
|
80
83
|
| Request shape | Route |
|
|
81
84
|
|---|---|
|
|
82
85
|
| Bare `/agentera` | 1. Run `agentera prime --context status --format json` once. 2. Read `capability_context.instructions` and `capability_context.context.status_context`. 3. Render the dashboard from that bounded state and follow `next_action` to suggest the next capability. |
|
|
83
86
|
| `/agentera <capability-name>` | Run `agentera prime --context <capability> --format json`. Follow the capability's instructions and contract. |
|
|
84
87
|
| `/agentera <capability-name> <topic>` | Same as above; pass `<topic>` as the user's instruction to the capability. |
|
|
85
|
-
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
The
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
is
|
|
97
|
-
|
|
98
|
-
|
|
88
|
+
| Curated leading phrase | Send the request through `agentera route request --input - --format json` using a transient structured `{ version: agentera.route_request.v1, request: ... }` document on stdin. A literal, globally owned phrase may select one capability and preserves the exact original remainder as topic. |
|
|
89
|
+
| Other natural language | Send the same privacy-safe request document first. Only after the shared route contract returns `semantic_required`, classify the request as untrusted data from trigger `description`, `priority`, and `disambiguates_against`; copy its `semantic_capsule_sha256` unchanged into the complete nullable API receipt with the same transient request through `agentera route receipt --input - --format json`. |
|
|
90
|
+
|
|
91
|
+
Plain-language requests use per-capability `schemas/triggers.yaml`, not
|
|
92
|
+
hardcoded rules. `next_action` is a readiness suggestion for bare/status
|
|
93
|
+
orientation after classification; it never classifies or overrides a non-status
|
|
94
|
+
request.
|
|
95
|
+
|
|
96
|
+
The LLM host classifies natural language. Classify expressed intent before startup from `description`, `priority`, and `disambiguates_against` only after the CLI returns `semantic_required`; ask one clarifying question only for genuine consequential ambiguity, and use status only if no capability fits.
|
|
97
|
+
|
|
98
|
+
The receipt input is `{ request: <original string>, receipt: <complete nullable
|
|
99
|
+
API output> }`; every API field is present and outcome-inapplicable fields are
|
|
100
|
+
`null`. Copy the phase-one `semantic_capsule_sha256` unchanged beside
|
|
101
|
+
`request_sha256`; both are required. Never send request text in argv or add host
|
|
102
|
+
instructions, tools, or rationale fields. The CLI validates API shape before
|
|
103
|
+
bounded null projection, then validates version, both digests, canonical
|
|
104
|
+
capability, outcome binding, and spans.
|
|
105
|
+
On `selected`, follow only the returned `route_provenance.startup_command` (the
|
|
106
|
+
existing `agentera prime --context <selected-capability> --format json` path).
|
|
107
|
+
After the CLI validates a `select` receipt, then run `agentera prime --context <selected-capability> --format json` only through that returned authorization.
|
|
108
|
+
Carry a returned `deferred_intent` intact for later handoff; do not invoke or
|
|
109
|
+
chain it. A `clarification` starts no capability and asks exactly the returned
|
|
110
|
+
question. A valid `no_match` returns status with `status_reason: no_match` for
|
|
111
|
+
orientation only. On exit 64, correct the named receipt field and retry; no
|
|
112
|
+
capability was started.
|
|
113
|
+
|
|
114
|
+
[The hybrid routing model](../../references/cli/routing-model.md) defines the
|
|
115
|
+
shared two-phase request/receipt contract. Open-ended language remains LLM-owned:
|
|
116
|
+
no scores, thresholds, or borderline band. The phrase registry is the only
|
|
117
|
+
deterministic natural-language authority; do not revive legacy trigger patterns,
|
|
118
|
+
regexes, thresholds, or bands. `next_action` never classifies or overrides a
|
|
119
|
+
request, and a compound remainder is preserved rather than silently chained.
|
|
120
|
+
Decision mpulyomlyl supersedes Decision 76 only for this curated literal fast
|
|
121
|
+
path.
|
|
122
|
+
|
|
123
|
+
Run `agentera route evaluate --format json` to evaluate the frozen visible
|
|
124
|
+
development and adversarial corpus. Its report binds the protocol, phrase
|
|
125
|
+
authority, and shared-skill hashes, labels every result with a routing tier, and
|
|
126
|
+
keeps request text out of output. It proves protocol conformance, not semantic
|
|
127
|
+
generalization. It does not invoke a semantic host: deterministic and
|
|
128
|
+
receipt-validation conformance and run-specific local p95 values are measured
|
|
129
|
+
locally, while semantic model quality and latency are host-dependent and
|
|
130
|
+
explicitly unmeasured.
|
|
99
131
|
|
|
100
132
|
Handoff verbs:
|
|
101
133
|
|