neuroplast
v1.3.2
Published
Repository-local cognitive augmentation toolkit implementing the Local Cognitive Protocol for local repositories.
Maintainers
Readme
Neuroplast
Neuroplast is a repository-local project mind for humans and AI systems, and an implementation of the Local Cognitive Protocol (LCP).
Normative protocol source:
LCP is the standard. Neuroplast is an implementation of that standard.
Neuroplast remains domain-agnostic. It can support software repositories, research repositories, marine biology repositories, educational repositories, collaborative learning repositories, and other local knowledge contexts.
Neuroplast preserves its existing /neuroplast/ working layout while also installing an explicit .lcp/ bridge entrypoint for visible LCP alignment.
Current version statement:
Neuroplast v1.3.2 implements LCP v1
Quick Start
Initialize Neuroplast in any project directory:
npx neuroplast initInclude shared Obsidian config files:
npx neuroplast init --with-obsidianApply one-time versioned updates and safe managed-file refreshes:
npx neuroplast syncPreview sync changes without writing files:
npx neuroplast sync --dry-runEmit machine-readable output for automation around init or sync:
npx neuroplast init --json
npx neuroplast sync --jsonPublished JSON schemas for automation consumers:
schemas/init-json.schema.jsonschemas/sync-json.schema.jsonschemas/validate-json.schema.json
Validate the LCP bridge, Neuroplast profile, and metadata:
npx neuroplast validateEmit machine-readable validation results for CI or wrapper tooling:
npx neuroplast validate --jsonRun the full maintainer pre-release verification flow:
npm run release:verifyRun the repository reliability suite while developing Neuroplast itself:
npm testThe initializer is non-destructive: existing files are skipped and never overwritten during init.
init also creates a minimal root ARCHITECTURE.md scaffold when that file does not already exist, so a fresh repository can complete the first validation loop immediately.
By default, Neuroplast writes working files under /neuroplast/ and installs a companion .lcp/ bridge layout.
The installed /neuroplast/README.md is the practical orientation file for people opening the deposited Neuroplast files inside a consumer repository.
Neuroplast now also ships an optional installed neuroplast/current-context.md briefing capsule so repositories can keep a compact current-state summary without replacing the canonical memory artifacts. When the file still matches its managed baseline, npx neuroplast sync can auto-refresh it from the latest plan and nearby durable artifacts.
Neuroplast now also supports an explicit active-plan pointer at neuroplast/plans/.active-plan so routing and briefing generation do not have to rely only on newest-file heuristics.
init also runs sync after file bootstrap so new package migrations are applied once per version.
First Successful Loop
After npx neuroplast init, you can open neuroplast/README.md for a practical overview, then read these canonical files in order before doing any real work:
.lcp/manifest.yamlneuroplast/WORKFLOW_CONTRACT.mdneuroplast/manifest.yamlneuroplast/capabilities.yamlneuroplast/interaction-routing.yaml- Any active workflow extensions declared in
neuroplast/manifest.yaml - The current instruction file such as
neuroplast/reverse-engineering.md,neuroplast/reconcile-conflicts.md,neuroplast/conceptualize.md, orneuroplast/act.md
Use the instruction files with this operating model:
- Start with
neuroplast/act.mdfor normal bounded work once the project already has enough context. - Start with
neuroplast/reverse-engineering.mdwhen an existing codebase needs code-grounded project-mind reconstruction before conceptualization. - Start with
neuroplast/reconcile-conflicts.mdwhen parallel edits or merge conflicts need a preservation-first reconciliation pass. - Start with
neuroplast/conceptualize.mdwhen the project is new, the request is ambiguous, or the project mind needs reframing. - Treat
/neuroplast/project-concept/,/neuroplast/plans/,/neuroplast/project-concept/changelog/, and/neuroplast/learning/as the durable memory surface shared by the human and the AI.
After the mandatory startup files are loaded, advisory context depths can keep common execution cheaper:
- lean — add
neuroplast/current-context.md, the active plan, and the current instruction file - standard — add
ARCHITECTURE.mdplus the most relevant concept note or recent changelog entry - deep — add broader concept, learning, and adjacent plan context for reframing or higher-risk work
Use short prompts carefully:
- Prefer explicit instruction-file requests or explicit step names when possible.
- If a repository defines shared interaction-routing rules, use them before interpreting prompts like
go ahead,continue,plan this, orwhat's next?. - Safe defaults are:
go ahead/continueonly implyactwhen a bounded active objective already exists;plan this/reframe thisshould useconceptualizewhen the work is new or ambiguous;what's next?should inspect the current plan rather than execute work automatically.
Terminal-first portability proof walkthrough
The terminal-only path is the current actively verified portability proof for Neuroplast because it exercises the workflow from the filesystem contract alone.
Use this first loop in a realistic consumer repository:
- Run
npx neuroplast initin the target repository. - Read the LCP bridge manifest, the Neuroplast contract, the Neuroplast manifest, the capability profile, and any active extensions.
- Review the root
ARCHITECTURE.mdscaffold created byinit, or confirm your existing architecture file. - Add one concept artifact under
neuroplast/project-concept/and one execution plan underneuroplast/plans/. - Execute one bounded step through
neuroplast/act.md. - Run
npx neuroplast validateto confirm the LCP bridge and Neuroplast profile are still valid. - On later package updates, run
npx neuroplast syncto apply package-managed refreshes without overwriting local edits.
This walkthrough shows the file contract in action without requiring any editor-specific integration.
LCP Relationship
- LCP is the normative external protocol source.
- Neuroplast is an implementation of LCP for repository-local cognitive augmentation.
.lcp/provides the LCP-facing bridge entrypoint./neuroplast/remains the Neuroplast-owned working layout and compatibility profile.- CLI/runtime behavior is Neuroplast tooling, not LCP core semantics.
See:
docs/lcp-mapping.mddocs/lcp-compatibility.mddocs/domain-generalization.mddocs/migration-to-lcp.md
Managed File Updates (Versioned Migrations)
Neuroplast now supports one-time versioned migrations plus safe refreshes for library-managed files under /neuroplast/.
- Sync state is persisted in
neuroplast/.neuroplast-state.json. - Each migration has an ID and target version.
- Applied migrations are recorded so they only run once.
- Managed package files also store a baseline content hash and last synced version.
- Sync evaluation runs on all package version updates, including patch releases.
- Downgrade detection skips automatic sync; use
--forceto override. - Use
--backupwithsyncto keep pre-update file copies underneuroplast/.backups/.
Managed refresh behavior
- Missing managed workflow, adapter, and bundled extension files are recreated during
sync. - Missing managed adapter bootstrap assets under
neuroplast/adapter-assets/are recreated duringsync. - Unchanged managed files are refreshed to the latest packaged version.
- Locally modified managed files are preserved and reported instead of being overwritten.
- Older installs without baseline metadata only adopt a file into safe refresh management when the current file already matches the packaged content exactly.
Sync behavior by version
- Same version: sync is skipped.
- Higher version (major/minor/patch): sync runs once and records new sync version.
- Lower version (downgrade): sync is skipped by default.
Current sync behavior
- Tag backfill migration enforces required Obsidian tags across managed markdown folders under
/neuroplast/. - Governed sync scope excludes
/neuroplast/.obsidian/and/neuroplast/.backups/. sync --dry-runnow announces preview mode explicitly and reports create/update/preserve/adopt/unchanged counts before any real write.
Validation Trust UX
- Human-readable validation output now includes a clear next corrective action for warnings and errors.
init --jsonandsync --jsonnow emit machine-readable action summaries for wrapper tooling while preserving the human-readable default output.npx neuroplast validate --jsonemits machine-readable findings and summary counts for CI or wrapper tooling.npx neuroplast route --jsonemits machine-readable phrase-resolution output for canonical interaction-routing inspection.npx neuroplast route --jsonnow also includes a recommended context depth and briefing emphasis so wrappers can load less context for the resolved intent.- Published JSON schemas now document the stable payload contracts for
init --json,sync --json,validate --json, androute --jsonwithin the current major version. validate --jsonnow includesschemaVersion, and the stable payload contract for the current major version is documented inschemas/validate-json.schema.json.- Validation now also checks sync-state parseability, the canonical interaction-routing artifact, and protected-phrase overlay safety.
- Validation now also checks the presence and canonical references of the shared adapter bootstrap asset family under
neuroplast/adapter-assets/. - Validation now also applies an advisory size-budget check to
neuroplast/current-context.mdwhen that briefing capsule is present. synccan now auto-refreshneuroplast/current-context.mdfrom the latest active plan while still preserving local edits.- Validation now also warns when
neuroplast/current-context.mdis older than the latest plan or changelog context that feeds it. - The generated
current-context.mdbriefing now includes route-aware reading hints foract,inspect-current-plan, andconceptualizeflows. - Validation now checks that
neuroplast/plans/.active-planresolves correctly when present, and routing/briefing generation prefer it over newest-plan fallback.
Compatibility and Upgrade Policy
Stable within a major version
- CLI command names:
init,sync,validate,route - The
/neuroplast/root layout and required folder paths - Root
ARCHITECTURE.mdas the canonical architecture artifact - Core manifest document-role paths and required workflow files
- Non-destructive
initbehavior for existing files - Non-destructive
syncbehavior for locally edited managed files validate --jsonschema contract for the activeschemaVersion
May evolve within a major version
- Human-readable CLI output wording
- Additive validation findings and documentation improvements
- Additional optional bundled extensions or additive metadata fields
- Documentation-only adapter guidance
- Copy/paste-ready adapter bootstrap assets that still preserve canonical routing semantics
Deprecation and upgrade expectations
- When practical, deprecations should be documented before removal rather than changed silently.
- Release notes should state whether consumers need to run
npx neuroplast sync,npx neuroplast sync --dry-run, or no follow-up command. - If a release changes managed assets or upgrade behavior materially, maintainers should publish upgrade notes or a migration guide alongside the change.
Using validate --json in CI
Use validate --json when a consuming repository wants machine-readable pass/fail output without scraping human logs.
Example GitHub Actions step after Neuroplast has been initialized in the repository:
- name: Validate Neuroplast contract
run: npx neuroplast validate --jsonCurrent CI consumer expectations:
- exit code
0means no validation errors were found - exit code
1means at least one validation error was found schemaVersionidentifies the machine-readable payload contractsummary.errors,summary.warnings, andfindingscan be consumed by wrapper tooling
If your automation depends on the JSON shape, pin the Neuroplast major version and review schemas/validate-json.schema.json when adopting a newer major release.
Using route --json in wrapper tooling
Use route --json when a wrapper, adapter shim, or local automation layer wants deterministic inspection of how Neuroplast resolves a short prompt.
Examples:
npx neuroplast route "go ahead" --json
npx neuroplast route "what's next?" --jsonCurrent wrapper expectations:
schemaVersionidentifies the machine-readable payload contractphraseechoes the inspected promptroutingFileidentifies the canonical routing artifact used for resolutionresolution.intentidentifies the canonical routed intentresolution.typedistinguishes routed phrases from clarify fallback
Maintainer Release Operations
- Run
npm run release:verifybefore publish. - The release verification flow runs
npm run validate,npm test, checks thenpm pack --jsonpayload against expected shipped assets, and performs a packed-install smoke test. - Repo-local maintainer assets such as
neuroplast/local-extensions/package-maintainer/are intentionally excluded from the published package payload.
Optional Workflow Extensions
- Bundled reusable workflow extensions are installed under
neuroplast/extensions/. - Repo-local custom extensions may be created under
neuroplast/local-extensions/. - Activate extensions in
neuroplast/manifest.yamlunderextensions.active_bundledandextensions.active_local. - Active extensions are additive guidance only and must not override the core workflow contract.
- Read active extensions after the core contract/manifest/capabilities documents and before executing the matching canonical instruction file.
- Use the seamless step-loading convention: for each active extension, load the matching file for the current phase when it exists.
- Active extensions should include a
README.md, the additive boundary reminder, and at least one canonical step file. - Bundled extensions shipped with Neuroplast:
verification-firstartifact-synccontext-continuity
- The
package-maintainerextension in this repository is repo-local only and is not shipped as part of the published package.
Portability Support Matrix
- Actively verified means the environment has a maintained first-loop proof path that is rerun against the canonical file contract.
- Documentation-only means the guide is kept aligned with the contract, but it is not yet treated as a separately verified portability proof.
| Environment | Status | Capability assumptions | Notes |
| --- | --- | --- | --- |
| Terminal-only | Actively verified | File reads, file writes, and terminal commands | Canonical proof path for init -> read files -> execute one loop -> validate -> later sync. |
| OpenCode | Documentation-only | File reads and writes; terminal access may vary by runtime | Guide stays aligned with the contract but is not yet maintained as a separately verified proof path. |
| Claude Code | Documentation-only | File reads and writes; tool permissions may vary; terminal usually available | Use the same file contract and recordkeeping path as the terminal proof. |
| Cursor | Documentation-only | File reads and writes; editor automation may vary | Treat editor assistance as convenience, not workflow authority. |
| Codex CLI | Documentation-only | File reads and writes; terminal access usually available | Thin wrapper over the same routing contract, but not yet a separately rerun proof path. |
| Windsurf | Documentation-only | File reads and writes; runtime capabilities may vary by mode | Fall back to the file contract when tool support is partial. |
| VS Code + Copilot | Documentation-only | File reads and writes; terminal availability depends on local setup | Keep the workflow grounded in files rather than editor chat state. |
What This Repository Is
This repository contains instruction files that help a human and an AI maintain a usable project mind through a repeatable process:
- Orient to the project and preserve durable context
- Produce or refresh architecture/project-map artifacts
- Execute bounded work sessions
- Record what changed
- Capture reusable lessons learned
It is set up as a workflow package template rather than a traditional code application.
Current Repository Contents
Source-of-truth package files in this repository:
src/instructions/— canonical instruction templates copied byneuroplast initREADME.mdcurrent-context.mdmanifest.yamlcapabilities.yamlWORKFLOW_CONTRACT.mdconceptualize.mdreverse-engineering.mdreconcile-conflicts.mdPLANNING_INSTRUCTIONS.mdact.mdCONCEPT_INSTRUCTIONS.mdCHANGELOG_INSTRUCTIONS.mdthink.md
src/obsidian/.obsidian/— optional shared Obsidian config templatessrc/extensions/— optional bundled workflow extensions and authoring scaffoldsrc/adapters/— optional environment guidance documentsbin/neuroplast.js— CLI initializer that creates folders and copies templates.gitignore— currently ignores.obsidian/workspace.json
Installed output in target projects (created by npx neuroplast init):
neuroplast/README.md— practical orientation guide for using the installed Neuroplast filesneuroplast/current-context.md— optional compact briefing capsule for the active objectiveneuroplast/WORKFLOW_CONTRACT.mdneuroplast/manifest.yamlneuroplast/capabilities.yamlARCHITECTURE.md— minimal root architecture scaffold created duringinitwhen missingneuroplast/conceptualize.mdneuroplast/reverse-engineering.mdneuroplast/reconcile-conflicts.mdneuroplast/PLANNING_INSTRUCTIONS.mdneuroplast/act.mdneuroplast/CONCEPT_INSTRUCTIONS.mdneuroplast/CHANGELOG_INSTRUCTIONS.mdneuroplast/think.mdneuroplast/extensions/— optional bundled workflow extensions and shared scaffoldingneuroplast/local-extensions/— optional repo-local custom workflow extensionsneuroplast/adapters/— documentation-only environment guidesneuroplast/adapter-assets/— copy/paste-ready tool-facing bootstrap assetsneuroplast/.obsidian/(optional via--with-obsidian)
Intended Folder Structure (Created During Workflow)
The instruction files reference these folders, which are expected to be created as part of the process:
/neuroplast/project-concept//neuroplast/project-concept/changelog//neuroplast/learning//neuroplast/plans/
Workflow Overview
1) Project-Mind Orientation
Start from neuroplast/WORKFLOW_CONTRACT.md, then choose the current instruction:
neuroplast/act.mdfor normal bounded workneuroplast/reverse-engineering.mdfor code-grounded reconstruction of project context from an existing repositoryneuroplast/reconcile-conflicts.mdfor explicit conflict-resolution and competing-edit reconciliation sessionsneuroplast/conceptualize.mdwhen the work is new, ambiguous, or needs reframing
neuroplast/conceptualize.md points to the structured context rules in neuroplast/PLANNING_INSTRUCTIONS.md.
neuroplast/reverse-engineering.md feeds code-grounded evidence into neuroplast/conceptualize.md when the repository exists but the durable project mind does not yet match reality.
neuroplast/manifest.yaml provides the canonical machine-readable map of workflow files, roles, and portability expectations.
neuroplast/capabilities.yaml provides the advisory machine-readable profile for environment limits and graceful degradation.
Optional environment guides live under neuroplast/adapters/ and explain how to apply the same contract in specific tools without changing workflow behavior.
Copy/paste-ready tool-facing bootstrap assets live under neuroplast/adapter-assets/ and are intended to be copied into destination-like tool formats such as AGENTS.md, CLAUDE.md, OpenCode kebab-case skills, or thin OpenCode agent files without changing canonical routing semantics. In the bundled OpenCode pair, neuroplast-planner is a strict read-only planning agent and neuroplast-orchestrator is the execution agent.
Those OpenCode assets now also recommend a success-oriented response shape so planner and orchestrator outputs stay more uniform about scope, verification, blockers, handoff, and next-step clarity.
Optional workflow extensions live under neuroplast/extensions/ (bundled shared extensions) or neuroplast/local-extensions/ (repo-local) and can add custom guidance without changing the canonical workflow behavior.
2) Project-Mind Outputs
Generate layered project-mind documents as needed:
- Orientation artifacts for major work surfaces, subject areas, or domains
- Detailed context artifacts for those same areas when needed
- Root
ARCHITECTURE.mdas the canonical architecture or project-map artifact - Optional supporting notes under
/neuroplast/project-concept/
Obsidian wiki-links ([[File Name]]) are supported and recommended, but the workflow must remain understandable in plain markdown.
3) Bounded Work Sessions
Follow neuroplast/act.md in order:
- Read project concept artifacts
- Read
neuroplast/WORKFLOW_CONTRACT.md - Ensure
ARCHITECTURE.mdexists in the repository root - Update the active plan in
/neuroplast/plans/ - Execute the next bounded step with references to
/neuroplast/learning/ - Run concept/changelog/think instructions
Reverse-Engineering Sessions
Follow neuroplast/reverse-engineering.md when the repository already exists but the project mind needs to be reconstructed from code evidence before normal conceptualization and execution can proceed.
4) Changelog Discipline
neuroplast/CHANGELOG_INSTRUCTIONS.md expects date-based changelog files (YYYY-MM-DD.md) under /neuroplast/project-concept/changelog/ with links to associated plans. When collisions or competing same-day edits exist, use neuroplast/reconcile-conflicts.md first so the final changelog preserves valid facts from both sides.
5) Learning Capture
neuroplast/think.md defines how to store non-sensitive lessons in /neuroplast/learning by category.
Prerequisites
- Git for versioning
- Obsidian optional for wiki-link navigation and graph-based note workflow
Notes and Caveats
- Some referenced files/folders are not present yet in the current repo (they are expected to be created by following the workflow).
- Keep architecture references consistent as
ARCHITECTURE.md. - This repo currently functions as a process framework and documentation system.
neuroplast/WORKFLOW_CONTRACT.mdis the canonical portability contract for the workflow.neuroplast/manifest.yamlis the canonical machine-readable workflow map.neuroplast/capabilities.yamlis the advisory capability profile for constrained environments.neuroplast/adapters/contains optional environment guides and is not an alternate workflow definition.- Terminal-only is the current actively verified portability proof path; other bundled environment guides are documentation-only until separately verified.
neuroplast/extensions/contains optional bundled workflow extensions that are only active when declared inneuroplast/manifest.yaml.neuroplast/local-extensions/is reserved for repo-local custom extensions declared inneuroplast/manifest.yaml.- This repository keeps
package-maintaineras a repo-local extension rather than a published bundled extension. - Instruction frontmatter is workflow metadata only and intentionally excludes model-tuning fields.
neuroplast validatechecks contract structure, required files, metadata parseability, instruction frontmatter, environment-guide boundaries, and whether any active workflow extensions follow the minimal file convention.- Validation is scoped to contract and metadata compliance, not environment orchestration.
npm testruns black-box CLI regression tests against temporary repositories.
Suggested Next Steps
- Create the
/neuroplast/...folders referenced above. - Add an initial project concept in
/neuroplast/project-concept/. - Start daily changelog files in
/neuroplast/project-concept/changelog/. - If multiple contributors create conflicting edits to the same artifact, run
neuroplast/reconcile-conflicts.mdbefore finalizing the canonical file. - Add a root architecture file matching your preferred naming convention.
