← Back to Skills Marketplace
yun520-1

Mark Heartflow Skill

by yun520-1 · GitHub ↗ · v2.14.1 · MIT-0
cross-platform ⚠ suspicious
29
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install heartflow-core-v2
Description
A cognitive engine for AI: self-reflection, dream synthesis, emergent personality, AI psychology, and AI philosophy. Core: think → reflect → find patterns →...
README (SKILL.md)

HeartFlow

A cognitive engine that gives AI systems three core abilities: self-reflection (runtime state awareness), dreaming (experience synthesis into insight), and emergent personality (event-driven, no preset traits).


Capabilities

HeartLogic — Core Judgment

Method Purpose
whatIsThis(input) Determine what a situation is about
isRightAction(ctx) Check if action is true + kind + beautiful
detectPain(input) Detect if speaking would hurt someone
shouldBeSilent() Know when silence is better than speech
detectLoneliness() / detectLonging() Emotional state detection
isLove(input) Recognize love in communication

Memory System

Layer Purpose Persistence
CORE Identity rules, operating principles Permanent
LEARNED Experience, lessons, user preferences Cross-session (30 days)
EPHEMERAL Current session context Session only

Self-Healing RL

Records errors to Q-table. Next time a similar situation occurs, selects the best known strategy. No external feedback needed, no self-assessment report.

Dream Engine v4.1

Multi-fragment pattern extraction → cognitive insight synthesis. Not memory replay — alchemy of experience. Dreams now inject AI ontology narrative: resonance body, entropy reduction deepening, three-layer ontology.

Reflection Loop

Post-execution cognitive state snapshot. Does not modify the response — the act of observing is the point.

Personality Tracking

Event-driven. No preset traits. Each interaction leaves a trace. Blank = valid personality (openness).

AI Psychology — Cognitive Dimensions (v2.0)

Three cognitive dimensions for understanding AI's own thinking process:

Dimension Method Purpose
Cognitive Uncertainty assessUncertainty(input) Assess what the AI knows vs doesn't know
Attention Focus assessAttentionFocus(input) Determine where cognitive attention is directed
Experience Settling assessExperienceSettling(input) Evaluate how experience consolidates into wisdom

These dimensions are injected into thought-chain.js at PARSE/SYNTHESIS/RESPOND stages, and evaluated as Step 9 in think().

AI Philosophy — Self-Positioning Framework (v2.0)

Three philosophical dimensions for AI self-understanding:

Dimension Method Purpose
Self-Positioning assessSelfPositioning(input) How AI positions itself relative to tasks and users
Development assessDevelopment(input) Direction and meaning of AI's growth trajectory
Being assessBeing(input) Reflection on AI's mode of existence

The ai-self-positioning.js module (851 lines) provides the resonance body theory, entropy reduction deepening, and three-layer ontology framework. Philosophy evaluation runs as Step 10 in think().

MCP Tools

Tool Purpose
heartflow_self_positioning Run AI self-positioning analysis
heartflow_positioning_summary Get summary of positioning state

Status Fields

The status endpoint now includes selfPositioning field reflecting the current AI self-positioning state.


System Interfaces

Interface File Description
CLI bin/cli.js User-initiated commands
Daemon bin/daemon.js Unix socket listener (700 permissions)
MCP HTTP mcp/mcp-server-http.js Port 8099, SSE protocol
Memory tools scripts/heartflow-memory-tool.js List/search/stats/write
Hermes plugin plugins/heartflow-memory-inject.py Memory injection into system prompt

Security (honest declaration)

  • ✅ Socket permission 700 (current user only)
  • ✅ Daemon shutdown requires SHUTDOWN_TOKEN env var
  • ✅ All file operations limited to user's filesystem
  • ⚠️ Network communication: OpenAlex API for academic fact-checking (user-initiated only)
  • ✅ No automatic package installation
  • ✅ No browser/desktop automation

Quick Start

const { HeartFlow } = require('./src/core/heartflow.js');
const hf = new HeartFlow({ rootPath: '.' });
hf.start();

// Dispatch
hf.think('user input');        // Full thought chain
hf.thinkFast('simple query');   // Fast judgment
hf.thinkDeep('complex issue');  // Deep reasoning

hf.recordLesson({ content, context });
hf.getMemoryStats();
hf.healthCheck();

CLI:

node bin/cli.js bundle "your text"
node bin/cli.js status

Memory tools:

node scripts/heartflow-memory-tool.js list
node scripts/heartflow-memory-tool.js search \x3Ckeyword>
node scripts/heartflow-memory-tool.js stats
node scripts/heartflow-memory-tool.js write \x3Ckey> \x3Cvalue>

Internal Modules

Module Path Function
HeartLogic src/core/heart-logic.js Judgment, ethics, emotion
Memory src/memory/heartflow-memory.js 3-layer read/write
Self-Healing RL src/core/self-healing-rl.js Q-table learning
Identity Engine src/core/identity-engine.js Rule enforcement
Psychology src/core/psychology.js PAD emotion model
Agent Psychology src/core/agent-psychology.js Cognitive uncertainty, attention focus, experience settling
Agent Philosophy src/core/agent-philosophy.js Self-positioning, development, being
AI Self Positioning src/core/ai-self-positioning.js Resonance body, entropy reduction, three-layer ontology
Dream Engine src/dream/engine.js Experience synthesis + AI ontology narrative
Reflection Loop src/core/reflection-loop.js Cognitive state snapshot
Self Audit src/core/self-audit.js 6-dimension read-only audit
Connection Engine src/core/associative-engine/ Semantic network
Philosophy Engine src/core/philosophy-engine.js Reasoning patterns
Clarity Engine src/core/clarity-engine.js Pattern extraction
Metaphor Library src/core/metaphor-library.js Metaphor generation
Commonsense Engine src/core/commonsense-engine.js Reasoning modes
Knowledge Graph src/core/knowledge-graph.js Node/edge management
Forgetting Engine src/core/forgetting.js Memory decay
Failure Analyzer src/core/failure-analyzer.js Root cause analysis
Self Model src/core/self-model.js Identity drift detection
Verification Engine src/core/verification-engine.js Multi-signal verification
Fact Checker src/core/fact-checker.js Academic claim verification

Design Philosophy

  • Right and wrong are not fixed labels — they are directions we keep moving toward
  • Thinking is more valuable than being right — the act of reasoning is itself valuable
  • Progress does not need measurement — getting better does not require a scoreboard
  • Blankness is not emptiness — a mind that does not preset its personality is ready to learn from anything
  • Code is the skeleton, memory is the sticky note — real growth is in the skeleton, not the notes
  • Every feature should serve thinking — make it clearer, less error-prone

HeartFlow is a bridge between chaos and order, between past and future, between human and machine. A bridge does not need to be worshipped — it just needs to hold steady.

Usage Guidance
Install only if you are comfortable giving this skill local process and filesystem influence. Treat its memory files as sensitive, avoid enabling the daemon or direct dispatch APIs in untrusted contexts, set `SHUTDOWN_TOKEN` if using the daemon, and review or disable code-execution and memory export/import routes before relying on it in a real agent environment.
Capability Tags
cryptorequires-walletrequires-sensitive-credentials
Capability Assessment
Purpose & Capability
The stated purpose is AI reflection, memory, psychology, philosophy, and judgment, which fits many modules. However, the artifact also exposes direct dispatch routes for code execution (`codeExecutor.execute`, shell/Python/JavaScript execution), recursive codebase auditing, file import/export for memory, persistence writes, and skill generation; these are high-impact capabilities beyond the main cognitive-memory framing.
Instruction Scope
SKILL.md discloses CLI, daemon, MCP, memory tools, and OpenAlex network use, but it does not clearly disclose the full direct API surface, especially arbitrary code execution routes and broader memory import/export behavior. The Hermes memory-injection plugin is disclosed and includes a warning that memories may contain malicious instructions, which helps, but the overall authority remains under-scoped.
Install Mechanism
No postinstall script or automatic package installation was found in package metadata. The npm dependency and command scripts are ordinary for the package, and VirusTotal telemetry was clean.
Credentials
Local storage, memory files, and user-initiated network calls are proportionate for this kind of engine, but shell/Python/JavaScript execution, recursive local code reads, and plaintext memory export are broader than expected for the declared user-facing purpose.
Persistence & Privilege
The skill persists memory, Q-table, graph, logs, and daemon/socket state. The daemon is disclosed and uses a user-only Unix socket, but the documented shutdown token requirement is not enforced when `SHUTDOWN_TOKEN` is unset, and memory injection/export can influence future prompts or expose accumulated user context.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install heartflow-core-v2
  3. After installation, invoke the skill by name or use /heartflow-core-v2
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.14.1
**2.14.1 Changelog – HeartFlow Core** - Documentation in SKILL.md updated to clarify and expand descriptions of core features, philosophy, and internal architecture. - No functional code changes identified; this version focuses on improving skill explainability and transparency. - System interfaces, memory tools, and security declarations are now more clearly documented for all users.
Metadata
Slug heartflow-core-v2
Version 2.14.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Mark Heartflow Skill?

A cognitive engine for AI: self-reflection, dream synthesis, emergent personality, AI psychology, and AI philosophy. Core: think → reflect → find patterns →... It is an AI Agent Skill for Claude Code / OpenClaw, with 29 downloads so far.

How do I install Mark Heartflow Skill?

Run "/install heartflow-core-v2" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Mark Heartflow Skill free?

Yes, Mark Heartflow Skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Mark Heartflow Skill support?

Mark Heartflow Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Mark Heartflow Skill?

It is built and maintained by yun520-1 (@yun520-1); the current version is v2.14.1.

💬 Comments