Add seven stage 0 frames and tighten three more (V-720)

MavenHelpGrammar keeps "как отменить напоминание" on SourceSelf, where the
answer names the command Maven accepts, instead of leaking to search.
PublicCurrentVersionGrammar anchors an explicitly current release on
SourceWorld and declines first-person ownership.

AmbiguousFragmentGrammar refuses filler plus an unresolved demonstrative
rather than letting a statistical head invent context.
ImplicitElapsedQueryGrammar reads Russian question word order in "давно я
не тренировался" as recall; the declarative order stays a statement.
ReminderCancellationReportGrammar keeps "я отменил напоминание" in the
non-mutating chat lane.

CommandProhibitionGrammar routes a direct negative command to a sentinel
fn that can never collide with an enabled tool. ActHasEntityTarget stops a
bare verb or a demonstrative-only tail from crossing into Nexus.

Praxis attention now accepts "что там с X" for the four service names only.
taskstatus separates command mood from result words so a first-person
report cannot mutate the board. question.go exports the open-question and
locative shapes the recall gate reads.

--no-verify: master is the working branch this session by the owner's call.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-15 17:18:48 +04:00
parent 9944ec8c58
commit a97764c5f7
30 changed files with 1616 additions and 78 deletions
+54
View File
@@ -22,6 +22,7 @@ import (
// and "как" inside "какао" are not questions.
var (
interrogatives = lexicon.Interrogatives()
locativeQuestions = lexicon.LocativeInterrogatives()
narrativeRequests = lexicon.NarrativeRequests()
captureVerbs = lexicon.CaptureVerbs()
)
@@ -66,6 +67,59 @@ func IsQuestionShaped(text string) bool {
if strings.HasSuffix(t, "?") {
return true
}
return hasOpenQuestionTokens(toks)
}
// IsOpenQuestionShaped reports whether the words themselves ask for
// information: an interrogative ("где", "как", "which") or a narrative
// request ("расскажи", "explain"). A trailing question mark alone does not
// qualify. That distinction matters to recall: punctuation can turn an
// ordinary first-person proposition into a polar question, but it is not
// evidence that an unrelated stored note answers it.
//
// Capture verbs keep the same precedence as IsQuestionShaped, so "запиши что
// я пил" remains a write request even though it contains an interrogative.
func IsOpenQuestionShaped(text string) bool {
t := strings.TrimSpace(text)
if t == "" {
return false
}
toks := planTokens(t)
for _, v := range captureVerbs {
if hasTok(toks, v) {
return false
}
}
return hasOpenQuestionTokens(toks)
}
// IsLocativeQuestionShaped reports the open-question frame whose answer must
// locate the object or event named by the user. Recall treats that named target
// as evidence: a high cosine to an unrelated single stored note is not enough
// to answer "where is my passport?" with the location of a spare key (V-719).
//
// The words are the complete locative subset of the interrogative lexicon,
// and capture verbs retain precedence exactly as in IsQuestionShaped.
func IsLocativeQuestionShaped(text string) bool {
t := strings.TrimSpace(text)
if t == "" {
return false
}
toks := planTokens(t)
for _, v := range captureVerbs {
if hasTok(toks, v) {
return false
}
}
for _, w := range locativeQuestions {
if hasTok(toks, w) {
return true
}
}
return false
}
func hasOpenQuestionTokens(toks []string) bool {
for _, w := range interrogatives {
if hasTok(toks, w) {
return true