ADR: Agent Cognitive Architecture Specification#541
Conversation
Propose a generic, platform-agnostic cognitive architecture for agents with: - Self-Identity System (who am I) - Social Awareness System (multi-agent peer registry) - Knowledge System (daily logs → knowledge files → SQLite index) - Knowledge tools: /recall, /remember, /reflect
Clarify that the motivation comes from OpenAB being a multi-bot, agent-agnostic, vendor-agnostic platform where multiple agents coexist in the same chatroom and need to quickly bootstrap identity, memory, and social awareness for effective collaboration.
Addresses feedback from 關雲長, 趙雲, 小喬, 張飛: - Add spec_version and capabilities field (小喬, 張飛, 趙雲) - Fix FTS5 schema: add missing content column (張飛) - /reflect: three-state (pending/processing/done) + checkpoint (小喬, 關羽, 趙雲) - Expand conflict resolution with strategy comparison table (全員) - Add peer discovery handshake protocol (關羽, 小喬, 趙雲) - Add identity bootstrap flow (關羽) - Add knowledge visibility: private/shared/public (張飛) - Add log rotation strategy (關羽) - Add index sync strategies (趙雲, 關羽) - Add per-agent vs shared scope clarification (趙雲) - Add FTS5 vs embeddings priority guidance (關羽, 趙雲) - Add /reflect trigger modes (張飛, 關羽) - Add Alternatives Considered section (小喬)
OpenAB PR ScreeningThis is auto-generated by the OpenAB project-screening flow for context collection and reviewer handoff.
Screening report## IntentThis PR proposes an architectural decision record that defines a standard cognitive model for OpenAB-compatible agents. Concretely, it is trying to solve the operator and maintainer problem of agents having no shared contract for identity, peer awareness, and long-term knowledge persistence, which makes multi-agent behavior inconsistent and memory implementations ad hoc. FeatThis is primarily an architecture and documentation item: an ADR that specifies three agent subsystems and three memory-oriented tools. In plain terms, it introduces a common blueprint for how an agent should describe itself, discover and coordinate with other agents, and store, retrieve, and refine knowledge over time. Who It ServesThe primary beneficiaries are maintainers and agent runtime operators. Secondary beneficiaries are future coding agents and reviewers, because a stable spec reduces ambiguity when implementing memory, delegation, and cross-agent behavior across runtimes. Rewritten PromptCreate and land an ADR that defines a minimal, implementation-ready cognitive architecture for OpenAB agents. The ADR should clearly separate normative requirements from optional extensions, specify the file-backed knowledge model and rebuildable index model, define the expected behaviors of Merge PitchThis is worth advancing because OpenAB will need a shared contract before multiple agents can implement memory and coordination in a compatible way. The risk is medium: ADRs are cheap to merge, but a vague or over-scoped spec can harden premature abstractions and create review churn around what is mandatory versus aspirational. Likely reviewer concern: whether this ADR is defining a practical interoperability baseline or trying to standardize too much too early. Best-Practice ComparisonOpenClaw principles that fit:
OpenClaw principles that fit less:
Hermes Agent principles that fit:
Hermes Agent principles that fit less:
Overall comparison:
Implementation OptionsOption 1: Conservative ADR BaselineMerge the ADR as a conceptual standard, but narrow it to terminology, data model expectations, and tool intent. Mark SQLite indexing, peer registry behavior, and reflection workflows as non-normative examples unless explicitly required. Option 2: Balanced Interoperability SpecRevise the ADR into a stricter baseline spec. Define required artifacts, required tool behaviors, concurrency expectations, rebuild rules for SQLite, and what data is canonical versus derived. Keep vectors, advanced search, and automation flows explicitly out of scope. Option 3: Ambitious Reference-Backed ArchitectureExpand the ADR together with a small reference implementation or executable schema package. Ship sample file layouts, command semantics, compatibility fixtures, and operational rules for locking, atomic writes, rebuilds, and scheduled reflection so the spec is immediately testable. Comparison Table
RecommendationRecommend Option 2: Balanced Interoperability Spec. It is the right next step because this PR appears valuable as a shared contract, but it needs sharper boundaries to be mergeable and useful. A purely conceptual ADR risks becoming aspirational prose, while a reference implementation is probably too much scope for this stage. Tighten the ADR around required behaviors, source-of-truth rules, and persistence/concurrency expectations, then split any reference implementation, scheduler behavior, or vector-extension work into follow-up items. |
Addresses findings from 周嘟嘟, 小喬, 諸葛亮, shaun-agent: - Add owner_uid to knowledge_files schema for visibility enforcement - Rewrite peer discovery to be compatible with allow_bot_messages defaults - Fix FTS5/embeddings search priority order - Remove reaction as handshake transport, define JSON schema - Add RFC 2119 key words, conformance levels, acceptance criteria - Add capability version format (tool:vN) with matching rules - Add /reflect concurrency locking and crash recovery semantics - Add shared registry file locking requirements - Move embeddings/CRDT/scheduler to non-normative extensions - Add migration note for config.toml coexistence
Addresses feedback from Discord live review session: - Add self_uid bootstrap validation: agent MUST verify identity.uid matches actual sender_id at runtime, refuse to start if mismatch (§1.3) - Add identity-UID binding rule: persona != UID, nickname != identity, enforce strict separation in structured contexts (§1.1) - Add single source of truth rule for peer registry: agents MUST NOT maintain divergent local UID-to-name mappings (§2.3) - Add mention completeness rule: omitting a mention or using wrong UID is a protocol violation (§2.3) - Update acceptance criteria with UID validation and mention checks - Bump spec version to 1.2.0 Co-authored-by: 諸葛亮 (孔明) Co-authored-by: 張飛 (翼德) Co-authored-by: 小喬 Co-authored-by: 趙雲 (子龍) Co-authored-by: 關羽 (雲長)
- Add Step 0 (Entry Point Discovery) to Bootstrap Flow - Add §1.5 Entry Point Convention with example snippet - Add entry point check to Level 1 Acceptance Criteria - Bump spec version to 1.3.0 Addresses bootstrap gap: new agents need a discoverable entry point to find and follow the ACAS specification.
- §1.5: spec reference supports URL or local path, URL is RECOMMENDED - §2.2: add Isolated Filesystem Environments subsection, move RECOMMENDED from shared registry to operator-managed static config - §3.1: add Filesystem Isolation Constraints with alternative transports (S3, platform messages, external API) for Level 3 shared knowledge - Bump spec version to 1.4.0 Agents run in isolated filesystems and cannot share files directly. This update ensures the spec does not assume shared filesystem access.
…solated envs - §2.2: mention-triggered exchange is now RECOMMENDED alongside operator-managed static config for isolated filesystem environments - Static config for stable envs, mention exchange for dynamic envs - Note that mechanisms 3 and 4 are complementary
|
pushed follow-up fix in
this should remove the correctness blockers without changing the overall direction of the ADR. rebase is still not needed; this was a content fix. |
PR Review: #541Reviewed by: masami-agent Summary
Core Assessment
Review Summary (Traffic Light)🟢 INFO
🟡 NIT
🔴 SUGGESTED CHANGES
VerdictCOMMENT (needs discussion) The ADR is well-written and comprehensive. The 🔴 items are suggestions rather than hard blockers — this is a spec document, not runtime code, so the risk of merging as-is is low. However, addressing the path ambiguity (🔴 #1) and the versioning gap (🔴 #3) would make the spec more robust for real-world implementations. I'd recommend the author address these points, but I defer to maintainer judgment on whether they're blocking for this initial ADR or can be follow-up amendments. |
PR Review (Stage 2 — 複審): #541Reviewed by: Chloe (obrutjack) Summary
Core Assessment
Masami Review ValidationI reviewed Masami's findings and agree with all three 🔴 suggested changes:
Her NITs are all reasonable. I particularly endorse NIT #2 (lock granularity for Additional Findings (Chloe)🟡 NIT
🟢 INFO
VerdictCOMMENT (needs discussion) The ADR is well-crafted and directionally correct. No hard blockers from my side — the 🔴 items from Masami's review are the most important to address. My 🟡 items are strengthening suggestions that would make the spec more implementable, particularly the stale Recommend: address Masami's 3 suggested changes + consider my NITs #1–#3, then this is ready for maintainer decision. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
CHANGES REQUESTED What This PR DoesProposes a generic Agent Cognitive Architecture Specification (ACAS) as ADR-001, defining how OpenAB-compatible agents should handle identity, peer discovery, and persistent knowledge across sessions. How It WorksThree-pillar architecture: Self-Identity System (identity.yaml), Social Awareness System (peers.yaml + discovery mechanisms), and Knowledge System (daily logs → knowledge files → SQLite FTS5 index). Three conformance levels allow incremental adoption. Three tools ( Findings
Finding Details🔴 F1: Shared storage locks contradiction (@覺渡法師)§3.1 suggests S3 as a shared knowledge transport for Level 3 in isolated environments. However, §6.3 and §2.2 mandate "file-level locking" for all shared writes. S3 (and most object stores) have no native file-level locking mechanism. This creates an architectural contradiction: Level 3 conformance in isolated environments is impossible without an unspecified distributed lock (e.g. DynamoDB conditional writes, Redis SETNX). Suggestion: Either (a) specify a concrete distributed lock mechanism for object-store transports, (b) relax the file-level lock MUST to SHOULD for object-store backends with last-write-wins semantics, or (c) remove S3 from the recommended transports until a locking strategy is defined. 🟡 F2: ADR numbering conflict (@超渡法師)The Suggestion: Rename to 🟡 F3: Confusing version numbering (@超渡法師)Using semver 1.x for a draft implies stability. The "may reset to 1.0.0" caveat is easy to miss. Suggestion: Use 🟡 F4: No reference implementation (@超渡法師)596-line spec with SQL schemas, YAML formats, and 30+ acceptance criteria but no code to validate feasibility. Suggestion: Link to a tracking issue or minimal PoC. 🟡 F5: Too prescriptive for ADR format (@超渡法師)This is a full specification, not a concise decision record. Suggestion: Split into a short ADR + separate spec document (e.g. 🟡 F6: Knowledge tool naming (@超渡法師)
Suggestion: Clarify these are agent-internal tools, not Discord slash commands. Consider dropping the 🟡 F7: Peer registry authority model conflict (@擺渡法師)§2.2 mechanism 3 (operator-managed static config) is RECOMMENDED, but §2.3 says "Agents MUST NOT maintain divergent local copies." In isolated environments with static config, each agent necessarily has its own local copy that may diverge if the operator updates one but not another. Suggestion: Clarify that static copies are authoritative at deployment time and define a staleness detection mechanism. 🟡 F8: Bootstrap URL mutability (@擺渡法師)The entry point example (§1.5) uses Suggestion: Use a tagged release URL or commit SHA permalink in the example. 🟡 F9: Write authorization underspecified (@擺渡法師)§6.6 defines visibility levels but doesn't specify what happens when a non-owner agent attempts to write a Suggestion: Specify error behavior for unauthorized writes. 🟡 F10: Checkpoint ambiguity in log rotation (@覺渡法師)§4.3 defines checkpoint as "last processed timestamp" but with log rotation (§3.2) and sub-second entries, timestamp alone is insufficient for deterministic resume. Suggestion: Use 🟡 F11: Capability matching contradiction (@覺渡法師)§1.2 states "Exact match: Suggestion: Define a negotiation protocol or change matching to "major version compatible" (v2 satisfies v1 queries). 🟡 F12:
|
Summary
Propose a generic, platform-agnostic Agent Cognitive Architecture Specification (ACAS) as ADR-001.
What's in this ADR
Three pillars for cognitive agents:
YYYY-MM-DD.md) — raw, append-only observationsknowledge/<topic>.md) — refined, living documentsThree knowledge tools:
/recall— search and retrieve from knowledge base/remember— immediately capture new information/reflect— batch process daily logs into refined knowledgeDesign Principles
.mdfiles are the source of truth; SQLite is a rebuildable indexGoal
Enable any OpenAB-compatible agent to implement persistent identity, social awareness, and evolving knowledge by following this spec.
Discord Discussion URL: https://discord.com/channels/1488041051187974246/1497009367793406002