115 lines
5.7 KiB
JSON
115 lines
5.7 KiB
JSON
{
|
||
"task_id": "GEN2-009",
|
||
"task_revision": 1,
|
||
"architecture_revision": "ARCH-GEN2-000",
|
||
"base_repo_revision": "gen2-integration",
|
||
"risk_tier": "E",
|
||
"intent": "Дать многоканальный retrieval по canonical owners без единой memory_items каноники.",
|
||
"requirement_ids": [
|
||
"REQ-GEN2-009-GOAL",
|
||
"REQ-GEN2-009-BOUNDARY",
|
||
"REQ-GEN2-009-GATE"
|
||
],
|
||
"allowed_change_scope": {
|
||
"modules": [],
|
||
"paths": [
|
||
"runtime/retrieval/**",
|
||
"contracts/cognitive/**",
|
||
"adapters/postgres/*retrieval*.go",
|
||
"adapters/postgres/*search*.go",
|
||
"database/migrations/*.sql",
|
||
"tests/**",
|
||
"dev/ACTIVE_TASK.json",
|
||
"dev/tasks/GEN2-009-build-memory-retrieval-fabric-as-rebuildable-projections.json"
|
||
]
|
||
},
|
||
"forbidden_change_scope": {
|
||
"paths": [
|
||
"security/**",
|
||
"go.mod",
|
||
"go.sum",
|
||
"architecture/**",
|
||
".gitea/workflows/**",
|
||
"deploy/**",
|
||
"adapters/models/**"
|
||
]
|
||
},
|
||
"allowed_architecture_delta": {
|
||
"new_cross_module_dependencies": 0,
|
||
"new_canonical_owners": 0,
|
||
"new_privileges": 0,
|
||
"new_third_party_dependencies": 0,
|
||
"new_database_owner_roles": 1
|
||
},
|
||
"contracts": {
|
||
"consume": [
|
||
"contracts.interaction@v1",
|
||
"contracts.world@gen2",
|
||
"contracts.epistemics@gen2",
|
||
"contracts.work@v1",
|
||
"contracts.continuity@v1",
|
||
"contracts.capability@v1",
|
||
"contracts.configuration@gen2",
|
||
"contracts.self@gen2"
|
||
],
|
||
"may_change": [
|
||
"Only contracts explicitly within GEN2-009 allowed_change_scope; preserve Gen2 owner boundaries and backward compatibility unless this packet says cutover."
|
||
]
|
||
},
|
||
"semantic_owner": "No canonical Memory owner; projection layer. Follow GEN2 target architecture: owner boundaries are authoritative; Memory remains a read/retrieval fabric, World is not truth owner, SELF is not a God orchestrator.",
|
||
"canonical_state": [
|
||
"canonical writers unchanged; retrieval index only projection writer",
|
||
"No task may create a second canonical owner for an already-owned mutable semantic concept."
|
||
],
|
||
"state_transitions": [
|
||
"current state -> additive/shadow Gen2 path -> evidence comparison -> controlled cutover -> compatibility retention; writer rule: canonical writers unchanged; retrieval index only projection writer"
|
||
],
|
||
"side_effects_and_privileges": [
|
||
"No external mutation may bypass existing Authority -> Commit -> Executor boundaries.",
|
||
"Do not weaken architecture/security/test guardrails to make the task pass."
|
||
],
|
||
"persistence_and_migrations": [
|
||
"Database changes must be additive next-numbered migrations only until an explicitly approved retirement task; never edit historical V1 migrations 001-045.",
|
||
"At most one canonical writer is active for each semantic state; backfill/shadow reads do not create a second canonical writer.",
|
||
"The positive new_database_owner_roles delta in this packet is a devctl-v1 database-surface compatibility gate; it does not authorize cross-owner SQL/FK/JOIN or an extra owner unless explicitly stated by this task."
|
||
],
|
||
"failure_retry_restart": [
|
||
"Rollback rule: drop/rebuild projection and use V1 memory retrieval",
|
||
"Retries/restarts must not create duplicate external side effects or a second canonical writer.",
|
||
"Durable state required by this task must survive process restart; process-local memory is never the only source of truth.",
|
||
"Cutover must keep the previous read/compatibility path available until the task or milestone explicitly proves retirement."
|
||
],
|
||
"assumptions": [
|
||
"Program milestone: M2; test profile: FAST.",
|
||
"Task branch starts from local gen2-integration; base_repo_revision=gen2-integration must resolve to the untouched integration base while the task branch is active.",
|
||
"Codex reads DOMOVOY_CONSTITUTION.md, GEN2_TARGET_ARCHITECTURE.md, GEN2_CANONICAL_DATA_MODEL.md, GEN2_MIGRATION_MAP.md, GEN2_MASTER_PLAN.md and GEN2_EXECUTION_CONTRACT.md before non-trivial edits.",
|
||
"Do not expand scope silently. If a required change falls outside allowed paths or changes ownership, return a typed gap and request a task revision.",
|
||
"Depends on: GEN2-008."
|
||
],
|
||
"acceptance_scenarios": [
|
||
"GEN2-009-SCN-01: создать RetrievalDocument projection с source SemanticRef",
|
||
"GEN2-009-SCN-02: projection builders из Interaction/World/Epistemics/Work/Continuity/Capability/Configuration/SELF",
|
||
"GEN2-009-SCN-03: жёсткий ContextScope/realm/version filter before similarity",
|
||
"GEN2-009-SCN-04: lanes: semantic, entity/graph-like refs, temporal, goal/commitment, positive experience, negative experience, contradiction, skill",
|
||
"GEN2-009-SCN-05: ranking signals: relevance, freshness, confidence, salience, scope distance, cost",
|
||
"GEN2-009-SCN-06: hot/warm/cold/archive retrieval policy как operational storage concern, не truth",
|
||
"GEN2-009-SCN-07: projection versioning/rebuild command",
|
||
"GEN2-009-EXIT: vector index можно полностью перестроить без изменения canonical memory; cross-company leak blocked before embedding rank."
|
||
],
|
||
"required_tests": [
|
||
"FAST: go test ./runtime/retrieval/... ./contracts/cognitive/... ./adapters/postgres",
|
||
"FAST: go vet ./runtime/retrieval/... ./contracts/cognitive/... ./adapters/postgres",
|
||
"FAST governance: go run ./cmd/devctl preflight -active dev/ACTIVE_TASK.json",
|
||
"FAST scope: go run ./cmd/devctl check-diff -active dev/ACTIVE_TASK.json",
|
||
"FAST independent: go run ./cmd/devctl/independent",
|
||
"FAST whitespace: git diff --check gen2-integration --"
|
||
],
|
||
"terminal_gap_states": [
|
||
"BLOCKED_BY_SPEC_GAP",
|
||
"BLOCKED_BY_ARCHITECTURE_GAP",
|
||
"BLOCKED_BY_MISSING_CAPABILITY",
|
||
"BLOCKED_BY_CONFLICT",
|
||
"REQUIRES_MIGRATION_DECISION"
|
||
]
|
||
}
|