Skip to content

Local-first 🧠 memory for Hermes Agent that lives in your Obsidian vault and remembers project context. Nightly 😴 dream passes turn repeat corrections into confirmed preferences with measurable confidence. Adapters ship for Claude Code, Codex, and OpenClaw, with an MCP server for anything else.

TypeScript
19.7 KB
Raw Blame

Variants - agent-presence-self-improvement

Audit trail for the phase-0 brainstorm. The wave-shape variants were generated in-session for this run; the same text lives at cli-output/consultant.md with the prompt at cli-output/prompt.md. Below them, each feature's rejected alternatives are recorded with the arguments that closed them, and the anchor-by-anchor premise table closes the document.

Wave shape

Variant 1: one installer feature, lessons and rewrites folded into it

  • Approach: Treat all four cards as one install-surface feature: the instruction block, the lessons block, the ChatGPT naming and even the rewrite lane hang off o2b install as steps of one orchestrator, with one manifest recording everything the tool wrote.
  • Trade-offs:
    • Pros: one verb to learn; one consent pass; the lock/manifest story is single.
    • Cons: the rewrite lane has no install step at all - it is a brain verb family with its own gates, so folding it in is a category error; the lessons approval lifecycle is independent of host detection (a vault with zero installed hosts still promotes lessons); a mega-orchestrator turns every later feature into an o2b install regression surface; the card asks for install presence, not install monopoly.
  • Complexity: large
  • Risk: high

Variant 2: one shared writer, two producers, separate kernels (chosen)

  • Approach: Build one block-id-parametrised rules-block writer over the existing managed-block editor; the installer lane and the lessons lane are its two producers with separate lifecycles and consent surfaces; the rewrite loop is a self-contained kernel lane beside them (task sets, preregistered spec, envelope rollouts, selection and held-out gates, apply through the existing proposal pipeline); ChatGPT desktop is detection-plus-docs on the codex adapter. Lanes own disjoint files; shared registries are append-only.
  • Trade-offs:
    • Pros: exactly one write class for harness-owned files, so one census story and one audit trail; no producer forks the editor; each kernel is testable in isolation; the lanes parallelize behind two early pure commits.
    • Cons: two consent surfaces for rules files (install's and the lessons verbs'), which the docs must keep distinct; the writer contract must be frozen before Lane C starts, adding an ordering constraint the mega-orchestrator would not have.
  • Complexity: medium
  • Risk: low

Variant 3: per-feature writers

  • Approach: Let each lane write its own block logic directly against insertManagedBlock: the installer keeps its own compute/apply, the lessons verbs their own.
  • Trade-offs:
    • Pros: no cross-lane contract; each lane ships independently with zero waiting.
    • Cons: two implementations of the drift refusal, the backup ladder, the idempotence byte-compare and the marker discipline, guaranteed to diverge; two census stories for one write class; the wave's stated spine (one apply-gated rules-file write path) is not built.
  • Complexity: small per lane, large in total
  • Risk: medium

Recommended: Variant 2. The board's own scope option names the spine as one write path plus the closed skill loop; Variant 3 dissolves the spine and Variant 1 miscategories the rewrite lane.

Feature: install writes the brain-usage block (t_ba41a78a)

  • Rejected: a standalone verb (o2b brain contract install). Cleaner ownership, but it fragments the surface the card names, needs its own consent ladder duplicated from the install one, and leaves o2b install --check and the detect table blind to the block. Rejected in favor of a step inside runTarget riding the existing consent lane.
  • Rejected: per-adapter installer logic (each adapter gains an instruction step). The target-to-file map would be re-derived per adapter against the one precedence table the checker already owns, and hosts without adapters (generic) would have no path at all. Rejected in favor of one orchestrator-level step deriving the target from HOST_INSTRUCTION_PRECEDENCE.
  • Rejected: writing the block at the project cwd instead of the vault root. Hosts read instruction files at the project root, but the readiness probe audits the vault root, InstallEnv has no cwd semantics today, and a cwd target drags an OUT_OF_VAULT_STATE row and sweep attribution. Vault-root-only is recorded as the v1 boundary with the override as a named follow-up.
  • Rejected: a second managed block for the write gate beside the docs pointer snippet. The editor allows exactly one pair per marker spelling; two pairs of the default spellings throw. One canonical body merging pointer usage and gate clauses is the upgrade path for existing manual installs instead.
  • Rejected: new InstallTargetId or new INSTALL_STEP_KINDS entries. ManifestEntry.target is typed to the target vocabulary held equal to the adapter registry in both directions; a pseudo-target has no adapter and fails the host-facts census. The existing "managed-block" step kind fits.

Feature: operator-approved lesson promotion (t_1e952e43)

  • Rejected: one block, two body sections (usage gate and lessons in the same marker pair). It couples two features' lifecycles, makes the contract audit's clause regexes see lessons text, and turns every lessons refresh into a writeback-contract event. Two block ids with distinct marker spellings keep the audit untouched.
  • Rejected: dream-tail auto-refresh of blocks under management (consent-once-then-derive). It would make the dream pass a rules-file writer, which regenerateLessonsQuiet's Brain-scoped discipline and the standing-rules guarantee both forbid; the ambient write would also surprise operators reading the dream's write list. Refresh is operator-only this wave; the middle ground is recorded as a follow-up decision.
  • Rejected: approval state in Brain/ (a note or frontmatter the agent can read). An agent that can read its own approval ledger can social-engineer around it; the derived store under .open-second-brain/ is the existing home of machine-owned state and is already swept by the state-surface census.
  • Rejected: an MCP approve verb (agent-facing promotion). Agent-facing verbs never approve their own lessons - the trust boundary the card exists to create. MCP exposure is report-only counts.
  • Rejected: a default scope vocabulary for qualification. A hardcoded list of English scope words deciding what counts as agent behavior is exactly the hardcoded natural-language phrase pattern the project forbids; lessons.promotion.scopes is operator-declared and absent/empty disables promotion with a named count.

Feature: benchmark-gated skill rewrites (t_635e3e72)

  • Rejected: a second apply path for rewrites (a dedicated rewrite writer). The proposal pipeline already owns gated skill writes: staged pending proposals, human accept, write-ahead journal, compensating rollback, sticky reject. A parallel writer would fork the gate and double the census surface. The one extension the pipeline needs is the journal's prior-content copy, because existence-only rollback cannot restore an overwritten body.
  • Rejected: an in-process model loop for rollouts (the kernel executes tasks itself). The tree has no agent runtime in core and must not grow one; generation and execution are envelope-mediated through needs-llm-step, exactly the page-draft flow the CLI already drives.
  • Rejected: free-form prose scoring (an LLM judge deciding pass/fail). An external judge can never be the selection metric: it is fail-open by contract, unverifiable and language-coupled. Structural predicates over returned artifacts score; the optional judge stays advisory through the command bridge, never moving the metric.
  • Rejected: repository-local task sets as the primary home. Operator skills are vault-local and the skills root may sit outside the vault; repo fixtures cannot travel with an operator's skill. Vault-side Brain/skill-benchmarks/ is primary; repo fixtures exist only for shipped-skill tests.
  • Rejected: a single collapsed quality score. bench/types.ts explicitly separates metric families; collapsing them hides a rewrite that wins by dropping checks. The selection metric stays a rate over tasks, and the grade record carries per-check outcomes so the drop is visible.
  • Rejected: held-out results fed back between rounds. The decision-model discipline is explicit: held-out is measured once on the final champion, never looped into optimization. The envelope builder asserts dev membership by construction.
  • Rejected: versioned skill publishing (a version chain or release surface). Assigned to another board card; this wave keeps exactly one prior-content backup per accept attempt.

Feature: ChatGPT desktop reach (t_8b793376)

  • Rejected: a separate chatgpt-desktop install target with its own adapter. ChatGPT desktop reads the same $CODEX_HOME/config.toml; a second adapter would fork detect/plan/apply/verify for one config path, break the host-facts census equality between vocabulary and registry, and leave two targets claiming one file. Alias-of-codex is the pinned decision: the codex target's detect note names ChatGPT desktop when the codex binary is absent, and the README and codex guide carry the discovery rows.
  • Rejected: renaming the codex target's label to cover both products. The label is quoted in docs, help text and tests; renaming churns every surface for zero behavioral gain, and "Codex CLI" remains the accurate name for the subprocess path. The note and docs carry the alias instead.
  • Rejected: ChatGPT-specific detection (app-bundle probing, process scanning). Host detection in this tree keys on files and config, never on manifests or running processes; a bundle probe would be a new detection class with platform-specific failure modes for a target whose file surface is already fully served. The binary-absent-plus-config-present signal is the honest, file-keyed case.

Orchestrator decision

Chosen: Variant 2 (the recommended wave shape; every per-feature decision above taken as recorded).

Premise verification

Spot-checked against the live worktree at 07125f6d (branch feat/agent-presence-self-improvement) on 2026-11-02. No premise was refuted; no card is dropped. Corrections are recorded for the plan.

Card Premise Key anchors checked live Result
t_635e3e72 confirmed src/core/surface/skills.ts:80 (SKILL_FILE_NAME), :83 (skillRoots), :162 (discoverSkills); src/core/brain/skill-usage.ts:106 (deriveSkillUsage), :235 (skillUsageRankingWeights); src/core/brain/skill-proposals.ts:90 (pattern kinds), :766 (acceptSkillProposal), :975 (SkillAcceptLockedError), :868 (skills-root materialize, overwrite: false, no vaultForRelativePath), :1393 (evolveAcceptedProposal, overwrite: true, frontmatter merge only); src/core/brain/skill-accept-journal.ts (existence flags only, no prior-content field); src/core/decision-model/eval-spec.ts:41 (hash-order-30-70), :56 (`promote hold
t_ba41a78a confirmed src/core/brain/writeback-contract.ts:29-33 (NO INSTALLER LIVES HERE docblock), :98-102 (AGENT_INSTRUCTION_FILES), :137-145 (HOST_INSTRUCTION_PRECEDENCE: claude-code/codex/cursor/opencode/aider/gemini-cli), :173-187 (WRITEBACK_CONTRACT_REQUIREMENTS, three clauses), missingWritebackGateClauses pure; src/core/install/managed-block.ts:21-22 (DEFAULT markers), insertManagedBlock idempotent, validateMarkers refusing multiple/unpaired/reversed; src/cli/install/install.ts:415-462 (fail-closed consent, exit 6, headless-refused, verdicts yes-flag/interactive-yes); src/core/brain/protect.ts:433 (backupHostFile, exclusive create 0600, laddered); src/core/doctor-readiness.ts (probe audits opts.vault, shadow triples fail); src/core/runtime/host-facts.ts:61-88 (INSTALL_TARGET_ID, ten members, NO claude-code); src/core/state/surfaces.ts:297-298/:580/:594 (install/protect lock rows) Exact except the scope correction: the recon's "claude-code writes CLAUDE.md" installer row is unreachable - there is no claude-code install target (the precedence docblock states it), so the installer maps registered targets only (codex, cursor, opencode, aider to AGENTS.md; gemini-cli to GEMINI.md) and the mapping derives from the table so a future target inherits it. The checker defines conformance and nothing writes today; the installer lane is genuinely absent.
t_1e952e43 confirmed src/core/brain/types.ts:89-103 (BRAIN_PREFERENCE_STATUS = unconfirmed/confirmed/quarantine, no approval state), :106-111 (BRAIN_CONFIDENCE); src/core/brain/lessons.ts:73-79 (LESSON_TIER), :155-253 (computeLessons, confirmed+quarantine filter), :470-483 (regenerateLessons, idempotent), :509-515 (regenerateLessonsQuiet); src/core/brain/dream-refresh.ts:265-280 (automatic firstApplied promotion, quarantine ladder); src/core/brain/content-hash.ts:1-30 (observability-not-enforcement pinning); src/core/brain/write-gate.ts:20-56 (inbound lanes signals/notes/ingest); src/core/brain/standing-rules.ts (operator channel, never machine-written); no o2b brain lessons verb exists; src/core/install/manifest.ts:37 (derived-store lock home) Exact except HOST_INSTRUCTION_PRECEDENCE at :137-145 (recon said :136-143). No approval-hold tier exists and promotion is automatic today; the write class for harness-owned files does not exist; both halves of the card are real.
t_8b793376 confirmed (verified inline; the recon report was not present at design time) grep for ChatGPT across src/, docs/, README.md: zero hits; src/core/install/adapters/codex.ts:91 (TARGET), :121 (Bun.which("codex")), :317-334 (detect: status keyed on declared servers, binary-presence note), $CODEX_HOME-or-~/.codex via src/core/runtime/host-facts.ts; src/core/install/adapters/all.ts (ten side-effect registrations); src/core/install/types.ts:167-198 (adapter contract); tests/core/architecture/host-facts-census.test.ts (vocabulary equals registry in both directions); README.md:80 (Codex row in the supported-clients table) Exact. No ChatGPT surface exists anywhere; the codex adapter serves the shared config file with the TOML-merge fallback already working when the binary is absent; the residue is detection notes plus docs, and the alias-of-codex decision is pinned in design.md. The external premise (ChatGPT desktop reads the codex config) was accepted at scope review per the batch report.