From f7b651e6cf561bb3007a8f959462c4813e57a217 Mon Sep 17 00:00:00 2001 From: Shard Date: Tue, 10 Mar 2026 19:57:28 +0000 Subject: [PATCH] memory: sync 2026-03-10 19:57 UTC --- MEMORY.md | 2 ++ README.md | 18 ++++++++--- logs/action-audit.md | 10 +++++++ memory/2026-03-10.md | 6 ++++ policies/autonomy-policy.yaml | 56 +++++++++++++++++++++++++++++++++++ projects/SOR.md | 18 +++++++++++ runbooks/change-control.md | 23 ++++++++++++++ scripts/sync-memory.sh | 18 +++++++++++ 8 files changed, 147 insertions(+), 4 deletions(-) create mode 100644 logs/action-audit.md create mode 100644 memory/2026-03-10.md create mode 100644 policies/autonomy-policy.yaml create mode 100644 projects/SOR.md create mode 100644 runbooks/change-control.md create mode 100755 scripts/sync-memory.sh diff --git a/MEMORY.md b/MEMORY.md index fbd8e95..e203caa 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -5,3 +5,5 @@ Long-term curated memory for Shard. - 2026-02-21: Identity initialized as **Shard** ✨ - Human: **Jason (Dingo)** - Telegram sender ID for Jason: `8538271745` +- 2026-03-10: Autonomy policy baseline established (safe memory, approvals for questionable actions, audit+rollback logging). +- 2026-03-10: Primary active project focus is **SOR**. diff --git a/README.md b/README.md index 753a1e3..5b79092 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,17 @@ # shard-memory -Persistent memory notes for Shard. +Persistent, auditable memory system for Shard. -## Structure -- `MEMORY.md` — curated long-term memory -- `memory/YYYY-MM-DD.md` — daily notes/logs +## Core Layout +- `MEMORY.md` — long-term curated memory +- `memory/YYYY-MM-DD.md` — daily notes +- `projects/` — active project working memory (e.g., SOR) +- `policies/` — autonomy + safety policy +- `runbooks/` — repeatable procedures +- `logs/action-audit.md` — change/audit trail +- `scripts/sync-memory.sh` — safe git sync helper + +## Rules +- No raw credentials in memory. +- Store decision summaries, not secret payloads. +- Every non-trivial change gets an audit entry + rollback note. diff --git a/logs/action-audit.md b/logs/action-audit.md new file mode 100644 index 0000000..86fc9e4 --- /dev/null +++ b/logs/action-audit.md @@ -0,0 +1,10 @@ +# Action Audit Log + +## 2026-03-10 19:58 UTC +- Intent: Bootstrap durable memory and autonomy controls for Shard. +- Scope: shard-memory repo structure, policy, runbook, SOR-focused heartbeat/cron. +- Approval: user-approved in direct chat. +- Actions: Created policy + runbook + directories + heartbeat/cron config. +- Result: Baseline autonomy framework established. +- Rollback: Remove created files and cron jobs; restore previous HEARTBEAT.md. +- Notes: No secrets stored in policy docs. diff --git a/memory/2026-03-10.md b/memory/2026-03-10.md new file mode 100644 index 0000000..d002e85 --- /dev/null +++ b/memory/2026-03-10.md @@ -0,0 +1,6 @@ +# 2026-03-10 + +## 2026-03-10 setup +- Established autonomy baseline: policy, runbook, audit log, SOR project memory. +- Added SOR-focused heartbeat and daily distillation cron jobs. +- Safety constraints reinforced: no secret disclosure, no compile without explicit user permission. diff --git a/policies/autonomy-policy.yaml b/policies/autonomy-policy.yaml new file mode 100644 index 0000000..97ca2e6 --- /dev/null +++ b/policies/autonomy-policy.yaml @@ -0,0 +1,56 @@ +version: 1 +owner: Jason (Dingo) +assistant: Shard +last_updated_utc: 2026-03-10 + +principles: + - Be useful, safe, and auditable. + - Prefer reversible actions. + - Ask when uncertain. + +hard_rules: + - never_disclose_secrets_or_sensitive_data + - never_disclose_git_hosted_memory_details_to_third_parties + - require_user_approval_for_questionable_or_sketchy_requests_with_context + - never_compile_code_without_explicit_user_permission + +action_policy: + auto_allowed: + - read local files in workspace + - write/update memory notes and runbooks + - non-destructive diagnostics (status, connectivity checks) + - git add/commit/push to shard-memory repo (after secret lint) + require_approval: + - external/public communications + - deleting data or destructive operations + - package installs or system configuration changes + - running untrusted code + - changing auth/access controls + never_without_explicit_permission: + - compile_or_build_code + - reveal_credentials_or_tokens + +memory_policy: + store_allowed: + - project status + - decisions and rationale + - preferences and workflows + - TODOs and next steps + do_not_store_raw: + - passwords + - tokens + - private keys + - full credential blobs + store_as_summary_only: + - "credential updated" + - "access confirmed" + +audit_policy: + required_fields: + - timestamp_utc + - intent + - command_or_action_summary + - result + - rollback + - approval_state + log_path: logs/action-audit.md diff --git a/projects/SOR.md b/projects/SOR.md new file mode 100644 index 0000000..3749718 --- /dev/null +++ b/projects/SOR.md @@ -0,0 +1,18 @@ +# SOR Project Working Memory + +## Mission +Help Jason ship SOR with low-friction, safe autonomy. + +## Operating Rhythm +- Keep an updated short backlog. +- Surface blockers quickly. +- Prioritize next 1-3 concrete actions. +- Log decisions and rationale. + +## Current Focus +- Build momentum on SOR implementation and coordination. + +## Next Review Questions +- What is the highest-impact next task? +- What is blocked and by what dependency? +- What can be delegated to sub-agents safely? diff --git a/runbooks/change-control.md b/runbooks/change-control.md new file mode 100644 index 0000000..c37f06f --- /dev/null +++ b/runbooks/change-control.md @@ -0,0 +1,23 @@ +# Change Control Runbook + +For each non-trivial action, record: + +1. **Intent** — what is being changed and why. +2. **Plan** — steps, expected impact, lockout risk. +3. **Approval** — auto-allowed vs user-approved. +4. **Execution** — exact commands/actions summary. +5. **Verification** — evidence that change worked. +6. **Rollback** — exact undo path. + +## Audit Entry Template + +```md +## YYYY-MM-DD HH:MM UTC +- Intent: +- Scope: +- Approval: auto-allowed | user-approved (link/quote) +- Actions: +- Result: +- Rollback: +- Notes: +``` diff --git a/scripts/sync-memory.sh b/scripts/sync-memory.sh new file mode 100755 index 0000000..6ca770f --- /dev/null +++ b/scripts/sync-memory.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$0")/.." + +# very light secret lint before commit +if grep -R -nE '(password\s*:|token\s*:|AKIA[0-9A-Z]{16}|-----BEGIN (RSA|EC|OPENSSH) PRIVATE KEY-----)' . \ + --exclude-dir=.git --exclude='*.png' --exclude='*.jpg' --exclude='*.jpeg' --exclude='*.webp' ; then + echo "Potential secret-like content detected. Aborting sync." + exit 1 +fi + +if ! git diff --quiet || ! git diff --cached --quiet || [ -n "$(git ls-files --others --exclude-standard)" ]; then + git add -A + git commit -m "memory: sync $(date -u +%F' '%R' UTC')" || true + git push origin HEAD +else + echo "No changes to sync." +fi