dna-sdk 0.1.0
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/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/adapters/embedding/onnx.d.ts +32 -0
- package/dist/adapters/embedding/onnx.js +51 -0
- package/dist/adapters/filesystem/cache.d.ts +16 -0
- package/dist/adapters/filesystem/cache.js +113 -0
- package/dist/adapters/filesystem/index.d.ts +2 -0
- package/dist/adapters/filesystem/index.js +2 -0
- package/dist/adapters/filesystem/source.d.ts +82 -0
- package/dist/adapters/filesystem/source.js +357 -0
- package/dist/adapters/postgres/index.d.ts +2 -0
- package/dist/adapters/postgres/index.js +2 -0
- package/dist/adapters/postgres/migrations.d.ts +14 -0
- package/dist/adapters/postgres/migrations.js +88 -0
- package/dist/adapters/postgres/source.d.ts +172 -0
- package/dist/adapters/postgres/source.js +569 -0
- package/dist/adapters/resolvers/github.d.ts +12 -0
- package/dist/adapters/resolvers/github.js +47 -0
- package/dist/adapters/resolvers/http.d.ts +22 -0
- package/dist/adapters/resolvers/http.js +145 -0
- package/dist/adapters/resolvers/index.d.ts +3 -0
- package/dist/adapters/resolvers/index.js +3 -0
- package/dist/adapters/resolvers/local.d.ts +24 -0
- package/dist/adapters/resolvers/local.js +132 -0
- package/dist/adapters/search/driver.d.ts +45 -0
- package/dist/adapters/search/driver.js +138 -0
- package/dist/adapters/search/migrations.d.ts +26 -0
- package/dist/adapters/search/migrations.js +58 -0
- package/dist/adapters/search/rrf.d.ts +23 -0
- package/dist/adapters/search/rrf.js +42 -0
- package/dist/adapters/search/sqlite-vec.d.ts +66 -0
- package/dist/adapters/search/sqlite-vec.js +294 -0
- package/dist/bootstrap.d.ts +45 -0
- package/dist/bootstrap.js +134 -0
- package/dist/extensions/agentskills/DOCS.md +18 -0
- package/dist/extensions/agentskills.d.ts +28 -0
- package/dist/extensions/agentskills.js +252 -0
- package/dist/extensions/agentsmd/DOCS.md +18 -0
- package/dist/extensions/agentsmd.d.ts +22 -0
- package/dist/extensions/agentsmd.js +170 -0
- package/dist/extensions/audit/kinds/audit-log.kind.yaml +148 -0
- package/dist/extensions/audit.d.ts +25 -0
- package/dist/extensions/audit.js +62 -0
- package/dist/extensions/automation/kinds/automation.kind.yaml +296 -0
- package/dist/extensions/automation/query.d.ts +49 -0
- package/dist/extensions/automation/query.js +77 -0
- package/dist/extensions/automation/write-guards.d.ts +59 -0
- package/dist/extensions/automation/write-guards.js +153 -0
- package/dist/extensions/automation.d.ts +41 -0
- package/dist/extensions/automation.js +54 -0
- package/dist/extensions/collab.d.ts +16 -0
- package/dist/extensions/collab.js +79 -0
- package/dist/extensions/doc/kinds/doc.kind.yaml +118 -0
- package/dist/extensions/doc.d.ts +25 -0
- package/dist/extensions/doc.js +10 -0
- package/dist/extensions/eval/kinds/eval-baseline.kind.yaml +65 -0
- package/dist/extensions/eval/kinds/eval-case.kind.yaml +140 -0
- package/dist/extensions/eval/kinds/eval-run.kind.yaml +134 -0
- package/dist/extensions/eval/kinds/eval-suite.kind.yaml +87 -0
- package/dist/extensions/eval.d.ts +24 -0
- package/dist/extensions/eval.js +31 -0
- package/dist/extensions/evidence/kinds/evidence.kind.yaml +92 -0
- package/dist/extensions/evidence.d.ts +17 -0
- package/dist/extensions/evidence.js +94 -0
- package/dist/extensions/federation.d.ts +22 -0
- package/dist/extensions/federation.js +173 -0
- package/dist/extensions/guardrails/DOCS.md +20 -0
- package/dist/extensions/guardrails.d.ts +31 -0
- package/dist/extensions/guardrails.js +228 -0
- package/dist/extensions/helix/DOCS-Actor.md +20 -0
- package/dist/extensions/helix/DOCS-Agent.md +20 -0
- package/dist/extensions/helix/DOCS-UseCase.md +20 -0
- package/dist/extensions/helix/layers.d.ts +12 -0
- package/dist/extensions/helix/layers.js +18 -0
- package/dist/extensions/helix/write-guards.d.ts +70 -0
- package/dist/extensions/helix/write-guards.js +172 -0
- package/dist/extensions/helix.d.ts +29 -0
- package/dist/extensions/helix.js +963 -0
- package/dist/extensions/helix_extras.d.ts +124 -0
- package/dist/extensions/helix_extras.js +328 -0
- package/dist/extensions/hooks.d.ts +31 -0
- package/dist/extensions/hooks.js +247 -0
- package/dist/extensions/kinddef/DOCS.md +24 -0
- package/dist/extensions/kinddef.d.ts +40 -0
- package/dist/extensions/kinddef.js +171 -0
- package/dist/extensions/lesson.d.ts +6 -0
- package/dist/extensions/lesson.js +194 -0
- package/dist/extensions/modelreg/kinds/model-profile.kind.yaml +155 -0
- package/dist/extensions/modelreg.d.ts +30 -0
- package/dist/extensions/modelreg.js +38 -0
- package/dist/extensions/recognizer.d.ts +34 -0
- package/dist/extensions/recognizer.js +272 -0
- package/dist/extensions/research.d.ts +32 -0
- package/dist/extensions/research.js +292 -0
- package/dist/extensions/safety.d.ts +33 -0
- package/dist/extensions/safety.js +230 -0
- package/dist/extensions/sdlc/kinds/adr.kind.yaml +136 -0
- package/dist/extensions/sdlc/kinds/archive-proposal.kind.yaml +107 -0
- package/dist/extensions/sdlc/kinds/changelog.kind.yaml +108 -0
- package/dist/extensions/sdlc/kinds/cognitive-policy.kind.yaml +470 -0
- package/dist/extensions/sdlc/kinds/forecast.kind.yaml +125 -0
- package/dist/extensions/sdlc/kinds/insight.kind.yaml +87 -0
- package/dist/extensions/sdlc/kinds/kaizen.kind.yaml +106 -0
- package/dist/extensions/sdlc/kinds/lesson-learned.kind.yaml +270 -0
- package/dist/extensions/sdlc/kinds/narrative.kind.yaml +189 -0
- package/dist/extensions/sdlc/kinds/pattern-insight.kind.yaml +204 -0
- package/dist/extensions/sdlc/kinds/postmortem.kind.yaml +168 -0
- package/dist/extensions/sdlc/kinds/pre-mortem.kind.yaml +145 -0
- package/dist/extensions/sdlc/kinds/prompt-template.kind.yaml +109 -0
- package/dist/extensions/sdlc/kinds/retrospective.kind.yaml +186 -0
- package/dist/extensions/sdlc/kinds/risk-register.kind.yaml +178 -0
- package/dist/extensions/sdlc/kinds/saved-view.kind.yaml +127 -0
- package/dist/extensions/sdlc/kinds/status-report.kind.yaml +129 -0
- package/dist/extensions/sdlc/kinds/synthesis-run.kind.yaml +279 -0
- package/dist/extensions/sdlc/kinds/synthesizer-state.kind.yaml +196 -0
- package/dist/extensions/sdlc/kinds/workflow-event.kind.yaml +195 -0
- package/dist/extensions/sdlc.d.ts +32 -0
- package/dist/extensions/sdlc.js +1318 -0
- package/dist/extensions/soulspec/DOCS.md +19 -0
- package/dist/extensions/soulspec.d.ts +22 -0
- package/dist/extensions/soulspec.js +287 -0
- package/dist/extensions/tenant.d.ts +6 -0
- package/dist/extensions/tenant.js +291 -0
- package/dist/extensions/testkit.d.ts +24 -0
- package/dist/extensions/testkit.js +211 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.js +102 -0
- package/dist/kernel/_text.d.ts +28 -0
- package/dist/kernel/_text.js +42 -0
- package/dist/kernel/bundle-handle.d.ts +83 -0
- package/dist/kernel/bundle-handle.js +184 -0
- package/dist/kernel/capabilities.d.ts +157 -0
- package/dist/kernel/capabilities.js +109 -0
- package/dist/kernel/collaborator-ports.d.ts +91 -0
- package/dist/kernel/collaborator-ports.js +1 -0
- package/dist/kernel/composition-resolver.d.ts +215 -0
- package/dist/kernel/composition-resolver.js +558 -0
- package/dist/kernel/composition.d.ts +10 -0
- package/dist/kernel/composition.js +1 -0
- package/dist/kernel/descriptor-loader.d.ts +13 -0
- package/dist/kernel/descriptor-loader.js +48 -0
- package/dist/kernel/document.d.ts +43 -0
- package/dist/kernel/document.js +71 -0
- package/dist/kernel/embedding.d.ts +28 -0
- package/dist/kernel/embedding.js +78 -0
- package/dist/kernel/errors.d.ts +62 -0
- package/dist/kernel/errors.js +82 -0
- package/dist/kernel/events.d.ts +6 -0
- package/dist/kernel/events.js +21 -0
- package/dist/kernel/evidence-capture.d.ts +69 -0
- package/dist/kernel/evidence-capture.js +138 -0
- package/dist/kernel/fs.d.ts +20 -0
- package/dist/kernel/fs.js +128 -0
- package/dist/kernel/generic-rw.d.ts +33 -0
- package/dist/kernel/generic-rw.js +235 -0
- package/dist/kernel/hooks.d.ts +172 -0
- package/dist/kernel/hooks.js +256 -0
- package/dist/kernel/index.d.ts +624 -0
- package/dist/kernel/index.js +1638 -0
- package/dist/kernel/instance.d.ts +211 -0
- package/dist/kernel/instance.js +487 -0
- package/dist/kernel/kind-registry.d.ts +183 -0
- package/dist/kernel/kind-registry.js +710 -0
- package/dist/kernel/kind_base.d.ts +106 -0
- package/dist/kernel/kind_base.js +244 -0
- package/dist/kernel/layer-resolver.d.ts +48 -0
- package/dist/kernel/layer-resolver.js +284 -0
- package/dist/kernel/lock-manager.d.ts +21 -0
- package/dist/kernel/lock-manager.js +43 -0
- package/dist/kernel/lock.d.ts +38 -0
- package/dist/kernel/lock.js +115 -0
- package/dist/kernel/meta.d.ts +135 -0
- package/dist/kernel/meta.js +817 -0
- package/dist/kernel/models.d.ts +3089 -0
- package/dist/kernel/models.js +764 -0
- package/dist/kernel/navigator.d.ts +36 -0
- package/dist/kernel/navigator.js +132 -0
- package/dist/kernel/port-surface.d.ts +33 -0
- package/dist/kernel/port-surface.js +180 -0
- package/dist/kernel/preview.d.ts +60 -0
- package/dist/kernel/preview.js +54 -0
- package/dist/kernel/prompt-budget.d.ts +39 -0
- package/dist/kernel/prompt-budget.js +43 -0
- package/dist/kernel/prompt-builder.d.ts +25 -0
- package/dist/kernel/prompt-builder.js +237 -0
- package/dist/kernel/protocols.d.ts +751 -0
- package/dist/kernel/protocols.js +493 -0
- package/dist/kernel/reports.d.ts +26 -0
- package/dist/kernel/reports.js +215 -0
- package/dist/kernel/resolver.d.ts +146 -0
- package/dist/kernel/resolver.js +232 -0
- package/dist/kernel/resource.d.ts +57 -0
- package/dist/kernel/resource.js +97 -0
- package/dist/kernel/runtime.d.ts +16 -0
- package/dist/kernel/runtime.js +18 -0
- package/dist/kernel/safety-scanner.d.ts +38 -0
- package/dist/kernel/safety-scanner.js +228 -0
- package/dist/kernel/serialize-to-files.d.ts +29 -0
- package/dist/kernel/serialize-to-files.js +23 -0
- package/dist/kernel/spec-access.d.ts +23 -0
- package/dist/kernel/spec-access.js +40 -0
- package/dist/kernel/studio_ui.d.ts +88 -0
- package/dist/kernel/studio_ui.js +135 -0
- package/dist/kernel/templates.d.ts +77 -0
- package/dist/kernel/templates.js +116 -0
- package/dist/kernel/tool-registry.d.ts +52 -0
- package/dist/kernel/tool-registry.js +89 -0
- package/dist/kernel/write-pipeline.d.ts +65 -0
- package/dist/kernel/write-pipeline.js +271 -0
- package/dist/kernel/writer-helpers.d.ts +24 -0
- package/dist/kernel/writer-helpers.js +42 -0
- package/dist/memory/decay.d.ts +31 -0
- package/dist/memory/decay.js +97 -0
- package/dist/memory/ecphory.d.ts +25 -0
- package/dist/memory/ecphory.js +178 -0
- package/dist/memory/encodingContext.d.ts +21 -0
- package/dist/memory/encodingContext.js +62 -0
- package/dist/memory/index.d.ts +23 -0
- package/dist/memory/index.js +23 -0
- package/dist/memory/memoryType.d.ts +7 -0
- package/dist/memory/memoryType.js +24 -0
- package/dist/memory/policy.d.ts +35 -0
- package/dist/memory/policy.js +35 -0
- package/dist/memory/retrieval.d.ts +21 -0
- package/dist/memory/retrieval.js +145 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.js +8 -0
- package/dist/testing/recordSearchConformance.d.ts +43 -0
- package/dist/testing/recordSearchConformance.js +147 -0
- package/dist/viz/ascii.d.ts +7 -0
- package/dist/viz/ascii.js +60 -0
- package/dist/viz/health.d.ts +8 -0
- package/dist/viz/health.js +161 -0
- package/dist/viz/index.d.ts +10 -0
- package/dist/viz/index.js +10 -0
- package/dist/viz/matrix.d.ts +8 -0
- package/dist/viz/matrix.js +84 -0
- package/dist/viz/mermaid.d.ts +38 -0
- package/dist/viz/mermaid.js +706 -0
- package/package.json +82 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# ArchiveProposal — pruning proposal (record plane). Always a *proposal*,
|
|
2
|
+
# never an execution: user (or Veto Hook) approves before the target moves
|
|
3
|
+
# to _forgotten/. Reversible via `dna sdlc forget undo`.
|
|
4
|
+
#
|
|
5
|
+
# F3 lote-2 (spec 2026-06-10-kinds-descriptor-f3): synthesized from this
|
|
6
|
+
# descriptor; the hand-written class twins were deleted. PARITY-CRITICAL
|
|
7
|
+
# package data — byte-identical mirror under packages/sdk-{py,ts};
|
|
8
|
+
# tests/test_descriptor_hash_parity.py enforces. Equivalence vs the extinct
|
|
9
|
+
# class frozen in tests/test_lote2_descriptor_equivalence.py (golden:
|
|
10
|
+
# tests/goldens/lote2/ArchiveProposal.golden.json). Deltas intencionais (semântica
|
|
11
|
+
# canônica = port): summary curado substitui o eco whole-spec do KindBase
|
|
12
|
+
# default (list endpoints não usam kp.summary()); parse valida contra o
|
|
13
|
+
# schema (classe era pass-through); to_card morto não migrado.
|
|
14
|
+
apiVersion: github.com/ruinosus/dna/core/v1
|
|
15
|
+
kind: KindDefinition
|
|
16
|
+
metadata:
|
|
17
|
+
name: archive-proposal
|
|
18
|
+
spec:
|
|
19
|
+
target_api_version: github.com/ruinosus/dna/sdlc/v1
|
|
20
|
+
target_kind: ArchiveProposal
|
|
21
|
+
alias: sdlc-archive-proposal
|
|
22
|
+
origin: github.com/ruinosus/dna/sdlc
|
|
23
|
+
tenant_scope: global
|
|
24
|
+
plane: record
|
|
25
|
+
prompt_target: false
|
|
26
|
+
flatten_in_context: false
|
|
27
|
+
prompt_target_priority: 0
|
|
28
|
+
storage:
|
|
29
|
+
type: bundle
|
|
30
|
+
container: archive-proposals
|
|
31
|
+
marker: ARCHIVE_PROPOSAL.md
|
|
32
|
+
body_field: body
|
|
33
|
+
schema:
|
|
34
|
+
type: object
|
|
35
|
+
required:
|
|
36
|
+
- target_kind
|
|
37
|
+
- target_name
|
|
38
|
+
- reason
|
|
39
|
+
- evidence
|
|
40
|
+
- proposed_by
|
|
41
|
+
- status
|
|
42
|
+
- review_deadline
|
|
43
|
+
properties:
|
|
44
|
+
target_kind:
|
|
45
|
+
type: string
|
|
46
|
+
description: Any Kind name (e.g. 'Plan', 'Story', 'Issue', 'Spec'). Self-references
|
|
47
|
+
rejected at execution time.
|
|
48
|
+
target_name:
|
|
49
|
+
type: string
|
|
50
|
+
description: Slug of the doc being proposed for forgetting.
|
|
51
|
+
reason:
|
|
52
|
+
type: string
|
|
53
|
+
enum:
|
|
54
|
+
- orphan
|
|
55
|
+
- superseded
|
|
56
|
+
- stale
|
|
57
|
+
- contradicted
|
|
58
|
+
- duplicate
|
|
59
|
+
description: Why prune. orphan = no inbound refs; superseded = newer doc replaces;
|
|
60
|
+
stale = no touch beyond threshold; contradicted = newer doc disagrees; duplicate
|
|
61
|
+
= identical.
|
|
62
|
+
evidence:
|
|
63
|
+
type: string
|
|
64
|
+
description: Plain-text justification. E.g. 'Unreferenced by any WorkflowEvent.methodology_artifact
|
|
65
|
+
in 91 entries scanned. Last touch 73 days ago.'
|
|
66
|
+
proposed_at:
|
|
67
|
+
type: string
|
|
68
|
+
format: date-time
|
|
69
|
+
description: Auto-stamped on creation.
|
|
70
|
+
proposed_by:
|
|
71
|
+
type: string
|
|
72
|
+
description: Oracle slug (typically 'cleanup-suggestions') or 'user'.
|
|
73
|
+
status:
|
|
74
|
+
type: string
|
|
75
|
+
enum:
|
|
76
|
+
- proposed
|
|
77
|
+
- approved
|
|
78
|
+
- vetoed
|
|
79
|
+
- executed
|
|
80
|
+
description: proposed → approved → executed (moves target to _forgotten/)
|
|
81
|
+
OR proposed → vetoed (target stays).
|
|
82
|
+
review_deadline:
|
|
83
|
+
type: string
|
|
84
|
+
format: date-time
|
|
85
|
+
description: 'Spec §15: default proposed_at + 14d. Stale proposals past this
|
|
86
|
+
date should be re-evaluated (not auto-vetoed).'
|
|
87
|
+
reviewer:
|
|
88
|
+
type: string
|
|
89
|
+
description: Auto-stamped on approve/veto. Username or 'system'.
|
|
90
|
+
reviewer_note:
|
|
91
|
+
type: string
|
|
92
|
+
description: Optional note explaining approval/veto reasoning.
|
|
93
|
+
summary:
|
|
94
|
+
target_kind: ''
|
|
95
|
+
target_name: ''
|
|
96
|
+
reason: ''
|
|
97
|
+
status: ''
|
|
98
|
+
embed:
|
|
99
|
+
- reason
|
|
100
|
+
- target_kind
|
|
101
|
+
- target_name
|
|
102
|
+
graph_style:
|
|
103
|
+
fill: '#94A3B8'
|
|
104
|
+
stroke: '#475569'
|
|
105
|
+
text_color: '#fff'
|
|
106
|
+
ascii_icon: 🪦
|
|
107
|
+
display_label: Arquivamento
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Changelog — release notes per semver version, Keep a Changelog 1.1.0
|
|
2
|
+
# (record plane). One doc per project (canonical name='CHANGELOG');
|
|
3
|
+
# spec.versions[] is the reverse-chronological release list.
|
|
4
|
+
#
|
|
5
|
+
# F3 lote-2 (spec 2026-06-10-kinds-descriptor-f3): synthesized from this
|
|
6
|
+
# descriptor; the hand-written class twins were deleted. PARITY-CRITICAL
|
|
7
|
+
# package data — byte-identical mirror under packages/sdk-{py,ts};
|
|
8
|
+
# tests/test_descriptor_hash_parity.py enforces. Equivalence vs the extinct
|
|
9
|
+
# class frozen in tests/test_lote2_descriptor_equivalence.py (golden:
|
|
10
|
+
# tests/goldens/lote2/Changelog.golden.json). Deltas intencionais (semântica
|
|
11
|
+
# canônica = port): summary curado substitui o eco whole-spec do KindBase
|
|
12
|
+
# default (list endpoints não usam kp.summary()); parse valida contra o
|
|
13
|
+
# schema (classe era pass-through); to_card morto não migrado.
|
|
14
|
+
apiVersion: github.com/ruinosus/dna/core/v1
|
|
15
|
+
kind: KindDefinition
|
|
16
|
+
metadata:
|
|
17
|
+
name: changelog
|
|
18
|
+
spec:
|
|
19
|
+
target_api_version: github.com/ruinosus/dna/sdlc/v1
|
|
20
|
+
target_kind: Changelog
|
|
21
|
+
alias: sdlc-changelog
|
|
22
|
+
origin: github.com/ruinosus/dna/sdlc
|
|
23
|
+
tenant_scope: global
|
|
24
|
+
plane: record
|
|
25
|
+
prompt_target: false
|
|
26
|
+
flatten_in_context: false
|
|
27
|
+
prompt_target_priority: 0
|
|
28
|
+
storage:
|
|
29
|
+
type: bundle
|
|
30
|
+
container: changelogs
|
|
31
|
+
marker: CHANGELOG.md
|
|
32
|
+
body_field: body
|
|
33
|
+
schema:
|
|
34
|
+
type: object
|
|
35
|
+
required:
|
|
36
|
+
- title
|
|
37
|
+
properties:
|
|
38
|
+
title:
|
|
39
|
+
type: string
|
|
40
|
+
description: Project name typically.
|
|
41
|
+
description:
|
|
42
|
+
type: string
|
|
43
|
+
versions:
|
|
44
|
+
type: array
|
|
45
|
+
items:
|
|
46
|
+
type: object
|
|
47
|
+
required:
|
|
48
|
+
- version
|
|
49
|
+
properties:
|
|
50
|
+
version:
|
|
51
|
+
type: string
|
|
52
|
+
description: SemVer 2.0 (e.g. '1.4.2') or '[Unreleased]'.
|
|
53
|
+
date:
|
|
54
|
+
type: string
|
|
55
|
+
format: date
|
|
56
|
+
added:
|
|
57
|
+
type: array
|
|
58
|
+
items:
|
|
59
|
+
type: string
|
|
60
|
+
description: New features.
|
|
61
|
+
changed:
|
|
62
|
+
type: array
|
|
63
|
+
items:
|
|
64
|
+
type: string
|
|
65
|
+
description: Changes in existing functionality.
|
|
66
|
+
deprecated:
|
|
67
|
+
type: array
|
|
68
|
+
items:
|
|
69
|
+
type: string
|
|
70
|
+
description: Soon-to-be removed.
|
|
71
|
+
removed:
|
|
72
|
+
type: array
|
|
73
|
+
items:
|
|
74
|
+
type: string
|
|
75
|
+
description: Removed in this version.
|
|
76
|
+
fixed:
|
|
77
|
+
type: array
|
|
78
|
+
items:
|
|
79
|
+
type: string
|
|
80
|
+
description: Bug fixes.
|
|
81
|
+
security:
|
|
82
|
+
type: array
|
|
83
|
+
items:
|
|
84
|
+
type: string
|
|
85
|
+
description: Vulnerability fixes.
|
|
86
|
+
description: Reverse-chronological list of versions.
|
|
87
|
+
body:
|
|
88
|
+
type: string
|
|
89
|
+
description: Optional full markdown CHANGELOG.md.
|
|
90
|
+
created_at:
|
|
91
|
+
type: string
|
|
92
|
+
format: date-time
|
|
93
|
+
updated_at:
|
|
94
|
+
type: string
|
|
95
|
+
format: date-time
|
|
96
|
+
summary:
|
|
97
|
+
title: ''
|
|
98
|
+
description: ''
|
|
99
|
+
graph_style:
|
|
100
|
+
fill: '#84CC16'
|
|
101
|
+
stroke: '#65A30D'
|
|
102
|
+
text_color: '#fff'
|
|
103
|
+
ascii_icon: 📋
|
|
104
|
+
display_label: Changelogs
|
|
105
|
+
docs: 'A Changelog records release notes per semver version per Keep a Changelog
|
|
106
|
+
1.1.0 convention. Six sections: Added, Changed, Deprecated, Removed, Fixed, Security.
|
|
107
|
+
Latest entry at top (reverse chronological). [Unreleased] section tracks work
|
|
108
|
+
in flight.'
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
# CognitivePolicy — the UNIFIED declarative policy for the cognitive runtime
|
|
2
|
+
# (record plane; scope-overridable like the old RecallPolicy: resolution is
|
|
3
|
+
# scope doc → _lib default → code defaults, fail-soft).
|
|
4
|
+
#
|
|
5
|
+
# s-consolidate-cognitive-policies (f-kind-catalog-governance, 2026-07-07):
|
|
6
|
+
# the 9 single-instance policy Kinds — RecallPolicy, DecayPolicy, the old
|
|
7
|
+
# CognitivePolicy (now the `generation` section), MemoryPolicy,
|
|
8
|
+
# AllocationPolicy, PaginationPolicy, EngramStrengthPolicy, EmbeddingProfile,
|
|
9
|
+
# AffectPalette — were "fields that became Kinds". They shared plane (record),
|
|
10
|
+
# instance count (exactly one `default` doc each) and resolution shape, so
|
|
11
|
+
# they were consolidated into ONE Kind with one top-level section per former
|
|
12
|
+
# Kind. A partial doc tunes only the sections it names (per-scope overrides
|
|
13
|
+
# stay cheap: po-as-a-service carries only `recall.semantic`).
|
|
14
|
+
#
|
|
15
|
+
# Consumption invariants preserved at the CONSUMER, not the schema:
|
|
16
|
+
# - `embedding` is only ever read from the _lib doc
|
|
17
|
+
# (kernel.embedding_profile stays _lib-direct) — the embedding space is
|
|
18
|
+
# intrinsically global, a scope must NOT be able to fork it.
|
|
19
|
+
# - `pagination` keeps its own resolver entry point
|
|
20
|
+
# (dna_shared.pagination_policy) — REST data-plane ownership.
|
|
21
|
+
# - `memory` keeps the MemoryPolicy multi-matcher merge semantics via the
|
|
22
|
+
# `memory.policies[]` array (applies_to / defaults / remember,
|
|
23
|
+
# most-specific-wins — dna_shared.cognitive.memory_policy).
|
|
24
|
+
#
|
|
25
|
+
# Schema is CLOSED (additionalProperties: false) — this family left
|
|
26
|
+
# _GRANDFATHERED_OPEN_SCHEMAS. The 8 retired names are pinned in
|
|
27
|
+
# Kernel._REMOVED_KINDS (+ _REMOVED_KIND_NOTES). PARITY-CRITICAL:
|
|
28
|
+
# byte-identical mirror at
|
|
29
|
+
# packages/sdk-{py,ts}/{dna/extensions,src/extensions}/sdlc/kinds/
|
|
30
|
+
# cognitive-policy.kind.yaml (test_descriptor_hash_parity enforces).
|
|
31
|
+
apiVersion: github.com/ruinosus/dna/core/v1
|
|
32
|
+
kind: KindDefinition
|
|
33
|
+
metadata:
|
|
34
|
+
name: cognitive-policy
|
|
35
|
+
spec:
|
|
36
|
+
target_api_version: github.com/ruinosus/dna/sdlc/v1
|
|
37
|
+
target_kind: CognitivePolicy
|
|
38
|
+
alias: sdlc-cognitive-policy
|
|
39
|
+
origin: github.com/ruinosus/dna/sdlc
|
|
40
|
+
plane: record
|
|
41
|
+
prompt_target: false
|
|
42
|
+
flatten_in_context: false
|
|
43
|
+
prompt_target_priority: 0
|
|
44
|
+
is_runtime_artifact: false
|
|
45
|
+
dep_filters: {}
|
|
46
|
+
storage:
|
|
47
|
+
type: yaml
|
|
48
|
+
container: cognitive-policies
|
|
49
|
+
schema:
|
|
50
|
+
type: object
|
|
51
|
+
additionalProperties: false
|
|
52
|
+
properties:
|
|
53
|
+
recall:
|
|
54
|
+
type: object
|
|
55
|
+
additionalProperties: false
|
|
56
|
+
description: Recall-tuning knobs for the ecphory engine (ex-RecallPolicy).
|
|
57
|
+
properties:
|
|
58
|
+
calibrated_for:
|
|
59
|
+
type: object
|
|
60
|
+
additionalProperties: false
|
|
61
|
+
description: Validity envelope — the embedding model/dimension/language
|
|
62
|
+
the semantic knobs were calibrated for. If the `embedding` section
|
|
63
|
+
changes, these are stale and must be re-calibrated.
|
|
64
|
+
properties:
|
|
65
|
+
embedding_model:
|
|
66
|
+
type: string
|
|
67
|
+
dimensions:
|
|
68
|
+
type: integer
|
|
69
|
+
language:
|
|
70
|
+
type: string
|
|
71
|
+
semantic:
|
|
72
|
+
type: object
|
|
73
|
+
additionalProperties: false
|
|
74
|
+
description: Embedding-coupled knobs (model+dimension+language). Cosine
|
|
75
|
+
only means anything within one embedding space — re-calibrate on change.
|
|
76
|
+
properties:
|
|
77
|
+
theta_in:
|
|
78
|
+
type: number
|
|
79
|
+
default: 0.30
|
|
80
|
+
description: Enter the working set when the fresh score >= this.
|
|
81
|
+
theta_out:
|
|
82
|
+
type: number
|
|
83
|
+
default: 0.23
|
|
84
|
+
description: Hold a prior member while its score >= this (hysteresis).
|
|
85
|
+
direct_threshold:
|
|
86
|
+
type: number
|
|
87
|
+
default: 0.30
|
|
88
|
+
description: Ecphory direct gate (mirrors theta_in).
|
|
89
|
+
cosine_weight:
|
|
90
|
+
type: number
|
|
91
|
+
default: 0.61
|
|
92
|
+
description: Weight on the raw embedding cosine in the content
|
|
93
|
+
dimension (calibrated 0.55->0.61, 2026-06-15).
|
|
94
|
+
structural:
|
|
95
|
+
type: object
|
|
96
|
+
additionalProperties: false
|
|
97
|
+
description: Theory-derived weights (Tulving/Nairne/Semon). Stable across
|
|
98
|
+
model and language.
|
|
99
|
+
properties:
|
|
100
|
+
content_weight:
|
|
101
|
+
type: number
|
|
102
|
+
default: 0.55
|
|
103
|
+
summary_partial_weight:
|
|
104
|
+
type: number
|
|
105
|
+
default: 0.28
|
|
106
|
+
co_topics_weight:
|
|
107
|
+
type: number
|
|
108
|
+
default: 0.20
|
|
109
|
+
source_refs_weight:
|
|
110
|
+
type: number
|
|
111
|
+
default: 0.15
|
|
112
|
+
affect_weight:
|
|
113
|
+
type: number
|
|
114
|
+
default: 0.05
|
|
115
|
+
time_weight:
|
|
116
|
+
type: number
|
|
117
|
+
default: 0.05
|
|
118
|
+
novelty_boost:
|
|
119
|
+
type: number
|
|
120
|
+
default: 0.05
|
|
121
|
+
recency_boost:
|
|
122
|
+
type: number
|
|
123
|
+
default: 0.10
|
|
124
|
+
saturation_decay:
|
|
125
|
+
type: number
|
|
126
|
+
default: 0.6
|
|
127
|
+
saturation_threshold:
|
|
128
|
+
type: integer
|
|
129
|
+
default: 3
|
|
130
|
+
description: Recent-24h cue count that triggers saturation decay.
|
|
131
|
+
retrieval:
|
|
132
|
+
type: object
|
|
133
|
+
additionalProperties: false
|
|
134
|
+
description: Shape of retrieval — how many results, how to diversify and
|
|
135
|
+
spread. Not coupled to the embedding model nor to memory theory.
|
|
136
|
+
properties:
|
|
137
|
+
k:
|
|
138
|
+
type: integer
|
|
139
|
+
default: 5
|
|
140
|
+
description: Final working-set size injected per turn.
|
|
141
|
+
mmr_lambda:
|
|
142
|
+
type: number
|
|
143
|
+
default: 0.3
|
|
144
|
+
description: MMR redundancy penalty (diversity vs raw score).
|
|
145
|
+
limit_direct:
|
|
146
|
+
type: integer
|
|
147
|
+
default: 8
|
|
148
|
+
description: Max direct ecphory hits considered.
|
|
149
|
+
limit_homophonic:
|
|
150
|
+
type: integer
|
|
151
|
+
default: 6
|
|
152
|
+
description: Max homophony-expanded hits considered.
|
|
153
|
+
spread_depth:
|
|
154
|
+
type: integer
|
|
155
|
+
default: 2
|
|
156
|
+
description: Spreading-activation hops from the direct hits.
|
|
157
|
+
spread_decay:
|
|
158
|
+
type: number
|
|
159
|
+
default: 0.7
|
|
160
|
+
description: Activation decay per spreading hop.
|
|
161
|
+
search_n:
|
|
162
|
+
type: integer
|
|
163
|
+
default: 50
|
|
164
|
+
description: pgvector candidates pulled for the cosine overlay.
|
|
165
|
+
decay:
|
|
166
|
+
type: object
|
|
167
|
+
additionalProperties: false
|
|
168
|
+
description: Memory retention/forgetting knobs (ex-DecayPolicy).
|
|
169
|
+
properties:
|
|
170
|
+
stability_tiers:
|
|
171
|
+
type: object
|
|
172
|
+
additionalProperties: false
|
|
173
|
+
description: Ebbinghaus stability per confidence tier, in days.
|
|
174
|
+
properties:
|
|
175
|
+
faint:
|
|
176
|
+
type: number
|
|
177
|
+
default: 5.0
|
|
178
|
+
firm:
|
|
179
|
+
type: number
|
|
180
|
+
default: 15.0
|
|
181
|
+
burning:
|
|
182
|
+
type: number
|
|
183
|
+
default: 45.0
|
|
184
|
+
default_stability_days:
|
|
185
|
+
type: number
|
|
186
|
+
default: 15.0
|
|
187
|
+
description: Fallback stability when no tier/stability is on the doc.
|
|
188
|
+
max_stability_days:
|
|
189
|
+
type: number
|
|
190
|
+
default: 60.0
|
|
191
|
+
description: Per-recall bump ceiling (so frequent recalls don't compound forever).
|
|
192
|
+
relevance_decay_seed:
|
|
193
|
+
type: number
|
|
194
|
+
default: 0.95
|
|
195
|
+
description: Default multiplicative decay per 24h (spec override wins).
|
|
196
|
+
ranking_formula:
|
|
197
|
+
type: string
|
|
198
|
+
enum:
|
|
199
|
+
- simple
|
|
200
|
+
- actr
|
|
201
|
+
default: simple
|
|
202
|
+
description: 'simple = exponential decay (Sprint 1); actr = log power-law (Sprint 2).'
|
|
203
|
+
generation:
|
|
204
|
+
type: object
|
|
205
|
+
additionalProperties: false
|
|
206
|
+
description: Operational params for the memory-gen engines (the ORIGINAL
|
|
207
|
+
CognitivePolicy body, now one section among peers).
|
|
208
|
+
properties:
|
|
209
|
+
auto_shipped:
|
|
210
|
+
type: object
|
|
211
|
+
additionalProperties: false
|
|
212
|
+
description: Deterministic ship → engram producer.
|
|
213
|
+
properties:
|
|
214
|
+
lookback_days:
|
|
215
|
+
type: integer
|
|
216
|
+
default: 7
|
|
217
|
+
description: Window of recently-done Stories considered.
|
|
218
|
+
max_emit:
|
|
219
|
+
type: integer
|
|
220
|
+
default: 5
|
|
221
|
+
description: Max engrams emitted per run.
|
|
222
|
+
consolidation:
|
|
223
|
+
type: object
|
|
224
|
+
additionalProperties: false
|
|
225
|
+
description: Episodic → semantic consolidation.
|
|
226
|
+
properties:
|
|
227
|
+
min_cluster_size:
|
|
228
|
+
type: integer
|
|
229
|
+
default: 3
|
|
230
|
+
description: Min episodic engrams in an area before consolidating.
|
|
231
|
+
backfill:
|
|
232
|
+
type: object
|
|
233
|
+
additionalProperties: false
|
|
234
|
+
description: Distil done Stories/Features into engrams.
|
|
235
|
+
properties:
|
|
236
|
+
budget:
|
|
237
|
+
type: integer
|
|
238
|
+
default: 50
|
|
239
|
+
description: Max engrams written per backfill run (resumable).
|
|
240
|
+
memory:
|
|
241
|
+
type: object
|
|
242
|
+
additionalProperties: false
|
|
243
|
+
description: Agent-memory governance (ex-MemoryPolicy). Each entry in
|
|
244
|
+
`policies` keeps the old multi-doc matcher semantics — merged
|
|
245
|
+
most-specific-wins by dna_shared.cognitive.memory_policy.
|
|
246
|
+
properties:
|
|
247
|
+
policies:
|
|
248
|
+
type: array
|
|
249
|
+
items:
|
|
250
|
+
type: object
|
|
251
|
+
additionalProperties: false
|
|
252
|
+
properties:
|
|
253
|
+
applies_to:
|
|
254
|
+
type: object
|
|
255
|
+
additionalProperties: false
|
|
256
|
+
description: 'Matcher: any of scope/owner/memory_type (absent =
|
|
257
|
+
wildcard). Most-specific wins.'
|
|
258
|
+
properties:
|
|
259
|
+
scope:
|
|
260
|
+
type: string
|
|
261
|
+
owner:
|
|
262
|
+
type: string
|
|
263
|
+
memory_type:
|
|
264
|
+
type: string
|
|
265
|
+
enum:
|
|
266
|
+
- episodic
|
|
267
|
+
- semantic
|
|
268
|
+
- procedural
|
|
269
|
+
defaults:
|
|
270
|
+
type: object
|
|
271
|
+
additionalProperties: false
|
|
272
|
+
properties:
|
|
273
|
+
visibility:
|
|
274
|
+
type: string
|
|
275
|
+
enum:
|
|
276
|
+
- shared
|
|
277
|
+
- private
|
|
278
|
+
- pinned
|
|
279
|
+
- archived
|
|
280
|
+
default: shared
|
|
281
|
+
include_agents:
|
|
282
|
+
type: boolean
|
|
283
|
+
default: true
|
|
284
|
+
pinned_budget:
|
|
285
|
+
type: integer
|
|
286
|
+
default: 10
|
|
287
|
+
remember:
|
|
288
|
+
type: object
|
|
289
|
+
additionalProperties: false
|
|
290
|
+
description: Topic steering (guidance; hard enforcement stays in
|
|
291
|
+
the write path / Presidio).
|
|
292
|
+
properties:
|
|
293
|
+
never:
|
|
294
|
+
type: array
|
|
295
|
+
items:
|
|
296
|
+
type: string
|
|
297
|
+
always:
|
|
298
|
+
type: array
|
|
299
|
+
items:
|
|
300
|
+
type: string
|
|
301
|
+
allocation:
|
|
302
|
+
type: object
|
|
303
|
+
additionalProperties: false
|
|
304
|
+
description: Engram allocation (dedup/archival) knobs (ex-AllocationPolicy).
|
|
305
|
+
properties:
|
|
306
|
+
threshold:
|
|
307
|
+
type: number
|
|
308
|
+
default: 0.85
|
|
309
|
+
description: Overlap >= this proposes archiving the loser (clamped 0.5-1.0).
|
|
310
|
+
loser_policy:
|
|
311
|
+
type: string
|
|
312
|
+
enum:
|
|
313
|
+
- weaker
|
|
314
|
+
- newer
|
|
315
|
+
default: weaker
|
|
316
|
+
description: Which of two overlapping engrams loses — the weaker
|
|
317
|
+
(lower strength) or the newer one.
|
|
318
|
+
overlap_weights:
|
|
319
|
+
type: object
|
|
320
|
+
additionalProperties: false
|
|
321
|
+
description: How overlap [0,1] is scored (sum 1.0).
|
|
322
|
+
properties:
|
|
323
|
+
source_refs:
|
|
324
|
+
type: number
|
|
325
|
+
default: 0.5
|
|
326
|
+
description: Jaccard of shared source_refs.
|
|
327
|
+
area:
|
|
328
|
+
type: number
|
|
329
|
+
default: 0.3
|
|
330
|
+
description: Same area bonus.
|
|
331
|
+
affect:
|
|
332
|
+
type: number
|
|
333
|
+
default: 0.2
|
|
334
|
+
description: Same affect bonus.
|
|
335
|
+
pagination:
|
|
336
|
+
type: object
|
|
337
|
+
additionalProperties: false
|
|
338
|
+
description: REST list pagination defaults/caps (ex-PaginationPolicy).
|
|
339
|
+
Data-plane ownership — read by dna_shared.pagination_policy, not the
|
|
340
|
+
cognitive engines.
|
|
341
|
+
properties:
|
|
342
|
+
default_limit:
|
|
343
|
+
type: integer
|
|
344
|
+
default: 50
|
|
345
|
+
description: Page size when the request omits ?limit=.
|
|
346
|
+
max_limit:
|
|
347
|
+
type: integer
|
|
348
|
+
default: 500
|
|
349
|
+
description: Hard cap — a larger ?limit= is clamped to this.
|
|
350
|
+
engram_strength:
|
|
351
|
+
type: object
|
|
352
|
+
additionalProperties: false
|
|
353
|
+
description: Initial-strength rules per engraphy trigger
|
|
354
|
+
(ex-EngramStrengthPolicy).
|
|
355
|
+
required:
|
|
356
|
+
- rules
|
|
357
|
+
properties:
|
|
358
|
+
rules:
|
|
359
|
+
type: array
|
|
360
|
+
minItems: 1
|
|
361
|
+
items:
|
|
362
|
+
type: object
|
|
363
|
+
additionalProperties: false
|
|
364
|
+
required:
|
|
365
|
+
- when
|
|
366
|
+
- initial_strength
|
|
367
|
+
properties:
|
|
368
|
+
when:
|
|
369
|
+
type: string
|
|
370
|
+
description: Trigger predicate
|
|
371
|
+
initial_strength:
|
|
372
|
+
type: number
|
|
373
|
+
engraphy_intensity:
|
|
374
|
+
type: number
|
|
375
|
+
default: 1.0
|
|
376
|
+
default_decay_rate_per_day:
|
|
377
|
+
type: number
|
|
378
|
+
default: 0.02
|
|
379
|
+
default_decay_threshold_days:
|
|
380
|
+
type: integer
|
|
381
|
+
default: 30
|
|
382
|
+
embedding:
|
|
383
|
+
type: object
|
|
384
|
+
additionalProperties: false
|
|
385
|
+
description: Embedding model + dimension + search weights
|
|
386
|
+
(ex-EmbeddingProfile). ONLY meaningful on the _lib doc — the embedding
|
|
387
|
+
space is intrinsically global (stored vectors and every query must
|
|
388
|
+
share one model+dimension); kernel.embedding_profile reads _lib
|
|
389
|
+
directly and never a scope override. `recall.calibrated_for` points
|
|
390
|
+
back here.
|
|
391
|
+
required:
|
|
392
|
+
- model
|
|
393
|
+
- dimensions
|
|
394
|
+
properties:
|
|
395
|
+
model:
|
|
396
|
+
type: string
|
|
397
|
+
description: Embedding model id (must be served by the LiteLLM proxy).
|
|
398
|
+
dimensions:
|
|
399
|
+
type: integer
|
|
400
|
+
description: Vector dimension. MUST match the pgvector column + every
|
|
401
|
+
stored embedding — changing it requires a full re-embed.
|
|
402
|
+
max_input_tokens:
|
|
403
|
+
type: integer
|
|
404
|
+
default: 8192
|
|
405
|
+
description: Input ceiling for a single embed call (model-specific).
|
|
406
|
+
language:
|
|
407
|
+
type: string
|
|
408
|
+
description: Primary language the recall knobs were calibrated against.
|
|
409
|
+
search_weights:
|
|
410
|
+
type: object
|
|
411
|
+
additionalProperties: false
|
|
412
|
+
description: RRF fusion weights for `cognitive search` (hybrid retrieval).
|
|
413
|
+
properties:
|
|
414
|
+
bm25:
|
|
415
|
+
type: number
|
|
416
|
+
default: 0.4
|
|
417
|
+
vector:
|
|
418
|
+
type: number
|
|
419
|
+
default: 0.6
|
|
420
|
+
graph:
|
|
421
|
+
type: number
|
|
422
|
+
default: 0.3
|
|
423
|
+
notes:
|
|
424
|
+
type: string
|
|
425
|
+
affect:
|
|
426
|
+
type: object
|
|
427
|
+
additionalProperties: false
|
|
428
|
+
description: Affect vocabulary for the memory/affect engine
|
|
429
|
+
(ex-AffectPalette). The active palette steers engraphy affect tags.
|
|
430
|
+
required:
|
|
431
|
+
- palette
|
|
432
|
+
properties:
|
|
433
|
+
palette:
|
|
434
|
+
type: array
|
|
435
|
+
minItems: 1
|
|
436
|
+
items:
|
|
437
|
+
type: object
|
|
438
|
+
additionalProperties: false
|
|
439
|
+
required:
|
|
440
|
+
- id
|
|
441
|
+
- semantics
|
|
442
|
+
properties:
|
|
443
|
+
id:
|
|
444
|
+
type: string
|
|
445
|
+
semantics:
|
|
446
|
+
type: string
|
|
447
|
+
affect_weight:
|
|
448
|
+
type: number
|
|
449
|
+
default: 1.0
|
|
450
|
+
use_when:
|
|
451
|
+
type: array
|
|
452
|
+
items:
|
|
453
|
+
type: string
|
|
454
|
+
default: []
|
|
455
|
+
owner:
|
|
456
|
+
type: string
|
|
457
|
+
created_at:
|
|
458
|
+
type: string
|
|
459
|
+
format: date-time
|
|
460
|
+
updated_at:
|
|
461
|
+
type: string
|
|
462
|
+
format: date-time
|
|
463
|
+
summary:
|
|
464
|
+
owner: ''
|
|
465
|
+
graph_style:
|
|
466
|
+
fill: '#F472B6'
|
|
467
|
+
stroke: '#DB2777'
|
|
468
|
+
text_color: '#fff'
|
|
469
|
+
ascii_icon: ⚙️
|
|
470
|
+
display_label: Política Cognitiva
|