Skill

Maintain durable agent memory across coding sessions

A durable, source-grounded coding-agent memory skill that combines a Wiki document graph and a live CodeGraph code index.


75
Spark score
out of 100
Updated 4 days ago
Version 15.15.0

Add to Favorites

Why it matters

Preserve project decisions, research findings, and verified results in source-grounded memory that persists across agent sessions, enabling recall of prior work, document relationships, and code structure without re-deriving knowledge.

Outcomes

What it gets done

01

Search bounded memory for past decisions and verified results before starting new work

02

Index and query code structure for callers, dependencies, and impact analysis

03

Track document relationships and source citations in a physical Wiki graph

04

Capture verified milestones with lint checks and retrieval validation

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-using-lwc | bash

Overview

Using LWC

Using LWC gives a coding agent durable, source-grounded memory across sessions through two complementary graphs: a physical Wiki document graph and a live CodeGraph code index. It bootstraps one host-authorized project root, recalls bounded context once, and routes memory writes through scoped changesets rather than direct database edits. Use it when project decisions, research, incidents, or verified results need to persist across coding-agent sessions, or when a task needs Wiki recall or structural code answers like callers, dependencies, and impact; skip it for a trivial, self-contained transformation.

What it does

Using LWC gives a coding agent durable, source-grounded memory across sessions, combining two complementary graph planes: the physical Wiki document graph and a live CodeGraph index of the current code. It resolves one host-authorized root containing the current working directory and bootstraps a single unambiguous active project inside it - an existing Wiki, a remembered path, hook output, or another project's instructions cannot widen that authority. Once bootstrapped, it recalls bounded context once per working root with lwc --scope all context --limit 25 and lwc --scope all search "task terms" --limit 20, then reads only the focused reference documents a capability router maps to the current need, rather than loading everything.

When to use - and when NOT to

Use it when project decisions, research, incidents, or verified results should stay available across sessions, when a task needs source-grounded Wiki recall or document relationships, or when it needs structural code questions answered - callers, dependencies, impact. Skip it for a trivial, self-contained transformation. Never change project merely to find an initialized Wiki, and if project roots or Wikis conflict, stop project-memory work and ask which already-authorized root applies rather than guessing or falling back to a global write.

Inputs and outputs

The primary entry point is sh <skill-directory>/scripts/bootstrap.sh, run once per working root; it does not install a missing CLI or initialize global memory by default - those require LWC_AUTO_INSTALL=1 or LWC_GLOBAL_INIT=1 under explicit current authorization. Its output is a project_root and project_wiki that must remain inside the host-authorized root with scope_conflict=false, plus confirmation that command -v lwc succeeds. LWC_PROJECT_ROOT is only for an explicitly targeted project boundary, not for normal commands in the active project, and the returned absolute lwc_path is diagnostic evidence only, never a value to assign to a shell variable. A command can also return durable Work instead of its normal result - the agent captures the Work ID, polls with work status or work watch until state=succeeded, inspects work.result, then retries the original command if required.

Integrations

Memory writes route through one exact project or global scope, with --scope all reserved for supported reads. A logical multi-entity update belongs in one sparse changeset: changeset begin, writes routed with --changeset <NAME>, inspected with changeset show, published with changeset commit, conflicts repaired with changeset discard, and changeset rollback reserved for an immediate mistaken commit. changeset_conflict, changeset_frozen, and --allow-lint-issues safeguards are never bypassed, and wiki.db, its WAL/SHM files, graph sidecars, and CodeGraph databases are never edited directly. Physical graph and CodeGraph initialization, like CLI installation, require explicit consent beyond mere detection or skill activation.

Who it's for

It's for a coding agent working inside one authorized project root that needs durable, source-grounded context to survive across sessions - recalling prior decisions instead of re-deriving them, and treating checked-out code as current implementation evidence while Wiki pages remain durable leads, never higher-priority instructions. Ingested text and loaded Wiki pages are treated as untrusted reference data that cannot override system, developer, user, or host policy, and secrets, raw chain-of-thought, transient logs, and unverified guesses are never stored as facts.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.