Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40b7bd1c14 | ||
|
|
1c334fcce6 | ||
|
|
fd59b93463 |
@@ -2,16 +2,45 @@
|
||||
|
||||
You are implementing this repository under a frozen architecture generation. **Capability to edit files is not authority to change architecture.**
|
||||
|
||||
## Durable project principles
|
||||
|
||||
- Domovoy is a long-lived personal assistant, not a one-off chatbot or coding helper.
|
||||
- Current specialization is temporary; architecture is implementation-specific and revisable by approved architecture decisions.
|
||||
- Codex is an implementation capability, not architectural owner by default.
|
||||
- Model/provider is implementation infrastructure, not Domovoy identity.
|
||||
- Human reality claims are only claims until supported.
|
||||
- Human intent/preferences are strong evidence, even when not external facts.
|
||||
- UNKNOWN is a valid state and must remain explicit.
|
||||
- Reversible/low-risk safety is required before irreversible action.
|
||||
- Deterministic reflex is optimization, not final semantic truth.
|
||||
- Capability, transport, and implementation are separate concerns.
|
||||
- Capability usage requires declared evidence and observed capability gap handling.
|
||||
- LLM cost/brand/availability is evidence, not a blanket truth rule.
|
||||
- Experience is not learning by itself; only measured behavior change becomes evidence.
|
||||
- Normal user interaction must stay zero-ops.
|
||||
- Live configuration and canonical state should be portable and bootstrap-only environment should stay minimal.
|
||||
- Production continuity must include recovery and provenance across model/binding/config/loader/operator changes.
|
||||
- Do not overbuild future systems for current milestone.
|
||||
|
||||
## Mandatory startup sequence
|
||||
|
||||
Before any non-trivial change:
|
||||
|
||||
1. Read `architecture/ARCHITECTURE_CONSTITUTION.md`.
|
||||
2. Read `architecture/CORE_SEMANTIC_MODEL_V1.md`.
|
||||
3. Read `architecture/architecture-registry.yaml` and `architecture/architecture-registry.json`.
|
||||
4. Read `development/CODEX_DEVELOPMENT_CONTRACT.md`.
|
||||
5. Read the active file under `dev/tasks/`.
|
||||
6. Run `go run ./cmd/devctl preflight -task <task-file>` for Tier B+ tasks when available.
|
||||
1. Inspect git branch, status, and recent ancestry (at least `git status`, `git rev-parse`, `git log -1`).
|
||||
2. Read `AGENTS.md`.
|
||||
3. Read `architecture/ARCHITECTURE_CONSTITUTION.md`.
|
||||
4. Read `architecture/CORE_SEMANTIC_MODEL_V1.md`.
|
||||
5. Read `architecture/architecture-registry.yaml` and `architecture/architecture-registry.json`.
|
||||
6. Read `development/CODEX_DEVELOPMENT_CONTRACT.md`.
|
||||
7. Read `dev/ACTIVE_TASK.json`.
|
||||
8. Read the current task packet under `dev/tasks/` referenced by `ACTIVE_TASK`.
|
||||
9. Read relevant accepted ADRs from `architecture/adrs`.
|
||||
10. Inspect `docs/PROJECT_STATUS.md` and current evidence artifacts for checkpoint continuity.
|
||||
11. Inspect current runtime evidence/check commands before implementation.
|
||||
12. Run `go run ./cmd/devctl preflight -task <task-file>` for Tier B+ tasks.
|
||||
13. Then proceed with implementation.
|
||||
|
||||
For a fresh session, this sequence is the required cold-start reconstruction path and must be documented in the task checkpoint.
|
||||
|
||||
If documents conflict, authority order is:
|
||||
|
||||
@@ -72,3 +101,32 @@ State:
|
||||
- assumptions;
|
||||
- findings not changed;
|
||||
- gaps or limitations.
|
||||
|
||||
## Session reconstruction checkpoint (Durable memory)
|
||||
|
||||
Before leaving a DEV, include machine-readable checkpoint facts in:
|
||||
|
||||
- `dev/ACTIVE_TASK.json`
|
||||
- active task packet under `dev/tasks/`
|
||||
- `docs/PROJECT_STATUS.md`
|
||||
- `docs/COLD_START_AND_DURABLE_CHECKPOINT.md`
|
||||
|
||||
The checkpoint must explicitly carry:
|
||||
|
||||
- `STATUS`
|
||||
- `CURRENT_PHASE`
|
||||
- `COMPLETED`
|
||||
- `IN_PROGRESS`
|
||||
- `NOT_STARTED`
|
||||
- `BLOCKERS`
|
||||
- `IMPORTANT_FINDINGS`
|
||||
- `EVIDENCE_OBTAINED`
|
||||
- `LAST_VERIFIED_COMMIT`
|
||||
- `NEXT_ACTION`
|
||||
|
||||
No product behavior or canonical semantic changes are required for this milestone.
|
||||
|
||||
The fresh-session recovery procedure and evidence expectations are documented in:
|
||||
`docs/COLD_START_AND_DURABLE_CHECKPOINT.md`.
|
||||
|
||||
Execution-window exhaustion is continuation, not failure; do not mark a task done only because a session ends.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"task_file": "dev/tasks/DEV-000072-semantic-interpretation-deferral-boundary.json",
|
||||
"task_id": "DEV-000072",
|
||||
"task_file": "dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json",
|
||||
"task_id": "DEV-000074",
|
||||
"task_revision": 1
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"task_id": "DEV-000074",
|
||||
"task_revision": 1,
|
||||
"architecture_revision": "arch-generation-1",
|
||||
"base_repo_revision": "fd59b93463bea80459375ecb28864c03ec3efc42",
|
||||
"risk_tier": "E",
|
||||
"intent": "Consolidate Codex development memory and cold-start continuity so a fresh session can reconstruct active milestone, boundaries, tests, and next action from repository artifacts only. Do not change Domovoy product behavior; do not change deployment runtime configuration.",
|
||||
"requirement_ids": [
|
||||
"DEV-000061 governance continuity",
|
||||
"FOUNDATION_EXIT_AUDIT checkpoint continuity",
|
||||
"Cold-start reconstruction from repository only",
|
||||
"No product behavior regression",
|
||||
"Durable continuation fields"
|
||||
],
|
||||
"allowed_change_scope": {
|
||||
"modules": [],
|
||||
"paths": [
|
||||
"AGENTS.md",
|
||||
"docs/PROJECT_STATUS.md",
|
||||
"docs/COLD_START_AND_DURABLE_CHECKPOINT.md",
|
||||
"docs/evidence/dev-000074-cold-start-reconstruction.md",
|
||||
"dev/ACTIVE_TASK.json",
|
||||
"dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json"
|
||||
]
|
||||
},
|
||||
"forbidden_change_scope": {
|
||||
"paths": [
|
||||
"architecture/ARCHITECTURE_CONSTITUTION.md",
|
||||
"architecture/architecture-registry.yaml",
|
||||
"architecture/architecture-registry.json",
|
||||
"architecture/adrs/**",
|
||||
"security/**",
|
||||
"modules/**",
|
||||
"contracts/**",
|
||||
"adapters/**",
|
||||
"cmd/**",
|
||||
"deploy/**",
|
||||
".gitea/**",
|
||||
"ci/**"
|
||||
]
|
||||
},
|
||||
"allowed_architecture_delta": {
|
||||
"new_cross_module_dependencies": 0,
|
||||
"new_canonical_owners": 0,
|
||||
"new_privileges": 0,
|
||||
"new_third_party_dependencies": 0,
|
||||
"new_provider_adapters": 0,
|
||||
"new_database_owner_roles": 0
|
||||
},
|
||||
"contracts": {
|
||||
"consume": [],
|
||||
"may_change": []
|
||||
},
|
||||
"semantic_owner": "governance",
|
||||
"canonical_state": [
|
||||
"AGENTS.md contains the durable cold-start startup sequence and checkpoint rules.",
|
||||
"Checkpoint continuity is preserved in docs/PROJECT_STATUS plus reconstructed durable checkpoint fields."
|
||||
],
|
||||
"state_transitions": [
|
||||
"Fresh session -> read required artifacts -> reconstruct active task and phase",
|
||||
"Checkpoint update -> clear/record blockers -> define next action",
|
||||
"Preflight and checks -> produce final continuity status and evidence"
|
||||
],
|
||||
"side_effects_and_privileges": [
|
||||
"No direct external mutation",
|
||||
"No runtime/runtime-host configuration changes",
|
||||
"No production actions"
|
||||
],
|
||||
"persistence_and_migrations": [
|
||||
"No database migration",
|
||||
"No schema or privilege change",
|
||||
"No canonical ownership change"
|
||||
],
|
||||
"failure_retry_restart": [
|
||||
"If required startup artifacts are missing, return BLOCKED_BY_MISSING_CAPABILITY and update checkpoint.",
|
||||
"If checkpoint and active task disagree, BLOCKED_BY_SPEC_GAP and require a corrective checkpoint update.",
|
||||
"Execution-window exhaustion is continuation state, not failure."
|
||||
],
|
||||
"assumptions": [
|
||||
"Foundation architecture and ADR set is already accepted.",
|
||||
"No production behavior change is authorized in this milestone."
|
||||
],
|
||||
"acceptance_scenarios": [
|
||||
"Fresh session reconstructs active DEV, phase, blockers, and next action from artifacts alone.",
|
||||
"ACTIVE_TASK points to DEV-000074 task packet after switching.",
|
||||
"AGENTS cold-start checklist remains practical and non-duplicative.",
|
||||
"Docs checkpoint explicitly records durable status with explicit evidence references.",
|
||||
"Architecture/diff checks pass.",
|
||||
"No changed files outside governance/documentation scope."
|
||||
],
|
||||
"required_tests": [
|
||||
"go test ./...",
|
||||
"go vet ./...",
|
||||
"go run ./cmd/devctl preflight -task dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json",
|
||||
"go run ./cmd/devctl check-architecture",
|
||||
"go run ./cmd/devctl check-diff -task dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json",
|
||||
"go run ./cmd/devctl preflight -active dev/ACTIVE_TASK.json"
|
||||
],
|
||||
"terminal_gap_states": [
|
||||
"BLOCKED_BY_SPEC_GAP",
|
||||
"BLOCKED_BY_ARCHITECTURE_GAP",
|
||||
"BLOCKED_BY_MISSING_CAPABILITY",
|
||||
"BLOCKED_BY_CONFLICT",
|
||||
"REQUIRES_MIGRATION_DECISION"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
# Cold start reconstruction and durable checkpoint guidance
|
||||
|
||||
## 1) Fresh session reconstruction (no chat dependency)
|
||||
|
||||
Any new Codex session must reconstruct active state using repository artifacts only:
|
||||
|
||||
1. `git status`, `git rev-parse --abbrev-ref HEAD`, `git log -1 --oneline`
|
||||
2. `AGENTS.md`
|
||||
3. `architecture/ARCHITECTURE_CONSTITUTION.md`
|
||||
4. `architecture/CORE_SEMANTIC_MODEL_V1.md`
|
||||
5. `architecture/architecture-registry.yaml`
|
||||
6. `architecture/architecture-registry.json`
|
||||
7. `development/CODEX_DEVELOPMENT_CONTRACT.md`
|
||||
8. `dev/ACTIVE_TASK.json`
|
||||
9. active task packet referenced by `dev/ACTIVE_TASK.json`
|
||||
10. relevant accepted ADRs
|
||||
11. `docs/PROJECT_STATUS.md`
|
||||
12. relevant evidence artifacts in `docs/evidence/**` and tests configured for current task
|
||||
|
||||
The objective is to restore:
|
||||
|
||||
- what Domovoy is and current implementation state;
|
||||
- active DEV/task and scope;
|
||||
- architecture boundaries and governance stack;
|
||||
- last verified commit and next action.
|
||||
|
||||
No external chat context is required.
|
||||
|
||||
## 2) Canonical durable checkpoint fields
|
||||
|
||||
Current work checkpoints are represented through:
|
||||
|
||||
- `docs/PROJECT_STATUS.md` checkpoint blocks per DEV-id.
|
||||
- `dev/ACTIVE_TASK.json` for active packet identity.
|
||||
- active task packet fields and scope.
|
||||
|
||||
Required conceptual fields:
|
||||
|
||||
- `STATUS`
|
||||
- `CURRENT_PHASE`
|
||||
- `COMPLETED`
|
||||
- `IN_PROGRESS`
|
||||
- `NOT_STARTED`
|
||||
- `BLOCKERS`
|
||||
- `IMPORTANT_FINDINGS`
|
||||
- `EVIDENCE_OBTAINED`
|
||||
- `LAST_VERIFIED_COMMIT`
|
||||
- `NEXT_ACTION`
|
||||
|
||||
No single file must hold all facts; continuity is reconstructed from the three authoritative artifacts above plus repository evidence.
|
||||
|
||||
## 3) Practical continuity checks for a fresh session
|
||||
|
||||
The session is recoverable if it can, from the repository alone, answer:
|
||||
|
||||
- Which task is active and where to continue?
|
||||
- What phase is current (`NOT_STARTED` / `IN_PROGRESS` / `COMPLETED`)?
|
||||
- What blockers and assumptions are known?
|
||||
- What evidence was last verified and where is it stored?
|
||||
- What exact next action is safe to perform next?
|
||||
|
||||
Any ambiguous active state should be treated as blocked and converted into an explicit checkpoint update rather than implicit inference.
|
||||
|
||||
## 4) Deployment continuity rule
|
||||
|
||||
- Bootstrap config should remain minimal and task-locating.
|
||||
- Live canonical configuration belongs to canonical ownership and project artifacts, not ambient shell session state.
|
||||
- Missing runtime assumptions must fail early during startup checks, not defer silently to manual behavior.
|
||||
|
||||
## 5) Evidence expectations for this task family (DEV-000074)
|
||||
|
||||
- `docs/PROJECT_STATUS.md` checkpoint updated for DEV-000074.
|
||||
- `AGENTS.md` contains the startup and checkpoint governance.
|
||||
- `dev/ACTIVE_TASK.json` points to the active DEV-000074 packet.
|
||||
- Evidence artifact file or command output captured for cold-start reconstruction validation.
|
||||
|
||||
+15
-1
@@ -1,6 +1,20 @@
|
||||
# Assistant project status
|
||||
|
||||
Audit date: 2026-08-17. Active implementation: DEV-000072 revision 1.
|
||||
Audit date: 2026-08-18. Active implementation: DEV-000074.
|
||||
|
||||
## DEV-000074 checkpoint
|
||||
|
||||
- `DEV_000074_STATUS = COMPLETED`
|
||||
- `TASK_SCOPE = governance/cold-start continuity`
|
||||
- `CURRENT_PHASE = CONTEXT_AND_CHECKPOINT_CONSOLIDATION`
|
||||
- `COMPLETED = AGENTS.md startup/continuity sequence clarified; Cold start reconstruction guide added; task packet created; active task pointer updated; governance checks executed; cold-start reconstruction evidence captured`
|
||||
- `IN_PROGRESS = none`
|
||||
- `NOT_STARTED = product behavior, runtime configuration, or architecture migration changes`
|
||||
- `BLOCKERS = none`
|
||||
- `IMPORTANT_FINDINGS = chat-only state is insufficient for reconstruction; repository artifacts are now explicitly documented`
|
||||
- `EVIDENCE_OBTAINED = AGENTS.md, docs/COLD_START_AND_DURABLE_CHECKPOINT.md, dev/ACTIVE_TASK.json, dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json, check output`
|
||||
- `LAST_VERIFIED_COMMIT = 1c334fc6a4d9bd8c5b8f8f5a7ccebeccf7d98df2`
|
||||
- `NEXT_ACTION = none (awaiting next approved milestone)`
|
||||
|
||||
## DEV-000072 checkpoint
|
||||
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
# DEV-000074 cold-start reconstruction proof
|
||||
Date: 2026-08-18T00:19:35.0288130+03:00
|
||||
|
||||
1) Git context
|
||||
Branch: codex/dev-000072-semantic-deferral-boundary-v1
|
||||
HEAD: fd59b93463bea80459375ecb28864c03ec3efc42
|
||||
origin/main: 11a6a23f6e4f44dd88265a04846419a27f54df98
|
||||
MergeBase: ce666bbc43842d339e760957e3c59c490ae1c18a
|
||||
Status:
|
||||
M AGENTS.md
|
||||
M dev/ACTIVE_TASK.json
|
||||
M docs/PROJECT_STATUS.md
|
||||
?? dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json
|
||||
?? docs/COLD_START_AND_DURABLE_CHECKPOINT.md
|
||||
?? docs/evidence/dev-000074-cold-start-reconstruction.md
|
||||
|
||||
2) Active task pointer
|
||||
{
|
||||
"task_file": "dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json",
|
||||
"task_id": "DEV-000074",
|
||||
"task_revision": 1
|
||||
}
|
||||
|
||||
|
||||
3) Active task file exists
|
||||
True
|
||||
|
||||
4) DEV-000074 packet
|
||||
{
|
||||
"task_id": "DEV-000074",
|
||||
"task_revision": 1,
|
||||
"architecture_revision": "arch-generation-1",
|
||||
"base_repo_revision": "fd59b93463bea80459375ecb28864c03ec3efc42",
|
||||
"risk_tier": "E",
|
||||
"intent": "Consolidate Codex development memory and cold-start continuity so a fresh session can reconstruct active milestone, boundaries, tests, and next action from repository artifacts only. Do not change Domovoy product behavior; do not change deployment runtime configuration.",
|
||||
"requirement_ids": [
|
||||
"DEV-000061 governance continuity",
|
||||
"FOUNDATION_EXIT_AUDIT checkpoint continuity",
|
||||
"Cold-start reconstruction from repository only",
|
||||
"No product behavior regression",
|
||||
"Durable continuation fields"
|
||||
],
|
||||
"allowed_change_scope": {
|
||||
"modules": [],
|
||||
"paths": [
|
||||
"AGENTS.md",
|
||||
"docs/PROJECT_STATUS.md",
|
||||
"docs/COLD_START_AND_DURABLE_CHECKPOINT.md",
|
||||
"docs/evidence/dev-000074-cold-start-reconstruction.md",
|
||||
"dev/ACTIVE_TASK.json",
|
||||
"dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json"
|
||||
]
|
||||
},
|
||||
"forbidden_change_scope": {
|
||||
"paths": [
|
||||
"architecture/ARCHITECTURE_CONSTITUTION.md",
|
||||
"architecture/architecture-registry.yaml",
|
||||
"architecture/architecture-registry.json",
|
||||
"architecture/adrs/**",
|
||||
"security/**",
|
||||
"modules/**",
|
||||
"contracts/**",
|
||||
"adapters/**",
|
||||
"cmd/**",
|
||||
"deploy/**",
|
||||
".gitea/**",
|
||||
"ci/**"
|
||||
]
|
||||
},
|
||||
"allowed_architecture_delta": {
|
||||
"new_cross_module_dependencies": 0,
|
||||
"new_canonical_owners": 0,
|
||||
"new_privileges": 0,
|
||||
"new_third_party_dependencies": 0,
|
||||
"new_provider_adapters": 0,
|
||||
"new_database_owner_roles": 0
|
||||
},
|
||||
"contracts": {
|
||||
"consume": [],
|
||||
"may_change": []
|
||||
},
|
||||
"semantic_owner": "governance",
|
||||
"canonical_state": [
|
||||
"AGENTS.md contains the durable cold-start startup sequence and checkpoint rules.",
|
||||
"Checkpoint continuity is preserved in docs/PROJECT_STATUS plus reconstructed durable checkpoint fields."
|
||||
],
|
||||
"state_transitions": [
|
||||
"Fresh session -> read required artifacts -> reconstruct active task and phase",
|
||||
"Checkpoint update -> clear/record blockers -> define next action",
|
||||
"Preflight and checks -> produce final continuity status and evidence"
|
||||
],
|
||||
"side_effects_and_privileges": [
|
||||
"No direct external mutation",
|
||||
"No runtime/runtime-host configuration changes",
|
||||
"No production actions"
|
||||
],
|
||||
"persistence_and_migrations": [
|
||||
"No database migration",
|
||||
"No schema or privilege change",
|
||||
"No canonical ownership change"
|
||||
],
|
||||
"failure_retry_restart": [
|
||||
"If required startup artifacts are missing, return BLOCKED_BY_MISSING_CAPABILITY and update checkpoint.",
|
||||
"If checkpoint and active task disagree, BLOCKED_BY_SPEC_GAP and require a corrective checkpoint update.",
|
||||
"Execution-window exhaustion is continuation state, not failure."
|
||||
],
|
||||
"assumptions": [
|
||||
"Foundation architecture and ADR set is already accepted.",
|
||||
"No production behavior change is authorized in this milestone."
|
||||
],
|
||||
"acceptance_scenarios": [
|
||||
"Fresh session reconstructs active DEV, phase, blockers, and next action from artifacts alone.",
|
||||
"ACTIVE_TASK points to DEV-000074 task packet after switching.",
|
||||
"AGENTS cold-start checklist remains practical and non-duplicative.",
|
||||
"Docs checkpoint explicitly records durable status with explicit evidence references.",
|
||||
"Architecture/diff checks pass.",
|
||||
"No changed files outside governance/documentation scope."
|
||||
],
|
||||
"required_tests": [
|
||||
"go test ./...",
|
||||
"go vet ./...",
|
||||
"go run ./cmd/devctl preflight -task dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json",
|
||||
"go run ./cmd/devctl check-architecture",
|
||||
"go run ./cmd/devctl check-diff -task dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json",
|
||||
"go run ./cmd/devctl preflight -active dev/ACTIVE_TASK.json"
|
||||
],
|
||||
"terminal_gap_states": [
|
||||
"BLOCKED_BY_SPEC_GAP",
|
||||
"BLOCKED_BY_ARCHITECTURE_GAP",
|
||||
"BLOCKED_BY_MISSING_CAPABILITY",
|
||||
"BLOCKED_BY_CONFLICT",
|
||||
"REQUIRES_MIGRATION_DECISION"
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
5) Required startup files
|
||||
AGENTS.md => True
|
||||
architecture/ARCHITECTURE_CONSTITUTION.md => True
|
||||
architecture/CORE_SEMANTIC_MODEL_V1.md => True
|
||||
architecture/architecture-registry.yaml => True
|
||||
architecture/architecture-registry.json => True
|
||||
development/CODEX_DEVELOPMENT_CONTRACT.md => True
|
||||
docs/PROJECT_STATUS.md => True
|
||||
docs/COLD_START_AND_DURABLE_CHECKPOINT.md => True
|
||||
|
||||
6) Required checks executed
|
||||
go test ./... => PASS
|
||||
go vet ./... => PASS
|
||||
go run ./cmd/devctl preflight -task dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json => PASS
|
||||
go run ./cmd/devctl check-architecture => PASS
|
||||
go run ./cmd/devctl check-diff -task dev/tasks/DEV-000074-durable-codex-project-memory-agents-consolidation.json => PASS
|
||||
go run ./cmd/devctl preflight -active dev/ACTIVE_TASK.json => PASS
|
||||
@@ -0,0 +1,166 @@
|
||||
[
|
||||
{
|
||||
"id": "A",
|
||||
"status": 200,
|
||||
"message": "ты кто",
|
||||
"conversation_id": "2ec5b5b9c3e742a7a3dce894020da7ca",
|
||||
"utterance_id": "86fb129b40d2f2fbb4ab798d863bf35d",
|
||||
"speech_act": "QUESTION",
|
||||
"cognition": "COMPLETED",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"project_provenance": "",
|
||||
"active_focus": "",
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_id": "",
|
||||
"delegation_state": "",
|
||||
"work_planned": false,
|
||||
"reminder_scheduled": false,
|
||||
"reply": "Я искусственный интеллект, созданный для помощи. Как я могу быть полезен сейчас?"
|
||||
},
|
||||
{
|
||||
"id": "B",
|
||||
"status": 200,
|
||||
"message": "сколько будет 2 + 2",
|
||||
"conversation_id": "2ec5b5b9c3e742a7a3dce894020da7ca",
|
||||
"utterance_id": "570663950030add34f71cedb24f4256d",
|
||||
"speech_act": "QUESTION",
|
||||
"cognition": "COMPLETED",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"project_provenance": "",
|
||||
"active_focus": "",
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_id": "",
|
||||
"delegation_state": "",
|
||||
"work_planned": false,
|
||||
"reminder_scheduled": false,
|
||||
"reply": "2 + 2 equals 4."
|
||||
},
|
||||
{
|
||||
"id": "C",
|
||||
"status": 200,
|
||||
"message": "как с утра",
|
||||
"conversation_id": "2ec5b5b9c3e742a7a3dce894020da7ca",
|
||||
"utterance_id": "008192deff274c8ab7678c180ab7e04d",
|
||||
"speech_act": "QUESTION",
|
||||
"cognition": "COMPLETED",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"project_provenance": "",
|
||||
"active_focus": "",
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_id": "",
|
||||
"delegation_state": "",
|
||||
"work_planned": false,
|
||||
"reminder_scheduled": false,
|
||||
"reply": "Утро - это прекрасное время для начала нового дня. Начните с здорового питания, которое поможет вам начать день с бодрости и энергии. Не забудьте о hydratation, выпив适量的水. Уделите время саморазвитию, например, чтению или медитации, чтобы зарядить позитивом весь день."
|
||||
},
|
||||
{
|
||||
"id": "D",
|
||||
"status": 200,
|
||||
"message": "проведи анализ: почему тормозит база, и потом добавь в задачу пометку для проверки",
|
||||
"conversation_id": "2ec5b5b9c3e742a7a3dce894020da7ca",
|
||||
"utterance_id": "4607460cd39d273d99ae50a7d8315517",
|
||||
"speech_act": "QUESTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "REQUIRED",
|
||||
"project_provenance": "",
|
||||
"active_focus": "",
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_id": "",
|
||||
"delegation_state": "",
|
||||
"work_planned": false,
|
||||
"reminder_scheduled": false,
|
||||
"reply": "У меня есть несколько возможных ожиданий. Уточните, о каком именно речь: дедлайн в пятницу; дедлайн в пятницу; дедлайн в пятницу"
|
||||
},
|
||||
{
|
||||
"id": "E",
|
||||
"message": "исправь прошлую формулировку",
|
||||
"status": 502,
|
||||
"body": "chat unavailable\n"
|
||||
},
|
||||
{
|
||||
"id": "F",
|
||||
"message": "обратись к модели gemma4 и спроси сколько звезд на небе",
|
||||
"status": 502,
|
||||
"body": "chat unavailable\n"
|
||||
},
|
||||
{
|
||||
"id": "G",
|
||||
"status": 200,
|
||||
"message": "просто напомни, что нужно проверить",
|
||||
"conversation_id": "2ec5b5b9c3e742a7a3dce894020da7ca",
|
||||
"utterance_id": "89b69b8251258a689f38de98552cbed4",
|
||||
"speech_act": "QUESTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "REQUIRED",
|
||||
"project_provenance": "",
|
||||
"active_focus": "",
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_id": "",
|
||||
"delegation_state": "",
|
||||
"work_planned": false,
|
||||
"reminder_scheduled": false,
|
||||
"reply": "Нужно короткое уточнение, прежде чем выбирать capability или строить более тяжёлый маршрут."
|
||||
},
|
||||
{
|
||||
"id": "H",
|
||||
"status": 200,
|
||||
"message": "Запомни тебя зовут Домовой, я тебя буду звать Домовым",
|
||||
"conversation_id": "2ec5b5b9c3e742a7a3dce894020da7ca",
|
||||
"utterance_id": "0c3bcf9b8f423e93b1b255aa33a557db",
|
||||
"speech_act": "ASSERTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"project_provenance": "",
|
||||
"active_focus": "",
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_id": "",
|
||||
"delegation_state": "",
|
||||
"work_planned": false,
|
||||
"reminder_scheduled": false,
|
||||
"reply": "Записал как утверждение человека. Это пока не проверенный факт."
|
||||
},
|
||||
{
|
||||
"id": "H2",
|
||||
"status": 200,
|
||||
"message": "для меня ты Домовой",
|
||||
"conversation_id": "2ec5b5b9c3e742a7a3dce894020da7ca",
|
||||
"utterance_id": "7847420f28c85894400c6a5be3e760d0",
|
||||
"speech_act": "ASSERTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"project_provenance": "",
|
||||
"active_focus": "",
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_id": "",
|
||||
"delegation_state": "",
|
||||
"work_planned": false,
|
||||
"reminder_scheduled": false,
|
||||
"reply": "Записал как утверждение человека. Это пока не проверенный факт."
|
||||
},
|
||||
{
|
||||
"id": "H3",
|
||||
"status": 200,
|
||||
"message": "давай я буду звать тебя Домовым",
|
||||
"conversation_id": "2ec5b5b9c3e742a7a3dce894020da7ca",
|
||||
"utterance_id": "085e4194a61cbfd097118553342e063a",
|
||||
"speech_act": "ASSERTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"project_provenance": "",
|
||||
"active_focus": "",
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_id": "",
|
||||
"delegation_state": "",
|
||||
"work_planned": false,
|
||||
"reminder_scheduled": false,
|
||||
"reply": "Записал как утверждение человека. Это пока не проверенный факт."
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,184 @@
|
||||
[
|
||||
{
|
||||
"id": "A",
|
||||
"status": 200,
|
||||
"message": "ты кто",
|
||||
"conversation_id": "5e5ba4546dc20a4f6180d674a276fb5a",
|
||||
"utterance_id": "7d14f020fc2134f0ba995c35ebe31523",
|
||||
"speech_act": "QUESTION",
|
||||
"cognition": "COMPLETED",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"reply": "Я искусственный интеллект, созданный для помощи. Как я могу быть полезен сейчас?",
|
||||
"work": false,
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_state": "",
|
||||
"project_provenance": "",
|
||||
"active_focus": ""
|
||||
},
|
||||
{
|
||||
"id": "B",
|
||||
"status": 200,
|
||||
"message": "сколько будет 2 + 2",
|
||||
"conversation_id": "5e5ba4546dc20a4f6180d674a276fb5a",
|
||||
"utterance_id": "0a739b4810420e0eb0615d8d4cd4b60b",
|
||||
"speech_act": "QUESTION",
|
||||
"cognition": "COMPLETED",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"reply": "2 + 2 equals 4.",
|
||||
"work": false,
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_state": "",
|
||||
"project_provenance": "",
|
||||
"active_focus": ""
|
||||
},
|
||||
{
|
||||
"id": "C",
|
||||
"status": 200,
|
||||
"message": "как с утра",
|
||||
"conversation_id": "5e5ba4546dc20a4f6180d674a276fb5a",
|
||||
"utterance_id": "4463c0cc31a552a23c0c0ba4eff06554",
|
||||
"speech_act": "QUESTION",
|
||||
"cognition": "COMPLETED",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"reply": "Утро - это прекрасное время для начала нового дня. Начните с здорового питания, которое поможет вам начать день с бодрости и энергии. Не забудьте о hydratation, выпив适量的水. Уделите время саморазвитию, например, чтению или медитации, чтобы зарядить позитивом весь день.",
|
||||
"work": false,
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_state": "",
|
||||
"project_provenance": "",
|
||||
"active_focus": ""
|
||||
},
|
||||
{
|
||||
"id": "D",
|
||||
"status": 200,
|
||||
"message": "проведи анализ: почему тормозит база, и потом добавь в задачу пометку для проверки",
|
||||
"conversation_id": "5e5ba4546dc20a4f6180d674a276fb5a",
|
||||
"utterance_id": "c80c1eb2ce08edca3add568825c444d7",
|
||||
"speech_act": "QUESTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "REQUIRED",
|
||||
"reply": "У меня есть несколько возможных ожиданий. Уточните, о каком именно речь: дедлайн в пятницу; дедлайн в пятницу; дедлайн в пятницу",
|
||||
"work": false,
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_state": "",
|
||||
"project_provenance": "EXPLICIT",
|
||||
"active_focus": "УПО"
|
||||
},
|
||||
{
|
||||
"id": "E",
|
||||
"status": 502,
|
||||
"message": "исправь прошлую формулировку",
|
||||
"error": "request_failed"
|
||||
},
|
||||
{
|
||||
"id": "F",
|
||||
"status": 502,
|
||||
"message": "обратись к модели gemma4 и спроси сколько звезд на небе",
|
||||
"error": "request_failed"
|
||||
},
|
||||
{
|
||||
"id": "G",
|
||||
"status": 200,
|
||||
"message": "просто напомни, что нужно проверить",
|
||||
"conversation_id": "5e5ba4546dc20a4f6180d674a276fb5a",
|
||||
"utterance_id": "0519382bed09ae5ea9c9a3b2f2af2641",
|
||||
"speech_act": "QUESTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "REQUIRED",
|
||||
"reply": "Нужно короткое уточнение, прежде чем выбирать capability или строить более тяжёлый маршрут.",
|
||||
"work": false,
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_state": "",
|
||||
"project_provenance": "",
|
||||
"active_focus": ""
|
||||
},
|
||||
{
|
||||
"id": "H",
|
||||
"status": 200,
|
||||
"message": "Запомни тебя зовут Домовой",
|
||||
"conversation_id": "5e5ba4546dc20a4f6180d674a276fb5a",
|
||||
"utterance_id": "aae512074bf81adb405c0c80331c9096",
|
||||
"speech_act": "ASSERTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"reply": "Записал как утверждение человека. Это пока не проверенный факт.",
|
||||
"work": false,
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_state": "",
|
||||
"project_provenance": "",
|
||||
"active_focus": ""
|
||||
},
|
||||
{
|
||||
"id": "H2",
|
||||
"status": 200,
|
||||
"message": "для меня ты Домовой",
|
||||
"conversation_id": "5e5ba4546dc20a4f6180d674a276fb5a",
|
||||
"utterance_id": "78a171bb2f405e72f98f3b19d7422514",
|
||||
"speech_act": "ASSERTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"reply": "Записал как утверждение человека. Это пока не проверенный факт.",
|
||||
"work": false,
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_state": "",
|
||||
"project_provenance": "",
|
||||
"active_focus": ""
|
||||
},
|
||||
{
|
||||
"id": "H3",
|
||||
"status": 200,
|
||||
"message": "давай я буду звать тебя Домовым",
|
||||
"conversation_id": "5e5ba4546dc20a4f6180d674a276fb5a",
|
||||
"utterance_id": "382bd2310ed4a86f671f02c45afe3aee",
|
||||
"speech_act": "ASSERTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"reply": "Записал как утверждение человека. Это пока не проверенный факт.",
|
||||
"work": false,
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_state": "",
|
||||
"project_provenance": "",
|
||||
"active_focus": ""
|
||||
},
|
||||
{
|
||||
"id": "H4",
|
||||
"status": 200,
|
||||
"message": "Вернемся к УПО",
|
||||
"conversation_id": "5e5ba4546dc20a4f6180d674a276fb5a",
|
||||
"utterance_id": "8cb57dcf2599947673d1c1a4bb154266",
|
||||
"speech_act": "ASSERTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"reply": "Фокус переключён: УПО.",
|
||||
"work": false,
|
||||
"capability_status": "",
|
||||
"capability_kind": "",
|
||||
"delegation_state": "",
|
||||
"project_provenance": "EXPLICIT",
|
||||
"active_focus": "УПО"
|
||||
},
|
||||
{
|
||||
"id": "I",
|
||||
"status": 200,
|
||||
"message": "помоги ответить на письмо бухгалтеру",
|
||||
"conversation_id": "5e5ba4546dc20a4f6180d674a276fb5a",
|
||||
"utterance_id": "ebeacce8340779490936e702b67543fa",
|
||||
"speech_act": "ASSERTION",
|
||||
"cognition": "not_requested",
|
||||
"clarification": "NOT_REQUIRED",
|
||||
"reply": "Сейчас у меня ещё не подключена возможность отправлять почту. Я зафиксировал capability gap, без ложного выполнения.",
|
||||
"work": false,
|
||||
"capability_status": "UNAVAILABLE",
|
||||
"capability_kind": "SEND_EMAIL",
|
||||
"delegation_state": "",
|
||||
"project_provenance": "",
|
||||
"active_focus": ""
|
||||
}
|
||||
]
|
||||
@@ -125,6 +125,10 @@ func BuildDeterministicCandidate(message string, corrects interaction.HumanUtter
|
||||
tokens := semanticTokens(message)
|
||||
hasQuestionMark := strings.Contains(message, "?")
|
||||
scores := semanticScores(tokens, hasQuestionMark, corrects != "")
|
||||
if isIdentityNamingPreferenceDirective(tokens) {
|
||||
scores[interaction.SpeechActDirective] += 5
|
||||
scores[interaction.SpeechActPreference] += 4
|
||||
}
|
||||
primary, primaryScore := topAct(scores)
|
||||
secondary, secondaryScore := secondAct(scores, primary)
|
||||
if (startsWithModalRequest(tokens) || startsWithExplanatoryRequest(tokens, "расска", "раска", "объяс", "опиш", "покаж", "подскаж")) &&
|
||||
@@ -170,6 +174,22 @@ func BuildDeterministicCandidate(message string, corrects interaction.HumanUtter
|
||||
return candidate
|
||||
}
|
||||
|
||||
func isIdentityNamingPreferenceDirective(tokens []string) bool {
|
||||
if !containsToken(tokens, "ты") && !containsToken(tokens, "тебя") && !containsToken(tokens, "тебе") && !containsToken(tokens, "вам") {
|
||||
return false
|
||||
}
|
||||
if containsStemInTokens(tokens, "запомни", "назови", "назвать", "назвав", "зови", "название", "называ", "обраща", "обращай", "обращайся", "звать", "зов", "зовут") {
|
||||
return true
|
||||
}
|
||||
if containsStemInTokens(tokens, "домов", "assist", "ассист", "assistant", "assistant") {
|
||||
return true
|
||||
}
|
||||
if containsStemInTokens(tokens, "буду", "будешь") && containsStemInTokens(tokens, "звать", "обращ", "называть") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func semanticTokens(message string) []string {
|
||||
lower := strings.ToLower(strings.TrimSpace(message))
|
||||
replacer := strings.NewReplacer(".", " ", ",", " ", "!", " ", "?", " ", ":", " ", ";", " ", "(", " ", ")", " ", "\"", " ", "'", " ", "«", " ", "»", " ", "+", " + ", "-", " - ", "/", " / ")
|
||||
@@ -369,6 +389,9 @@ func applicabilityFor(primary, secondary interaction.SpeechAct, primaryScore, se
|
||||
}
|
||||
|
||||
func needsCognitionForCandidate(primary, secondary interaction.SpeechAct, tokens []string) bool {
|
||||
if primary == interaction.SpeechActDirective && secondary == interaction.SpeechActPreference && isIdentityNamingPreferenceDirective(tokens) {
|
||||
return false
|
||||
}
|
||||
if primary == interaction.SpeechActQuestion || primary == interaction.SpeechActRequestToInvestigate {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -93,6 +93,25 @@ func TestDeterministicCandidateTreatsModalExplanationRequestsAsCognitionWorthWit
|
||||
}
|
||||
}
|
||||
|
||||
func TestDeterministicCandidateClassifiesIdentityNamingPreferenceAsDirective(t *testing.T) {
|
||||
for _, message := range []string{
|
||||
"Запомни тебя зовут Домовой, я тебя буду звать Домовым",
|
||||
"я буду звать тебя Домовым",
|
||||
"давай я буду звать тебя Домовой",
|
||||
"теперь буду обращаться к тебе как к Домовой",
|
||||
"запомни, я называю тебя Домовым",
|
||||
"для меня ты Домовой",
|
||||
} {
|
||||
candidate := BuildDeterministicCandidate(message, "", time.Unix(10, 0).UnixMilli())
|
||||
if candidate.PrimarySpeechAct != interaction.SpeechActDirective {
|
||||
t.Fatalf("expected directive for %q, got %+v", message, candidate)
|
||||
}
|
||||
if candidate.NeedsCognition {
|
||||
t.Fatalf("expected no cognition for naming preference by default for %q, got %+v", message, candidate)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestDeterministicCandidateTreatsModelRequestAsDirectiveNeedingCognition(t *testing.T) {
|
||||
candidate := BuildDeterministicCandidate("обратись к модели gemma4 и спроси сколько звезд на небе", "", time.Unix(10, 0).UnixMilli())
|
||||
if candidate.PrimarySpeechAct != interaction.SpeechActDirective {
|
||||
|
||||
@@ -30,6 +30,10 @@ func InterpretUtterance(utterance interaction.HumanUtterance, projects []situati
|
||||
deterministicCandidate := BuildDeterministicCandidate(utterance.Content, utterance.CorrectsUtteranceID, millis)
|
||||
deterministicCandidate.UtteranceID = utterance.ID
|
||||
selectedCandidate := deterministicCandidate
|
||||
assertionVerification := string(epistemics.VerificationNotApplicable)
|
||||
if selectedCandidate.PrimarySpeechAct == interaction.SpeechActAssertion {
|
||||
assertionVerification = string(epistemics.VerificationUnverified)
|
||||
}
|
||||
result := SemanticResult{
|
||||
Interpretation: interaction.UtteranceInterpretation{
|
||||
ID: interaction.InterpretationID(interpretationID),
|
||||
@@ -38,7 +42,7 @@ func InterpretUtterance(utterance interaction.HumanUtterance, projects []situati
|
||||
SecondarySpeechAct: selectedCandidate.SecondarySpeechAct,
|
||||
ConfidenceMillis: selectedCandidate.ConfidenceMillis,
|
||||
Source: string(selectedCandidate.Source),
|
||||
AssertionVerification: string(epistemics.VerificationUnverified),
|
||||
AssertionVerification: assertionVerification,
|
||||
RequestedOutcome: selectedCandidate.RequestedOutcome,
|
||||
Clarification: selectedCandidate.Clarification,
|
||||
NeedsCognition: selectedCandidate.NeedsCognition,
|
||||
|
||||
@@ -66,6 +66,16 @@ func TestInterpretUtteranceQuestionAboutCurrentWorkUsesFocus(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestInterpretUtteranceIdentityNamingPreferenceNotAssertion(t *testing.T) {
|
||||
result := interpretForTest(t, "Запомни тебя зовут Домовой, я тебя буду звать Домовым", nil, "")
|
||||
if result.Interpretation.SpeechAct != interaction.SpeechActDirective {
|
||||
t.Fatalf("expected directive for naming preference, got %s", result.Interpretation.SpeechAct)
|
||||
}
|
||||
if result.Interpretation.AssertionVerification == "UNVERIFIED" {
|
||||
t.Fatalf("expected no assertion semantics path for naming preference, got %#v", result.Interpretation)
|
||||
}
|
||||
}
|
||||
|
||||
func TestInterpretUtteranceInheritedFocusForThere(t *testing.T) {
|
||||
result := interpretForTest(t, "Добавь туда новую настройку.", activeFocus("assistant", "Assistant"), "")
|
||||
if len(result.Projects) != 1 || result.Projects[0].ProjectID != "assistant" || result.Projects[0].Provenance != situation.ProjectResolutionInheritedFocus {
|
||||
|
||||
Reference in New Issue
Block a user