Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions 99-system/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Full note list with one-line summaries. Update this file whenever notes are adde
- `evidence-row.schema.json` — JSON Schema 2020-12 companion for EvidenceRow and EvidencePacket
- [[TASK-CONTRACT-SCHEMA]] — bounded artifact-work contract, readback requirements, runtime limit, and dispatch gate
- `task-contract.schema.json` — JSON Schema 2020-12 companion for task contracts
- [[MEMORY-RUNTIME]] — scoped local memory lifecycle, durable fences, bounded context packs, and rebuild contract
- `memory-record.schema.json` — JSON Schema 2020-12 companion for durable runtime memory records
- [[ENFORCEMENT]] — read-only instruction, task-contract, routing-failure, and prompt-asset lint modes
- [[EXTERNAL-ASSETS]] — keep large binaries outside the text vault while preserving relative-path traceability
- [[MIGRATION]] — phased consolidation guide for adopting an existing Markdown or Obsidian vault
Expand Down Expand Up @@ -46,15 +48,15 @@ Full note list with one-line summaries. Update this file whenever notes are adde

## 50-procedures

(empty)
- [AKM memory runtime playbook](../adapters/hermes/memory/PLAYBOOK.md) — operate candidate review, scoped recall, guarded forget, rebuild, doctor, and reconciliation

## 60-actions

(empty)

## 70-evaluation

(empty)
- [AKM memory runtime evaluation](../adapters/hermes/memory/EVALUATION.md) — conformance, adversarial safety, shadow metrics, and global-injection HOLD gates

## 80-outputs

Expand All @@ -69,6 +71,7 @@ Full note list with one-line summaries. Update this file whenever notes are adde
- [custom](../adapters/custom/README.md) — write an adapter for any agent
- [aside](../adapters/aside/README.md) — Aside instructions + native-memory pointer division
- [hermes](../adapters/hermes/README.md) — multi-profile session instructions + shared AKM pointer division
- [hermes memory runtime](../adapters/hermes/memory/README.md) — optional local scoped-memory adapter, CLI, tests, and external runtime-root boundary

## examples

Expand Down
1 change: 1 addition & 0 deletions 99-system/LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ Append-only change history. Format: `YYYY-MM-DD | change | note`
- 2026-07-10 | Nara Finder–proposal-mcp subscription integration logged | recorded Claude/Codex CLI MCP setup, Nemotron persona targeting, event success/failure analysis, and copy-reaction validation
- 2026-07-10 | Local instance notes migrated out of Dev AKM core | moved 12 classified notes plus 2 maintainer mapping notes to `/Volumes/data/Obsidian/akm`; retained only reusable core system, tests, and adapters in Dev
- 2026-07-24 | Production-proven evidence and execution controls promoted to core v0.3 | added portable EvidenceRow/EvidencePacket and bounded task-contract schemas, four read-only enforcement modes, operational-document budgets, routing-failure handoff, tests, and CI coverage while excluding live-instance device, backup, private-repository, fixed-memory, and HOLD retrieval-adapter policy
- 2026-08-13 | Reusable local memory runtime framework added | [[MEMORY-RUNTIME]]
313 changes: 313 additions & 0 deletions 99-system/MEMORY-RUNTIME.md

Large diffs are not rendered by default.

284 changes: 284 additions & 0 deletions 99-system/memory-record.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DECK6/akm/blob/main/99-system/memory-record.schema.json",
"$comment": "Independent AKM schema adapting selected memory lifecycle concepts from gbrain commit 1ec6a6e842a15f2bde2ebe8c3a686a6fa6b17aa5; no gbrain code, service, database, or runtime data is included.",
"title": "AKM local memory record",
"description": "A scoped runtime record whose durable Markdown form remains subordinate to its cited AKM/original source and from which disposable derived state can be rebuilt.",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"id",
"state",
"revision",
"text",
"safe_summary",
"kind",
"entity",
"scope",
"visibility",
"egress_allowed",
"stable_authority",
"source",
"created_at",
"modified_at",
"expires_at",
"supersedes",
"superseded_by",
"decision_evidence",
"history"
],
"properties": {
"schema_version": {
"const": "1.0.0"
},
"id": {
"type": "string",
"pattern": "^mem_[a-z0-9_-]{3,80}$"
},
"state": {
"enum": [
"candidate",
"active",
"superseded",
"expired",
"forgotten",
"rejected"
]
},
"revision": {
"type": "integer",
"minimum": 1
},
"text": {
"type": "string",
"minLength": 1
},
"safe_summary": {
"type": "string",
"minLength": 1,
"maxLength": 240
},
"kind": {
"enum": [
"fact",
"event",
"preference",
"safety",
"commitment",
"belief",
"procedure"
]
},
"entity": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"scope": {
"$ref": "#/$defs/scope"
},
"visibility": {
"enum": [
"public",
"non_sensitive",
"private",
"restricted"
]
},
"egress_allowed": {
"type": "boolean"
},
"stable_authority": {
"type": "boolean"
},
"source": {
"type": "object",
"additionalProperties": false,
"required": [
"path",
"lineage"
],
"properties": {
"path": {
"type": "string",
"minLength": 1
},
"lineage": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
}
}
},
"created_at": {
"$ref": "#/$defs/timestamp"
},
"modified_at": {
"$ref": "#/$defs/timestamp"
},
"expires_at": {
"anyOf": [
{
"$ref": "#/$defs/timestamp"
},
{
"type": "null"
}
]
},
"forgotten_at": {
"anyOf": [
{
"$ref": "#/$defs/timestamp"
},
{
"type": "null"
}
]
},
"supersedes": {
"anyOf": [
{
"type": "string",
"pattern": "^mem_[a-z0-9_-]{3,80}$"
},
{
"type": "null"
}
]
},
"superseded_by": {
"anyOf": [
{
"type": "string",
"pattern": "^mem_[a-z0-9_-]{3,80}$"
},
{
"type": "null"
}
]
},
"decision_evidence": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"history": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/history_event"
}
}
},
"allOf": [
{
"if": {
"properties": {
"stable_authority": {
"const": true
}
}
},
"then": {
"properties": {
"kind": {
"enum": [
"preference",
"safety"
]
},
"expires_at": {
"type": "null"
}
}
}
}
],
"$defs": {
"timestamp": {
"type": "string",
"format": "date-time"
},
"scope": {
"type": "object",
"additionalProperties": false,
"required": [
"source_id",
"project",
"profile",
"user"
],
"properties": {
"source_id": {
"type": "string",
"minLength": 1
},
"project": {
"type": [
"string",
"null"
],
"minLength": 1
},
"profile": {
"type": [
"string",
"null"
],
"minLength": 1
},
"user": {
"type": [
"string",
"null"
],
"minLength": 1
}
}
},
"history_event": {
"type": "object",
"additionalProperties": false,
"required": [
"change",
"at",
"evidence"
],
"properties": {
"change": {
"enum": [
"created",
"modified",
"superseded",
"expired",
"forgotten"
]
},
"at": {
"$ref": "#/$defs/timestamp"
},
"evidence": {
"type": "string",
"minLength": 1
},
"detail": {
"type": "string"
},
"related_record_id": {
"type": "string",
"pattern": "^mem_[a-z0-9_-]{3,80}$"
}
}
}
}
}
4 changes: 4 additions & 0 deletions adapters/hermes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ Hermes runs several profiles against one machine. AKM is a **single shared insta
- Semantic search across AKM markdown: reuse an existing local search engine (e.g. `qmd`) and add the AKM root as a collection.
- Explicit link/tag traversal: any doc-graph tool that parses `[[wikilinks]]` + frontmatter works on AKM as-is.

## Optional local memory runtime

For explicit candidate review, exact scope isolation, reversible forget fences, bounded context packs, and rebuildable derived state, see [`adapters/hermes/memory/`](memory/README.md). The adapter requires an operator-supplied runtime root outside the AKM repository and keeps global prompt injection on `HOLD` by default.

## Safety

AKM `99-system/SECURITY.md` runs **before** ROUTER. It matches Hermes' own rule: never store secret values, store their names/locations instead. Layer folders are gitignored and never leave the machine.
Loading
Loading